From bf287b90c30c0e3badce878ac478fdbcdfd04b5d Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 17 Oct 2014 23:05:16 -0400 Subject: format warnings about control characters as "\033", not "\33" --- src/parser.l | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parser.l b/src/parser.l index e5edbec..e249a79 100644 --- a/src/parser.l +++ b/src/parser.l @@ -188,7 +188,7 @@ static void vt100_parser_handle_text(VT100Screen *vt, char *text, size_t len); {CSI}[<=?]?{CSIPARAMS}{CTRL} { fprintf(stderr, - "unhandled CSI sequence: \\033%s\\%hho\n", + "unhandled CSI sequence: \\033%s\\%03hho\n", yytext + 1, yytext[yyleng - 1]); } @@ -212,7 +212,7 @@ static void vt100_parser_handle_text(VT100Screen *vt, char *text, size_t len); } {ESC}{CTRL} { - fprintf(stderr, "unhandled escape sequence: \\%hho\n", yytext[1]); + fprintf(stderr, "unhandled escape sequence: \\%03hho\n", yytext[1]); } {ESC}{CHAR} { @@ -228,11 +228,11 @@ static void vt100_parser_handle_text(VT100Screen *vt, char *text, size_t len); } {CTRL} { - fprintf(stderr, "unhandled control character: \\%hho\n", yytext[0]); + fprintf(stderr, "unhandled control character: \\%03hho\n", yytext[0]); } (?s:.) { - fprintf(stderr, "invalid utf8 byte: \\%hho\n", yytext[0]); + fprintf(stderr, "invalid utf8 byte: \\%03hho\n", yytext[0]); } %% -- cgit v1.2.3