tony2001                Mon Apr 23 11:04:54 2007 UTC

  Modified files:              
    /php-src/sapi/cgi   getopt.c 
    /php-src/sapi/cli   getopt.c 
  Log:
  fix long options
  
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/getopt.c?r1=1.13&r2=1.14&diff_format=u
Index: php-src/sapi/cgi/getopt.c
diff -u php-src/sapi/cgi/getopt.c:1.13 php-src/sapi/cgi/getopt.c:1.14
--- php-src/sapi/cgi/getopt.c:1.13      Sun Apr 22 15:24:19 2007
+++ php-src/sapi/cgi/getopt.c   Mon Apr 23 11:04:54 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: getopt.c,v 1.13 2007/04/22 15:24:19 helly Exp $ */
+/* $Id: getopt.c,v 1.14 2007/04/23 11:04:54 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.13&r2=1.14&diff_format=u
Index: php-src/sapi/cli/getopt.c
diff -u php-src/sapi/cli/getopt.c:1.13 php-src/sapi/cli/getopt.c:1.14
--- php-src/sapi/cli/getopt.c:1.13      Sun Apr 22 15:24:19 2007
+++ php-src/sapi/cli/getopt.c   Mon Apr 23 11:04:54 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: getopt.c,v 1.13 2007/04/22 15:24:19 helly Exp $ */
+/* $Id: getopt.c,v 1.14 2007/04/23 11:04:54 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;

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

Reply via email to