aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cgi.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-12-10 10:59:21 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-12-10 10:59:21 +0000
commit6022ebeae314751c0c5e600aa8881a8c61610734 (patch)
tree0b5a1c83b5e970e1b7037605430ead0924a1a3a6 /cgi.c
parent09152fff4d7a824d26c7267cf34687305e1bd1a0 (diff)
downloadmandoc-6022ebeae314751c0c5e600aa8881a8c61610734.tar.gz
mandoc-6022ebeae314751c0c5e600aa8881a8c61610734.tar.zst
mandoc-6022ebeae314751c0c5e600aa8881a8c61610734.zip
FreeBSD's man.cgi uses a "default" value for no arch.
Diffstat (limited to 'cgi.c')
-rw-r--r--cgi.c15
1 files 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 <kristaps@bsd.lv>
*
@@ -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;
}
/*