|
NAMEmansearch —
search manual page databases
SYNOPSIS#include <stdint.h>
#include <manconf.h>
#include <mansearch.h>
int
DESCRIPTIONThemansearch () function returns information about
manuals matching a search query from a
mandoc.db(5)
database.
The query arguments are as follows:
The output arguments are as follows:
IMPLEMENTATION NOTESFor each manual page tree, the search is done in two steps. In the first step, a list of pages matching the search criteria is built. In the second step, the requested information about these pages is retrieved from the database and assembled into the res array.All function mentioned here are defined in the file mansearch.c. Finding matchesCommand line parsing is done by the functionexprcomp ()
building a singly linked list of expr structures, using
the helper functions expr_and () and
exprterm ().
Assembling the resultsThe names, sections, and architectures of the manuals found are assembled into the names field of the result structure by the functionbuildnames ().
FILES
SEE ALSOapropos(1), mandoc.db(5), makewhatis(8)HISTORYThemansearch () subsystem first appeared in
OpenBSD 5.6.
AUTHORSA module to search manual page databases was first written by Kristaps Dzonsons <kristaps@bsd.lv> in 2011, at first using the Berkeley DB; he rewrote it for SQLite3 in 2012, and Ingo Schwarze <schwarze@openbsd.org> removed the dependency on SQLite3 in 2016.
Visit the GSP FreeBSD Man Page Interface. |