summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-17 23:05:16 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-17 23:05:16 -0400
commitbf287b90c30c0e3badce878ac478fdbcdfd04b5d (patch)
treec44f89d0450406e7ee7bcf9838105452540dddcd
parente14d7bb899ecec4aaca2347e92c5512292d3788a (diff)
downloadlibvt100-bf287b90c30c0e3badce878ac478fdbcdfd04b5d.tar.gz
libvt100-bf287b90c30c0e3badce878ac478fdbcdfd04b5d.zip
format warnings about control characters as "\033", not "\33"
-rw-r--r--src/parser.l8
1 files 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]);
}
%%