| 265 |
} |
} |
| 266 |
} |
} |
| 267 |
|
|
| 268 |
if (str_in[i] == '\n') |
if (str_in[i] == '\n') // jump out of tag at end of line |
| 269 |
{ |
{ |
| 270 |
tag_name_pos = -1; // jump out of tag at end of line |
if (tag_start_pos != -1) // tag is not closed |
| 271 |
|
{ |
| 272 |
|
tag_end_pos = i - 1; |
| 273 |
|
tag_output_len = tag_end_pos - tag_start_pos + 1; |
| 274 |
|
if (j + tag_output_len >= buf_len) |
| 275 |
|
{ |
| 276 |
|
log_error("Buffer is not longer enough for output string %ld >= %d\n", j + tag_output_len, buf_len); |
| 277 |
|
str_out[j] = '\0'; |
| 278 |
|
return j; |
| 279 |
|
} |
| 280 |
|
|
| 281 |
|
memcpy(str_out + j, str_in + tag_start_pos, (size_t)tag_output_len); |
| 282 |
|
j += tag_output_len; |
| 283 |
|
} |
| 284 |
|
|
| 285 |
|
tag_start_pos = -1; |
| 286 |
|
tag_name_pos = -1; |
| 287 |
new_line = 1; |
new_line = 1; |
| 288 |
} |
} |
| 289 |
else if (str_in[i] == '\r') |
else if (str_in[i] == '\r') |
| 393 |
j += tag_output_len; |
j += tag_output_len; |
| 394 |
} |
} |
| 395 |
|
|
| 396 |
|
tag_start_pos = -1; |
| 397 |
tag_name_pos = -1; |
tag_name_pos = -1; |
| 398 |
} |
} |
| 399 |
} |
} |