+ }
+ else if (!yaz_matchstr(argv[0], "completeness") && argc == 2)
+ {
+ zm->completeness = atoi(argv[1]);
+ }
+ else if (!yaz_matchstr(argv[0], "position") && argc == 2)
+ {
+ zm->positioned = atoi(argv[1]);
+ }
+ else if (!yaz_matchstr(argv[0], "alwaysmatches") && argc == 2)
+ {
+ if (zm->type != ZEBRA_MAP_TYPE_STATICRANK)
+ zm->alwaysmatches = atoi(argv[1]);
+ else
+ {
+ yaz_log(YLOG_WARN|YLOG_FATAL, "%s:%d: alwaysmatches for "
+ "staticrank is invalid", fname, lineno);
+ return -1;
+ }
+ }
+ else if (!yaz_matchstr(argv[0], "firstinfield") && argc == 2)
+ {
+ zm->first_in_field = atoi(argv[1]);
+ }
+ else if (!yaz_matchstr(argv[0], "entrysize") && argc == 2)
+ {
+ if (zm->type == ZEBRA_MAP_TYPE_SORT)
+ zm->u.sort.entry_size = atoi(argv[1]);
+ else
+ {
+ yaz_log(YLOG_WARN,
+ "%s:%d: entrysize only valid in sort section",
+ fname, lineno);
+ return -1;
+ }
+ }
+ else if (!yaz_matchstr(argv[0], "simplechain"))
+ {
+ zm->use_chain = 1;
+#if YAZ_HAVE_ICU
+ zm->icu_chain = 0;
+#endif
+ }
+ else if (!yaz_matchstr(argv[0], "icuchain"))
+ {
+ char full_path[1024];
+ if (!yaz_filepath_resolve(argv[1], zms->tabpath, zms->tabroot,
+ full_path))
+ {
+ yaz_log(YLOG_WARN, "%s:%d: Could not locate icuchain config '%s'",
+ fname, lineno, argv[1]);
+ return -1;
+ }
+#if YAZ_HAVE_XML2
+ zm->doc = xmlParseFile(full_path);
+ if (!zm->doc)
+ {
+ yaz_log(YLOG_WARN, "%s:%d: Could not load icuchain config '%s'",
+ fname, lineno, argv[1]);
+ return -1;
+ }
+ else