From: Baptiste Daroussin <bapt@FreeBSD.org>
To: tech@mdocml.bsd.lv
Subject: Support MANPATH as an alias for manpath
Date: Fri, 3 Apr 2015 00:25:00 +0200 [thread overview]
Message-ID: <20150402222500.GG30115@ivaldir.etoilebsd.net> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 322 bytes --]
Hi,
I would like to minimize the modifications for FreeBSD when I will replace our
home made man(1) command to the mandoc one.
There is at least 2 thing I do want to keep:
MANPATH and MANCONFIG (I can skip MANLOCALE given I don't see a real usage for
it :))
Here is a first patch to support MANPATH
Best regards,
Bapt
[-- Attachment #1.2: support-MANPATH.diff --]
[-- Type: text/x-diff, Size: 1721 bytes --]
? :!
? ChangeLog
? Makefile.local
? config.h
? config.log
? demandoc
? makewhatis
? mandoc
? plop
? read.c.diff
? support-MANPATH.diff
Index: man.conf.5
===================================================================
RCS file: /cvs/mdocml/man.conf.5,v
retrieving revision 1.3
diff -u -r1.3 man.conf.5
--- man.conf.5 27 Mar 2015 21:33:20 -0000 1.3
+++ man.conf.5 2 Apr 2015 22:21:05 -0000
@@ -102,6 +102,9 @@
but using a historic and misleading syntax.
It is kept for backward compatibility for now,
but will eventually be removed.
+.It Ic MANPATH Ar path
+This directive provides the same finctionality as
+.Ic manpath .
.El
.Sh FILES
.Pa /etc/man.conf
Index: manpath.c
===================================================================
RCS file: /cvs/mdocml/manpath.c,v
retrieving revision 1.23
diff -u -r1.23 manpath.c
--- manpath.c 27 Mar 2015 17:37:25 -0000 1.23
+++ manpath.c 2 Apr 2015 22:21:05 -0000
@@ -209,7 +209,9 @@
static void
manconf_file(struct manconf *conf, const char *file)
{
- const char *const toks[] = { "manpath", "output", "_whatdb" };
+ const char *const toks[] = {
+ "MANPATH", "manpath", "output", "_whatdb"
+ };
FILE *stream;
char *cp, *ep;
@@ -241,17 +243,18 @@
}
switch (tok) {
- case 2: /* _whatdb */
+ case 3: /* _whatdb */
while (ep > cp && ep[-1] != '/')
ep--;
if (ep == cp)
continue;
*ep = '\0';
/* FALLTHROUGH */
- case 0: /* manpath */
+ case 1: /* manpath */
+ case 0: /* MANPATH */
manpath_add(&conf->manpath, cp, 0);
break;
- case 1: /* output */
+ case 2: /* output */
manconf_output(&conf->output, cp);
break;
default:
[-- Attachment #2: Type: application/pgp-signature, Size: 181 bytes --]
reply other threads:[~2015-04-02 22:25 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=20150402222500.GG30115@ivaldir.etoilebsd.net \
--to=bapt@freebsd.org \
--cc=tech@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).