From 3d871d9086bbc5f79cd485dfb26b9d02a19cf2e3 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 5 Jan 2014 20:26:36 +0000 Subject: 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() and fix some errors in mandoc(3). 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. --- libmandoc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libmandoc.h') diff --git a/libmandoc.h b/libmandoc.h index ab243ff9..7a1b4219 100644 --- a/libmandoc.h +++ b/libmandoc.h @@ -1,4 +1,4 @@ -/* $Id: libmandoc.h,v 1.37 2014/01/05 19:10:56 joerg Exp $ */ +/* $Id: libmandoc.h,v 1.38 2014/01/05 20:26:36 schwarze Exp $ */ /* * Copyright (c) 2009, 2010, 2011, 2012 Kristaps Dzonsons * Copyright (c) 2013 Ingo Schwarze @@ -50,7 +50,7 @@ int mandoc_strntoi(const char *, size_t, int); const char *mandoc_a2msec(const char*); void mdoc_free(struct mdoc *); -struct mdoc *mdoc_alloc(struct roff *, struct mparse *, char *); +struct mdoc *mdoc_alloc(struct roff *, struct mparse *, char *, int); void mdoc_reset(struct mdoc *); int mdoc_parseln(struct mdoc *, int, char *, int); int mdoc_endparse(struct mdoc *); @@ -58,7 +58,7 @@ int mdoc_addspan(struct mdoc *, const struct tbl_span *); int mdoc_addeqn(struct mdoc *, const struct eqn *); void man_free(struct man *); -struct man *man_alloc(struct roff *, struct mparse *); +struct man *man_alloc(struct roff *, struct mparse *, int); void man_reset(struct man *); int man_parseln(struct man *, int, char *, int); int man_endparse(struct man *); -- cgit v1.2.3-56-ge451