-// Callback. Adds a new entry to the dictionary if necessary
-// This is used in pass 1 to determine layout of dictionary
-// and to load any databases mentioned
-static void prepare_dictionary(struct setting *set)
-{
- int i;
- char *p;
-
- // If target address is not wildcard, add the database
- if (*set->target && !zurl_wildcard(set->target))
- find_database(set->target, 0);
-
- // Determine if we already have a dictionary entry
- if (!strncmp(set->name, "pz:", 3) && (p = strchr(set->name + 3, ':')))
- *(p + 1) = '\0';
- for (i = 0; i < dictionary->num; i++)
- if (!strcmp(dictionary->dict[i], set->name))
- return;
-
- if (!strncmp(set->name, "pz:", 3)) // Probably a typo in config file
- {
- yaz_log(YLOG_FATAL, "Unknown pz: setting '%s'", set->name);
- exit(1);
- }