Lines Matching refs:key
37 * kva_match(): Given a key-value array and a key, return a pointer to the
38 * value that matches the key.
41 kva_match(kva_t *kva, char *key)
46 if (kva == NULL || key == NULL) {
51 if (strcmp(data[i].key, key) == 0) {
73 if (data[i].key != NULL) {
74 free(data[i].key);
75 data[i].key = NULL;
88 * the given key.
91 _kva_free_value(kva_t *kva, char *key)
104 if (strcmp(data->key, key) == 0 && data->value != NULL) {
113 * new_kva(): Allocate a key-value array.
132 * _str2kva(): Given a string (s) of key-value pairs, separated by delimeter
133 * (del), place the values into the key value array (nkva).
144 char *key;
181 key = _strtok_escape(pair, ass, &last_key);
182 if (key != NULL) {
183 data[nkva->length].key = do_unescape(key, &err);
226 * _kva2str(): Given an array of key-value pairs, place them into a string
259 if (data[i].key != NULL && data[i].key[0] != '\0' &&
261 char *key, *val;
263 cdel, do_escape(data[i].key, &key, esc, &err), ass,
266 free(key);
288 _insert2kva(kva_t *kva, char *key, char *value)
298 if (strcmp(data[i].key, key) == 0) {
328 new_data[i].key = _strdup_null(old_data[i].key);
406 data[i].key != NULL ? data[i].key : "NULL",