From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Fix selection of arch-specific manuals: (1) Correctly compare
Date: Sat, 10 Dec 2011 11:53:40 -0500 (EST) [thread overview]
Message-ID: <201112101653.pBAGreYN032420@krisdoz.my.domain> (raw)
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
reply other threads:[~2011-12-10 16:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201112101653.pBAGreYN032420@krisdoz.my.domain \
--to=schwarze@mdocml.bsd.lv \
--cc=source@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).