(enum mh_arg): New declaration, instead of multiple defines.
Showing
1 changed file
with
140 additions
and
137 deletions
... | @@ -39,143 +39,146 @@ struct mh_argp_data | ... | @@ -39,143 +39,146 @@ struct mh_argp_data |
39 | char *doc; | 39 | char *doc; |
40 | }; | 40 | }; |
41 | 41 | ||
42 | #define ARG_ADD 257 | 42 | enum mh_arg { |
43 | #define ARG_AFTER 258 | 43 | ARG_ADD = 256, |
44 | #define ARG_ALIAS 259 | 44 | ARG_AFTER, |
45 | #define ARG_ALL 260 | 45 | ARG_ALIAS, |
46 | #define ARG_AND 261 | 46 | ARG_ALL, |
47 | #define ARG_ANNOTATE 262 | 47 | ARG_AND, |
48 | #define ARG_AUDIT 263 | 48 | ARG_ANNOTATE, |
49 | #define ARG_AUTO 264 | 49 | ARG_AUDIT, |
50 | #define ARG_BEFORE 265 | 50 | ARG_AUTO, |
51 | #define ARG_BELL 266 | 51 | ARG_BEFORE, |
52 | #define ARG_BUILD 267 | 52 | ARG_BELL, |
53 | #define ARG_CC 268 | 53 | ARG_BUILD, |
54 | #define ARG_CFLAGS 269 | 54 | ARG_CC, |
55 | #define ARG_CHANGECUR 270 | 55 | ARG_CFLAGS, |
56 | #define ARG_CHECK 271 | 56 | ARG_CHANGECUR, |
57 | #define ARG_CLEAR 272 | 57 | ARG_CHECK, |
58 | #define ARG_COMPAT 273 | 58 | ARG_CLEAR, |
59 | #define ARG_COMPONENT 274 | 59 | ARG_COMPAT, |
60 | #define ARG_COMPOSE 275 | 60 | ARG_COMPONENT, |
61 | #define ARG_CREATE 276 | 61 | ARG_COMPOSE, |
62 | #define ARG_DATE 277 | 62 | ARG_CREATE, |
63 | #define ARG_DATEFIELD 278 | 63 | ARG_DATE, |
64 | #define ARG_DEBUG 279 | 64 | ARG_DATEFIELD, |
65 | #define ARG_DELETE 280 | 65 | ARG_DEBUG, |
66 | #define ARG_DRAFT 281 | 66 | ARG_DELETE, |
67 | #define ARG_DRAFTFOLDER 282 | 67 | ARG_DRAFT, |
68 | #define ARG_DRAFTMESSAGE 283 | 68 | ARG_DRAFTFOLDER, |
69 | #define ARG_DRY_RUN 284 | 69 | ARG_DRAFTMESSAGE, |
70 | #define ARG_DUMP 285 | 70 | ARG_DRY_RUN, |
71 | #define ARG_EDITOR 286 | 71 | ARG_DUMP, |
72 | #define ARG_FAST 287 | 72 | ARG_EDITOR, |
73 | #define ARG_FCC 288 | 73 | ARG_FAST, |
74 | #define ARG_FILE 289 | 74 | ARG_FCC, |
75 | #define ARG_FILTER 290 | 75 | ARG_FILE, |
76 | #define ARG_FOLDER 291 | 76 | ARG_FILTER, |
77 | #define ARG_FORM 292 | 77 | ARG_FOLDER, |
78 | #define ARG_FORMAT 293 | 78 | ARG_FORM, |
79 | #define ARG_FORWARD 294 | 79 | ARG_FORMAT, |
80 | #define ARG_FROM 295 | 80 | ARG_FORWARD, |
81 | #define ARG_GROUP 296 | 81 | ARG_FROM, |
82 | #define ARG_HEADER 297 | 82 | ARG_GROUP, |
83 | #define ARG_INPLACE 298 | 83 | ARG_HEADER, |
84 | #define ARG_INTERACTIVE 299 | 84 | ARG_INPLACE, |
85 | #define ARG_LBRACE 300 | 85 | ARG_INTERACTIVE, |
86 | #define ARG_LENGTH 301 | 86 | ARG_LBRACE, |
87 | #define ARG_LICENSE 302 | 87 | ARG_LENGTH, |
88 | #define ARG_LIMIT 303 | 88 | ARG_LICENSE, |
89 | #define ARG_LINK 304 | 89 | ARG_LIMIT, |
90 | #define ARG_LIST 305 | 90 | ARG_LINK, |
91 | #define ARG_MIME 306 | 91 | ARG_LIST, |
92 | #define ARG_MOREPROC 307 | 92 | ARG_MIME, |
93 | #define ARG_MSGID 308 | 93 | ARG_MOREPROC, |
94 | #define ARG_NOALIAS 309 | 94 | ARG_MSGID, |
95 | #define ARG_NOAUDIT 310 | 95 | ARG_NOALIAS, |
96 | #define ARG_NOAUTO 311 | 96 | ARG_NOAUDIT, |
97 | #define ARG_NOBELL 312 | 97 | ARG_NOAUTO, |
98 | #define ARG_NOCC 313 | 98 | ARG_NOBELL, |
99 | #define ARG_NOCHANGECUR 314 | 99 | ARG_NOCC, |
100 | #define ARG_NOCHECK 315 | 100 | ARG_NOCHANGECUR, |
101 | #define ARG_NOCLEAR 316 | 101 | ARG_NOCHECK, |
102 | #define ARG_NOCOMPOSE 317 | 102 | ARG_NOCLEAR, |
103 | #define ARG_NOCREATE 318 | 103 | ARG_NOCOMPOSE, |
104 | #define ARG_NODATE 319 | 104 | ARG_NOCREATE, |
105 | #define ARG_NODATEFIELD 320 | 105 | ARG_NODATE, |
106 | #define ARG_NODRAFTFOLDER 321 | 106 | ARG_NODATEFIELD, |
107 | #define ARG_NOEDIT 322 | 107 | ARG_NODRAFTFOLDER, |
108 | #define ARG_NOFAST 323 | 108 | ARG_NOEDIT, |
109 | #define ARG_NOFILTER 324 | 109 | ARG_NOFAST, |
110 | #define ARG_NOFORMAT 325 | 110 | ARG_NOFILTER, |
111 | #define ARG_NOFORWARD 326 | 111 | ARG_NOFORMAT, |
112 | #define ARG_NOHEADER 327 | 112 | ARG_NOFORWARD, |
113 | #define ARG_NOHEADERS 328 | 113 | ARG_NOHEADER, |
114 | #define ARG_NOINTERACTIVE 329 | 114 | ARG_NOHEADERS, |
115 | #define ARG_NOINPLACE 330 | 115 | ARG_NOINTERACTIVE, |
116 | #define ARG_NOLIMIT 331 | 116 | ARG_NOINPLACE, |
117 | #define ARG_NOLIST 332 | 117 | ARG_NOLIMIT, |
118 | #define ARG_NOMIME 333 | 118 | ARG_NOLIST, |
119 | #define ARG_NOMOREPROC 334 | 119 | ARG_NOMIME, |
120 | #define ARG_NOMSGID 335 | 120 | ARG_NOMOREPROC, |
121 | #define ARG_NOPAUSE 336 | 121 | ARG_NOMSGID, |
122 | #define ARG_NOPUBLIC 337 | 122 | ARG_NOPAUSE, |
123 | #define ARG_NOPUSH 338 | 123 | ARG_NOPUBLIC, |
124 | #define ARG_NOREALSIZE 339 | 124 | ARG_NOPUSH, |
125 | #define ARG_NORECURSIVE 340 | 125 | ARG_NOQUIET, |
126 | #define ARG_NOREVERSE 341 | 126 | ARG_NOREALSIZE, |
127 | #define ARG_NORMALIZE 342 | 127 | ARG_NORECURSIVE, |
128 | #define ARG_NOSERIALONLY 343 | 128 | ARG_NOREVERSE, |
129 | #define ARG_NOSHOW 344 | 129 | ARG_NORMALIZE, |
130 | #define ARG_NOSTORE 345 | 130 | ARG_NOSERIALONLY, |
131 | #define ARG_NOT 346 | 131 | ARG_NOSHOW, |
132 | #define ARG_NOTEXTFIELD 347 | 132 | ARG_NOSTORE, |
133 | #define ARG_NOTOTAL 348 | 133 | ARG_NOT, |
134 | #define ARG_NOTRUNCATE 349 | 134 | ARG_NOTEXTFIELD, |
135 | #define ARG_NOUSE 350 | 135 | ARG_NOTOTAL, |
136 | #define ARG_NOVERBOSE 351 | 136 | ARG_NOTRUNCATE, |
137 | #define ARG_NOWATCH 352 | 137 | ARG_NOUSE, |
138 | #define ARG_NOWHATNOWPROC 353 | 138 | ARG_NOVERBOSE, |
139 | #define ARG_NOZERO 354 | 139 | ARG_NOWATCH, |
140 | #define ARG_NUMFIELD 355 | 140 | ARG_NOWHATNOWPROC, |
141 | #define ARG_OR 356 | 141 | ARG_NOZERO, |
142 | #define ARG_PACK 357 | 142 | ARG_NUMFIELD, |
143 | #define ARG_PART 358 | 143 | ARG_OR, |
144 | #define ARG_PATTERN 359 | 144 | ARG_PACK, |
145 | #define ARG_PAUSE 360 | 145 | ARG_PART, |
146 | #define ARG_POP 361 | 146 | ARG_PATTERN, |
147 | #define ARG_PRESERVE 362 | 147 | ARG_PAUSE, |
148 | #define ARG_PRINT 363 | 148 | ARG_POP, |
149 | #define ARG_PROMPT 364 | 149 | ARG_PRESERVE, |
150 | #define ARG_PUBLIC 365 | 150 | ARG_PRINT, |
151 | #define ARG_PUSH 366 | 151 | ARG_PROMPT, |
152 | #define ARG_QUERY 367 | 152 | ARG_PUBLIC, |
153 | #define ARG_QUIET 368 | 153 | ARG_PUSH, |
154 | #define ARG_RBRACE 369 | 154 | ARG_QUERY, |
155 | #define ARG_REALSIZE 370 | 155 | ARG_QUIET, |
156 | #define ARG_RECURSIVE 371 | 156 | ARG_RBRACE, |
157 | #define ARG_REORDER 372 | 157 | ARG_REALSIZE, |
158 | #define ARG_REVERSE 373 | 158 | ARG_RECURSIVE, |
159 | #define ARG_SEQUENCE 374 | 159 | ARG_REORDER, |
160 | #define ARG_SERIALONLY 375 | 160 | ARG_REVERSE, |
161 | #define ARG_SHOW 376 | 161 | ARG_SEQUENCE, |
162 | #define ARG_SOURCE 377 | 162 | ARG_SERIALONLY, |
163 | #define ARG_SPLIT 378 | 163 | ARG_SHOW, |
164 | #define ARG_STORE 379 | 164 | ARG_SOURCE, |
165 | #define ARG_SUBJECT 380 | 165 | ARG_SPLIT, |
166 | #define ARG_TEXT 381 | 166 | ARG_STORE, |
167 | #define ARG_TEXTFIELD 382 | 167 | ARG_SUBJECT, |
168 | #define ARG_TO 383 | 168 | ARG_TEXT, |
169 | #define ARG_TOTAL 384 | 169 | ARG_TEXTFIELD, |
170 | #define ARG_TRUNCATE 385 | 170 | ARG_TO, |
171 | #define ARG_TYPE 386 | 171 | ARG_TOTAL, |
172 | #define ARG_USE 387 | 172 | ARG_TRUNCATE, |
173 | #define ARG_USER 388 | 173 | ARG_TYPE, |
174 | #define ARG_VERBOSE 389 | 174 | ARG_USE, |
175 | #define ARG_WATCH 390 | 175 | ARG_USER, |
176 | #define ARG_WHATNOWPROC 391 | 176 | ARG_VERBOSE, |
177 | #define ARG_WIDTH 392 | 177 | ARG_WATCH, |
178 | #define ARG_ZERO 393 | 178 | ARG_WHATNOWPROC, |
179 | ARG_WIDTH, | ||
180 | ARG_ZERO | ||
181 | }; | ||
179 | 182 | ||
180 | void mh_argv_preproc (int argc, char **argv, struct mh_argp_data *data); | 183 | void mh_argv_preproc (int argc, char **argv, struct mh_argp_data *data); |
181 | int mh_getopt (int argc, char **argv, struct mh_option *mh_opt, const char *doc); | 184 | int mh_getopt (int argc, char **argv, struct mh_option *mh_opt, const char *doc); | ... | ... |
-
Please register or sign in to post a comment