summaryrefslogtreecommitdiffstats
path: root/src/parser.c
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-09-15 23:31:24 -0400
committerJesse Luehrs <doy@tozt.net>2014-09-15 23:31:24 -0400
commit931d64f8de509a4528839ec74bfa573c4ee339e9 (patch)
tree3f46eb2662e547d985a530ffabdca0bd97dad68c /src/parser.c
parent77756c0cb189f837ad177f2f6da97acd7d1204c9 (diff)
downloadlibvt100-931d64f8de509a4528839ec74bfa573c4ee339e9.tar.gz
libvt100-931d64f8de509a4528839ec74bfa573c4ee339e9.zip
%*s can't be used to truncate, so stop trying
Diffstat (limited to 'src/parser.c')
-rw-r--r--src/parser.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/parser.c b/src/parser.c
index 608ebba..690b7dd 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -1192,66 +1192,63 @@ YY_RULE_SETUP
#line 182 "src/parser.l"
{
fprintf(stderr,
- "unhandled CSI sequence: \\033%*s\\%hho\n",
- (int)yyleng - 2, yytext + 1, yytext[yyleng - 1]);
+ "unhandled CSI sequence: \\033%s\\%hho\n",
+ yytext + 1, yytext[yyleng - 1]);
}
YY_BREAK
case 50:
YY_RULE_SETUP
#line 188 "src/parser.l"
{
- fprintf(stderr,
- "unhandled CSI sequence: \\033%*s\n",
- (int)yyleng - 1, yytext + 1);
+ fprintf(stderr, "unhandled CSI sequence: \\033%s\n", yytext + 1);
}
YY_BREAK
case 51:
YY_RULE_SETUP
-#line 194 "src/parser.l"
+#line 192 "src/parser.l"
{
+ yytext[yyleng - 1] = '\0';
fprintf(stderr,
- "%d unhandled OSC sequence: \\033%*s\\007\n",
- (int)yyleng, (int)yyleng - 5, yytext + 1);
+ "unhandled OSC sequence: \\033%s\\007\n",
+ yytext + 1);
}
YY_BREAK
case 52:
/* rule 52 can match eol */
YY_RULE_SETUP
-#line 200 "src/parser.l"
+#line 199 "src/parser.l"
{
fprintf(stderr, "unhandled escape sequence: \\%hho\n", yytext[1]);
}
YY_BREAK
case 53:
YY_RULE_SETUP
-#line 204 "src/parser.l"
+#line 203 "src/parser.l"
{
- fprintf(stderr,
- "unhandled escape sequence: %*s\n",
- (int)yyleng - 1, yytext + 1);
+ fprintf(stderr, "unhandled escape sequence: %s\n", yytext + 1);
}
YY_BREAK
case 54:
/* rule 54 can match eol */
YY_RULE_SETUP
-#line 210 "src/parser.l"
+#line 207 "src/parser.l"
{
fprintf(stderr, "unhandled control character: \\%hho\n", yytext[0]);
}
YY_BREAK
case 55:
YY_RULE_SETUP
-#line 214 "src/parser.l"
+#line 211 "src/parser.l"
{
fprintf(stderr, "invalid utf8 byte: \\%hho\n", yytext[0]);
}
YY_BREAK
case 56:
YY_RULE_SETUP
-#line 218 "src/parser.l"
+#line 215 "src/parser.l"
YY_FATAL_ERROR( "flex scanner jammed" );
YY_BREAK
-#line 1255 "src/parser.c"
+#line 1252 "src/parser.c"
case YY_END_OF_BUFFER:
{
@@ -2343,7 +2340,7 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
#define YYTABLES_NAME "yytables"
-#line 218 "src/parser.l"
+#line 215 "src/parser.l"