source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: Fix selection of arch-specific manuals: (1) Correctly compare
@ 2011-12-10 16:53 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2011-12-10 16:53 UTC (permalink / raw)
  To: source

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-12-10 16:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-10 16:53 mdocml: Fix selection of arch-specific manuals: (1) Correctly compare schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).