Lines Matching refs:key
42 * kva_match(): Given a key-value array and a key, return a pointer to the
43 * value that matches the key.
46 kva_match(kva_t *kva, char *key)
51 if (kva == NULL || key == NULL) {
56 if (strcmp(data[i].key, key) == 0) {
78 if (data[i].key != NULL) {
79 free(data[i].key);
80 data[i].key = NULL;
93 * the given key.
96 _kva_free_value(kva_t *kva, char *key)
109 if (strcmp(data->key, key) == 0 && data->value != NULL) {
118 * new_kva(): Allocate a key-value array.
137 * _str2kva(): Given a string (s) of key-value pairs, separated by delimeter
138 * (del), place the values into the key value array (nkva).
149 char *key;
185 key = _strtok_escape(pair, ass, &last_key);
186 if (key != NULL) {
187 data[nkva->length].key = _do_unescape(key);
197 * _kva2str(): Given an array of key-value pairs, place them into a string
221 data[i].key, ass, data[i].value, del);
233 _insert2kva(kva_t *kva, char *key, char *value)
243 if (strcmp(data[i].key, key) == 0) {
273 new_data[i].key = _strdup_null(old_data[i].key);
404 data[i].key != NULL ? data[i].key : "NULL",