| 42 |
|
|
| 43 |
if (skip_ctrl_seq && c == '\033' && str[i + 1] == '[') // Skip control sequence |
if (skip_ctrl_seq && c == '\033' && str[i + 1] == '[') // Skip control sequence |
| 44 |
{ |
{ |
| 45 |
for (i = i + 2; isdigit(str[i]) || str[i] == ';' || str[i] == '?'; i++) |
for (i = i + 2; isdigit((int)str[i]) || str[i] == ';' || str[i] == '?'; i++) |
| 46 |
; |
; |
| 47 |
|
|
| 48 |
if (str[i] == 'm') // valid |
if (str[i] == 'm') // valid |
| 49 |
{ |
{ |
| 50 |
// skip |
// skip |
| 51 |
} |
} |
| 52 |
else if (isalpha(str[i])) |
else if (isalpha((int)str[i])) |
| 53 |
{ |
{ |
| 54 |
// unsupported ANSI CSI command |
// unsupported ANSI CSI command |
| 55 |
} |
} |
| 203 |
// Exceed max_line_cnt |
// Exceed max_line_cnt |
| 204 |
if (line_cnt + 1 >= line_offsets_count) |
if (line_cnt + 1 >= line_offsets_count) |
| 205 |
{ |
{ |
| 206 |
// log_error("Line count %d reaches limit %d\n", line_cnt + 1, line_offsets_count); |
#ifdef _DEBUG |
| 207 |
|
log_error("Line count %d reaches limit %d\n", line_cnt + 1, line_offsets_count); |
| 208 |
|
#endif |
| 209 |
return line_cnt; |
return line_cnt; |
| 210 |
} |
} |
| 211 |
|
|