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:21:19 +0200 |
commit | 0febafcfbe3e35f4a230430368ba931f19f8e957 (patch) | |
tree | 745cc1c42877f144a24f643dc80c9a5b940175c8 /sapi/phpdbg/phpdbg_cmd.c | |
parent | 53158f2c32c71bddbfaa390c0c4758bc98540946 (diff) | |
download | php-git-0febafcfbe3e35f4a230430368ba931f19f8e957.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); |