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 pBAGreBJ024475 for ; Sat, 10 Dec 2011 11:53:40 -0500 (EST) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id pBAGreYN032420; Sat, 10 Dec 2011 11:53:40 -0500 (EST) Date: Sat, 10 Dec 2011 11:53:40 -0500 (EST) Message-Id: <201112101653.pBAGreYN032420@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: Fix selection of arch-specific manuals: (1) Correctly compare X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Fix selection of arch-specific manuals: (1) Correctly compare cat vs. man paths. (2) Compare arch (and section) names case-insensitively. Problem noticed by kristaps@. 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.31 retrieving revision 1.32 diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.31 -r1.32 --- mandocdb.c +++ mandocdb.c @@ -579,14 +579,14 @@ index_merge(const struct of *of, struct if (0 == use_all) { assert(of->sec); assert(msec); - if (strcmp(msec, of->sec)) + if (strcasecmp(msec, of->sec)) continue; if (NULL == arch) { if (NULL != of->arch) continue; } else if (NULL == of->arch || - strcmp(arch, of->arch)) + strcasecmp(arch, of->arch)) continue; } @@ -1559,6 +1559,10 @@ ofile_dirbuild(const char *dir, const ch buf[0] = '\0'; strlcat(buf, dir, MAXPATHLEN); p = strrchr(buf, '/'); + if (NULL != parch && NULL != p) + for (p--; p > buf; p--) + if ('/' == *p) + break; if (NULL == p) p = buf; else -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv