From 52e32329c935cd5b17f86511fb6d80879b597e60 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 9 Nov 2011 22:05:56 +0000 Subject: Make apropos's lookup use a find(1)-like expression. I'll write more on this when it completes; this is to keep it in-tree. Right now this uses prefix notation. Ignore it. I'll make this into infix notation real soon. The goal of this (exprcomp and exprexec) is to have arbitrary logical expressions. --- cgi.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'cgi.c') diff --git a/cgi.c b/cgi.c index c41b7866..09128c77 100644 --- a/cgi.c +++ b/cgi.c @@ -47,13 +47,17 @@ struct req { enum page page; }; +#if 0 static void html_printtext(const char *); +#endif static int kval_decode(char *); static void kval_parse(struct kval **, size_t *, char *); static void kval_free(struct kval *, size_t); static void pg_index(const struct req *, char *); static void pg_search(const struct req *, char *); +#if 0 static void pg_searchres(struct rec *, size_t, void *); +#endif static const char * const pages[PAGE__MAX] = { "index", /* PAGE_INDEX */ @@ -64,6 +68,7 @@ static const char * const medias[MEDIA__MAX] = { "html", /* MEDIA_HTML */ }; +#if 0 static void html_printtext(const char *p) { @@ -88,6 +93,7 @@ html_printtext(const char *p) break; } } +#endif static void kval_free(struct kval *p, size_t sz) @@ -205,6 +211,7 @@ pg_index(const struct req *req, char *path) } +#if 0 static void pg_searchres(struct rec *recs, size_t sz, void *arg) { @@ -223,6 +230,7 @@ pg_searchres(struct rec *recs, size_t sz, void *arg) puts(")"); } } +#endif static void pg_search(const struct req *req, char *path) @@ -238,8 +246,8 @@ pg_search(const struct req *req, char *path) return; memset(&opt, 0, sizeof(struct opts)); - opt.types = TYPE_NAME | TYPE_DESC; - apropos_search(&opt, req->fields[i].val, NULL, pg_searchres); + /*opt.types = TYPE_NAME | TYPE_DESC; + apropos_search(&opt, req->fields[i].val, NULL, pg_searchres);*/ } int -- cgit