}
#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... */
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) {
}
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;
- 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
------