aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* Drop Nd from the mpages table, it is still in the keys table.Ingo Schwarze2014-01-065-33/+12
| | | | | This shrinks the database in standard mode by 3%, in -Q mode by 9%, without loss of functionality.
* Joerg Sonnenberger contributed copyrightable amounts of text toIngo Schwarze2014-01-066-7/+13
| | | | | | some files. To make it clear that he also put his contributions under the ISC license, with his explicit permission, add his Copyright notice to the relevant files. No code change.
* Cope with mparse_alloc() interface change.Ingo Schwarze2014-01-052-4/+4
|
* Add an option -Q (quick) to mandocdb(8)Ingo Schwarze2014-01-0510-40/+101
| | | | | | | | | | | | | | | for accelerated generation of reduced-size databases. Implement this by allowing the parsers to optionally abort the parse sequence after the NAME section. While here, garbage collect the unused void *arg attribute of struct mparse and mparse_alloc() and fix some errors in mandoc(3). This reduces the processing time of mandocdb(8) on /usr/share/man by a factor of 2 and the database size by a factor of 4. However, it still takes 5 times the time and 6 times the space of makewhatis(8), so more work is clearly needed.
* Tag functions with format strings as arguments as printf-like.Joerg Sonnenberger2014-01-054-6/+15
| | | | | Fix one case where a non-literal is used as format string. Fix another case where a variable is formatted using the wrong type.
* Merge NetBSD's r1.4: Rename data to getdata to work around bugs in theJoerg Sonnenberger2014-01-051-5/+5
| | | | PPC64 toolchain.
* Rip out the complete "reachable" checks, without replacement.Ingo Schwarze2014-01-051-69/+7
| | | | | | | | | | | | | | It's a pity i spent time during t2k13 writing this; however, when an entire concept is busted, let us not look back, There is no such thing as an unreachable page. Even if you are crazy enough to put a page starting with ".Dt NAMEI 9" into a file man1/cat.1, we now make sure that it can be found by all of the following: Nm=namei Nm=cat sec=1 sec=9 It will always be displayed as: cat(1) - pathname lookup So you know that you have to type `man cat` to get at it. That obsoletes the concept of "unreachable manuals" for good.
* Remove the obsolete file name column from the mpages table.Ingo Schwarze2014-01-052-38/+32
| | | | | This column wasn't helpful because one manpage can have multiple MLINKS. Use the file name column in the mlinks table, instead.
* Remove the obsolete sec and arch columns from the mpages table.Ingo Schwarze2014-01-052-12/+8
| | | | | They were confusing because a manpage can have MLINKS in different sections and architectures.
* Reimplement apropos -s NUM -S ARCH EXPR by internally converting it toIngo Schwarze2014-01-052-25/+57
| | | | | | | | | | | | | | | apropos \( EXPR \) -a 'sec~^NUM$' -a 'arch~^(ARCH|any)$' in preparation for removal of sec and arch from the mpage table. Almost no functional change except for the following bonus: This also makes sure that for cross-section and cross-arch MLINKs, all of the following work: apropos -s 1 encrypt apropos -s 8 encrypt apropos -s 1 makekey apropos -s 8 makekey While here, print error messages about invalid regexps to stderr.
* Put section and architecture info into the keys table,Ingo Schwarze2014-01-053-5/+17
| | | | | | | | | | in preparation for removing them from the mpages table, aiming for cleaner and more uniform interfaces. Database growth is below 4%, part of which will be reclaimed. As a bonus, this allows searches like: ./obj/apropos An=kettenis -a arch=ppc ./obj/apropos An=kettenis -a sec~[^4]
* New implementation of complex search criteria using \(, \), -a becauseIngo Schwarze2014-01-041-56/+92
| | | | | | the old implementation got lost in the Berkeley to SQLite switch. Note that this is not just feature creep, but required for upcoming database format cleanup and simplification.
* Put mansearch.{h,c}, manpage.c, and compat_ohash.{h,c}Ingo Schwarze2014-01-041-2/+7
| | | | into the distribution tarball. Bump VERSION.
* Put ./configure into the distributin tarball.Ingo Schwarze2014-01-041-1/+3
|
* Use C99 uint32_t, not BSD-style u_int32_t.Ingo Schwarze2014-01-042-3/+3
| | | | Needed for Solaris 10 as reported by Matthias Scheler.
* Even though strnlen(3) is required by POSIX 2008,Ingo Schwarze2014-01-046-9/+66
| | | | | | Matthias Scheler reports than Solaris 10 lacks it. While here, sort the declarations in config.h and move the headers to the top.
* Clean up feature tests:Ingo Schwarze2014-01-048-72/+86
| | | | | | * Split the configure steering script out of the Makefile. * Let the configure step depend on the test sources. * Clean up the test programs such that they can be run.
* Avoid "utf8" in the names of a function and a struct memberIngo Schwarze2014-01-021-19/+19
| | | | | that don't necessarily have anything to do with UTF-8. Just renaming, no functional change.
* Do not put UTF-8-encoded strings into the database by default, use ASCII.Ingo Schwarze2014-01-021-17/+35
| | | | Just like for mandoc(1), provide a -Tutf8 option for people who want that.
* Polish the mlink_add() interface:Ingo Schwarze2014-01-021-27/+21
| | | | | Allocate memory inside, not in the callers. No functional change.
* Check all MLINKS for consistency with the content of the manual page,Ingo Schwarze2014-01-021-43/+60
| | | | | not just the first one. This doesn't change how the check is done, but just which MLINKS are checked.
* Since the functions in read.c are part of the mandoc(3) library,Ingo Schwarze2014-01-022-19/+51
| | | | | | do not print to stderr. Instead, properly use the mmsg callback. Issue noticed by Abhinav Upadhyay <er dot abhinav dot upadhyay at gmail dot com> and Thomas Klausner <wiz at NetBSD>.
* Support .St -p1003.1-2013, "IEEE Std 1003.1-2008/Cor 1-2013".Ingo Schwarze2013-12-312-3/+6
| | | | | | | | | | | | | | Note that the POSIX-2008 standard remains in force, so please refrain from wholesale 2008 -> 2013 replacements. Make sure to only use the new -p1003.1-2013 argument for cases where "IEEE Std 1003.1(TM)-2008/ Cor 1-2013, IEEE Standard for Information Technology--Portable Operating System Interface (POSIX(R)), Technical Corrigendum 1" actually changes something in the standard with respect to the specific function documented in the manual you touch. Otherwise, please continue using .St -p1003.1-2008. Triggered by a similar, but slightly incorrect patch from jmc@; ok guenther@.
* Simplify: Remove an unused argument from the mandoc_eos() function.Ingo Schwarze2013-12-316-15/+15
| | | | No functional change.
* Provide strcasestr(3) and strsep(3) for Solaris 10 compat;Ingo Schwarze2013-12-316-1/+192
| | | | reported missing by Matthias Scheler <tron at NetBSD> via wiz@.
* Do not trigger end-of-sentence spacing by trailing punctuationIngo Schwarze2013-12-311-20/+1
| | | | | | | | | | | | | | | | | | | | at the end of partial implicit macros. Prodded by jmc@. Actually, this is a revert of rev. 1.64 Fri May 14 14:09:13 2010 UTC by kristaps@, with this original commit message: "Block-implicit macros now up-propogate end-of-sentence spacing. NOTE: GROFF IS NOT SMART ENOUGH TO DO THIS." Please speak after me: Then why the hell should we? We already weakened this in rev. 1.93 Sun Jul 18 17:00:26 2010 UTC, but that weakening was insufficient. Let's take it out completely. Admittedly, there are two places in OpenBSD base where what Kristaps did make the output nicer, in calloc(3) and in fish(6). But both are atypical. There are 18 other places where this revert makes the output nicer, the typical case being: "Mail status is shown as ``No Mail.'' if there is no mail." You do *not* want the EOS spacing after ``No Mail.'' in that sentence.
* Yet another regression introduced by Kristaps when he switched fromIngo Schwarze2013-12-311-34/+6
| | | | | | | | | | | | | | Berkeley DB to SQLite3: In the .In parser, the logic got inverted. The resulting NULL pointer access was found by clang; scan log provided by Ulrich Spoerlein <uqs at FreeBSD>. The best fix is to simply remove the whole, pointless custom handler function for .In and let the framework do its work. Now searching for included header files actually works. While here, remove the similarly pointless custom .St handler, fix the return value of the .Fd handler and disentangle the spaghetti in the .Nm handler.
* remove assignments that will be overwritten right afterwards,Ingo Schwarze2013-12-313-10/+4
| | | | | and remove pointless local variables; found in a clang output from Ulrich Spoerlein <uqs at FreeBSD>
* update the link to the ISC licenseIngo Schwarze2013-12-311-3/+3
| | | | and note that the pkgsrc port was updated to 1.12.3
* Add missing description of .UR/.UE.Ingo Schwarze2013-12-311-3/+22
| | | | While here, also add .EX/.EE and .PD to the MACRO SYNTAX table.
* release 1.12.3VERSION_1_12_3Ingo Schwarze2013-12-313-31/+85
|
* Experimental feature to let apropos(1) show different keys than .Nd.Ingo Schwarze2013-12-314-12/+85
| | | | | | | | This really takes us beyond what grep -R /usr/*/man/ can do because now you can search for pages by *one* criterion and then display the contents of *another* macro from those pages, like in $ apropos -O Ox Fa~wchar to get an impression how long wide character handling is available.
* Split buildnames() out of mansearch(); the latter function is gettingIngo Schwarze2013-12-311-31/+41
| | | | too long and unwieldy, but will grow more code soon. No functional change.
* Oops, missed one:Ingo Schwarze2013-12-301-3/+2
| | | | | | Remove duplicate const specifier from a call to mandoc_escape(). Found by Thomas Klausner <wiz at NetBSD dot org> using clang. No functional change.
* Remove duplicate const specifiers from the declaration of mandoc_escape().Ingo Schwarze2013-12-302-5/+4
| | | | | Found by Thomas Klausner <wiz at NetBSD dot org> using clang. No functional change.
* Oops, that segfaulted after deleting an mlink from the list.Ingo Schwarze2013-12-271-8/+10
| | | | Fix the loop logic in mlinks_undupe().
* Split mlinks_undupe() out of mpages_merge()Ingo Schwarze2013-12-271-37/+53
| | | | | such that the check for source manuals of the same name can be done for multiple mlinks pointing to the same preformatted mpage.
* Change the mansearch() interface to use the mlinks table in the databaseIngo Schwarze2013-12-274-15/+66
| | | | | | and return a list of names with sections, used by apropos(1) for display. While here, improve uniformity of the interface by allocating the file name dynamically, just like the names list and the description.
* Save the MLINK name into the database, too;Ingo Schwarze2013-12-271-3/+5
| | | | apropos(1) will need it to display its results.
* Write more than one mlink per mpage to the database.Ingo Schwarze2013-12-271-8/+11
| | | | Not yet used by apropos(1).
* Allow saving more than one mlink per mpage in the mlinks ohash.Ingo Schwarze2013-12-271-24/+1
| | | | | | We are still only using one of them for now. Actually, we are now using a different one, but the order the mlinks are found is random anyway.
* Enable the framework code to allow more than one mlink per mpage.Ingo Schwarze2013-12-271-3/+4
| | | | Not used yet.
* Clean up the interface of mlink_add().Ingo Schwarze2013-12-271-70/+67
| | | | | Consistently use "fsec" and "fform" for info derived from the file name. No functional change.
* Another step on the way to clear naming, this time regarding mlinks:Ingo Schwarze2013-12-271-77/+37
| | | | | | | | * rename global ohash filenames to mlinks * rename ofadd() to mlink_add() * fold fileadd() and inoadd() into mlink_add() * fold filecheck() into mpages_merge() Still no functional change.
* Split struct mlink out of struct mpage.Ingo Schwarze2013-12-271-83/+124
| | | | Still a 1:1 relation, no functional change yet.
* Add an additional mlinks table to the database, redundant for now,Ingo Schwarze2013-12-272-25/+56
| | | | | | both because it contains nothing but a subset of the data of the existing mpages table and because the relationship of mpage and mlink entries is still 1:1. But all that will eventually change.
* Drop the mpages_list, use the existing mpages ohash for iteration.Ingo Schwarze2013-12-261-24/+28
| | | | | No functional change except that the order of database entries changes, which doesn't matter anyway.
* The name "id" is terrible for a struct.Ingo Schwarze2013-12-261-15/+15
| | | | | Make this more searchable by calling it "inodev". No functional change.
* To better support MLINKS, we will have to split the "docs" databaseIngo Schwarze2013-12-261-179/+184
| | | | | | | | table into two tables, on for actual files on disk, one for (often multiple) directory entries pointing to them. That implies splitting struct of into two structs, to be called "mpage" and "mlink", respectively. As a preparation, globally rename "of" and "inos" to "mpage". No functional change.
* Stop parsing man(7) input when we found all we were searching for,Ingo Schwarze2013-12-261-2/+5
| | | | such that we don't trigger an assertion on a duplicate NAME section.