mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
- Added "set prompt" command
This commit is contained in:
parent
97f733e60d
commit
795e12b85e
8 changed files with 31 additions and 8 deletions
|
@ -20,6 +20,7 @@
|
|||
#include "phpdbg.h"
|
||||
#include "phpdbg_cmd.h"
|
||||
#include "phpdbg_utils.h"
|
||||
#include "phpdbg_set.h"
|
||||
|
||||
ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
|
||||
|
||||
|
@ -220,7 +221,7 @@ PHPDBG_API phpdbg_input_t *phpdbg_read_input(char *buffered TSRMLS_DC) /* {{{ */
|
|||
if (buffered == NULL) {
|
||||
#ifndef HAVE_LIBREADLINE
|
||||
char buf[PHPDBG_MAX_CMD];
|
||||
if (!phpdbg_write(PROMPT) ||
|
||||
if (!phpdbg_write(phpdbg_get_prompt(TSRMLS_C)) ||
|
||||
!fgets(buf, PHPDBG_MAX_CMD, PHPDBG_G(io)[PHPDBG_STDIN])) {
|
||||
/* the user has gone away */
|
||||
phpdbg_error("Failed to read console !");
|
||||
|
@ -231,7 +232,7 @@ PHPDBG_API phpdbg_input_t *phpdbg_read_input(char *buffered TSRMLS_DC) /* {{{ */
|
|||
|
||||
cmd = buf;
|
||||
#else
|
||||
cmd = readline(PROMPT);
|
||||
cmd = readline(phpdbg_get_prompt(TSRMLS_C));
|
||||
if (!cmd) {
|
||||
/* the user has gone away */
|
||||
phpdbg_error("Failed to read console !");
|
||||
|
@ -381,7 +382,7 @@ PHPDBG_API int phpdbg_do_cmd(const phpdbg_command_t *command, phpdbg_input_t *in
|
|||
}
|
||||
|
||||
rc = command->handler(¶m, input TSRMLS_CC);
|
||||
|
||||
|
||||
/* only set last command when it is worth it ! */
|
||||
if ((rc != FAILURE) &&
|
||||
!(PHPDBG_G(flags) & PHPDBG_IS_INITIALIZING)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue