summaryrefslogtreecommitdiffstats
path: root/cgi.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-11-09 22:05:56 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-11-09 22:05:56 +0000
commit52e32329c935cd5b17f86511fb6d80879b597e60 (patch)
treec469cd63d2f1673c38a1ce3bd446239ea5f45354 /cgi.c
parent7ec3bd32ef3cef1e8f8f96474716f3288bbbca5d (diff)
downloadmandoc-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.c12
1 files changed, 10 insertions, 2 deletions
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(")</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