=================================================================== RCS file: /cvs/mandoc/cgi.c,v retrieving revision 1.21 retrieving revision 1.23 diff -u -p -r1.21 -r1.23 --- mandoc/cgi.c 2011/12/09 23:18:51 1.21 +++ mandoc/cgi.c 2011/12/10 10:59:21 1.23 @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.21 2011/12/09 23:18:51 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, 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; } /* @@ -434,7 +441,7 @@ resp_error400(void) "

\n" "The query your entered was malformed.\n" "Try again from the\n" - "main page\n" + "main page.\n" "

", progname); resp_end_html(); } @@ -452,7 +459,7 @@ resp_error404(const char *page) printf(",\n" "could not be found.\n" "Try searching from the\n" - "main page\n" + "main page.\n" "

", progname); resp_end_html(); }