-/* This function is for private use -- callers should use set_preference() instead
- */
-void store_preference(char *key, char *value) {
-
- struct wcpref *ptr = NULL;
-
- if (WC->first_pref == NULL) {
- WC->first_pref = malloc(sizeof(struct wcpref));
- WC->first_pref->next = NULL;
- WC->first_pref->pref_key = strdup(key);
- WC->first_pref->pref_value = strdup(value);
- return;
- }
-
- for (ptr = WC->first_pref; ptr != NULL; ptr = ptr->next) {
- if (!strcasecmp(ptr->pref_key, key)) {
- free(ptr->pref_value);
- ptr->pref_value = strdup(value);
- return;
- }
- }
-
- ptr = malloc(sizeof(struct wcpref));
- ptr->pref_key = strdup(key);
- ptr->pref_value = strdup(value);
- ptr->next = WC->first_pref;
- WC->first_pref = ptr;
-}
-