=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mandocdb.c,v retrieving revision 1.72 retrieving revision 1.73 diff -c -r1.72 -r1.73 *** src/usr.bin/mandoc/mandocdb.c 2014/03/18 16:56:06 1.72 --- src/usr.bin/mandoc/mandocdb.c 2014/03/19 21:50:59 1.73 *************** *** 1,4 **** ! /* $Id: mandocdb.c,v 1.72 2014/03/18 16:56:06 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze --- 1,4 ---- ! /* $Id: mandocdb.c,v 1.73 2014/03/19 21:50:59 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze *************** *** 164,170 **** static char tempfilename[32]; static char *progname; static int nodb; /* no database changes */ ! static int quick; /* abort the parse early */ static int use_all; /* use all found files */ static int verb; /* print what we're doing */ static int warnings; /* warn about crap */ --- 164,170 ---- static char tempfilename[32]; static char *progname; static int nodb; /* no database changes */ ! static int mparse_options; /* abort the parse early */ static int use_all; /* use all found files */ static int verb; /* print what we're doing */ static int warnings; /* warn about crap */ *************** *** 343,348 **** --- 343,349 ---- path_arg = NULL; op = OP_DEFAULT; + mparse_options = MPARSE_SO; while (-1 != (ch = getopt(argc, argv, "aC:d:nQT:tu:vW"))) switch (ch) { *************** *** 363,369 **** nodb = 1; break; case ('Q'): ! quick = 1; break; case ('T'): if (strcmp(optarg, "utf8")) { --- 364,370 ---- nodb = 1; break; case ('Q'): ! mparse_options |= MPARSE_QUICK; break; case ('T'): if (strcmp(optarg, "utf8")) { *************** *** 403,410 **** } exitcode = (int)MANDOCLEVEL_OK; ! mp = mparse_alloc(MPARSE_AUTO, ! MANDOCLEVEL_FATAL, NULL, NULL, quick); mc = mchars_alloc(); ohash_init(&mpages, 6, &mpages_info); --- 404,410 ---- } exitcode = (int)MANDOCLEVEL_OK; ! mp = mparse_alloc(mparse_options, MANDOCLEVEL_FATAL, NULL, NULL); mc = mchars_alloc(); ohash_init(&mpages, 6, &mpages_info); *************** *** 1977,1983 **** rc = sqlite3_open_v2(MANDOC_DB "~", &db, ofl, NULL); if (SQLITE_OK == rc) goto create_tables; ! if (quick) { exitcode = (int)MANDOCLEVEL_SYSERR; say(MANDOC_DB "~", "%s", sqlite3_errmsg(db)); return(0); --- 1977,1983 ---- rc = sqlite3_open_v2(MANDOC_DB "~", &db, ofl, NULL); if (SQLITE_OK == rc) goto create_tables; ! if (MPARSE_QUICK & mparse_options) { exitcode = (int)MANDOCLEVEL_SYSERR; say(MANDOC_DB "~", "%s", sqlite3_errmsg(db)); return(0);