Lines Matching refs:dc
17 static void configparser_push(config_t *ctx, data_config *dc, int isnew) { in configparser_push() argument
19 dc->context_ndx = ctx->all_configs->used; in configparser_push()
20 assert(dc->context_ndx > ctx->current->context_ndx); in configparser_push()
21 array_insert_unique(ctx->all_configs, (data_unset *)dc); in configparser_push()
22 dc->parent = ctx->current; in configparser_push()
23 array_insert_unique(dc->parent->childs, (data_unset *)dc); in configparser_push()
30 ctx->current = dc; in configparser_push()
42 data_config *dc; in configparser_get_variable() local
47 for (dc = ctx->current; dc; dc = dc->parent) { in configparser_get_variable()
49 fprintf(stderr, "get var on block: %s\n", dc->key->ptr); in configparser_get_variable()
50 array_print(dc->value, 0); in configparser_get_variable()
52 if (NULL != (du = array_get_element(dc->value, key->ptr))) { in configparser_get_variable()
1095 data_config *dc; in yy_reduce() local
1096 dc = (data_config *)array_get_element(ctx->srv->config_context, "global"); in yy_reduce()
1097 assert(dc); in yy_reduce()
1098 configparser_push(ctx, dc, 0); in yy_reduce()
1167 data_config *dc; in yy_reduce() local
1202 if (NULL != (dc = (data_config *)array_get_element(ctx->all_configs, b->ptr))) { in yy_reduce()
1203 configparser_push(ctx, dc, 0); in yy_reduce()
1228 dc = data_config_init(); in yy_reduce()
1230 buffer_copy_string_buffer(dc->key, b); in yy_reduce()
1231 buffer_copy_string_buffer(dc->op, op); in yy_reduce()
1232 buffer_copy_string_buffer(dc->comp_key, yymsp[-5].minor.yy0); in yy_reduce()
1233 buffer_append_string_len(dc->comp_key, CONST_STR_LEN("[\"")); in yy_reduce()
1234 buffer_append_string_buffer(dc->comp_key, yymsp[-3].minor.yy43); in yy_reduce()
1235 buffer_append_string_len(dc->comp_key, CONST_STR_LEN("\"]")); in yy_reduce()
1236 dc->cond = yymsp[-1].minor.yy27; in yy_reduce()
1240 dc->comp_key, comps[i].comp_key, comps[i].len)) { in yy_reduce()
1241 dc->comp = comps[i].comp; in yy_reduce()
1245 if (COMP_UNSET == dc->comp) { in yy_reduce()
1246 fprintf(stderr, "error comp_key %s", dc->comp_key->ptr); in yy_reduce()
1253 dc->string = buffer_init_buffer(rvalue); in yy_reduce()
1261 if (NULL == (dc->regex = in yy_reduce()
1263 dc->string = buffer_init_string(errptr); in yy_reduce()
1264 dc->cond = CONFIG_COND_UNSET; in yy_reduce()
1270 } else if (NULL == (dc->regex_study = in yy_reduce()
1271 pcre_study(dc->regex, 0, &errptr)) && in yy_reduce()
1276 … } else if (0 != (pcre_fullinfo(dc->regex, dc->regex_study, PCRE_INFO_CAPTURECOUNT, &captures))) { in yy_reduce()
1285 dc->string = buffer_init_buffer(rvalue); in yy_reduce()
1303 configparser_push(ctx, dc, 1); in yy_reduce()