summaryrefslogtreecommitdiff
path: root/include/asterisk/term.h
diff options
context:
space:
mode:
authorWalter Doekes <walter+asterisk@wjd.nu>2015-11-25 20:29:55 +0100
committerWalter Doekes <walter+asterisk@wjd.nu>2015-11-25 20:29:55 +0100
commit03759c5587229b95204288e0969f928c20764a6e (patch)
tree723f2e202365b2626b307e6fe25ab22bad7ea075 /include/asterisk/term.h
parentfb45130476bf2530a189eda5119dd0e817202ac1 (diff)
main: Slight refactor of main. Improve color situation.
Several issues are addressed here: - main() is large, and half of it is only used if we're not rasterisk; fixed by spliting up the daemon part into a separate function. - Call ast_term_init from rasterisk as well. - Remove duplicate code reading/writing asterisk history file. - Attempt to tackle background color issues and color changes that occur. Tested by starting asterisk -c until the colors stopped changing at odd locations. - Remove unused term_prep() and term_prompt() functions. ASTERISK-25585 #close Change-Id: Ib641a0964c59ef9fe6f59efa8ccb481a9580c52f
Diffstat (limited to 'include/asterisk/term.h')
-rw-r--r--include/asterisk/term.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/asterisk/term.h b/include/asterisk/term.h
index 18d743b76..f91b04781 100644
--- a/include/asterisk/term.h
+++ b/include/asterisk/term.h
@@ -67,8 +67,8 @@ extern "C" {
#define COLORIZE_FMT "%s%s%s"
#define COLORIZE(fg, bg, str) ast_term_color(fg,bg),str,ast_term_reset()
/*! \brief Maximum number of characters needed for a color escape sequence,
- * plus a null char */
-#define AST_TERM_MAX_ESCAPE_CHARS 12
+ * and another one for a trailing reset, plus a null char */
+#define AST_TERM_MAX_ESCAPE_CHARS 23
#define AST_TERM_MAX_ROTATING_BUFFERS 15
/*! \brief Colorize a specified string by adding terminal color codes
@@ -137,10 +137,6 @@ char *term_strip(char *outbuf, const char *inbuf, int maxout);
void term_filter_escapes(char *line);
-char *term_prompt(char *outbuf, const char *inbuf, int maxout);
-
-const char *term_prep(void);
-
const char *term_end(void);
const char *term_quit(void);