From ce780c5b63bbdf99a16ac4682af67d5ffbbdca0f Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Sat, 15 Jul 2017 22:17:48 +1000 Subject: [PATCH] Use character constants instead of bare integers for escape character in strip_ansi() Also use '\t' instead of '\011' in prepare_display(). Should be no functional changes, just looks nicer. --- source/screen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/screen.c b/source/screen.c index 709b8a9..52a4a13 100644 --- a/source/screen.c +++ b/source/screen.c @@ -468,7 +468,7 @@ char **BX_prepare_display(const char *orig_str, break; /* case '\a' */ } - case '\011': /* TAB */ + case '\t': /* TAB */ { tab_cnt++; if ((tab_max > 0) && (tab_cnt > tab_max)) @@ -495,7 +495,7 @@ char **BX_prepare_display(const char *orig_str, break; } } - break; /* case '\011' */ + break; /* case '\t' */ } case ND_SPACE: { @@ -2522,7 +2522,7 @@ char *BX_strip_ansi(const char *str) */ case ('P') : { - while (((chr = next_char()) != 0) && chr != 033) + while (((chr = next_char()) != 0) && chr != '\033') ; if (chr == 0) put_back(); @@ -2619,7 +2619,7 @@ char *BX_strip_ansi(const char *str) * If we find a new ansi char, start all * over from the top and strip it out too */ - if (this_char() == 033) + if (this_char() == '\033') continue; /*