aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apropos.h
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 /apropos.h
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 'apropos.h')
-rw-r--r--apropos.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/apropos.h b/apropos.h
index 4a06db87..16ebcda2 100644
--- a/apropos.h
+++ b/apropos.h
@@ -1,4 +1,4 @@
-/* $Id: apropos.h,v 1.1 2011/11/09 01:24:23 kristaps Exp $ */
+/* $Id: apropos.h,v 1.2 2011/11/09 22:05:56 kristaps Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -53,15 +53,18 @@ struct rec {
struct opts {
const char *arch; /* restrict to architecture */
const char *cat; /* restrict to manual section */
- int types; /* only types in bitmask */
- int flags;
-#define OPTS_INSENS (0x01) /* case-insensitive match */
};
__BEGIN_DECLS
-void apropos_search(const struct opts *, const char *,
- void *, void (*)(struct rec *, size_t, void *));
+struct expr;
+
+void apropos_search(const struct opts *,
+ const struct expr *, void *,
+ void (*)(struct rec *, size_t, void *));
+
+struct expr *exprcomp(int, char *[], int);
+void exprfree(struct expr *);
__END_DECLS