Mercurial > hg > toybox
comparison toys/other/hello.c @ 1036:a25239480e7a draft
Improve --longopt parsing: general bugfixes, better error reporting, new ; option for optional arguments only suppliable with =.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 01 Sep 2013 07:50:32 -0500 |
parents | b4faf2ae39e8 |
children | ac4a0cde89c2 |
comparison
equal
deleted
inserted
replaced
1035:6b4529a50b72 | 1036:a25239480e7a |
---|---|
5 * See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ | 5 * See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ |
6 * See http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/cmdbehav.html | 6 * See http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/cmdbehav.html |
7 | 7 |
8 // Accept many different kinds of command line argument: | 8 // Accept many different kinds of command line argument: |
9 | 9 |
10 USE_HELLO(NEWTOY(hello, "(walrus)(blubber):e@d*c#b:a", TOYFLAG_USR|TOYFLAG_BIN)) | 10 USE_HELLO(NEWTOY(hello, "(walrus)(blubber):;(also):e@d*c#b:a", TOYFLAG_USR|TOYFLAG_BIN)) |
11 | 11 |
12 config HELLO | 12 config HELLO |
13 bool "hello" | 13 bool "hello" |
14 default n | 14 default n |
15 help | 15 help |
29 GLOBALS( | 29 GLOBALS( |
30 char *b_string; | 30 char *b_string; |
31 long c_number; | 31 long c_number; |
32 struct arg_list *d_list; | 32 struct arg_list *d_list; |
33 long e_count; | 33 long e_count; |
34 char *also_string; | |
34 char *blubber_string; | 35 char *blubber_string; |
35 | 36 |
36 int more_globals; | 37 int more_globals; |
37 ) | 38 ) |
38 | 39 |