aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit53ecc54dbae535c524e2b4044ae5c358dcd67c30 (patch)
tree2eb8acec92b0c4fbc2e618a02b4e5f90cbad6bda /cgi.c
parent3089a1b55afe00d988cd16b8de6fe2cd08ff48f5 (diff)
downloadmandoc-53ecc54dbae535c524e2b4044ae5c358dcd67c30.tar.gz
mandoc-53ecc54dbae535c524e2b4044ae5c358dcd67c30.tar.zst
mandoc-53ecc54dbae535c524e2b4044ae5c358dcd67c30.zip
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.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/cgi.c b/cgi.c
index edf63f8d..a596254a 100644
--- a/cgi.c
+++ b/cgi.c
@@ -1,4 +1,4 @@
-/* $Id: cgi.c,v 1.1 2011/11/09 01:24:23 kristaps Exp $ */
+/* $Id: cgi.c,v 1.2 2011/11/09 22:05:56 kristaps Exp $ */
#include <assert.h>
#include <fcntl.h>
#include <regex.h>
@@ -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