summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--phpdbg_set.c12
-rw-r--r--phpdbg_utils.h2
2 files changed, 9 insertions, 5 deletions
diff --git a/phpdbg_set.c b/phpdbg_set.c
index 3f9a262ac0..d8a75a6fa4 100644
--- a/phpdbg_set.c
+++ b/phpdbg_set.c
@@ -30,7 +30,11 @@ void phpdbg_set_prompt(const char *prompt TSRMLS_DC) /* {{{ */
PHPDBG_G(prompt) = NULL;
}
- spprintf(&PHPDBG_G(prompt), 0, "%s ", prompt);
+ if (PHPDBG_IS_COLOURED) {
+ spprintf(&PHPDBG_G(prompt), 0, "\033[1;64m%s\033[0m ", prompt);
+ } else {
+ spprintf(&PHPDBG_G(prompt), 0, "%s ", prompt);
+ }
} /* }}} */
const char *phpdbg_get_prompt(TSRMLS_D) /* {{{ */
@@ -62,13 +66,13 @@ PHPDBG_SET(oplog) /* {{{ */
phpdbg_notice(
"Oplog %s", PHPDBG_G(oplog) ? "enabled" : "disabled");
break;
-
+
case NUMERIC_PARAM: switch (param->num) {
case 1:
phpdbg_error(
"An output file must be provided to enable oplog");
break;
-
+
case 0: {
if (PHPDBG_G(oplog)) {
phpdbg_notice("Disabling oplog");
@@ -77,7 +81,7 @@ PHPDBG_SET(oplog) /* {{{ */
} else {
phpdbg_error("Oplog is not enabled !");
}
- } break;
+ } break;
} break;
case STR_PARAM: {
diff --git a/phpdbg_utils.h b/phpdbg_utils.h
index e59a7ed412..b014319041 100644
--- a/phpdbg_utils.h
+++ b/phpdbg_utils.h
@@ -70,7 +70,7 @@ int phpdbg_print(int TSRMLS_DC, FILE*, const char*, ...) PHP_ATTRIBUTE_FORMAT(pr
#define EMPTY "" /* }}} */
/* {{{ For prompt lines */
-#define PROMPT ((PHPDBG_G(flags) & PHPDBG_IS_COLOURED) ? "\033[1;64mphpdbg>\033[0m" : "phpdbg>") /* }}} */
+#define PROMPT "phpdbg>" /* }}} */
/* {{{ For separation */
#define SEPARATE "------------------------------------------------" /* }}} */