com php-src: remove -e option in favour of taking script from argv[]: phpdbg.c phpdbg_help.c
| From: | Bob Weinand | Date: | Mon, 21 Apr 2014 20:24:41 +0000 |
| Subject: | com php-src: remove -e option in favour of taking script from argv[]: phpdbg.c phpdbg_help.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-76970@lists.php.net to get a copy of this message | ||
Commit: 0873f2bfb4f8ad0ecd5f4ae7805828ed34bc1565
Author: krakjoe <joe.watkins@live.co.uk> Mon, 21 Apr 2014 21:24:41 +0100
Parents: f96feea00c112bc1bec3e7b677218f4b487d1152
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0873f2bfb4f8ad0ecd5f4ae7805828ed34bc1565
Log:
remove -e option in favour of taking script from argv[]
Changed paths:
M phpdbg.c
M phpdbg_help.c
Diff:
diff --git a/phpdbg.c b/phpdbg.c
index 8fde93c..d7eb5c8 100644
--- a/phpdbg.c
+++ b/phpdbg.c
@@ -569,7 +569,6 @@ const opt_struct OPTIONS[] = { /* {{{ */
{'z', 1, "load zend_extension"},
/* phpdbg options */
{'q', 0, "no banner"},
- {'e', 1, "exec"},
{'v', 0, "disable quietness"},
{'s', 0, "enable stepping"},
{'b', 0, "boring colours"},
@@ -983,16 +982,6 @@ phpdbg_main:
/* begin phpdbg options */
- case 'e': { /* set execution context */
- exec_len = strlen(php_optarg);
- if (exec_len) {
- if (exec) {
- free(exec);
- }
- exec = strdup(php_optarg);
- }
- } break;
-
case 'S': { /* set SAPI name */
if (sapi_name) {
free(sapi_name);
@@ -1083,6 +1072,19 @@ phpdbg_main:
} break;
}
}
+
+ /* set exec if present on command line */
+ if ((argc > php_optind) && (strcmp(argv[php_optind-1],"--") != SUCCESS))
+ {
+ exec_len = strlen(argv[php_optind]);
+ if (exec_len) {
+ if (exec) {
+ free(exec);
+ }
+ exec = strdup(argv[php_optind]);
+ }
+ php_optind++;
+ }
#ifndef _WIN32
/* setup remote server if necessary */
diff --git a/phpdbg_help.c b/phpdbg_help.c
index 2a6f9e8..f912f46 100644
--- a/phpdbg_help.c
+++ b/phpdbg_help.c
@@ -361,7 +361,6 @@ phpdbg_help_text_t phpdbg_help_text[] = {
" **-d** **-d**memory_limit=4G Set a php.ini directive" CR
" **-n** Disable default php.ini" CR
" **-q** Supress welcome banner" CR
-" **-e** **-e**mytest.php Set execution context" CR
" **-v** Enable oplog output" CR
" **-s** Enable stepping" CR
" **-b** Disable colour" CR