| 857 | } |
| 858 | |
| 859 | static bool ti_build_macros(cbm_ti_source_t *s) { |
| 860 | for (int f = 0; f < s->file_count; f++) { |
| 861 | if (!s->files[f].header) { |
| 862 | continue; |
| 863 | } |
| 864 | for (int line = 1; line <= s->files[f].line_count; line++) { |
| 865 | size_t len = 0; |
| 866 | const char *text = cbm_ti_source_line(s, f, line, &len); |
| 867 | cbm_ti_span_t name; |
| 868 | size_t body = 0; |
| 869 | if (cbm_ti_match_define(text, len, &name, &body) && |
| 870 | !ti_read_macro(s, f, &line, name, body)) { |
| 871 | return false; |
| 872 | } |
| 873 | } |
| 874 | } |
| 875 | return true; |
| 876 | } |
| 877 | |
| 878 | const cbm_ti_macro_t *cbm_ti_source_macros(const cbm_ti_source_t *s, int *count) { |
| 879 | if (count) { |
no test coverage detected