From 2cfc7310afb5b9fc57aba0d72188cc20f947c244 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 15 Mar 2017 13:49:50 +0000 Subject: In URIs in apropos(1) result tables, only write the manpath if it does not match the default. --- cgi.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'cgi.c') diff --git a/cgi.c b/cgi.c index 68bdf6e7..cfb779c2 100644 --- a/cgi.c +++ b/cgi.c @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.150 2017/03/15 13:18:53 schwarze Exp $ */ +/* $Id: cgi.c,v 1.151 2017/03/15 13:49:50 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze @@ -653,9 +653,12 @@ pg_searchres(const struct req *req, struct manpage *r, size_t sz) for (i = 0; i < sz; i++) { printf(" \n" " " - "", - scriptname, *scriptname == '\0' ? "" : "/", - req->q.manpath, r[i].file); + "q.manpath, req->p[0])) + printf("%s/", req->q.manpath); + printf("%s\">", r[i].file); html_print(r[i].names); printf("\n" " "); -- cgit v1.2.3