cvs: php-src(PHP_5_2) /sapi/cgi getopt.c /sapi/cli getopt.c

From: Date: Mon, 23 Apr 2007 11:05:16 +0000
Subject: cvs: php-src(PHP_5_2) /sapi/cgi getopt.c /sapi/cli getopt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-44049@lists.php.net to get a copy of this message
tony2001 Mon Apr 23 11:05:16 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/sapi/cgi getopt.c /php-src/sapi/cli getopt.c Log: MFH: fix long options http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/getopt.c?r1=1.9.2.1.2.3&r2=1.9.2.1.2.4&diff_format=u Index: php-src/sapi/cgi/getopt.c diff -u php-src/sapi/cgi/getopt.c:1.9.2.1.2.3 php-src/sapi/cgi/getopt.c:1.9.2.1.2.4 --- php-src/sapi/cgi/getopt.c:1.9.2.1.2.3 Sun Apr 22 15:31:16 2007 +++ php-src/sapi/cgi/getopt.c Mon Apr 23 11:05:16 2007 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: getopt.c,v 1.9.2.1.2.3 2007/04/22 15:31:16 helly Exp $ */ +/* $Id: getopt.c,v 1.9.2.1.2.4 2007/04/23 11:05:16 tony2001 Exp $ */ #include <stdio.h> #include <string.h> @@ -145,7 +145,8 @@ } return opts[opts_idx].opt_char; } else { - if (arg_start >= 2) { + /* multiple options specified as one (exclude long opts) */ + if (arg_start >= 2 && !((argv[*optind][0] == '-') && (argv[*optind][1] == '-'))) { if (!argv[*optind][optchr+1]) { dash = 0; http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/getopt.c?r1=1.8.2.1.2.4&r2=1.8.2.1.2.5&diff_format=u Index: php-src/sapi/cli/getopt.c diff -u php-src/sapi/cli/getopt.c:1.8.2.1.2.4 php-src/sapi/cli/getopt.c:1.8.2.1.2.5 --- php-src/sapi/cli/getopt.c:1.8.2.1.2.4 Sun Apr 22 15:31:16 2007 +++ php-src/sapi/cli/getopt.c Mon Apr 23 11:05:16 2007 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: getopt.c,v 1.8.2.1.2.4 2007/04/22 15:31:16 helly Exp $ */ +/* $Id: getopt.c,v 1.8.2.1.2.5 2007/04/23 11:05:16 tony2001 Exp $ */ #include <stdio.h> #include <string.h> @@ -145,7 +145,8 @@ } return opts[opts_idx].opt_char; } else { - if (arg_start >= 2) { + /* multiple options specified as one (exclude long opts) */ + if (arg_start >= 2 && !((argv[*optind][0] == '-') && (argv[*optind][1] == '-'))) { if (!argv[*optind][optchr+1]) { dash = 0;

« previous php.cvs (#44049) next »