From 77756c0cb189f837ad177f2f6da97acd7d1204c9 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 15 Sep 2014 23:28:21 -0400 Subject: eat the entire OSC sequence instead of just the \e] --- src/parser.c | 254 +++++++++++++++++++++++++++++------------------------------ src/parser.h | 2 +- src/parser.l | 14 +--- 3 files changed, 129 insertions(+), 141 deletions(-) (limited to 'src') diff --git a/src/parser.c b/src/parser.c index 3589797..608ebba 100644 --- a/src/parser.c +++ b/src/parser.c @@ -351,8 +351,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 57 -#define YY_END_OF_BUFFER 58 +#define YY_NUM_RULES 56 +#define YY_END_OF_BUFFER 57 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -362,19 +362,19 @@ struct yy_trans_info }; static yyconst flex_int16_t yy_accept[149] = { 0, - 0, 0, 58, 55, 1, 2, 3, 4, 5, 6, - 7, 8, 48, 40, 56, 42, 43, 44, 53, 54, - 54, 54, 54, 54, 14, 15, 9, 10, 11, 46, + 0, 0, 57, 54, 1, 2, 3, 4, 5, 6, + 7, 8, 48, 40, 55, 42, 43, 44, 52, 53, + 53, 53, 53, 53, 14, 15, 9, 10, 11, 46, 47, 12, 13, 0, 0, 0, 40, 0, 0, 0, 41, 43, 44, 0, 36, 0, 37, 0, 38, 0, 39, 49, 50, 45, 45, 50, 50, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 0, 0, 0, 51, 52, 52, 52, 52, + 29, 30, 0, 0, 0, 51, 47, 47, 47, 47, 0, 0, 0, 0, 0, 0, 0, 44, 45, 45, - 45, 31, 32, 0, 0, 0, 0, 0, 0, 0, + 45, 31, 32, 0, 0, 47, 47, 47, 0, 0, - 0, 0, 0, 0, 45, 0, 33, 0, 0, 0, - 0, 34, 0, 0, 0, 0, 35, 0, 0, 0, + 0, 0, 0, 0, 45, 0, 33, 47, 0, 0, + 0, 34, 47, 0, 0, 0, 35, 47, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 28, 45, 0, 0, 0, 45, 45, 0, 45, 45, 0, 45, 0 @@ -418,30 +418,30 @@ static yyconst flex_int32_t yy_meta[52] = 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 5, 6, 6, 3, 6, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 5, 5, 3, 3, 7, 8, 8, 8, - 7 + 3, 3, 5, 5, 3, 3, 1, 7, 7, 7, + 1 } ; static yyconst flex_int16_t yy_base[167] = { 0, - 0, 51, 379, 556, 556, 556, 556, 556, 556, 556, - 556, 556, 102, 14, 556, 331, 330, 329, 556, 556, - 0, 5, 10, 15, 556, 556, 556, 556, 556, 152, - 202, 556, 556, 328, 327, 325, 17, 324, 323, 312, - 20, 311, 310, 20, 556, 25, 556, 30, 556, 60, - 556, 556, 556, 190, 556, 237, 268, 556, 556, 556, - 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, - 556, 556, 309, 308, 307, 556, 556, 330, 329, 328, - 302, 294, 292, 283, 282, 281, 277, 274, 52, 198, - 288, 556, 556, 273, 272, 44, 197, 228, 271, 263, - - 254, 253, 317, 64, 62, 252, 556, 242, 251, 250, - 246, 556, 246, 216, 202, 196, 556, 277, 188, 186, - 181, 177, 0, 198, 216, 348, 169, 102, 50, 49, - 48, 44, 368, 202, 556, 556, 386, 43, 41, 31, - 406, 207, 424, 0, 213, 296, 327, 556, 470, 476, - 482, 486, 490, 494, 500, 506, 511, 516, 523, 530, - 535, 538, 541, 543, 546, 549 + 0, 51, 375, 578, 578, 578, 578, 578, 578, 578, + 578, 578, 102, 14, 578, 327, 326, 325, 578, 578, + 0, 5, 10, 15, 578, 578, 578, 578, 578, 152, + 197, 578, 578, 324, 322, 313, 17, 312, 311, 310, + 20, 309, 308, 20, 578, 25, 578, 30, 578, 60, + 578, 578, 578, 180, 578, 232, 263, 578, 578, 578, + 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, + 578, 578, 301, 283, 276, 578, 44, 269, 272, 283, + 269, 262, 261, 260, 258, 257, 247, 246, 52, 185, + 318, 578, 578, 226, 225, 238, 241, 252, 211, 208, + + 197, 195, 347, 64, 62, 194, 578, 294, 192, 191, + 190, 578, 297, 189, 188, 187, 578, 301, 186, 183, + 175, 171, 0, 185, 188, 378, 159, 102, 50, 49, + 48, 44, 398, 192, 578, 578, 416, 43, 41, 31, + 436, 196, 454, 0, 200, 294, 308, 578, 500, 505, + 510, 514, 518, 522, 527, 532, 536, 541, 547, 553, + 557, 560, 563, 565, 568, 571 } ; static yyconst flex_int16_t yy_def[167] = @@ -453,7 +453,7 @@ static yyconst flex_int16_t yy_def[167] = 156, 148, 148, 151, 148, 152, 148, 153, 148, 154, 148, 148, 148, 30, 148, 30, 56, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 148, 155, 155, 155, 155, 148, 148, 148, 148, 148, 148, 148, 148, 157, 56, 56, 148, 148, 148, 148, 158, 159, 160, 148, 148, @@ -466,18 +466,18 @@ static yyconst flex_int16_t yy_def[167] = 148, 148, 148, 148, 148, 148 } ; -static yyconst flex_int16_t yy_nxt[608] = +static yyconst flex_int16_t yy_nxt[630] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 44, 44, 44, 44, 44, 46, 46, 46, 46, 46, 48, 48, 48, 48, 48, 50, 50, 50, 50, 50, 44, 44, 44, 44, 44, 46, 46, 46, 46, 46, - 48, 48, 48, 48, 48, 107, 15, 16, 17, 18, + 48, 48, 48, 48, 48, 76, 15, 16, 17, 18, 15, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 38, 39, 40, 38, 39, 40, 38, 39, 40, 50, 50, 50, 50, 50, 104, 104, 118, 104, 125, 125, 125, 125, 125, 125, 104, 104, 113, 104, 108, - 140, 109, 110, 111, 118, 139, 113, 15, 16, 17, + 140, 81, 82, 83, 118, 139, 113, 15, 16, 17, 18, 15, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 21, 22, 23, 24, 20, 20, 20, @@ -488,30 +488,33 @@ static yyconst flex_int16_t yy_nxt[608] = 52, 52, 53, 53, 53, 53, 53, 54, 54, 54, 54, 54, 54, 53, 55, 56, 56, 53, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 53, 53, 53, 53, 69, 70, 71, 72, 112, 73, - - 74, 75, 76, 76, 76, 76, 76, 76, 76, 76, - 76, 76, 89, 53, 53, 108, 53, 78, 79, 80, - 105, 104, 104, 77, 104, 104, 104, 132, 104, 117, - 104, 104, 131, 104, 118, 53, 104, 104, 134, 104, - 69, 70, 130, 107, 114, 115, 116, 112, 129, 81, - 82, 83, 90, 90, 90, 90, 90, 90, 135, 136, - 53, 53, 113, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 53, 53, 119, 120, 121, 117, 53, - 53, 53, 53, 91, 91, 91, 91, 91, 91, 109, - 110, 111, 128, 114, 115, 116, 127, 108, 53, 41, - - 20, 92, 93, 91, 91, 91, 91, 91, 91, 122, - 105, 147, 147, 147, 147, 147, 147, 77, 106, 53, - 41, 92, 93, 102, 119, 120, 121, 41, 101, 20, - 69, 70, 123, 123, 123, 123, 123, 123, 100, 124, - 99, 53, 147, 147, 147, 147, 147, 147, 77, 63, - 98, 97, 96, 95, 94, 53, 88, 41, 87, 69, - 70, 71, 72, 137, 137, 137, 137, 137, 137, 86, - 41, 85, 53, 84, 20, 43, 42, 41, 148, 148, + 53, 53, 53, 53, 69, 70, 71, 72, 76, 73, + + 74, 75, 89, 53, 53, 108, 53, 105, 104, 104, + 134, 104, 78, 79, 80, 104, 104, 77, 104, 104, + 104, 132, 104, 104, 104, 53, 104, 69, 70, 131, + 135, 136, 118, 130, 129, 113, 128, 127, 108, 107, + 53, 41, 112, 20, 81, 82, 83, 90, 90, 90, + 90, 90, 90, 117, 122, 53, 53, 77, 53, 53, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 76, 106, 53, 76, 53, 53, 53, 53, 91, 91, + 91, 91, 91, 91, 76, 109, 110, 111, 114, 115, + 116, 96, 41, 102, 97, 107, 92, 93, 112, 119, + + 120, 121, 117, 41, 101, 98, 20, 100, 99, 147, + 147, 147, 147, 147, 147, 77, 81, 82, 83, 81, + 82, 83, 95, 147, 147, 147, 147, 147, 147, 94, + 81, 82, 83, 91, 91, 91, 91, 91, 91, 53, + 105, 109, 110, 111, 114, 115, 116, 53, 119, 120, + 121, 92, 93, 53, 88, 41, 87, 86, 41, 85, + 69, 70, 123, 123, 123, 123, 123, 123, 84, 124, + 20, 43, 42, 41, 148, 148, 148, 148, 148, 63, + 148, 148, 148, 148, 148, 148, 148, 148, 148, 69, + 70, 71, 72, 137, 137, 137, 137, 137, 137, 148, + + 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 53, 53, 141, 141, 141, 141, 141, 141, 148, 142, 148, 148, 148, 148, 148, 148, 148, 148, 148, - 53, 137, 137, 137, 137, 137, 137, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 53, 53, 141, 141, 141, 141, 141, 141, 148, 142, 148, @@ -519,36 +522,35 @@ static yyconst flex_int16_t yy_nxt[608] = 144, 144, 144, 144, 144, 148, 145, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 53, 53, 148, 148, 148, 148, 148, 148, 148, 148, 148, 71, 72, - 14, 14, 14, 14, 14, 14, 14, 14, 37, 37, - 37, 37, 148, 37, 45, 45, 45, 45, 47, 47, - 47, 47, 49, 49, 49, 49, 51, 51, 51, 51, - - 77, 77, 77, 77, 77, 77, 148, 77, 41, 41, - 41, 41, 148, 41, 103, 148, 103, 108, 108, 108, - 108, 108, 148, 108, 113, 113, 113, 113, 113, 148, - 113, 118, 118, 118, 118, 118, 148, 118, 126, 148, - 126, 133, 148, 133, 125, 125, 125, 148, 125, 143, - 148, 143, 146, 148, 146, 3, 148, 148, 148, 148, + + 14, 14, 14, 14, 14, 14, 14, 37, 37, 37, + 37, 37, 45, 45, 45, 45, 47, 47, 47, 47, + 49, 49, 49, 49, 51, 51, 51, 51, 77, 77, + 77, 77, 77, 77, 41, 41, 41, 41, 41, 103, + 148, 103, 108, 108, 108, 108, 108, 108, 113, 113, + 113, 113, 113, 113, 118, 118, 118, 118, 118, 118, + 126, 148, 126, 133, 148, 133, 125, 125, 125, 148, + 125, 143, 148, 143, 146, 148, 146, 3, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - - 148, 148, 148, 148, 148, 148, 148 + 148, 148, 148, 148, 148, 148, 148, 148, 148 } ; -static yyconst flex_int16_t yy_chk[608] = +static yyconst flex_int16_t yy_chk[630] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 44, 44, 44, 44, 44, 46, 46, 46, 46, 46, - 48, 48, 48, 48, 48, 96, 1, 1, 1, 1, + 48, 48, 48, 48, 48, 77, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 14, 14, 14, 37, 37, 37, 41, 41, 41, 50, 50, 50, 50, 50, 89, 89, 140, 89, 104, 104, 104, 104, 104, 104, 105, 105, 139, 105, 138, - 132, 96, 96, 96, 131, 130, 129, 2, 2, 2, + 132, 77, 77, 77, 131, 130, 129, 2, 2, 2, 2, 2, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, @@ -559,30 +561,33 @@ static yyconst flex_int16_t yy_chk[608] = 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, 97, 30, - - 30, 30, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 54, 54, 54, 127, 54, 31, 31, 31, - 90, 124, 124, 122, 124, 134, 134, 121, 134, 98, - 142, 142, 120, 142, 119, 54, 145, 145, 125, 145, - 90, 90, 116, 108, 97, 97, 97, 113, 115, 31, - 31, 31, 56, 56, 56, 56, 56, 56, 125, 125, - 56, 56, 114, 56, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 98, 98, 98, 118, 56, - 56, 56, 56, 57, 57, 57, 57, 57, 57, 108, - 108, 108, 111, 113, 113, 113, 110, 109, 106, 102, - - 101, 57, 57, 91, 91, 91, 91, 91, 91, 100, - 91, 146, 146, 146, 146, 146, 146, 99, 95, 94, - 88, 91, 91, 87, 118, 118, 118, 86, 85, 84, - 91, 91, 103, 103, 103, 103, 103, 103, 83, 103, - 82, 146, 147, 147, 147, 147, 147, 147, 81, 103, - 80, 79, 78, 75, 74, 73, 43, 42, 40, 103, - 103, 103, 103, 126, 126, 126, 126, 126, 126, 39, - 38, 36, 147, 35, 34, 18, 17, 16, 3, 0, + 30, 30, 30, 30, 30, 30, 30, 30, 31, 30, + + 30, 30, 54, 54, 54, 127, 54, 90, 124, 124, + 125, 124, 31, 31, 31, 134, 134, 122, 134, 142, + 142, 121, 142, 145, 145, 54, 145, 90, 90, 120, + 125, 125, 119, 116, 115, 114, 111, 110, 109, 96, + 106, 102, 97, 101, 31, 31, 31, 56, 56, 56, + 56, 56, 56, 98, 100, 56, 56, 99, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 78, 95, 94, 79, 56, 56, 56, 56, 57, 57, + 57, 57, 57, 57, 80, 96, 96, 96, 97, 97, + 97, 78, 88, 87, 79, 108, 57, 57, 113, 98, + + 98, 98, 118, 86, 85, 80, 84, 83, 82, 146, + 146, 146, 146, 146, 146, 81, 78, 78, 78, 79, + 79, 79, 75, 147, 147, 147, 147, 147, 147, 74, + 80, 80, 80, 91, 91, 91, 91, 91, 91, 146, + 91, 108, 108, 108, 113, 113, 113, 73, 118, 118, + 118, 91, 91, 147, 43, 42, 40, 39, 38, 36, + 91, 91, 103, 103, 103, 103, 103, 103, 35, 103, + 34, 18, 17, 16, 3, 0, 0, 0, 0, 103, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 103, + 103, 103, 103, 126, 126, 126, 126, 126, 126, 0, + + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 126, 126, 133, 133, 133, 133, 133, 133, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 133, 137, 137, 137, 137, 137, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 137, 141, 141, 141, 141, 141, 141, 0, 141, 0, @@ -590,22 +595,21 @@ static yyconst flex_int16_t yy_chk[608] = 143, 143, 143, 143, 143, 0, 143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 143, - 149, 149, 149, 149, 149, 149, 149, 149, 150, 150, - 150, 150, 0, 150, 151, 151, 151, 151, 152, 152, - 152, 152, 153, 153, 153, 153, 154, 154, 154, 154, - - 155, 155, 155, 155, 155, 155, 0, 155, 156, 156, - 156, 156, 0, 156, 157, 0, 157, 158, 158, 158, - 158, 158, 0, 158, 159, 159, 159, 159, 159, 0, - 159, 160, 160, 160, 160, 160, 0, 160, 161, 0, - 161, 162, 0, 162, 163, 163, 164, 0, 164, 165, - 0, 165, 166, 0, 166, 148, 148, 148, 148, 148, + + 149, 149, 149, 149, 149, 149, 149, 150, 150, 150, + 150, 150, 151, 151, 151, 151, 152, 152, 152, 152, + 153, 153, 153, 153, 154, 154, 154, 154, 155, 155, + 155, 155, 155, 155, 156, 156, 156, 156, 156, 157, + 0, 157, 158, 158, 158, 158, 158, 158, 159, 159, + 159, 159, 159, 159, 160, 160, 160, 160, 160, 160, + 161, 0, 161, 162, 0, 162, 163, 163, 164, 0, + 164, 165, 0, 165, 166, 0, 166, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, + 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, - - 148, 148, 148, 148, 148, 148, 148 + 148, 148, 148, 148, 148, 148, 148, 148, 148 } ; /* The intent behind this definition is that it'll catch @@ -664,7 +668,7 @@ static void vt100_parser_handle_osc1(VT100Screen *vt, char *buf, size_t len); static void vt100_parser_handle_osc2(VT100Screen *vt, char *buf, size_t len); static void vt100_parser_handle_ascii(VT100Screen *vt, char *text, size_t len); static void vt100_parser_handle_text(VT100Screen *vt, char *text, size_t len); -#line 668 "src/parser.c" +#line 672 "src/parser.c" #define INITIAL 0 @@ -915,7 +919,7 @@ YY_DECL #line 122 "src/parser.l" -#line 919 "src/parser.c" +#line 923 "src/parser.c" while ( 1 ) /* loops until end-of-file is reached */ { @@ -1202,62 +1206,52 @@ YY_RULE_SETUP } YY_BREAK case 51: -/* rule 51 can match eol */ YY_RULE_SETUP #line 194 "src/parser.l" { fprintf(stderr, - "unhandled OSC sequence: \\033%*s\\%hho\n", - (int)yyleng - 2, yytext + 1, yytext[yyleng - 1]); + "%d unhandled OSC sequence: \\033%*s\\007\n", + (int)yyleng, (int)yyleng - 5, yytext + 1); } YY_BREAK case 52: +/* rule 52 can match eol */ YY_RULE_SETUP #line 200 "src/parser.l" -{ - fprintf(stderr, - "unhandled OSC sequence: \\033%*s\n", - (int)yyleng - 1, yytext + 1); -} - YY_BREAK -case 53: -/* rule 53 can match eol */ -YY_RULE_SETUP -#line 206 "src/parser.l" { fprintf(stderr, "unhandled escape sequence: \\%hho\n", yytext[1]); } YY_BREAK -case 54: +case 53: YY_RULE_SETUP -#line 210 "src/parser.l" +#line 204 "src/parser.l" { fprintf(stderr, "unhandled escape sequence: %*s\n", (int)yyleng - 1, yytext + 1); } YY_BREAK -case 55: -/* rule 55 can match eol */ +case 54: +/* rule 54 can match eol */ YY_RULE_SETUP -#line 216 "src/parser.l" +#line 210 "src/parser.l" { fprintf(stderr, "unhandled control character: \\%hho\n", yytext[0]); } YY_BREAK -case 56: +case 55: YY_RULE_SETUP -#line 220 "src/parser.l" +#line 214 "src/parser.l" { fprintf(stderr, "invalid utf8 byte: \\%hho\n", yytext[0]); } YY_BREAK -case 57: +case 56: YY_RULE_SETUP -#line 224 "src/parser.l" +#line 218 "src/parser.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1261 "src/parser.c" +#line 1255 "src/parser.c" case YY_END_OF_BUFFER: { @@ -2349,7 +2343,7 @@ static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 224 "src/parser.l" +#line 218 "src/parser.l" diff --git a/src/parser.h b/src/parser.h index a250957..e4f71da 100644 --- a/src/parser.h +++ b/src/parser.h @@ -330,7 +330,7 @@ extern int vt100_parser_yylex (yyscan_t yyscanner); #undef YY_DECL #endif -#line 224 "src/parser.l" +#line 218 "src/parser.l" #line 337 "src/parser.h" diff --git a/src/parser.l b/src/parser.l index 8d63b05..f36a4e6 100644 --- a/src/parser.l +++ b/src/parser.l @@ -174,7 +174,7 @@ static void vt100_parser_handle_text(VT100Screen *vt, char *text, size_t len); {LEAD4}{CONT}?{CONT}? | {CSI}[<=?]?{CSIPARAMS}[0-9;] | {CSI} | -{OSC} | +{OSC}{CHAR}* | {ESC} return yyleng; <> return 0; @@ -191,16 +191,10 @@ static void vt100_parser_handle_text(VT100Screen *vt, char *text, size_t len); (int)yyleng - 1, yytext + 1); } -{OSC}{CTRL} { +{OSC}{CHAR}*{ST} { fprintf(stderr, - "unhandled OSC sequence: \\033%*s\\%hho\n", - (int)yyleng - 2, yytext + 1, yytext[yyleng - 1]); -} - -{OSC}{CHAR} { - fprintf(stderr, - "unhandled OSC sequence: \\033%*s\n", - (int)yyleng - 1, yytext + 1); + "unhandled OSC sequence: \\033%*s\\007\n", + (int)yyleng - 2, yytext + 1); } {ESC}{CTRL} { -- cgit v1.2.3-54-g00ecf