diff options
author | 2014-01-05 20:26:27 +0000 | |
---|---|---|
committer | 2014-01-05 20:26:27 +0000 | |
commit | f1da507fdd28f0ef6cf390c0be3a759d812fde8b (patch) | |
tree | 44f79d233e003ad6cef81a350a22c69bbffba1d0 /usr.bin/mandoc/libmdoc.h | |
parent | Don't use the first 64KB for anything, including tramps. Move tramps and (diff) | |
download | wireguard-openbsd-f1da507fdd28f0ef6cf390c0be3a759d812fde8b.tar.xz wireguard-openbsd-f1da507fdd28f0ef6cf390c0be3a759d812fde8b.zip |
Add an option -Q (quick) to mandocdb(8)
for accelerated generation of reduced-size databases.
Implement this by allowing the parsers to optionally
abort the parse sequence after the NAME section.
While here, garbage collect the unused void *arg attribute
of struct mparse and mparse_alloc().
This reduces the processing time of mandocdb(8) on /usr/share/man
by a factor of 2 and the database size by a factor of 4.
However, it still takes 5 times the time and 6 times the space
of makewhatis(8), so more work is clearly needed.
Diffstat (limited to 'usr.bin/mandoc/libmdoc.h')
-rw-r--r-- | usr.bin/mandoc/libmdoc.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mandoc/libmdoc.h b/usr.bin/mandoc/libmdoc.h index 1a51844470c..cd74739dfb8 100644 --- a/usr.bin/mandoc/libmdoc.h +++ b/usr.bin/mandoc/libmdoc.h @@ -1,4 +1,4 @@ -/* $Id: libmdoc.h,v 1.52 2013/10/21 23:32:32 schwarze Exp $ */ +/* $Id: libmdoc.h,v 1.53 2014/01/05 20:26:27 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013 Ingo Schwarze <schwarze@openbsd.org> @@ -26,6 +26,7 @@ enum mdoc_next { struct mdoc { struct mparse *parse; /* parse pointer */ char *defos; /* default argument for .Os */ + int quick; /* abort parse early */ int flags; /* parse flags */ #define MDOC_HALT (1 << 0) /* error in parse: halt */ #define MDOC_LITERAL (1 << 1) /* in a literal scope */ |