Lines Matching +defs:key +defs:value
41 process_line(char *line, char **key, char **value, char **comment)
45 *key = &line[1];
46 *value = NULL;
54 * *key: value/comment
56 * *key value/comment: data
66 * *key value/comment: data
76 *value = ptr;
102 char *key = NULL, *value = NULL, *text = NULL;
104 /* we want *key...: "value" */
114 process_line(line, &key, &value, &text);
116 if ((strcasecmp(key, "PageSize") == 0) ||
117 (strcasecmp(key, "InputSlot") == 0))
118 key = "media";
120 if (strcasecmp(key, "OpenGroup") == 0) {
121 if (value == NULL)
122 value = "unknown";
123 current_group_name = strdup(value);
124 } else if (strcasecmp(key, "OpenUI") == 0) {
125 if ((strcasecmp(value, "PageSize") == 0) ||
126 (strcasecmp(value, "InputSlot") == 0))
127 value = "media";
128 snprintf(capability, sizeof (capability), "%s", value);
130 "%s-default", value);
132 "%s-supported", value);
134 } else if (strcasecmp(key, "CloseGroup") == 0) {
136 } else if (strcasecmp(key, "CloseUI") == 0) {
139 } else if (strcasecmp(key, "Manufacturer") == 0) {
142 "printer-make", value);
143 } else if (strcasecmp(key, "ModelName") == 0) {
146 "printer-model", value);
147 } else if (strcasecmp(key, "ShortNickName") == 0) {
150 "printer-make-and-model", value);
151 } else if ((strncasecmp(key, "Default", 7) == 0) && ui) {
154 def, value);
155 } else if ((strcasecmp(key, capability) == 0) && ui) {
158 supported, value);