Mercurial > hg > chrpath
comparison main.c @ 2:7bf4a164d5bb default tip
fix bug: long_options have to be zero terminated
author | Peter Meerwald <p.meerwald@bct-electronic.com> |
---|---|
date | Fri, 20 Jul 2012 11:28:30 +0200 |
parents | b8f7423e385c |
children |
comparison
equal
deleted
inserted
replaced
1:bbbfb3f97919 | 2:7bf4a164d5bb |
---|---|
29 {"delete", 0, 0, 'd'}, | 29 {"delete", 0, 0, 'd'}, |
30 {"help", 0, 0, 'h'}, | 30 {"help", 0, 0, 'h'}, |
31 {"keepgoing", 0, 0, 'k'}, | 31 {"keepgoing", 0, 0, 'k'}, |
32 {"list", 0, 0, 'l'}, | 32 {"list", 0, 0, 'l'}, |
33 {"replace", 1, 0, 'r'}, | 33 {"replace", 1, 0, 'r'}, |
34 {"version", 0, 0, 'v'} | 34 {"version", 0, 0, 'v'}, |
35 {0, 0, 0, 0} | |
35 }; | 36 }; |
36 | 37 |
37 #else /* not HAVE_GETOPT_LONG */ | 38 #else /* not HAVE_GETOPT_LONG */ |
38 # define GETOPT_LONG(argc,argv,optstr,lopts,lidx) getopt(argc,argv,optstr) | 39 # define GETOPT_LONG(argc,argv,optstr,lopts,lidx) getopt(argc,argv,optstr) |
39 #endif /* not HAVE_GETOPT_LONG */ | 40 #endif /* not HAVE_GETOPT_LONG */ |