aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cgi.c
Commit message (Collapse)AuthorAgeFilesLines
* Removing INSECURE mode. This is a work in progress! Logic forKristaps Dzonsons2011-11-271-59/+37
| | | | formatting manpages is now linked into man.cgi.
* Let man.cgi run in two modes:Kristaps Dzonsons2011-11-241-28/+91
| | | | | | | | | | | | | (1) Insecure. This means that we're operating over the full file-system with access to mandoc(1). In this mode, mandocdb entries are formatted on-the-fly. The $INSECURE environment variable must be passed to man.cgi for this mode to work. (2) Secure. Manuals are assumed to be pre-formatted in a cache directory, which may be set with $CACHE_DIR but default to /cache/man.cgi. This mode works with manup(8), which updates the cached pages from outside of the jail. man.cgi simply locates the manual file and outputs it to stdout.
* man.cgi works for the non-jailed case.Kristaps Dzonsons2011-11-231-81/+422
| | | | | | | In other words, if you smash this into a cgi-bin directory, it will Just Work for your system's manuals (it of course needs access to mandoc(1) and your file-system, hence "non-jailed"). The notion of a jailed case is much more subtle and being worked on now.
* Merge schwarze@'s work for 64-bit types. This is based on a tweaked patchKristaps Dzonsons2011-11-201-1/+2
| | | | | | | submitted to tech@ on 16/11/2011, 01:39. It has been updated to account for the logical-operator functions and to avoid keeping a live pointer into the DBT value, which is not guaranteed to be consistent across calls into the bdb library.
* Inventing new keywords for mostly the same thing when a well-establishedIngo Schwarze2011-11-131-2/+3
| | | | | | | | | | set of keywords already exists is a bad idea, so reuse the mdoc(7) macro names as apropos(1) search types. This is a gain in brevity as well. Some time ago, kristaps@ agreed in principle. The search type bit field constants are used by both mandocdb(8) and apropos(1) and should better stay in sync, so give them their own header file.
* 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-3/+11
| | | | | | | | | | 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.
* Split apropos.c into db.c and apropos.h with simpler code (re-written, butKristaps Dzonsons2011-11-091-0/+303
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.