aboutsummaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Rework the documentation of Spaces, using the Ossanna/Kernighan/RitterIngo Schwarze2013-12-261-22/+22
| | | | | | | | | | | | | | | | 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-21/+29
|
* I have no idea how it happened that \B, \H, \h, \L, and \l gotIngo Schwarze2013-12-261-8/+6
| | | | | | | | | | | 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-9/+255
| | | | | | | 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-1/+9
| | | | 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-4/+9
|
* Oops, .Fa never breaks the output line in the middle of any of itsIngo Schwarze2013-12-251-3/+2
| | | | | | 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-7/+5
|
* In the SYNOPSIS, implement hanging indentation for .FoIngo Schwarze2013-12-252-16/+24
| | | | | | 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-4/+7
| | | | | | | | 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.
* s/[Nn]ull/NUL/ in comments where appropriate;Ingo Schwarze2013-12-254-11/+12
| | | | suggested by Thomas Klausner <wiz @ NetBSD dot org>.
* Do not break output lines in .Fn function arguments in SYNOPSIS mode.Ingo Schwarze2013-12-254-5/+28
| | | | | Following an idea from Franco Fichtner, but implemented more cleanly. This reduces groff-mandoc-differences in OpenBSD base by a fantastic 7.5%.
* Delete the unused flag TERMP_IGNDELIMIngo Schwarze2013-12-243-25/+13
| | | | | and the empty callback termp_igndelim_pre(). Sort the remaining termp flags.
* Implement SYNOPSIS .Fn indentation for -Tman.Ingo Schwarze2013-12-241-2/+5
|
* It turns out SYNOPSIS mode does not imply .Bk in general,Ingo Schwarze2013-12-244-42/+31
| | | | | | but only within .Nm blocks. Simplify the code accordingly. Triggered by research done by Franco Fichtner.
* When deciding whether two consecutive macros are on the same input line,Ingo Schwarze2013-12-246-15/+22
| | | | | | | | we have to compare the line where the first one *ends* (not where it begins) to the line where the second one starts. This fixes the bug that .Bk allowed output line breaks right after block macros spanning more than one input line, even when the next macro follows on the same line.