diff options
| author | Remi Collet <remi@php.net> | 2014-06-23 10:04:40 +0200 | 
|---|---|---|
| committer | Remi Collet <remi@php.net> | 2014-06-23 10:04:40 +0200 | 
| commit | 86bafec836b81070547399b890c5b01897250a31 (patch) | |
| tree | 36d14adfe37aa9960410ba6df5a53b5832db86c9 /sapi/phpdbg/phpdbg_cmd.c | |
| parent | f08a5bfadc360cb53574bdb2f4dc32ac30636133 (diff) | |
| download | php-git-86bafec836b81070547399b890c5b01897250a31.tar.gz | |
Fix https://github.com/krakjoe/phpdbg/issues/91
Enable edit feature when build with libedit.
Notice: coloured prompt only enable with READLINE
Diffstat (limited to 'sapi/phpdbg/phpdbg_cmd.c')
| -rw-r--r-- | sapi/phpdbg/phpdbg_cmd.c | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/sapi/phpdbg/phpdbg_cmd.c b/sapi/phpdbg/phpdbg_cmd.c index d4ce8ebc55..a45513bee6 100644 --- a/sapi/phpdbg/phpdbg_cmd.c +++ b/sapi/phpdbg/phpdbg_cmd.c @@ -792,7 +792,7 @@ PHPDBG_API int phpdbg_stack_execute(phpdbg_param_t *stack, char **why TSRMLS_DC)  PHPDBG_API char* phpdbg_read_input(char *buffered TSRMLS_DC) /* {{{ */  {  	char *cmd = NULL; -#ifndef HAVE_LIBREADLINE +#if !defined(HAVE_LIBREADLINE) && !defined(HAVE_LIBEDIT)  	char buf[PHPDBG_MAX_CMD];  #endif  	char *buffer = NULL; @@ -811,7 +811,7 @@ disconnect:  				return NULL;  			} -#ifndef HAVE_LIBREADLINE +#if !defined(HAVE_LIBREADLINE) && !defined(HAVE_LIBEDIT)  			if (!(PHPDBG_G(flags) & PHPDBG_IS_REMOTE)) {  				if (!phpdbg_write("%s", phpdbg_get_prompt(TSRMLS_C))) {  					goto disconnect; @@ -850,7 +850,7 @@ readline:  		buffer = estrdup(cmd); -#ifdef HAVE_LIBREADLINE +#if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT)  		if (!buffered && cmd &&  			!(PHPDBG_G(flags) & PHPDBG_IS_REMOTE)) {  			free(cmd); | 
