Browse Source

discard first TWO symbols of a long argument

experimental/lemon
Antony Dovgal 17 years ago
parent
commit
29aff0a595
  1. 2
      main/getopt.c

2
main/getopt.c

@ -81,7 +81,7 @@ PHPAPI int php_getopt(int argc, char* const *argv, const opt_struct opts[], char
}
if ((argv[*optind][0] == '-') && (argv[*optind][1] == '-')) {
char *pos;
int arg_end = strlen(argv[*optind])-1;
int arg_end = strlen(argv[*optind])-2;
/* '--' indicates end of args if not followed by a known long option name */
if (argv[*optind][2] == '\0') {

Loading…
Cancel
Save