summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Put section and architecture info into the keys table,Ingo Schwarze2014-01-053-2/+14
| | | | | | | | | | 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-55/+91
| | | | | | 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-18/+18
| | | | | 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-16/+34
| | | | Just like for mandoc(1), provide a -Tutf8 option for people who want that.
* Polish the mlink_add() interface:Ingo Schwarze2014-01-021-26/+20
| | | | | 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-42/+59
| | | | | 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-17/+49
| | | | | | 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-0/+3
| | | | | | | | | | | | | | 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-9/+9
| | | | 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-19/+0
| | | | | | | | | | | | | | | | | | | | 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-33/+5
| | | | | | | | | | | | | | 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-7/+1
| | | | | 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-2/+2
| | | | and note that the pkgsrc port was updated to 1.12.3
* Add missing description of .UR/.UE.Ingo Schwarze2013-12-311-1/+20
| | | | While here, also add .EX/.EE and .PD to the MACRO SYNTAX table.
* release 1.12.3VERSION.1.12.3Ingo Schwarze2013-12-313-29/+83
|
* Experimental feature to let apropos(1) show different keys than .Nd.Ingo Schwarze2013-12-314-8/+81
| | | | | | | | 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-30/+40
| | | | too long and unwieldy, but will grow more code soon. No functional change.
* Oops, missed one:Ingo Schwarze2013-12-301-2/+1
| | | | | | 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-3/+2
| | | | | 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-7/+9
| | | | Fix the loop logic in mlinks_undupe().
* Split mlinks_undupe() out of mpages_merge()Ingo Schwarze2013-12-271-36/+52
| | | | | 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-11/+62
| | | | | | 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-2/+4
| | | | apropos(1) will need it to display its results.
* Write more than one mlink per mpage to the database.Ingo Schwarze2013-12-271-7/+10
| | | | Not yet used by apropos(1).
* Allow saving more than one mlink per mpage in the mlinks ohash.Ingo Schwarze2013-12-271-23/+0
| | | | | | 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-2/+3
| | | | Not used yet.
* Clean up the interface of mlink_add().Ingo Schwarze2013-12-271-69/+66
| | | | | 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-76/+36
| | | | | | | | * 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-82/+123
| | | | Still a 1:1 relation, no functional change yet.
* Add an additional mlinks table to the database, redundant for now,Ingo Schwarze2013-12-272-23/+54
| | | | | | 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-23/+27
| | | | | 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-14/+14
| | | | | 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-178/+183
| | | | | | | | 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-1/+4
| | | | such that we don't trigger an assertion on a duplicate NAME section.
* Rework the documentation of Spaces, using the Ossanna/Kernighan/RitterIngo Schwarze2013-12-261-20/+20
| | | | | | | | | | | | | | | | Heirloom Nroff/Troff User's Manual at the authoritative reference. Part of our text was outright wrong. Also, refrain from advertising the paddable non-breaking space `\~' in the DESCRIPTION, for three reasons: For nroff mode, -Tascii, and fixed width fonts in general, it makes no difference, so keep the discussion simple. Compared to `\ ', '\~' is of questionable portability. And if you want to keep words together, it is also more usual that you don't want padding to intervene either. Finally, drop the `\c' escape sequence (interrupt text processing) which is not a special character but an input processing instruction akin to the \<newline> escape sequence.
* merge from VERSION_1_12Ingo Schwarze2013-12-261-20/+28
|
* I have no idea how it happened that \B, \H, \h, \L, and \l gotIngo Schwarze2013-12-261-7/+5
| | | | | | | | | | | mapped to ESCAPE_NUMBERED (which is for \N and only for \N), that made no sense at all. Properly remap them to ESCAPE_IGNORE. While here, move \B and \w from the group taking number arguments to the group taking string arguments; right now, that doesn't imply any functional change, but if we ever go ahead and implement a parser for roff(7) numerical expressions, it will suddenly start to matter, and cause confusion.
* The roff language really has two groups of basic building blocks:Ingo Schwarze2013-12-261-7/+253
| | | | | | | Requests and escape sequences. Consequently, supplement the REQUEST REFERENCE by an ESCAPE SEQUENCE REFERENCE, such that people no longer need to guess or experiment what mandoc(1) implements, what it parses and ignores, and what it doesn't handle at all.
* Parse and ignore the roff(7) escape sequences \d (move half line down)Ingo Schwarze2013-12-251-0/+8
| | | | und \u (move half line up). Found by bentley@ in some DocBook crap.
* Implement .Fo/.Fa/.Fc indentation and break handling for -Tman.Ingo Schwarze2013-12-251-3/+8
|
* Oops, .Fa never breaks the output line in the middle of any of itsIngo Schwarze2013-12-251-2/+1
| | | | | | arguments, not even outside SYNOPSIS mode. Quite surprising as .Fn does break the line in the middle of its arguments outside SYNOPSIS mode, and only doesn't do that in SYNOPSIS mode. Wonders of groff...
* Garbage collect two local variables each used only one single time.Ingo Schwarze2013-12-251-6/+4
|
* In the SYNOPSIS, implement hanging indentation for .FoIngo Schwarze2013-12-252-14/+22
| | | | | | and avoid output line breaks inside .Fa arguments. This reduces groff-mandoc differences in OpenBSD base by more than 8%. Patch from Franco Fichtner <franco at lastsummer dot de> (DragonFly).
* Support .St -xsh4.2, the System Interfaces part of the original SingleIngo Schwarze2013-12-252-1/+4
| | | | | | | | UNIX Specification. As this one appears to be used in the wild and we already have -xpg4.2 and even -xsh5, it makes sense to add this one. Note that calling the original SUS XPG4.2 appears to be more common than calling it SUSv1, so it's ok that we don't have .St -susv1. From Sascha Wildner <saw at online dot de> (DragonFly) via Franco Fichtner.