com php-src: - Fixed repeat-last-command feature for next and until command: phpdbg_prompt.c
| From: | Bob Weinand | Date: | Sat, 16 Nov 2013 11:50:25 +0000 |
| Subject: | com php-src: - Fixed repeat-last-command feature for next and until command: phpdbg_prompt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74929@lists.php.net to get a copy of this message | ||
Commit: 515f7806c55f0005c441703f1f65f5e7746782d9
Author: Felipe Pena <felipensp@gmail.com> Sat, 16 Nov 2013 09:50:25 -0200
Parents: 44d27200f63e10d0c3c003da491e4f60b163b499
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=515f7806c55f0005c441703f1f65f5e7746782d9
Log:
- Fixed repeat-last-command feature for next and until command
Changed paths:
M phpdbg_prompt.c
Diff:
diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c
index 89d5aef..8c9b4d5 100644
--- a/phpdbg_prompt.c
+++ b/phpdbg_prompt.c
@@ -692,10 +692,10 @@ int phpdbg_do_cmd(const phpdbg_command_t *command, char *cmd_line, size_t
cmd_le
PHPDBG_G(last_params) = expr;
PHPDBG_G(last_params_len) = (cmd_len - expr_len) ?
(((cmd_len - expr_len) - sizeof(" "))+1) : 0;
-
+
phpdbg_debug("phpdbg_do_cmd(%s, \"%s\", %lu)",
command->name, PHPDBG_G(last_params), PHPDBG_G(last_params_len));
-
+
return command->handler(
PHPDBG_G(last_params), PHPDBG_G(last_params_len) TSRMLS_CC);
}
@@ -721,11 +721,8 @@ int phpdbg_interactive(TSRMLS_D) /* {{{ */
char *cmd = NULL;
while (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) {
- cmd = readline(PROMPT);
-
- if (cmd) {
- cmd_len = strlen(cmd);
- } else cmd_len = 0L;
+ cmd = readline(PROMPT);
+ cmd_len = cmd ? strlen(cmd) : 0;
#endif
/* trim space from end of input */
@@ -769,7 +766,7 @@ int phpdbg_interactive(TSRMLS_D) /* {{{ */
}
#endif
} else if (PHPDBG_G(last)) {
- PHPDBG_G(last)->handler(
+ return PHPDBG_G(last)->handler(
PHPDBG_G(last_params), PHPDBG_G(last_params_len) TSRMLS_CC);
}
}