From e172f9f624ad12bd47884050af2d30dee0820744 Mon Sep 17 00:00:00 2001 From: Roger Davis Date: Mon, 22 Jan 2024 17:03:09 -1000 Subject: [PATCH] Add longoptions support for psbarb. (#8283) --- src/longopt/psbarb_inc.h | 41 +++++++++------------------------------- src/windbarbs/psbarb.c | 2 +- 2 files changed, 10 insertions(+), 33 deletions(-) diff --git a/src/longopt/psbarb_inc.h b/src/longopt/psbarb_inc.h index be2d8a1ef23..b7009dcee70 100644 --- a/src/longopt/psbarb_inc.h +++ b/src/longopt/psbarb_inc.h @@ -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 */ diff --git a/src/windbarbs/psbarb.c b/src/windbarbs/psbarb.c index 6a1733da4ad..81bee904080 100644 --- a/src/windbarbs/psbarb.c +++ b/src/windbarbs/psbarb.c @@ -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 */