void render_string(const char * const string,
const char * const mode) {
for (const char * s = string; *s != '\00';) {
- int f = 0;
+ int f = 0;
size_t token_index = 0;
- int offset;
+ int offset = 0;
for (; token_index < token_table.element_count; token_index++) {
- token_t * t = vector_get(&token_table,
- token_index);
+ token_t * t = *(token_t**)vector_get(&token_table,
+ token_index);
f = token_fits(t, string, s - string, &offset);
if (f) {
break;
regex_t * regex_compile(const char * const pattern) {
regex_t * regex = (regex_t *)malloc(sizeof(regex_t));
regex->str = strdup(pattern);
- vector_init(®ex->delta_table, sizeof(delta_t), 0UL);
- vector_init(®ex->catch_table, sizeof(offshoot_t), 0UL);
- vector_init(regex.delta_table, sizeof(delta_t), 0);
- vector_init(regex.catch_table, sizeof(offshoot_t), 0);
++ vector_init(®ex->delta_table, sizeof(delta_t*), 0UL);
++ vector_init(®ex->catch_table, sizeof(offshoot_t*), 0UL);
int state = 0;