cvs: php4 /sapi/cgi getopt.c
| From: | James Moore | Date: | Thu, 17 May 2001 23:57:43 +0000 |
| Subject: | cvs: php4 /sapi/cgi getopt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-5813@lists.php.net to get a copy of this message | ||
jmoore Thu May 17 16:57:43 2001 EDT
Modified files:
/php4/sapi/cgi getopt.c
Log:
Merge the more sensible way of doing this back in to HEAD
Index: php4/sapi/cgi/getopt.c
diff -u php4/sapi/cgi/getopt.c:1.3 php4/sapi/cgi/getopt.c:1.4
--- php4/sapi/cgi/getopt.c:1.3 Thu May 17 14:32:05 2001
+++ php4/sapi/cgi/getopt.c Thu May 17 16:57:43 2001
@@ -10,7 +10,6 @@
#define OPTERRARG (3)
-char buff[81]; /* too hold option value when needed */
char *ap_php_optarg;
int ap_php_optind = 1;
static int ap_php_opterr = 1;
@@ -110,12 +109,7 @@
}
else
{
- int offset = 2;
- int len = 0;
- while(argv[ap_php_optind][offset]) {
- buff[len++] = argv[ap_php_optind][offset++];
- }
- ap_php_optarg = buff;
+ ap_php_optarg = &argv[ap_php_optind][2];
ap_php_optind++;
}
return(*cp);