=================================================================== RCS file: /cvs/mandoc/Attic/apropos_db.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -p -r1.4 -r1.5 --- mandoc/Attic/apropos_db.h 2011/11/14 10:07:06 1.4 +++ mandoc/Attic/apropos_db.h 2011/11/18 07:02:19 1.5 @@ -1,4 +1,4 @@ -/* $Id: apropos_db.h,v 1.4 2011/11/14 10:07:06 kristaps Exp $ */ +/* $Id: apropos_db.h,v 1.5 2011/11/18 07:02:19 kristaps Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons * @@ -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