returns STAG_* information about the line
| 555 | |
| 556 | // returns STAG_* information about the line |
| 557 | int8_t _parse_line_information(char *line) { |
| 558 | for (int i = 0; i < Num_languages; i++) { |
| 559 | if (Language_tags[i].length == -1) |
| 560 | Language_tags[i].length = strlen(Language_tags[i].tag); |
| 561 | |
| 562 | if (!strncmp(line, Language_tags[i].tag, Language_tags[i].length)) |
| 563 | return i; |
| 564 | } |
| 565 | |
| 566 | if (!strncmp(line, COMMENT_TAG, strlen(COMMENT_TAG))) |
| 567 | return STAG_COMMENT; |
| 568 | if (strlen(line) == 0) |
| 569 | return STAG_EMPTY; |
| 570 | return STAG_CONTINUE; |
| 571 | } |
| 572 | |
| 573 | // parses a string_tag out |
| 574 | char *_parse_string_tag(char *buffer) { |
no outgoing calls
no test coverage detected