Lines Matching refs:key

71 static data_unset *configparser_get_variable(config_t *ctx, const buffer *key) {  in configparser_get_variable()  argument
76 fprintf(stderr, "get var %s\n", key->ptr); in configparser_get_variable()
80 fprintf(stderr, "get var on block: %s\n", dc->key.ptr); in configparser_get_variable()
83 if (NULL != (du = array_get_element_klen(dc->value, BUF_PTR_LEN(key)))) { in configparser_get_variable()
85 buffer_clear(&du_copy->key); in configparser_get_variable()
131 if (buffer_is_unset(&du->key) in configparser_merge_data()
132 || !(ddu = array_get_element_klen(dst, BUF_PTR_LEN(&du->key)))){ in configparser_merge_data()
135 fprintf(stderr, "Duplicate array-key '%s'\n", du->key.ptr); in configparser_merge_data()
260 const uint32_t comp_offset = buffer_clen(&ctx->current->key)+3; in configparser_parse_condition()
264 { BUF_PTR_LEN(&ctx->current->key) } in configparser_parse_condition()
288 buffer_copy_buffer(&dc->key, tb); in configparser_parse_condition()
290 dc->comp_key = dc->key.ptr + comp_offset; in configparser_parse_condition()
355 buffer_append_str2(&dc->key, BUF_PTR_LEN(&ctx->current->key), in configparser_parse_else_condition()
385 %type key {buffer *}
395 %destructor key { buffer_free($$); }
401 varline ::= key(A) ASSIGN expression(B). { in key() function
403 buffer_copy_buffer(&B->key, A); in key()
407 ctx->current->key.ptr, A->ptr); in key()
409 } else if (NULL == array_get_element_klen(ctx->current->value, BUF_PTR_LEN(&B->key))) { in key()
415 ctx->current->key.ptr, B->key.ptr); in key()
425 varline ::= key(A) FORCE_ASSIGN expression(B). { in key() function
430 ctx->current->key.ptr, A->ptr); in key()
433 buffer_copy_buffer(&B->key, A); in key()
444 varline ::= key(A) APPEND expression(B). { in key() function
452 ctx->current->key.ptr, A->ptr); in key()
460 buffer_copy_buffer(&du->key, A); in key()
464 buffer_copy_buffer(&B->key, A); in key()
475 key(A) ::= LKEY(B). { in key() function
507 value(A) ::= key(B). { in value()
572 if (buffer_is_unset(&B->key) || in aelements()
573 NULL == array_get_element_klen(C, BUF_PTR_LEN(&B->key))) { in aelements()
578 B->key.ptr); in aelements()
614 buffer_copy_buffer(&C->key, B); in aelement()
673 dc = (data_config *)array_extract_element_klen(ctx->all_configs, BUF_PTR_LEN(&C->key)); in condlines()
675 buffer_copy_buffer(&C->key, &B->key); in condlines()
676 C->comp_key = C->key.ptr + (B->comp_key - B->key.ptr); in condlines()
680 pos = buffer_clen(&C->key) - buffer_clen(&B->string) - 5; in condlines()
683 C->key.ptr[pos] = '='; /* opposite cond */ in condlines()
687 C->key.ptr[pos] = '!'; /* opposite cond */ in condlines()
691 C->key.ptr[pos] = '='; /* opposite cond */ in condlines()
695 C->key.ptr[pos] = '!'; /* opposite cond */ in condlines()
699 C->key.ptr[pos] = '!'; /* opposite cond */ in condlines()
703 C->key.ptr[pos] = '!'; /* opposite cond */ in condlines()
710 if (NULL == (dc = configparser_get_data_config(ctx->all_configs, BUF_PTR_LEN(&C->key)))) { in condlines()