-/* $Id: cgi.c,v 1.20 2011/12/09 11:29:19 kristaps Exp $ */
+/* $Id: cgi.c,v 1.21 2011/12/09 23:18:51 kristaps Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
int i, legacy;
memset(q, 0, sizeof(struct query));
+ q->whatis = 1;
legacy = -1;
for (i = 0; i < (int)sz; i++)
kval_query(&q, req->fields, req->fieldsz);
if (0 == sz) {
- puts("<P>\n"
- "No results found.");
+ printf("<P>\n"
+ "No %s results found.",
+ q.whatis ? "whatis" : "apropos");
if (q.whatis) {
printf("(Try <A HREF=\"");
html_print(progname);