version 1.20, 2011/12/09 11:29:19 |
version 1.22, 2011/12/10 00:06:34 |
Line 128 kval_query(struct query *q, const struct kval *fields, |
|
Line 128 kval_query(struct query *q, const struct kval *fields, |
|
int i, legacy; |
int i, legacy; |
|
|
memset(q, 0, sizeof(struct query)); |
memset(q, 0, sizeof(struct query)); |
|
q->whatis = 1; |
legacy = -1; |
legacy = -1; |
|
|
for (i = 0; i < (int)sz; i++) |
for (i = 0; i < (int)sz; i++) |
Line 433 resp_error400(void) |
|
Line 434 resp_error400(void) |
|
"<P>\n" |
"<P>\n" |
"The query your entered was malformed.\n" |
"The query your entered was malformed.\n" |
"Try again from the\n" |
"Try again from the\n" |
"<A HREF=\"%s/index.html\">main page</A>\n" |
"<A HREF=\"%s/index.html\">main page</A>.\n" |
"</P>", progname); |
"</P>", progname); |
resp_end_html(); |
resp_end_html(); |
} |
} |
Line 451 resp_error404(const char *page) |
|
Line 452 resp_error404(const char *page) |
|
printf("</B>,\n" |
printf("</B>,\n" |
"could not be found.\n" |
"could not be found.\n" |
"Try searching from the\n" |
"Try searching from the\n" |
"<A HREF=\"%s/index.html\">main page</A>\n" |
"<A HREF=\"%s/index.html\">main page</A>.\n" |
"</P>", progname); |
"</P>", progname); |
resp_end_html(); |
resp_end_html(); |
} |
} |
Line 502 resp_search(struct res *r, size_t sz, void *arg) |
|
Line 503 resp_search(struct res *r, size_t sz, void *arg) |
|
kval_query(&q, req->fields, req->fieldsz); |
kval_query(&q, req->fields, req->fieldsz); |
|
|
if (0 == sz) { |
if (0 == sz) { |
puts("<P>\n" |
printf("<P>\n" |
"No results found."); |
"No %s results found.", |
|
q.whatis ? "whatis" : "apropos"); |
if (q.whatis) { |
if (q.whatis) { |
printf("(Try <A HREF=\""); |
printf("(Try <A HREF=\""); |
html_print(progname); |
html_print(progname); |