com php-src: Always show the prompt (now also: <prompt> tag): phpdbg_cmd.c xml.md
| From: | Bob Weinand | Date: | Mon, 20 Oct 2014 20:05:05 +0000 |
| Subject: | com php-src: Always show the prompt (now also: <prompt> tag): phpdbg_cmd.c xml.md | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82526@lists.php.net to get a copy of this message | ||
Commit: bafe6a9f7a89fdbea2fca0b2e1f3e1ab85db25db
Author: Bob Weinand <bobwei9@hotmail.com> Mon, 20 Oct 2014 22:05:05 +0200
Parents: dfdc19fb2a3a4e3ed7627e47678e63b02cb01278
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bafe6a9f7a89fdbea2fca0b2e1f3e1ab85db25db
Log:
Always show the prompt (now also: <prompt> tag)
Changed paths:
M phpdbg_cmd.c
M xml.md
Diff:
diff --git a/phpdbg_cmd.c b/phpdbg_cmd.c
index c09df70..30ea48c 100644
--- a/phpdbg_cmd.c
+++ b/phpdbg_cmd.c
@@ -813,14 +813,6 @@ disconnect:
}
#define USE_LIB_STAR (defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDIT))
-#if !USE_LIB_STAR
- if (!(PHPDBG_G(flags) & PHPDBG_IS_REMOTE)) {
- if (!phpdbg_out("%s", phpdbg_get_prompt(TSRMLS_C))) {
- goto disconnect;
- }
- PHPDBG_G(last_was_newline) = 1;
- }
-#endif
/* note: EOF makes readline write prompt again in local console mode - and ignored if compiled
without readline */
/* strongly assuming to be in blocking mode... */
@@ -835,6 +827,9 @@ readline:
memcpy(buf, PHPDBG_G(input_buffer), bytes);
}
+ phpdbg_write("prompt", "", "%s", phpdbg_get_prompt(TSRMLS_C));
+ PHPDBG_G(last_was_newline) = 1;
+
do {
int i;
if (bytes <= 0) {
@@ -864,7 +859,7 @@ readline:
}
len += bytes;
/* XXX export the timeout through INI??*/
- } while ((bytes = phpdbg_mixed_read(PHPDBG_G(io)[PHPDBG_STDIN].fd, buf + len, PHPDBG_MAX_CMD -
len, -1 TSRMLS_CC)) > 0 || (errno == EINTR && bytes < 0));
+ } while ((bytes = phpdbg_mixed_read(PHPDBG_G(io)[PHPDBG_STDIN].fd, buf + len, PHPDBG_MAX_CMD -
len, -1 TSRMLS_CC)) > 0);
if (bytes <= 0) {
goto disconnect;
diff --git a/xml.md b/xml.md
index 1cb1646..05734d6 100644
--- a/xml.md
+++ b/xml.md
@@ -77,6 +77,11 @@ intro
- help: command name for help
- report: URL for bug reporting
+prompt
+------
+
+- msg tag contains the text prompt
+- indicates that a new command may be accepted
phpdbg
------