help / color / mirror / Atom feed
From: Ingo Schwarze <>
To: Andreas Voegele <>
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: <> (raw)
In-Reply-To: <>


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 ""
> instead of "" even
> if the script name is not empty.

Committed.  Thanks for the patch!

Log Message:
Bugfix: use SCRIPT_NAME for .Xr hyperlinks.
Patch from <andreas at AndreasVoegele dot com>.

Modified Files:

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; = mandoc_strdup(CSS_DIR "/mandoc.css");
 	usepath = strcmp(req->q.manpath, req->p[0]);
-	mandoc_asprintf(&, "/%s%s%%N.%%S",
+	mandoc_asprintf(&, "/%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

      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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* 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).