cvs: php-src(PHP_4_4) /sapi/cli getopt.c
| From: | Marcus Boerger | Date: | Wed, 21 Mar 2007 23:20:30 +0000 |
| Subject: | cvs: php-src(PHP_4_4) /sapi/cli getopt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-43607@lists.php.net to get a copy of this message | ||
helly Wed Mar 21 23:20:30 2007 UTC
Modified files: (Branch: PHP_4_4)
/php-src/sapi/cli getopt.c
Log:
- MFH Fix issue with long form of command line switches
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/getopt.c?r1=1.3.4.3.6.2&r2=1.3.4.3.6.3&diff_format=u
Index: php-src/sapi/cli/getopt.c
diff -u php-src/sapi/cli/getopt.c:1.3.4.3.6.2 php-src/sapi/cli/getopt.c:1.3.4.3.6.3
--- php-src/sapi/cli/getopt.c:1.3.4.3.6.2 Mon Jan 1 09:46:52 2007
+++ php-src/sapi/cli/getopt.c Wed Mar 21 23:20:30 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: getopt.c,v 1.3.4.3.6.2 2007/01/01 09:46:52 sebastian Exp $ */
+/* $Id: getopt.c,v 1.3.4.3.6.3 2007/03/21 23:20:30 helly Exp $ */
#include <stdio.h>
#include <string.h>
@@ -89,19 +89,19 @@
}
}
optchr = 0;
- dash = 1;
- arg_start = 2 + strlen(opts[opts_idx].opt_name);
- }
- if (!dash) {
- dash = 1;
- optchr = 1;
- }
-
- /* Check if the guy tries to do a -: kind of flag */
- if (argv[*optind][optchr] == ':') {
dash = 0;
- (*optind)++;
- return (php_opt_error(argc, argv, *optind-1, optchr, OPTERRCOLON, show_err));
+ arg_start = 2 + strlen(opts[opts_idx].opt_name);
+ } else {
+ if (!dash) {
+ dash = 1;
+ optchr = 1;
+ }
+ /* Check if the guy tries to do a -: kind of flag */
+ if (argv[*optind][optchr] == ':') {
+ dash = 0;
+ (*optind)++;
+ return (php_opt_error(argc, argv, *optind-1, optchr, OPTERRCOLON, show_err));
+ }
}
if (opts_idx < 0) {
while (1) {