From: Ingo Schwarze <schwarze@usta.de>
To: Andreas Voegele <andreas@andreasvoegele.com>
Cc: tech@mdocml.bsd.lv
Subject: Re: cgi.c does not add script name to links in manual pages
Date: Sat, 18 Mar 2017 17:23:35 +0100 [thread overview]
Message-ID: <20170318162335.GC52684@athene.usta.de> (raw)
In-Reply-To: <53dc1a39-71d8-e9fb-daa1-1b3b2dd3aa66@andreasvoegele.com>
Hi,
Andreas Voegele wrote on Tue, Feb 28, 2017 at 08:51:02AM +0100:
> attached is a patch that adds the script name to links in manual pages.
>
> Without the patch links point to "http://www.example.org/apropos.1"
> instead of "http://www.example.org/cgi-bin/man.cgi/apropos.1" even
> if the script name is not empty.
Committed. Thanks for the patch!
Ingo
Log Message:
-----------
Bugfix: use SCRIPT_NAME for .Xr hyperlinks.
Patch from <andreas at AndreasVoegele dot com>.
Modified Files:
--------------
mdocml:
cgi.c
Revision Data
-------------
Index: cgi.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/cgi.c,v
retrieving revision 1.151
retrieving revision 1.152
diff -Lcgi.c -Lcgi.c -u -p -r1.151 -r1.152
--- cgi.c
+++ cgi.c
@@ -839,7 +839,8 @@ resp_format(const struct req *req, const
conf.fragment = 1;
conf.style = mandoc_strdup(CSS_DIR "/mandoc.css");
usepath = strcmp(req->q.manpath, req->p[0]);
- mandoc_asprintf(&conf.man, "/%s%s%%N.%%S",
+ mandoc_asprintf(&conf.man, "/%s%s%s%s%%N.%%S",
+ scriptname, *scriptname == '\0' ? "" : "/",
usepath ? req->q.manpath : "", usepath ? "/" : "");
mparse_result(mp, &man, NULL);
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
prev parent reply other threads:[~2017-03-18 16:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-28 7:51 Andreas Vögele
2017-03-18 16:23 ` Ingo Schwarze [this message]
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=20170318162335.GC52684@athene.usta.de \
--to=schwarze@usta.de \
--cc=andreas@andreasvoegele.com \
--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).