diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-01-05 20:26:28 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-01-05 20:26:28 +0000 |
commit | 066d14198ba63d4ee9755c04935d18cce5c3cf6e (patch) | |
tree | e3cdd0c8e5421d0a1de49bbf6c57a7a49d374fcf /usr.bin/mandoc/libman.h | |
parent | 7a2f31f19e4bbccde245f80943633337ad18ec0c (diff) |
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/libman.h')
-rw-r--r-- | usr.bin/mandoc/libman.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mandoc/libman.h b/usr.bin/mandoc/libman.h index fcff91d550b..45a78bc344c 100644 --- a/usr.bin/mandoc/libman.h +++ b/usr.bin/mandoc/libman.h @@ -1,4 +1,4 @@ -/* $Id: libman.h,v 1.32 2012/11/17 00:25:20 schwarze Exp $ */ +/* $Id: libman.h,v 1.33 2014/01/05 20:26:27 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -24,6 +24,7 @@ enum man_next { struct man { struct mparse *parse; /* parse pointer */ + int quick; /* abort parse early */ int flags; /* parse flags */ #define MAN_HALT (1 << 0) /* badness happened: die */ #define MAN_ELINE (1 << 1) /* Next-line element scope. */ |