From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s3J2usQA017650 for ; Fri, 18 Apr 2014 22:56:54 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s3J2usGe015786; Fri, 18 Apr 2014 22:56:54 -0400 (EDT) Date: Fri, 18 Apr 2014 22:56:54 -0400 (EDT) Message-Id: <201404190256.s3J2usGe015786@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Two minor tweaks regarding the fallback from -u/-d to default X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Two minor tweaks regarding the fallback from -u/-d to default mode: (1) Use all files found on the command line, but do *not* use all stray files found during fallback tree recursion. (2) If the fallback works, call that success, i.e. exit(0). As pointed out by naddy@, the latter is required for ports' happiness. Modified Files: -------------- mdocml: mandocdb.c Revision Data ------------- Index: mandocdb.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandocdb.c,v retrieving revision 1.139 retrieving revision 1.140 diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.139 -r1.140 --- mandocdb.c +++ mandocdb.c @@ -430,19 +430,20 @@ main(int argc, char *argv[]) ohash_init(&mlinks, 6, &mlinks_info); if (OP_UPDATE == op || OP_DELETE == op || OP_TEST == op) { - /* - * Force processing all files. - */ - use_all = 1; /* * All of these deal with a specific directory. - * Jump into that directory then collect files specified - * on the command-line. + * Jump into that directory first. */ if (0 == set_basedir(path_arg)) goto out; + if (dbopen(1)) { + /* + * The existing database is usable. Process + * all files specified on the command-line. + */ + use_all = 1; for (i = 0; i < argc; i++) filescan(argv[i]); if (OP_TEST != op) @@ -452,6 +453,7 @@ main(int argc, char *argv[]) * Database missing or corrupt. * Recreate from scratch. */ + exitcode = (int)MANDOCLEVEL_OK; op = OP_DEFAULT; if (0 == treescan()) goto out; -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv