Flush the current buffer as a token into out[]. */
| 157 | |
| 158 | /* Flush the current buffer as a token into out[]. */ |
| 159 | static void flush_token(char *buf, int *blen, char **out, int *count, int max_out) { |
| 160 | if (*blen > 0 && *count < max_out) { |
| 161 | buf[*blen] = '\0'; |
| 162 | out[(*count)++] = cbm_mem_strdup(CBM_MEM_CLASS_SEMANTIC, buf); |
| 163 | } |
| 164 | *blen = 0; |
| 165 | } |
| 166 | |
| 167 | int cbm_sem_tokenize(const char *name, char **out, int max_out) { |
| 168 | if (!name || !out || max_out <= 0) { |
no test coverage detected