summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2014-10-28 17:35:43 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2014-10-28 17:35:43 +0000
commite65351f6a3dd637d14b3fcf8be0e8367a1aacc0d (patch)
tree492cb187aebcd5f308bdfabec30d31afbaa8de63 /usr.bin/mandoc/mandocdb.c
parent24322f395665631cc678573c61a088bf15bc333c (diff)
Make the character table available to libroff so it can check the
validity of character escape names and warn about unknown ones. This requires mchars_spec2cp() to report unknown names again. Fortunately, that doesn't require changing the calling code because according to groff, invalid character escapes should not produce output anyway, and now that we warn about them, that's fine.
Diffstat (limited to 'usr.bin/mandoc/mandocdb.c')
-rw-r--r--usr.bin/mandoc/mandocdb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c
index e4e0983ef39..3c063feec2d 100644
--- a/usr.bin/mandoc/mandocdb.c
+++ b/usr.bin/mandoc/mandocdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mandocdb.c,v 1.122 2014/10/27 13:29:30 schwarze Exp $ */
+/* $OpenBSD: mandocdb.c,v 1.123 2014/10/28 17:35:42 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -415,9 +415,9 @@ mandocdb(int argc, char *argv[])
}
exitcode = (int)MANDOCLEVEL_OK;
- mp = mparse_alloc(mparse_options, MANDOCLEVEL_FATAL, NULL, NULL);
mc = mchars_alloc();
-
+ mp = mparse_alloc(mparse_options, MANDOCLEVEL_FATAL, NULL,
+ mc, NULL);
ohash_init(&mpages, 6, &mpages_info);
ohash_init(&mlinks, 6, &mlinks_info);
@@ -515,8 +515,8 @@ mandocdb(int argc, char *argv[])
}
out:
manpath_free(&dirs);
- mchars_free(mc);
mparse_free(mp);
+ mchars_free(mc);
mpages_free();
ohash_delete(&mpages);
ohash_delete(&mlinks);