| 252 |
new_line = 0; |
new_line = 0; |
| 253 |
} |
} |
| 254 |
|
|
| 255 |
|
if (lml_tag_disabled && new_line) |
| 256 |
|
{ |
| 257 |
|
new_line = 0; |
| 258 |
|
} |
| 259 |
|
|
| 260 |
if (str_in[i] == '\033' && str_in[i + 1] == '[') // Escape sequence |
if (str_in[i] == '\033' && str_in[i + 1] == '[') // Escape sequence |
| 261 |
{ |
{ |
| 262 |
for (k = i + 2; isdigit(str_in[k]) || str_in[k] == ';' || str_in[k] == '?'; k++) |
for (k = i + 2; isdigit(str_in[k]) || str_in[k] == ';' || str_in[k] == '?'; k++) |
| 285 |
{ |
{ |
| 286 |
tag_end_pos = i - 1; |
tag_end_pos = i - 1; |
| 287 |
tag_output_len = tag_end_pos - tag_start_pos + 1; |
tag_output_len = tag_end_pos - tag_start_pos + 1; |
| 288 |
CHECK_AND_APPEND_OUTPUT(str_out, buf_len, j, str_in + tag_start_pos, tag_output_len, line_width); |
|
| 289 |
|
if (line_width + tag_output_len > width) |
| 290 |
|
{ |
| 291 |
|
CHECK_AND_APPEND_OUTPUT(str_out, buf_len, j, "\n", 1, line_width); |
| 292 |
|
new_line = 1; |
| 293 |
|
line_width = 0; |
| 294 |
|
i--; // redo at current $i |
| 295 |
|
} |
| 296 |
|
else |
| 297 |
|
{ |
| 298 |
|
CHECK_AND_APPEND_OUTPUT(str_out, buf_len, j, str_in + tag_start_pos, tag_output_len, line_width); |
| 299 |
|
} |
| 300 |
} |
} |
| 301 |
|
|
| 302 |
if (fb_quote_level > 0) |
if (fb_quote_level > 0) |
| 309 |
fb_quote_level = 0; |
fb_quote_level = 0; |
| 310 |
} |
} |
| 311 |
|
|
| 312 |
|
if (new_line) |
| 313 |
|
{ |
| 314 |
|
continue; |
| 315 |
|
} |
| 316 |
|
|
| 317 |
tag_start_pos = -1; |
tag_start_pos = -1; |
| 318 |
tag_name_pos = -1; |
tag_name_pos = -1; |
| 319 |
new_line = 1; |
new_line = 1; |
| 320 |
line_width = 0; |
line_width = -1; |
| 321 |
} |
} |
| 322 |
else if (str_in[i] == '\r' || str_in[i] == '\7') |
else if (str_in[i] == '\r' || str_in[i] == '\7') |
| 323 |
{ |
{ |
| 406 |
if (!tag_name_found) |
if (!tag_name_found) |
| 407 |
{ |
{ |
| 408 |
tag_output_len = tag_end_pos - tag_start_pos + 1; |
tag_output_len = tag_end_pos - tag_start_pos + 1; |
| 409 |
|
|
| 410 |
|
if (line_width + tag_output_len > width) |
| 411 |
|
{ |
| 412 |
|
CHECK_AND_APPEND_OUTPUT(str_out, buf_len, j, "\n", 1, line_width); |
| 413 |
|
new_line = 1; |
| 414 |
|
line_width = 0; |
| 415 |
|
i--; // redo at current $i |
| 416 |
|
continue; |
| 417 |
|
} |
| 418 |
|
|
| 419 |
CHECK_AND_APPEND_OUTPUT(str_out, buf_len, j, str_in + tag_start_pos, tag_output_len, line_width); |
CHECK_AND_APPEND_OUTPUT(str_out, buf_len, j, str_in + tag_start_pos, tag_output_len, line_width); |
| 420 |
} |
} |
| 421 |
|
|