Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add longoptions support for psbarb. #8283

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 9 additions & 32 deletions src/longopt/psbarb_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,42 +25,19 @@ static struct GMT_KEYWORD_DICTIONARY module_kw[] = {
short_directives, long_directives,
short_modifiers, long_modifiers,
transproc_mask */
{ 0, 'C', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'D', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'G', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'I', "",
"", "",
GMT_C_CPT_KW,
{ 0, 'D', "offset", "", "", "", "", GMT_TP_STANDARD },
{ 0, 'G', "fill", "", "", "", "", GMT_TP_STANDARD },
{ 0, 'I', "intensity|illumination", "", "", "", "", GMT_TP_STANDARD },
{ 0, 'N', "noclip",
"c,r", "clip_norepeat,repeat|noclip_repeat",
"", "",
GMT_TP_STANDARD },
{ 0, 'N', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'Q', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'T', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'W', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'Z', "",
"", "",
{ 0, 'Q', "barbs",
"", "",
"a,g,p,j,s,w,z", "angle,fill,pen,justify,longspeed,width,uvdata",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

longspeed? Shouldn't be windspeed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the speed value which gets drawn as a long barb. longbarbwindspeed seemed a bit long to me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I must be missing something, both longspeed and windspeed have exactly the same length and +s is meant to set the the wind speed which corresponds to a long barb

GMT_TP_STANDARD },
GMT_W_PEN_KW,
{ 0, '\0', "", "", "", "", "", 0 } /* End of list marked with empty option and strings */
};
#endif /* !PSBARB_INC_H */
2 changes: 1 addition & 1 deletion src/windbarbs/psbarb.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ EXTERN_MSC int GMT_psbarb (void *V_API, int mode, void *args) {

/* Parse the command-line arguments; return if errors are encountered */

if ((GMT = gmt_init_module (API, THIS_MODULE_LIB, THIS_MODULE_CLASSIC_NAME, THIS_MODULE_KEYS, THIS_MODULE_NEEDS, NULL, &options, &GMT_cpy)) == NULL) bailout (API->error); /* Save current state */
if ((GMT = gmt_init_module (API, THIS_MODULE_LIB, THIS_MODULE_CLASSIC_NAME, THIS_MODULE_KEYS, THIS_MODULE_NEEDS, module_kw, &options, &GMT_cpy)) == NULL) bailout (API->error); /* Save current state */
if (GMT_Parse_Common (API, THIS_MODULE_OPTIONS, options)) Return (API->error);
/* Initialize GMT_SYMBOL structure */

Expand Down