+ new_element->name = xstrdup(name);
+ }
+ else if (!strcmp(cmd, "all"))
+ {
+ char *p;
+ data1_termlist **tp = &all;
+
+ if (all)
+ {
+ logf(LOG_WARN, "Too many ALL declarations in %s - ignored",
+ file);
+ continue;
+ }
+
+ p = args;
+ if (!res->attset)
+ {
+ logf(LOG_WARN, "No attset loaded in %s", file);
+ fclose(f);
+ return 0;
+ }
+ do
+ {
+ char attname[512], structure[512];
+ int r;
+
+ if (!(r = sscanf(p, "%511[^:,]:%511[^,]", attname,
+ structure)))
+ {
+ logf(LOG_WARN, "Syntax error in termlistspec in %s",
+ file);
+ fclose(f);
+ return 0;
+ }
+ *tp = nmem_malloc(data1_nmem_get(dh), sizeof(**tp));
+ if (!((*tp)->att = data1_getattbyname (dh, res->attset,
+ attname)))
+ {
+ logf(LOG_WARN, "Couldn't find att '%s' in attset",
+ attname);
+ fclose(f);
+ return 0;
+ }
+ if (r < 2) /* is the structure qualified? */
+ (*tp)->structure = DATA1S_word;
+ else if (!data1_matchstr(structure, "w"))
+ (*tp)->structure = DATA1S_word;
+ else if (!data1_matchstr(structure, "p"))
+ (*tp)->structure = DATA1S_phrase;
+
+ (*tp)->next = 0;
+ tp = &(*tp)->next;
+ }
+ while ((p = strchr(p, ',')) && *(++p));