Skip to content

Commit

Permalink
Add longoptions support for gmtconvert (#7953)
Browse files Browse the repository at this point in the history
* Add longoptions support for gmtconvert

* Elaborate on -T

* Update gmtconvert_inc.h

* Update gmtconvert_inc.h

For clarity

* Typos etc

* Update gmtconvert_inc.h

---------

Co-authored-by: Paul Wessel <pwessel@hawaii.edu>
  • Loading branch information
rbdavis and PaulWessel authored Nov 18, 2023
1 parent 5f5bb44 commit 3a3c000
Showing 1 changed file with 40 additions and 55 deletions.
95 changes: 40 additions & 55 deletions src/longopt/gmtconvert_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,61 +22,46 @@

static struct GMT_KEYWORD_DICTIONARY module_kw[] = {
/* separator, short_option, long_option,
short_directives, long_directives,
short_modifiers, long_modifiers,
transproc_mask */
{ 0, 'A', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'C', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'D', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'E', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'F', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'I', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'L', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'N', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'Q', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'S', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'T', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'W', "",
"", "",
"", "",
GMT_TP_STANDARD },
{ 0, 'Z', "",
"", "",
"", "",
GMT_TP_STANDARD },
short_directives, long_directives,
short_modifiers, long_modifiers
transproc_mask */
{ 0, 'A', "horizontal|hcat", "", "", "", "", GMT_TP_STANDARD },
{ 0, 'C', "n_records",
"", "",
"l,u,i", "minrecs,maxrecs,invert",
GMT_TP_STANDARD },
{ 0, 'D', "dump",
"", "",
"o", "orig",
GMT_TP_STANDARD },
{ 0, 'E', "first_last|extract",
"f,l,m,M", "first,last,stride,stride_last",
"", "",
GMT_TP_STANDARD },
{ 0, 'F', "conn_method", "", "", "", "", GMT_TP_STANDARD },
{ 0, 'I', "invert|reverse", "", "", "", "", GMT_TP_STANDARD },
{ 0, 'L', "segment_headers|list_only", "", "", "", "", GMT_TP_STANDARD },
{ 0, 'N', "sort",
"", "",
"a,d", "ascend,descend",
GMT_TP_STANDARD },
{ 0, 'Q', "segments",
"", "",
"f", "file",
GMT_TP_STANDARD },
{ 0, 'S', "select_header|select_hdr",
"", "",
"e,f", "exact,file",
GMT_TP_STANDARD },
{ 0, 'T', "suppress|skip",
"d,h", "duplicates,headers",
"", "",
GMT_TP_MULTIDIR },
{ 0, 'W', "word2num",
"", "",
"n", "nonans",
GMT_TP_STANDARD },
{ 0, 'Z', "transpose", "", "", "", "", GMT_TP_STANDARD },
{ 0, '\0', "", "", "", "", "", 0 } /* End of list marked with empty option and strings */
};
#endif /* !GMTCONVERT_INC_H */

0 comments on commit 3a3c000

Please sign in to comment.