helly           Wed Mar 21 23:20:21 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /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.8.2.1.2.1&r2=1.8.2.1.2.2&diff_format=u
Index: php-src/sapi/cli/getopt.c
diff -u php-src/sapi/cli/getopt.c:1.8.2.1.2.1 
php-src/sapi/cli/getopt.c:1.8.2.1.2.2
--- php-src/sapi/cli/getopt.c:1.8.2.1.2.1       Mon Jan  1 09:36:12 2007
+++ php-src/sapi/cli/getopt.c   Wed Mar 21 23:20:21 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: getopt.c,v 1.8.2.1.2.1 2007/01/01 09:36:12 sebastian Exp $ */
+/* $Id: getopt.c,v 1.8.2.1.2.2 2007/03/21 23:20:21 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) {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to