diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-12-10 10:59:21 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-12-10 10:59:21 +0000 |
commit | dea30820e2b066a715e7612edf9f978584103f71 (patch) | |
tree | 70ee7f09f9937c7237f6222dea4783fd328560e4 | |
parent | 8c608d36c3fea82230317a1c68a6fa924aeceff1 (diff) | |
download | mandoc-dea30820e2b066a715e7612edf9f978584103f71.tar.gz |
FreeBSD's man.cgi uses a "default" value for no arch.
-rw-r--r-- | cgi.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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; } /* |