aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apropos.c
Commit message (Collapse)AuthorAgeFilesLines
* Less misleading file names; ok kristaps@.Ingo Schwarze2011-11-131-2/+2
|
* Make apropos's lookup use a find(1)-like expression. I'll write more onKristaps Dzonsons2011-11-091-57/+16
| | | | | | | | | | 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.
* Change getopt() to be more like schwarze@'s suggestions.Kristaps Dzonsons2011-11-091-6/+6
|
* Split apropos.c into db.c and apropos.h with simpler code (re-written, butKristaps Dzonsons2011-11-091-537/+25
| | | | | | | | | inspired by apropos.c and mandoc-tools' mandoc-cgi.c). This uses UTF-8 right now for its re-writing, but will soon accomodate for the regular suspects (this is a rather simple matter). I also introduce man.cgi (cgi.c), which is a standalone CGI that replaces mandoc-tools' mandoc.cgi. Right now it's just a framework.
* Make apropos results-gathering able to error out and clean up beforeKristaps Dzonsons2011-10-091-15/+17
| | | | making the utility exit non-zero.
* Remove some unnecessary variables and note that mchars_alloc never returnsKristaps Dzonsons2011-10-091-26/+8
| | | | NULL.
* Use a binary tree (for now, unbalanced) for deduping the records in theKristaps Dzonsons2011-10-091-6/+32
| | | | | | results array. This is much faster than the previous method, a linear search, at a small cost. Note that array offsets are used instead of storing the res pointer because we may realloc the results vector.
* Use mandoc_realloc() in apropos, as we're linking to libmandoc.a.Kristaps Dzonsons2011-10-081-5/+2
|
* Lift hard-coded limit of results.Kristaps Dzonsons2011-10-071-6/+8
|
* Clean up file a bit: remove errx and err function pointers from theKristaps Dzonsons2011-10-071-118/+98
| | | | | | state struct (directly using fprintf and perror to do this); add some in-line documentation; remove state init and destroy directly to the main function.
* Import apropos from mandoc-tools after inlining all source filesKristaps Dzonsons2011-10-061-0/+689
(originally including extern.h, state.c, and sort.c). The apropos utility interfaces with the databases of mandocdb to provide semantic searching capabilities. It Works For Me, but will need lots of cleanup in the coming months.