summaryrefslogtreecommitdiffstats
path: root/apropos_db.h
diff options
context:
space:
mode:
Diffstat (limited to 'apropos_db.h')
-rw-r--r--apropos_db.h21
1 files changed, 5 insertions, 16 deletions
diff --git a/apropos_db.h b/apropos_db.h
index cc6e41d9..95ac1567 100644
--- a/apropos_db.h
+++ b/apropos_db.h
@@ -17,23 +17,13 @@
#ifndef APROPOS_H
#define APROPOS_H
-struct rec {
+struct res {
char *file; /* file in file-system */
char *cat; /* category (3p, 3, etc.) */
char *title; /* title (FOO, etc.) */
char *arch; /* arch (or empty string) */
char *desc; /* description (from Nd) */
unsigned int rec; /* record in index */
- /*
- * By the time the apropos_search() callback is called, these
- * are superfluous.
- * Maintain a binary tree for checking the uniqueness of `rec'
- * when adding elements to the results array.
- * Since the results array is dynamic, use offset in the array
- * instead of a pointer to the structure.
- */
- int lhs;
- int rhs;
};
struct opts {
@@ -45,11 +35,10 @@ __BEGIN_DECLS
struct expr;
-void apropos_search(const struct opts *,
- const struct expr *, void *,
- void (*)(struct rec *, size_t, void *));
-
-struct expr *exprcomp(char *);
+int apropos_search(const struct opts *,
+ const struct expr *, size_t, void *,
+ void (*)(struct res *, size_t, void *));
+struct expr *exprcomp(int, char *[], size_t *);
void exprfree(struct expr *);
__END_DECLS