Skip to content

Commit 45a7b67

Browse files
authored
Pscoast longopts (#6906)
* Changes to support pscoast long-options. * Remove debugging #ifdefs from changed gmt_init.c * Update gmt_init.c
1 parent 5b6e302 commit 45a7b67

File tree

4 files changed

+196
-67
lines changed

4 files changed

+196
-67
lines changed

src/gmt_common_longoptions.h

Lines changed: 85 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -38,36 +38,90 @@
3838
*
3939
* This table for the common options is assumed to be complete unless proven otherwise!
4040
*
41-
* separator, short_option, long_option, short_directives, long_directives, short_modifiers, long_modifiers
41+
* The multi-line per-entry format (line-breaks and horizontal spacing designed to hopefully
42+
* maximize legibility) is
43+
*
44+
* { separator, short_option, long_option,
45+
* short_directives, long_directives,
46+
* short_modifiers, long_modifiers }
4247
*/
4348

44-
{ 0, 'B', "frame", "", "", "b,g,i,n,o,s,t,w,x,y,z", "box,fill,interior,noframe,pole,subtitle,title,pen,yzfill,xzfill,xyfill" },
45-
{ 0, 'B', "axis", "x,y,z", "x,y,z", "a,f,l,L,p,s,S,u", "angle,fancy,label,hlabel,prefix,alt_label,alt_hlabel,unit" },
46-
{ 0, 'J', "projection", "", "", "", ""},
47-
{ 0, 'R', "region", "", "", "r,u", "rectangular,unit"},
48-
{ 0, 'U', "timestamp", "", "", "c,j,o", "command,justify,offset"},
49-
{ 0, 'V', "verbosity", "q,e,w,t,i,c,d", "quiet,error,warning,timing,info,compat,debug", "", ""},
50-
{ 0, 'X', "xshift", "a,c,f,r", "absolute,center,fixed,relative", "", ""},
51-
{ 0, 'Y', "yshift", "a,c,f,r", "absolute,center,fixed,relative", "", ""},
52-
{ 0, 'a', "aspatial", "", "", "", ""},
53-
{ 0, 'b', "binary", "", "", "b,l", "big_endian,little_endian"},
54-
{ 0, 'c', "panel", "", "", "", ""},
55-
{ 0, 'd', "nodata", "i,o", "in,out", "", ""},
56-
{ 0, 'e', "find", "", "", "f", "file"},
57-
{ ',', 'f', "coltypes", "i,o", "in,out", "", ""},
58-
{ 0, 'g', "gap", "", "", "n,p", "negative,positive"},
59-
{ 0, 'h', "header", "i,o", "in,out", "c,d,r,t", "columns,delete,remark,title"},
60-
{ ',', 'i', "incols", "", "", "l,o,s", "log10,offset,scale"},
61-
{ 0, 'j', "distance", "e,f,g", "ellipsoidal,flatearth,spherical", "", ""},
62-
{ 0, 'l', "legend", "", "", "D,G,H,L,N,S,V,f,g,j,o,p,s,w", "hline,gap,header,linetext,ncols,size,vline,font,fill,justify,offset,pen,scale,width"},
63-
{ 0, 'n', "interpolation", "b,c,l,n", "bspline,bicubic,linear,nearneighbor", "a,b,c,t", "anti_alias,bc,clip,threshold"},
64-
{ ',', 'o', "outcols", "", "", "", ""},
65-
{ 0, 'p', "perspective", "x,y,z", "x,y,z", "v,w", "view,world"},
66-
{ ',', 'q', "inrows", "~", "invert", "a,c,f,s", "byset,column,byfile,bysegment"}, /* Actually -qi */
67-
{ ',', 'q', "outrows", "~", "invert", "a,c,f,s", "byset,column,byfile,bysegment"}, /* Actually -qo */
68-
{ 0, 'r', "registration", "g,p", "gridline,pixel", "", ""},
69-
{ 0, 's', "skiprows", "", "", "a,r", "any,reverse"},
70-
{ 0, 't', "transparency", "", "", "", ""},
71-
{ 0, 'w', "wrap", "a,y,w,d,h,m,s,p", "annual,year,week,day,hour,min,sec,period", "c", "column"},
72-
{ 0, 'x', "cores", "", "", "", ""},
73-
{ 0, '\0', "", "", "", "", ""} /* End of list is marked with empty short-option code and strings */
49+
{ 0, 'B', "frame",
50+
"", "",
51+
"b,g,i,n,o,s,t,w,x,y,z", "box,fill,interior,noframe,pole,subtitle,title,pen,yzfill,xzfill,xyfill" },
52+
{ 0, 'B', "axis",
53+
"x,y,z", "x,y,z",
54+
"a,f,l,L,p,s,S,u", "angle,fancy,label,hlabel,prefix,alt_label,alt_hlabel,unit" },
55+
{ 0, 'J', "projection",
56+
"", "",
57+
"d,a,t,v,w,z,f,k,r", "d,a,t,v,w,z,f,k,r" },
58+
{ 0, 'R', "region",
59+
"", "",
60+
"r,u", "rectangular,unit" },
61+
{ 0, 'U', "timestamp",
62+
"", "",
63+
"c,j,o", "command,justify,offset" },
64+
{ 0, 'V', "verbosity",
65+
"q,e,w,t,i,c,d", "quiet,error,warning,timing,info,compat,debug",
66+
"", "" },
67+
{ 0, 'X', "xshift",
68+
"a,c,f,r", "absolute,center,fixed,relative",
69+
"", "" },
70+
{ 0, 'Y', "yshift",
71+
"a,c,f,r", "absolute,center,fixed,relative",
72+
"", "" },
73+
{ 0, 'a', "aspatial", "", "", "", "" },
74+
{ 0, 'b', "binary",
75+
"", "",
76+
"b,l", "big_endian,little_endian" },
77+
{ 0, 'c', "panel", "", "", "", "" },
78+
{ 0, 'd', "nodata",
79+
"i,o", "in,out",
80+
"", "" },
81+
{ 0, 'e', "find",
82+
"", "",
83+
"f", "file" },
84+
{ ',', 'f', "coltypes",
85+
"i,o", "in,out",
86+
"", "" },
87+
{ 0, 'g', "gap",
88+
"", "",
89+
"n,p", "negative,positive" },
90+
{ 0, 'h', "header",
91+
"i,o", "in,out",
92+
"c,d,r,t", "columns,delete,remark,title" },
93+
{ ',', 'i', "incols",
94+
"", "",
95+
"l,o,s", "log10,offset,scale" },
96+
{ 0, 'j', "distance",
97+
"e,f,g", "ellipsoidal,flatearth,spherical",
98+
"", "" },
99+
{ 0, 'l', "legend",
100+
"", "",
101+
"D,G,H,L,N,S,V,f,g,j,o,p,s,w",
102+
"hline,gap,header,linetext,ncols,size,vline,font,fill,justify,offset,pen,scale,width" },
103+
{ 0, 'n', "interpolation",
104+
"b,c,l,n", "bspline,bicubic,linear,nearneighbor",
105+
"a,b,c,t", "anti_alias,bc,clip,threshold" },
106+
{ ',', 'o', "outcols", "", "", "", "" },
107+
{ 0, 'p', "perspective",
108+
"x,y,z", "x,y,z",
109+
"v,w", "view,world" },
110+
{ ',', 'q', "inrows",
111+
"~", "invert",
112+
"a,c,f,s", "byset,column,byfile,bysegment" }, /* Actually -qi */
113+
{ ',', 'q', "outrows",
114+
"~", "invert",
115+
"a,c,f,s", "byset,column,byfile,bysegment" }, /* Actually -qo */
116+
{ 0, 'r', "registration",
117+
"g,p", "gridline,pixel",
118+
"", "" },
119+
{ 0, 's', "skiprows",
120+
"", "",
121+
"a,r", "any,reverse" },
122+
{ 0, 't', "transparency", "", "", "", "" },
123+
{ 0, 'w', "wrap",
124+
"a,y,w,d,h,m,s,p", "annual,year,week,day,hour,min,sec,period",
125+
"c", "column" },
126+
{ 0, 'x', "cores", "", "", "", "" },
127+
{ 0, '\0', "", "", "", "", "" } /* End of list is marked with empty short-option code and strings */

0 commit comments

Comments
 (0)