tony2001                                 Wed, 14 Apr 2010 15:49:38 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=297995

Log:
discard first TWO symbols of a long argument

Changed paths:
    U   php/php-src/branches/PHP_5_3/main/getopt.c
    U   php/php-src/trunk/main/getopt.c

Modified: php/php-src/branches/PHP_5_3/main/getopt.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/getopt.c  2010-04-14 15:32:56 UTC (rev 
297994)
+++ php/php-src/branches/PHP_5_3/main/getopt.c  2010-04-14 15:49:38 UTC (rev 
297995)
@@ -81,7 +81,7 @@
        }
        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') {

Modified: php/php-src/trunk/main/getopt.c
===================================================================
--- php/php-src/trunk/main/getopt.c     2010-04-14 15:32:56 UTC (rev 297994)
+++ php/php-src/trunk/main/getopt.c     2010-04-14 15:49:38 UTC (rev 297995)
@@ -81,7 +81,7 @@
        }
        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') {

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

Reply via email to