From 6022ebeae314751c0c5e600aa8881a8c61610734 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Sat, 10 Dec 2011 10:59:21 +0000 Subject: FreeBSD's man.cgi uses a "default" value for no arch. --- cgi.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/cgi.c b/cgi.c index e58605ff..e69f8284 100644 --- a/cgi.c +++ b/cgi.c @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.22 2011/12/10 00:06:34 kristaps Exp $ */ +/* $Id: cgi.c,v 1.23 2011/12/10 10:59:21 kristaps Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons * @@ -159,10 +159,17 @@ kval_query(struct query *q, const struct kval *fields, size_t sz) q->whatis = 1; } - /* Section "0" means no section when in legacy mode. */ + /* + * Section "0" means no section when in legacy mode. + * For some man.cgi scripts, "default" arch is none. + */ - if (q->legacy && NULL != q->sec && 0 == strcmp(q->sec, "0")) - q->sec = NULL; + if (q->legacy && NULL != q->sec) + if (0 == strcmp(q->sec, "0")) + q->sec = NULL; + if (q->legacy && NULL != q->arch) + if (0 == strcmp(q->arch, "default")) + q->arch = NULL; } /* -- cgit v1.2.3-56-ge451