Lines Matching refs:key

46  *	kvp_create(const char *key, const void *value)
48 * const char *key
49 * - key for key/value pair
51 * - value for key/value pair
54 * - pointer to structure containing the key/value pair
58 ns_kvp_create(const char *key, const char *value)
63 kvp->key = strdup(key);
73 if (kvp->key != NULL)
74 free(kvp->key);
86 * ns_kvp_match_key(const ns_kvp_t *kvp, const char *key)
89 * - key/value pair to check
90 * const char *key
91 * - key for matching
98 ns_kvp_match_key(const ns_kvp_t *kvp, char *key)
100 if ((kvp != NULL) && (kvp->key != NULL) && (key != NULL))
101 return (strcmp(kvp->key, key));
108 * ns_r_get_value(const char *key, const ns_printer_t *printer)
110 * const char *key
111 * - key for matching
120 ns_r_get_value(const char *key, const ns_printer_t *printer, int level)
124 if ((key == NULL) || (printer == NULL) ||
133 (COMP_T)ns_kvp_match_key, (void *)key)) != NULL) {
134 void *value = string_to_value(key, kvp->value);
137 if (strcmp(key, NS_KEY_BSDADDR) == 0) {
151 if ((strcmp((*attrs)->key, NS_KEY_ALL) == 0) ||
152 (strcmp((*attrs)->key, NS_KEY_GROUP) == 0)) {
155 for (printers = string_to_value((*attrs)->key,
161 if ((value = ns_r_get_value(key, printer,
166 } else if (strcmp((*attrs)->key, NS_KEY_LIST) == 0) {
169 for (printers = string_to_value((*attrs)->key,
172 if ((value = ns_r_get_value(key, *printers,
176 } else if (strcmp((*attrs)->key, NS_KEY_USE) == 0) {
180 if ((value = ns_r_get_value(key, printer,
184 value = string_to_value(key, string);
201 ns_get_value(const char *key, const ns_printer_t *printer)
203 return (ns_r_get_value(key, printer, 0));
208 * ns_get_value_string() gets the value of the key passed in from the
212 ns_get_value_string(const char *key, const ns_printer_t *printer)
214 return ((char *)value_to_string(key, ns_get_value(key, printer)));
223 ns_set_value(const char *key, const void *value, ns_printer_t *printer)
225 return (ns_set_value_from_string(key,
226 value_to_string(key, (void *)value), printer));
235 ns_set_value_from_string(const char *key, const char *string,
241 if (key == NULL)
249 (void *)key)) == NULL) &&
251 kvp->key = strdup(key);