Import fixed arg.h from farbfeld
This fixes the handling of a { NULL } argv[] without returning argc = -1.
This commit is contained in:
parent
075e314bdd
commit
84d77d096b
1 changed files with 1 additions and 1 deletions
2
arg.h
2
arg.h
|
@ -22,7 +22,7 @@
|
|||
extern char *argv0;
|
||||
|
||||
/* int main(int argc, char *argv[]) */
|
||||
#define ARGBEGIN for (argv0 = *argv, argc--, argv++; \
|
||||
#define ARGBEGIN for (argv0 = *argv, *argv ? (argc--, argv++) : ((void *)0); \
|
||||
*argv && (*argv)[0] == '-' && (*argv)[1]; argc--, argv++) { \
|
||||
int argparsed; \
|
||||
if ((*argv)[1] == '-' && (*argv)[2] == '\0') { \
|
||||
|
|
Loading…
Reference in a new issue