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