+
+out:
+ if (*manpath_default != '\0')
+ manpath_parseline(&conf->manpath, manpath_default, 0);
+}
+#endif
+
+void
+manconf_output(struct manoutput *conf, const char *cp)
+{
+ const char *const toks[] = {
+ "includes", "man", "paper", "style",
+ "indent", "width", "fragment", "mdoc"
+ };
+
+ size_t len, tok;
+
+ for (tok = 0; tok < sizeof(toks)/sizeof(toks[0]); tok++) {
+ len = strlen(toks[tok]);
+ if ( ! strncmp(cp, toks[tok], len) &&
+ strchr(" = ", cp[len]) != NULL) {
+ cp += len;
+ if (*cp == '=')
+ cp++;
+ while (isspace((unsigned char)*cp))
+ cp++;
+ break;
+ }
+ }
+
+ if (tok < 6 && *cp == '\0')
+ return;
+
+ switch (tok) {
+ case 0:
+ if (conf->includes == NULL)
+ conf->includes = mandoc_strdup(cp);
+ break;
+ case 1:
+ if (conf->man == NULL)
+ conf->man = mandoc_strdup(cp);
+ break;
+ case 2:
+ if (conf->paper == NULL)
+ conf->paper = mandoc_strdup(cp);
+ break;
+ case 3:
+ if (conf->style == NULL)
+ conf->style = mandoc_strdup(cp);
+ break;
+ case 4:
+ if (conf->indent == 0)
+ conf->indent = strtonum(cp, 0, 1000, NULL);
+ break;
+ case 5:
+ if (conf->width == 0)
+ conf->width = strtonum(cp, 58, 1000, NULL);
+ break;
+ case 6:
+ conf->fragment = 1;
+ break;
+ case 7:
+ conf->mdoc = 1;
+ break;
+ default:
+ break;
+ }