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. --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 7e5c7a98..5038b639 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.167 2012/11/19 17:22:26 schwarze Exp $ */ +/* $Id: main.c,v 1.168 2014/01/05 20:26:36 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011, 2012 Ingo Schwarze @@ -140,7 +140,7 @@ main(int argc, char *argv[]) /* NOTREACHED */ } - curp.mp = mparse_alloc(type, curp.wlevel, mmsg, &curp, defos); + curp.mp = mparse_alloc(type, curp.wlevel, mmsg, defos, 0); /* * Conditionally start up the lookaside buffer before parsing. -- cgit v1.2.3-56-ge451