Skip to content

Commit

Permalink
Add longoptions support for psbarb. (#8283)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbdavis authored Jan 23, 2024
1 parent 80d95c7 commit e172f9f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 33 deletions.
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",
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

0 comments on commit e172f9f

Please sign in to comment.