summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Churn as I finish email address migration kth.se -> bsd.lv.Kristaps Dzonsons2010-06-1945-45/+45
|
* Version notes for 1.10.2.Kristaps Dzonsons2010-06-192-2/+13
|
* Removed finished TODOsKristaps Dzonsons2010-06-131-27/+3
|
* Remove arg_getattrs(), as we only have arg_getattr()-like calls now thatKristaps Dzonsons2010-06-131-44/+14
| | | | -width is cached.
* Switch on cached -width usage in front-ends.Kristaps Dzonsons2010-06-132-12/+13
|
* Allow -width for lists to be cached in mdoc_bl. This requires someKristaps Dzonsons2010-06-134-52/+67
| | | | | | trickery because widths may be on-the-fly recalculated. I don't like how these are split between mdoc_action.c and mdoc_validate.c, but for the time being, it'll do.
* Small optimisations in mdoc_action list processing. Cleanups making wayKristaps Dzonsons2010-06-131-37/+35
| | | | for "width" cached argument.
* Cached `Bl -offset' into mdoc_bl. Removed erroneous "-offset defaultsKristaps Dzonsons2010-06-126-65/+46
| | | | | to 6n if no value is specified" and added regression tests for `Bl' testing against the empty -offset argument.
* Reverted to mdoc_term.c 1.149 (`It' does not inherit `Bl's cache,Kristaps Dzonsons2010-06-121-7/+10
| | | | | obviously, which was causing fallout) and again remove the loop code. Tested more thoroughly.
* Moved `Bl -compact' into cached data. This allowed the removal ofKristaps Dzonsons2010-06-124-30/+29
| | | | scanning the argv list in print_bvspace(), and thus the parent pointer.
* `Bl' is now using a struct instead of a single enum mdoc_list for itsKristaps Dzonsons2010-06-126-25/+31
| | | | cached values. You can probably guess where this is going.
* Removed stipulation that an empty `Bd -offset' will default to 6n. NotKristaps Dzonsons2010-06-127-33/+80
| | | | | | | sure where this came about. Added regression tests to convince myself that this is so. Also consolidated COMPATIBILITY notes regarding `Bd'. Added COMPATIBILITY note to the effect that old groff pukes on `Bd -compact -ragged' (regression test will fail on old groff).
* Cache all of `Bd's resolved arguments into mdoc_bd, which is stashed inKristaps Dzonsons2010-06-126-56/+120
| | | | | | the "data" union in mdoc_node. Allows me to remove some ugly loops in the front-end and duplicate tests in mdoc_action.c. Add a regression test to make sure we're not doing anything bad (more to come).
* Added enum mdoc_disp (similar to enum mdoc_list). Display types are nowKristaps Dzonsons2010-06-128-87/+77
| | | | | | | | | | | only calculated once in mdoc_validate.c. Noted that `Bd -file xxx' is not supported: it now raises a fatal warning. This is noted in mdoc.7. Empty `Bd' now defaults to LIST_ragged, which is not quite what groff does, but close enough (gross just throws away the `Bd' and gets upset when it encounters an `Ed').
* Add FreeBSD libraries (provided by Ulrich Spoerlein).Kristaps Dzonsons2010-06-111-0/+25
|
* Implement font-switching for PostScript. -Tps now supportsKristaps Dzonsons2010-06-112-61/+134
| | | | | | TERMFONT_BOLD (Courier-Bold) and TERMFONT_UNDER (Courier-Oblique). It doesn't look half bad. This accomplished through tricksy juggling of the one-char back-buffer.
* Delay opening a word state until a character is ready to be output.Kristaps Dzonsons2010-06-111-20/+41
| | | | | This paves the way for closing/reopening scope in the event that a font changes.
* Teach -Tps to ignore backspace-encoding by using a one-char buffer and aKristaps Dzonsons2010-06-113-5/+32
| | | | simple state machine. This paves the way for decorated text.
* Note that we use PostScript level 2, not 1 (the /Courier invocation).Kristaps Dzonsons2010-06-111-1/+1
|
* Allow open word contexts in -Tps to preserve whitespace, as whitespaceKristaps Dzonsons2010-06-101-3/+4
| | | | | apparently doesn't collapse in PostScript (surprise!). Makes output files much more compact.
* Fix a regression that crept in in man_term.c 1.73 and mdoc_term.c 1.144.Ingo Schwarze2010-06-102-5/+4
| | | | | | | | | | | | | | | | When the title line uses special characters, mandoc will segfault. Thus, first set up the character tables, then print the header, as we always did. Found in OpenBSD /usr/src/usr.sbin/bind/bin/check/named-checkconf.8. While here, set p->tabwidth in terminal_man() for symmetry with terminal_mdoc(), as suggested by millert@ (and already committed to OpenBSD earlier). Since 5 is the default, this is not strictly required, but it is certainly clearer and more robust. "looks fine" kristaps@
* Fix adding some minimal intelligence to conditional parser. See roff.7Kristaps Dzonsons2010-06-103-35/+131
| | | | | | | | | | for what's supported. This simplified the roff_cond() function quite nicely. From a bug report by uqs@. Added regression test based on bug-report example by uqs@. Also added ROFF_DEBUG to see what the hell the parser is actually doing. Obviously turned off by default.
* Make "sub" for conditionals run roffnode_cleanscope() before callingKristaps Dzonsons2010-06-091-1/+11
| | | | down to sub-arguments. From a bug report by Ulrich Spoerlein.
* Squash bug noted by Ulrich Spoerlein where "-" were being converted toKristaps Dzonsons2010-06-095-44/+65
| | | | | | | | | ASCII_HYPH, as per normal, but were screwing up mandoc_special(). Fixed by making mandoc_special() first check isspace() instead of ! isgraph(), then normalise its string as it passes out. This require de-constifying some validation routines not already de-constified (those in libman), but that's ok, because I'd like to be pushing actions into validation routines to save on space and redundant calculations.
* Forgot to increment into the nil terminator. And call va_end() whileKristaps Dzonsons2010-06-091-1/+3
| | | | we're at it.
* Have the standard manpage header and footer print on every page of -TpsKristaps Dzonsons2010-06-095-68/+153
| | | | | | | | | | | | | | | output. This is more tricky than you may think: we can't just call the header function out-of-state (i.e., before a flushln has occured) because we'd clobber our current state. Thus, we call at the beginning and dump the output into an auxiliary buffer. For the record, I don't think there's any other clean way to do this. The only other Way That Works is to copy-aside *all* termp state, zero it, and do the necessary headf/footf. This is just as complex, as memory needs to be alloc'd and free'd per margin. Unfortunately, this prohibits page numbering (the margin is only printed once), so I'll probably end up re-writing this down the line.
* Lint noops. Also fixed getsubopt() to be in unistd.h (noted by joerg@).Kristaps Dzonsons2010-06-082-0/+2
|
* Broke ascii_*() functions into term_ascii.cKristaps Dzonsons2010-06-085-250/+334
| | | | Made low-level engine functions into function pointers.
* No functionality changes: just restructuring. DeprecatedKristaps Dzonsons2010-06-086-40/+88
| | | | | terminal_free() in favour of ps_free() and ascii_free(). Moved ps_*() functions into term_ps.c so that they don't clutter up term.c.
* Missing prototype for getsubopt() on NetBSD fixed.VERSION.1.10.1Kristaps Dzonsons2010-06-081-0/+1
|
* Fixed missing tag in www index.Kristaps Dzonsons2010-06-081-1/+0
|
* Updated version bits with PostScript goodies.Kristaps Dzonsons2010-06-071-36/+62
|
* Lint fix.Kristaps Dzonsons2010-06-072-1/+4
| | | | Added J.C. Roberts' TODO note.
* First check-in of PostScript output. This does not change any logicKristaps Dzonsons2010-06-078-50/+332
| | | | | | within term.c, but does add a small shim over putchar() that switches on the output engine. Prints, for this initial version, only monospace and without font decorations. It's a start.
* Added version bits for 1.10.1.Kristaps Dzonsons2010-06-073-9/+18
| | | | Spell-checked manuals.
* I really should run -Tlint on my own manuals before committing them.Kristaps Dzonsons2010-06-071-2/+2
| | | | EOLN whitespace fixed.
* Normalise SYNOPSIS behaviour after I gave up on following groff'sKristaps Dzonsons2010-06-079-305/+216
| | | | | | | | | | | | | | | | | | | | | inconsistent behaviour. In short: Some macros are displayed differently in the SYNOPSIS section, particularly Nm, Cd, Fd, Fn, Fo, In, Vt, and Ft. All of these macros are output on their own line. If two such dissimilar macros are pair-wise invoked (except for Ft before Fo or Fn), they are separated by a vertical space, unless in the case of Fo, Fn, and Ft, which are always separated by vertical space. Behaviour ok Jason McIntyre, ingo@. Fallout will be treated case-by-case. I had to clear out some regressions that were testing against groff's stranger behaviours: these will now break, as we don't care about such invocations. Also removed the newline for `Cd' invocation in a non-SYNOPSIS context.
* Forgot to check in manual along with -Owidth=width patch.Kristaps Dzonsons2010-06-071-2/+12
|
* Add -Owidth=width option to mandoc -Tascii. Asked for by joerg@ about aKristaps Dzonsons2010-06-074-9/+29
| | | | thousand years ago. Note that this is normalised to >=60.
* Small fix to preserve trailing semicolons in examples.Kristaps Dzonsons2010-06-061-3/+3
|
* Merge a fix to avoid a regression in OpenBSD:Ingo Schwarze2010-06-061-0/+3
| | | | | | | | | | | Restore the blank line before .In in SYNOPSIS except right after .Sh or right after another .In. Even though Kristaps says SYNOPSIS blank-line handling is still very much work in progress and more is probably needed, this one is useful to keep in sync with OpenBSD. "fine" kristaps@
* Add MAP_SHARED for mmap, at least NetBSD with DIAGNOSTIC is quite noisyJoerg Sonnenberger2010-06-061-1/+1
| | | | otherwise.
* Have regress.sh bail out if $MANDOC isn't found.Kristaps Dzonsons2010-06-061-0/+6
|
* Fixed -Tascii and -Thtml rendering of `Ft' and `Fo'.Kristaps Dzonsons2010-06-066-45/+154
|
* Shortened "its calling syntax" -> "its syntax".Kristaps Dzonsons2010-06-061-35/+149
| | | | | | Better documentation for `Fa' and some others. Added `Ft', `Fo', and some COMPATIBILITY notes.
* Fix following the first: `Ft' is given special treatment if specified beforeKristaps Dzonsons2010-06-042-1/+7
| | | | `Fn'.
* Fixed `Fn' newline behaviour and added some regression tests to thisKristaps Dzonsons2010-06-045-3/+81
| | | | | | | extent. Documented `Fn'. Please note the COMPATIBILITY note regarding historic groff.
* Documented `In' in full.Kristaps Dzonsons2010-06-044-35/+63
| | | | | | Fixed `In' to behave properly: it wasn't properly breaking lines, formatting, or really anything else. Noted COMPATIBILITY with OpenBSD's groff, which pukes all over `In'.
* Fixed `Fd' to format in the right way. Found when confused by what theKristaps Dzonsons2010-06-043-17/+33
| | | | | hell `Fd' is supposed to do anyway (answer: it's a historical macro and we shouldn't be doing anything with it anyway).
* Documented `Db', `El', `Fa', and `Fd'.Kristaps Dzonsons2010-06-041-0/+37
|