diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-11-09 22:05:56 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-11-09 22:05:56 +0000 |
commit | 52e32329c935cd5b17f86511fb6d80879b597e60 (patch) | |
tree | c469cd63d2f1673c38a1ce3bd446239ea5f45354 /cgi.c | |
parent | 7ec3bd32ef3cef1e8f8f96474716f3288bbbca5d (diff) | |
download | mandoc-52e32329c935cd5b17f86511fb6d80879b597e60.tar.gz |
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.
Diffstat (limited to 'cgi.c')
-rw-r--r-- | cgi.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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(")</A>"); } } +#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 |