aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandocdb.c
Commit message (Collapse)AuthorAgeFilesLines
* chdir(2) to the right man page tree before parsing manuals;Ingo Schwarze2011-11-291-2/+18
| | | | ok kristaps@
* Reimplement the global command line options -a and -vIngo Schwarze2011-11-271-27/+21
| | | | | | as static global variables, reducing the maze of arguments passed around among various static functions. Suggested by kristaps@.
* Save the manual type (mdoc, man, or cat) in the index fileIngo Schwarze2011-11-271-1/+2
| | | | | | | | of the mandoc databases, as suggested by kristaps@. Given the well-structured code, this is surprisingly simple. This changes the mandoc.index database format. Run "sudo mandocdb" to regenerate your databases.
* Rudimentary handling of formatted manuals ("cat pages").Ingo Schwarze2011-11-271-31/+206
| | | | | Coded on the train back from p2k11 in Budapest. Kristaps has seen the patch and agreed with the direction.
* Sync to OpenBSD, mostly gratuitous and whitespace differences,Ingo Schwarze2011-11-261-5/+10
| | | | | | | | | but a few serious things as well: * -M overrides MANPATH * -m prepends to the path * put back database close calls that got lost in mandocdb * missing sys/types.h in manpath.c, needed for size_t ok kristaps@
* Store page titles in the correct case, and by default, onlyIngo Schwarze2011-11-261-38/+190
| | | | | | put stuff into the database that man(1) will be able to retrieve. However, support an option to use all directories and files. feedback and ok kristaps@
* I say that mandocdb(8) uses "man(1)'s method", but it doesn't. It just usesKristaps Dzonsons2011-11-241-2/+2
| | | | | the configuration file and ignores MANPATH. Everybody else uses MANPATH (being apropos and man), so why shouldn't we?
* Have mandocdb(8) take advantage of manpath.h.Kristaps Dzonsons2011-11-231-6/+26
| | | | | This brings it in line with makewhatis(8), which, like apropos(1), will use man.conf (or manpath(1)) if no manpath entries are provided.
* Merge schwarze@'s work for 64-bit types. This is based on a tweaked patchKristaps Dzonsons2011-11-201-14/+14
| | | | | | | 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-36/+19
| | | | | | | | | | 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.
* Fix two crashes that occur when walking very large (i.e. real-world) trees:Ingo Schwarze2011-11-131-5/+5
| | | | | | 1) Avoid excessive, needless recursion, lest you overflow the stack; 2) Close all dir file descriptors, lest you run out of descriptors. ok kristaps@
* fix an obvious typo: sz was used uninitializedIngo Schwarze2011-09-171-2/+2
| | | | found while merging to OpenBSD
* Big step forward in bringing mandocdb in line with most makewhatis-typeKristaps Dzonsons2011-07-151-55/+185
| | | | systems.
* First step of making mandocdb a true makewhatis/mandb replacement:Kristaps Dzonsons2011-07-151-96/+116
| | | | | | | accept a set of directories on the command line ("manpaths") that are recursed for files. The databases are created in each manpath root. This temporarily removes OP_UPDATE and OP_DELETE functionality, which will be added back in.
* Move parts of mandocdb that "do stuff" to the databases into their ownKristaps Dzonsons2011-07-151-126/+174
| | | | | functions. This will make it easier to call repeatedly (for different directoreis) as must be done with the new interfaces being developed.
* move mandocdb(1) to mandocdb(8)Ingo Schwarze2011-07-141-2/+2
| | | | "please make this change" kristaps@
* Rename makewhatis [back] into mandocdb. This is to maintain consistencyKristaps Dzonsons2011-07-141-0/+1105
with OpenBSD, which is sandboxing the code for merge. It makes sense because it doesn't really make a `makewhatis' file in the traditional sense, so it may be confusing.