]> git.cameronkatri.com Git - mandoc.git/log
mandoc.git
14 years agoMechanical diff allowing the const struct regset to propogate through
Kristaps Dzonsons [Sat, 26 Jun 2010 16:07:08 +0000 (16:07 +0000)]
Mechanical diff allowing the const struct regset to propogate through
libman and libmdoc.

14 years agoChurn-ish check-in getting mdoc_parseln() and man_parseln() to accept a
Kristaps Dzonsons [Sat, 26 Jun 2010 15:36:37 +0000 (15:36 +0000)]
Churn-ish check-in getting mdoc_parseln() and man_parseln() to accept a
const struct regset pointer.  No functionality.

14 years agoFirst step of adding register support. This is inspired by a significant
Kristaps Dzonsons [Sat, 26 Jun 2010 15:22:19 +0000 (15:22 +0000)]
First step of adding register support.  This is inspired by a significant
patch by schwarze@.  This commit adds support to libroff parsing `nr'
into register set defined in regs.h.  This will propogate into libmdoc
and libman in later commits.

14 years agoRemove "pt" from struct roffsu, as CSS (the only reason it was there) is
Kristaps Dzonsons [Fri, 25 Jun 2010 19:50:23 +0000 (19:50 +0000)]
Remove "pt" from struct roffsu, as CSS (the only reason it was there) is
unclear about which units accept floats/integers, which leads me to
assume that it handles either and rounds as appropriate.

14 years agoAllow OpenBSD's nroff to process mandoc.1 without puking on long `It'
Kristaps Dzonsons [Fri, 25 Jun 2010 19:02:48 +0000 (19:02 +0000)]
Allow OpenBSD's nroff to process mandoc.1 without puking on long `It'
lines.

14 years agoInitial chunks for variable-width fonts. Pushes all width calculations
Kristaps Dzonsons [Fri, 25 Jun 2010 18:53:14 +0000 (18:53 +0000)]
Initial chunks for variable-width fonts.  Pushes all width calculations
in mdoc_term.c and man_term.c down into term.c.  This is still not
implemented in term.c, although stubs for width calculations are in
place.  From now on, offset, rmargin, and other layout variables are
abstract screen widths.  They will resolve to the the familiar values
for -Tascii but -Tps will eventually use points instead of chars.

14 years agoFix slipped in after tag: install PS files with installwww. VERSION_1_10_2
Kristaps Dzonsons [Sat, 19 Jun 2010 20:51:50 +0000 (20:51 +0000)]
Fix slipped in after tag: install PS files with installwww.

14 years agoChurn as I finish email address migration kth.se -> bsd.lv.
Kristaps Dzonsons [Sat, 19 Jun 2010 20:46:27 +0000 (20:46 +0000)]
Churn as I finish email address migration kth.se -> bsd.lv.

14 years agoVersion notes for 1.10.2.
Kristaps Dzonsons [Sat, 19 Jun 2010 20:43:35 +0000 (20:43 +0000)]
Version notes for 1.10.2.

14 years agoRemoved finished TODOs
Kristaps Dzonsons [Sun, 13 Jun 2010 22:44:33 +0000 (22:44 +0000)]
Removed finished TODOs

14 years agoRemove arg_getattrs(), as we only have arg_getattr()-like calls now that
Kristaps Dzonsons [Sun, 13 Jun 2010 22:05:43 +0000 (22:05 +0000)]
Remove arg_getattrs(), as we only have arg_getattr()-like calls now that
-width is cached.

14 years agoSwitch on cached -width usage in front-ends.
Kristaps Dzonsons [Sun, 13 Jun 2010 21:41:58 +0000 (21:41 +0000)]
Switch on cached -width usage in front-ends.

14 years agoAllow -width for lists to be cached in mdoc_bl. This requires some
Kristaps Dzonsons [Sun, 13 Jun 2010 21:02:48 +0000 (21:02 +0000)]
Allow -width for lists to be cached in mdoc_bl.  This requires some
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.

14 years agoSmall optimisations in mdoc_action list processing. Cleanups making way
Kristaps Dzonsons [Sun, 13 Jun 2010 20:05:12 +0000 (20:05 +0000)]
Small optimisations in mdoc_action list processing.  Cleanups making way
for "width" cached argument.

14 years agoCached `Bl -offset' into mdoc_bl. Removed erroneous "-offset defaults
Kristaps Dzonsons [Sat, 12 Jun 2010 12:38:01 +0000 (12:38 +0000)]
Cached `Bl -offset' into mdoc_bl.  Removed erroneous "-offset defaults
to 6n if no value is specified" and added regression tests for `Bl'
testing against the empty -offset argument.

14 years agoReverted to mdoc_term.c 1.149 (`It' does not inherit `Bl's cache,
Kristaps Dzonsons [Sat, 12 Jun 2010 12:21:41 +0000 (12:21 +0000)]
Reverted to mdoc_term.c 1.149 (`It' does not inherit `Bl's cache,
obviously, which was causing fallout) and again remove the loop code.
Tested more thoroughly.

14 years agoMoved `Bl -compact' into cached data. This allowed the removal of
Kristaps Dzonsons [Sat, 12 Jun 2010 12:10:55 +0000 (12:10 +0000)]
Moved `Bl -compact' into cached data.  This allowed the removal of
scanning the argv list in print_bvspace(), and thus the parent pointer.

14 years ago`Bl' is now using a struct instead of a single enum mdoc_list for its
Kristaps Dzonsons [Sat, 12 Jun 2010 11:58:22 +0000 (11:58 +0000)]
`Bl' is now using a struct instead of a single enum mdoc_list for its
cached values.  You can probably guess where this is going.

14 years agoRemoved stipulation that an empty `Bd -offset' will default to 6n. Not
Kristaps Dzonsons [Sat, 12 Jun 2010 11:41:50 +0000 (11:41 +0000)]
Removed stipulation that an empty `Bd -offset' will default to 6n.  Not
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).

14 years agoCache all of `Bd's resolved arguments into mdoc_bd, which is stashed in
Kristaps Dzonsons [Sat, 12 Jun 2010 11:21:44 +0000 (11:21 +0000)]
Cache all of `Bd's resolved arguments into mdoc_bd, which is stashed in
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).

14 years agoAdded enum mdoc_disp (similar to enum mdoc_list). Display types are now
Kristaps Dzonsons [Sat, 12 Jun 2010 10:09:19 +0000 (10:09 +0000)]
Added enum mdoc_disp (similar to enum mdoc_list).  Display types are now
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').

14 years agoAdd FreeBSD libraries (provided by Ulrich Spoerlein).
Kristaps Dzonsons [Fri, 11 Jun 2010 23:40:33 +0000 (23:40 +0000)]
Add FreeBSD libraries (provided by Ulrich Spoerlein).

14 years agoImplement font-switching for PostScript. -Tps now supports
Kristaps Dzonsons [Fri, 11 Jun 2010 16:58:20 +0000 (16:58 +0000)]
Implement font-switching for PostScript.  -Tps now supports
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.

14 years agoDelay opening a word state until a character is ready to be output.
Kristaps Dzonsons [Fri, 11 Jun 2010 15:26:39 +0000 (15:26 +0000)]
Delay opening a word state until a character is ready to be output.
This paves the way for closing/reopening scope in the event that a font
changes.

14 years agoTeach -Tps to ignore backspace-encoding by using a one-char buffer and a
Kristaps Dzonsons [Fri, 11 Jun 2010 07:23:04 +0000 (07:23 +0000)]
Teach -Tps to ignore backspace-encoding by using a one-char buffer and a
simple state machine.  This paves the way for decorated text.

14 years agoNote that we use PostScript level 2, not 1 (the /Courier invocation).
Kristaps Dzonsons [Fri, 11 Jun 2010 07:15:42 +0000 (07:15 +0000)]
Note that we use PostScript level 2, not 1 (the /Courier invocation).

14 years agoAllow open word contexts in -Tps to preserve whitespace, as whitespace
Kristaps Dzonsons [Thu, 10 Jun 2010 23:56:33 +0000 (23:56 +0000)]
Allow open word contexts in -Tps to preserve whitespace, as whitespace
apparently doesn't collapse in PostScript (surprise!).  Makes output
files much more compact.

14 years agoFix a regression that crept in in man_term.c 1.73 and mdoc_term.c 1.144.
Ingo Schwarze [Thu, 10 Jun 2010 23:24:37 +0000 (23:24 +0000)]
Fix a regression that crept in in man_term.c 1.73 and mdoc_term.c 1.144.
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@

14 years agoFix adding some minimal intelligence to conditional parser. See roff.7
Kristaps Dzonsons [Thu, 10 Jun 2010 21:42:02 +0000 (21:42 +0000)]
Fix adding some minimal intelligence to conditional parser.  See roff.7
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.

14 years agoMake "sub" for conditionals run roffnode_cleanscope() before calling
Kristaps Dzonsons [Wed, 9 Jun 2010 20:00:38 +0000 (20:00 +0000)]
Make "sub" for conditionals run roffnode_cleanscope() before calling
down to sub-arguments.  From a bug report by Ulrich Spoerlein.

14 years agoSquash bug noted by Ulrich Spoerlein where "-" were being converted to
Kristaps Dzonsons [Wed, 9 Jun 2010 19:22:56 +0000 (19:22 +0000)]
Squash bug noted by Ulrich Spoerlein where "-" were being converted to
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.

14 years agoForgot to increment into the nil terminator. And call va_end() while
Kristaps Dzonsons [Wed, 9 Jun 2010 08:31:18 +0000 (08:31 +0000)]
Forgot to increment into the nil terminator.  And call va_end() while
we're at it.

14 years agoHave the standard manpage header and footer print on every page of -Tps
Kristaps Dzonsons [Wed, 9 Jun 2010 08:07:13 +0000 (08:07 +0000)]
Have the standard manpage header and footer print on every page of -Tps
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.

14 years agoLint noops. Also fixed getsubopt() to be in unistd.h (noted by joerg@).
Kristaps Dzonsons [Tue, 8 Jun 2010 15:06:01 +0000 (15:06 +0000)]
Lint noops.  Also fixed getsubopt() to be in unistd.h (noted by joerg@).

14 years agoBroke ascii_*() functions into term_ascii.c
Kristaps Dzonsons [Tue, 8 Jun 2010 15:00:17 +0000 (15:00 +0000)]
Broke ascii_*() functions into term_ascii.c

Made low-level engine functions into function pointers.

14 years agoNo functionality changes: just restructuring. Deprecated
Kristaps Dzonsons [Tue, 8 Jun 2010 13:22:37 +0000 (13:22 +0000)]
No functionality changes: just restructuring.  Deprecated
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.

14 years agoMissing prototype for getsubopt() on NetBSD fixed. VERSION_1_10_1
Kristaps Dzonsons [Tue, 8 Jun 2010 09:20:08 +0000 (09:20 +0000)]
Missing prototype for getsubopt() on NetBSD fixed.

14 years agoFixed missing tag in www index.
Kristaps Dzonsons [Tue, 8 Jun 2010 09:15:58 +0000 (09:15 +0000)]
Fixed missing tag in www index.

14 years agoUpdated version bits with PostScript goodies.
Kristaps Dzonsons [Mon, 7 Jun 2010 21:05:59 +0000 (21:05 +0000)]
Updated version bits with PostScript goodies.

14 years agoLint fix.
Kristaps Dzonsons [Mon, 7 Jun 2010 21:03:02 +0000 (21:03 +0000)]
Lint fix.

Added J.C. Roberts' TODO note.

14 years agoFirst check-in of PostScript output. This does not change any logic
Kristaps Dzonsons [Mon, 7 Jun 2010 20:57:09 +0000 (20:57 +0000)]
First check-in of PostScript output.  This does not change any logic
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.

14 years agoAdded version bits for 1.10.1.
Kristaps Dzonsons [Mon, 7 Jun 2010 12:20:07 +0000 (12:20 +0000)]
Added version bits for 1.10.1.

Spell-checked manuals.

14 years agoI really should run -Tlint on my own manuals before committing them.
Kristaps Dzonsons [Mon, 7 Jun 2010 11:14:13 +0000 (11:14 +0000)]
I really should run -Tlint on my own manuals before committing them.
EOLN whitespace fixed.

14 years agoNormalise SYNOPSIS behaviour after I gave up on following groff's
Kristaps Dzonsons [Mon, 7 Jun 2010 11:01:15 +0000 (11:01 +0000)]
Normalise SYNOPSIS behaviour after I gave up on following groff's
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.

14 years agoForgot to check in manual along with -Owidth=width patch.
Kristaps Dzonsons [Mon, 7 Jun 2010 10:55:27 +0000 (10:55 +0000)]
Forgot to check in manual along with -Owidth=width patch.

14 years agoAdd -Owidth=width option to mandoc -Tascii. Asked for by joerg@ about a
Kristaps Dzonsons [Mon, 7 Jun 2010 10:52:44 +0000 (10:52 +0000)]
Add -Owidth=width option to mandoc -Tascii.  Asked for by joerg@ about a
thousand years ago.  Note that this is normalised to >=60.

14 years agoSmall fix to preserve trailing semicolons in examples.
Kristaps Dzonsons [Sun, 6 Jun 2010 22:25:56 +0000 (22:25 +0000)]
Small fix to preserve trailing semicolons in examples.

14 years agoMerge a fix to avoid a regression in OpenBSD:
Ingo Schwarze [Sun, 6 Jun 2010 22:08:15 +0000 (22:08 +0000)]
Merge a fix to avoid a regression in OpenBSD:
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@

14 years agoAdd MAP_SHARED for mmap, at least NetBSD with DIAGNOSTIC is quite noisy
Joerg Sonnenberger [Sun, 6 Jun 2010 20:44:53 +0000 (20:44 +0000)]
Add MAP_SHARED for mmap, at least NetBSD with DIAGNOSTIC is quite noisy
otherwise.

14 years agoHave regress.sh bail out if $MANDOC isn't found.
Kristaps Dzonsons [Sun, 6 Jun 2010 10:57:43 +0000 (10:57 +0000)]
Have regress.sh bail out if $MANDOC isn't found.

14 years agoFixed -Tascii and -Thtml rendering of `Ft' and `Fo'.
Kristaps Dzonsons [Sun, 6 Jun 2010 10:50:56 +0000 (10:50 +0000)]
Fixed -Tascii and -Thtml rendering of `Ft' and `Fo'.

14 years agoShortened "its calling syntax" -> "its syntax".
Kristaps Dzonsons [Sun, 6 Jun 2010 10:49:56 +0000 (10:49 +0000)]
Shortened "its calling syntax" -> "its syntax".

Better documentation for `Fa' and some others.

Added `Ft', `Fo', and some COMPATIBILITY notes.

14 years agoFix following the first: `Ft' is given special treatment if specified before
Kristaps Dzonsons [Fri, 4 Jun 2010 22:26:13 +0000 (22:26 +0000)]
Fix following the first: `Ft' is given special treatment if specified before
`Fn'.

14 years agoFixed `Fn' newline behaviour and added some regression tests to this
Kristaps Dzonsons [Fri, 4 Jun 2010 22:16:27 +0000 (22:16 +0000)]
Fixed `Fn' newline behaviour and added some regression tests to this
extent.

Documented `Fn'.  Please note the COMPATIBILITY note regarding historic
groff.

14 years agoDocumented `In' in full.
Kristaps Dzonsons [Fri, 4 Jun 2010 21:49:39 +0000 (21:49 +0000)]
Documented `In' in full.

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'.

14 years agoFixed `Fd' to format in the right way. Found when confused by what the
Kristaps Dzonsons [Fri, 4 Jun 2010 21:05:39 +0000 (21:05 +0000)]
Fixed `Fd' to format in the right way.  Found when confused by what the
hell `Fd' is supposed to do anyway (answer: it's a historical macro and
we shouldn't be doing anything with it anyway).

14 years agoDocumented `Db', `El', `Fa', and `Fd'.
Kristaps Dzonsons [Fri, 4 Jun 2010 20:57:26 +0000 (20:57 +0000)]
Documented `Db', `El', `Fa', and `Fd'.

14 years agoDocument the `Mt' macro.
Kristaps Dzonsons [Thu, 3 Jun 2010 15:54:27 +0000 (15:54 +0000)]
Document the `Mt' macro.

14 years agoRemove manuals.7 (see http://manpages.bsd.lv).
Kristaps Dzonsons [Thu, 3 Jun 2010 15:39:56 +0000 (15:39 +0000)]
Remove manuals.7 (see http://manpages.bsd.lv).

14 years agoVersion bits for 1.10.1.
Kristaps Dzonsons [Thu, 3 Jun 2010 14:52:48 +0000 (14:52 +0000)]
Version bits for 1.10.1.

14 years agoCompatibility note about `Ta' being a line macro.
Kristaps Dzonsons [Thu, 3 Jun 2010 14:52:32 +0000 (14:52 +0000)]
Compatibility note about `Ta' being a line macro.

14 years agoComplete, rigorous documentation of the `Bl' and `It' macros, including
Kristaps Dzonsons [Thu, 3 Jun 2010 14:29:52 +0000 (14:29 +0000)]
Complete, rigorous documentation of the `Bl' and `It' macros, including
the peculiarities with `It'-less `Bl -column' invocations, column
phrases, per-type syntax of `It', etc.

14 years agoConsolidated list processing to a single loop in mdoc_validate.c. This
Kristaps Dzonsons [Thu, 3 Jun 2010 13:44:36 +0000 (13:44 +0000)]
Consolidated list processing to a single loop in mdoc_validate.c.  This
relieves having to repeat running over the argument list in
mdoc_action.c and mdoc_validate.c.

Default to LIST_item for type-less lists (groff technically doesn't do
this: it just ignores the `It' lines altogether).

Make MANDOC_LISTTYPE be a recoverable error.

14 years agoStrip empty-line markers from mdoc.template and its mdoc.7 embedded form
Kristaps Dzonsons [Wed, 2 Jun 2010 12:01:00 +0000 (12:01 +0000)]
Strip empty-line markers from mdoc.template and its mdoc.7 embedded form
(as per Jason McIntyre's suggestion for manuals in general).

14 years agoNote missing man/roff(?) feature not documented anywhere.
Kristaps Dzonsons [Tue, 1 Jun 2010 22:05:59 +0000 (22:05 +0000)]
Note missing man/roff(?) feature not documented anywhere.

14 years agoSpelling patches provided by Ulrich Spoerlein.
Kristaps Dzonsons [Tue, 1 Jun 2010 14:54:37 +0000 (14:54 +0000)]
Spelling patches provided by Ulrich Spoerlein.

14 years agoDe Morgan's law not being applied properly. Noted by Ulrich Spoerlein.
Kristaps Dzonsons [Tue, 1 Jun 2010 14:51:09 +0000 (14:51 +0000)]
De Morgan's law not being applied properly.  Noted by Ulrich Spoerlein.

14 years agoNoted that \} collapses into a zero-width space on the front-end.
Kristaps Dzonsons [Tue, 1 Jun 2010 11:54:23 +0000 (11:54 +0000)]
Noted that \} collapses into a zero-width space on the front-end.

14 years agoRegression made old-groff-friendly.
Kristaps Dzonsons [Tue, 1 Jun 2010 11:53:26 +0000 (11:53 +0000)]
Regression made old-groff-friendly.

14 years agoFixed condition of `\}' closing a conditional at the start of the line.
Kristaps Dzonsons [Tue, 1 Jun 2010 11:47:28 +0000 (11:47 +0000)]
Fixed condition of `\}' closing a conditional at the start of the line.

Fixed flushed-out condition of \} causing subsequent arguments to be
truncated, when in fact the whole line should be passed through (if the
conditional succeeds) to the front-end and the \} ignored there.

Added regression test of this behaviour.

14 years agoLint fixes (noops).
Kristaps Dzonsons [Mon, 31 May 2010 23:49:16 +0000 (23:49 +0000)]
Lint fixes (noops).

14 years agoCleanup post_bl_head() to use enum mdoc_list (avoid traversing that
Kristaps Dzonsons [Mon, 31 May 2010 23:40:25 +0000 (23:40 +0000)]
Cleanup post_bl_head() to use enum mdoc_list (avoid traversing that
list).

Reverted MANDOC_COLUMNS to be a bad-bad syntax error: we don't, and
apparently never have, allowed mixing of -column syntaxes.  This would
have segfaulted if encountered.

14 years agoClean up the validation code for `It' macros: use enum mdoc_list
Kristaps Dzonsons [Mon, 31 May 2010 23:10:51 +0000 (23:10 +0000)]
Clean up the validation code for `It' macros:  use enum mdoc_list
instead of iterating over arguments and only scan with `-column', which
needs the count of arguments.

14 years agoRemove now-superfluous check on `Ta' context.
Kristaps Dzonsons [Mon, 31 May 2010 22:39:55 +0000 (22:39 +0000)]
Remove now-superfluous check on `Ta' context.

14 years agoFixed my breaking of Ingo's eoln-whitespace detection code, where a
Kristaps Dzonsons [Mon, 31 May 2010 21:32:57 +0000 (21:32 +0000)]
Fixed my breaking of Ingo's eoln-whitespace detection code, where a
hyphen wasn't resetting the fact of being whitespace.  Noted by Jason
McIntyre.

14 years agoMacro lines now infer an `It' if they immediately follow a `Bl -column'
Kristaps Dzonsons [Mon, 31 May 2010 20:14:10 +0000 (20:14 +0000)]
Macro lines now infer an `It' if they immediately follow a `Bl -column'
or a closed-out `It' block within a `Bl -column' (which only happens
when a macro or free-form text is encountered prior to an `It').

Added some regression tests for this behaviour.

14 years agoStrengthened constraint for passing into `It'.
Kristaps Dzonsons [Mon, 31 May 2010 15:50:48 +0000 (15:50 +0000)]
Strengthened constraint for passing into `It'.

Added regression test for constrained condition.

14 years agoAdd ability to interpret initial free-form lines as part of a `Bl
Kristaps Dzonsons [Mon, 31 May 2010 15:42:09 +0000 (15:42 +0000)]
Add ability to interpret initial free-form lines as part of a `Bl
-column' up until the first `It'.  This is UGLY and should have all
sorts of warnings, and will.  On the one hand, it fits with groff's
notion of tabs and tab-spaces.  On the other hand, it's not really
"free-form" text any more.  Note that this does not yet accomodate for
macros coming on these lines.

14 years agoGetting args() function ready to handle no-context (*pos can == 0)
Kristaps Dzonsons [Mon, 31 May 2010 13:39:13 +0000 (13:39 +0000)]
Getting args() function ready to handle no-context (*pos can == 0)
processing.

14 years ago`Ta' scope-checks need to be more specific (until implicit `It' handling
Kristaps Dzonsons [Mon, 31 May 2010 11:52:06 +0000 (11:52 +0000)]
`Ta' scope-checks need to be more specific (until implicit `It' handling
comes into play).

14 years agoAdd some regression tests.
Kristaps Dzonsons [Mon, 31 May 2010 10:29:34 +0000 (10:29 +0000)]
Add some regression tests.

14 years agoRemove enum mdocargerr from phrase() (unused).
Kristaps Dzonsons [Mon, 31 May 2010 10:28:04 +0000 (10:28 +0000)]
Remove enum mdocargerr from phrase() (unused).

Add `Ta' macro, which is basically a NULL case everywhere but in
mdoc_macro.c, where it closes out an existing `It' body scope and opens
a new one, then continues parsing as in phrase() (TODO: merge these
two?).

Fix where scope-breaking was silently just dying instead of printing an
error.

Fix where trailing `Ta' or tab weren't creating a new MDOC_BODY context.

We now support arbitrarily complex `It' contents for `Bl -column'.

14 years agoFix unescaped `Ta' invocations in mdoc.7.
Kristaps Dzonsons [Mon, 31 May 2010 10:19:31 +0000 (10:19 +0000)]
Fix unescaped `Ta' invocations in mdoc.7.

14 years agoHave mdoc_args() use enum mdoc_list instead of scanning.
Kristaps Dzonsons [Sun, 30 May 2010 23:59:59 +0000 (23:59 +0000)]
Have mdoc_args() use enum mdoc_list instead of scanning.

14 years agoTweak regression so it doesn't puke on the groff behaviour (allowing
Kristaps Dzonsons [Sun, 30 May 2010 23:07:34 +0000 (23:07 +0000)]
Tweak regression so it doesn't puke on the groff behaviour (allowing
open scopes to migrate across tabs) that we probably won't support and
is well-known.

14 years agoMigrate `Bl -column' phrases to be MDOC_BODY instead of MDOC_HEAD. This
Kristaps Dzonsons [Sun, 30 May 2010 22:56:02 +0000 (22:56 +0000)]
Migrate `Bl -column' phrases to be MDOC_BODY instead of MDOC_HEAD.  This
will make it easy for re-entrant parsing of `Ta' macros to fit in with
standard closure rules.

Added some more regressions for `Bl -column'.  Note that one should
fail, as documented in the TODO file.

Recorded change of AST BNF in mdoc.3.

14 years agoFinal word on lac/ac. Document flow as it relates to phrasing, as I'll
Kristaps Dzonsons [Sun, 30 May 2010 21:50:23 +0000 (21:50 +0000)]
Final word on lac/ac.  Document flow as it relates to phrasing, as I'll
be changing this around and want a record in CVS of what was happening
beforehand.

14 years agoObvious fix to last patch: have ARGS_PEND also be flagged for phrase()
Kristaps Dzonsons [Sun, 30 May 2010 21:41:46 +0000 (21:41 +0000)]
Obvious fix to last patch: have ARGS_PEND also be flagged for phrase()
handling.

14 years agoFirst in several iterative patches in getting complex -column lists
Kristaps Dzonsons [Sun, 30 May 2010 21:28:30 +0000 (21:28 +0000)]
First in several iterative patches in getting complex -column lists
supported (which works but is tricky enough that it should be broken
down into digestable parts).  This simply moves around the propogation
of ARGS_PEND into one recognised by phrase().

Added a few regressions for simple -column lists.

14 years agoMake check for case a little more intuitive (suggested by joerg@).
Kristaps Dzonsons [Sun, 30 May 2010 11:47:44 +0000 (11:47 +0000)]
Make check for case a little more intuitive (suggested by joerg@).

14 years agoMade `Dt' default to LOCAL and UNKNOWN instead of local and unknown (note case).
Kristaps Dzonsons [Sun, 30 May 2010 11:00:53 +0000 (11:00 +0000)]
Made `Dt' default to LOCAL and UNKNOWN instead of local and unknown (note case).

Have `Dt' default to UNKNOWN if it's an empty string.

Raise a warning if `Dt' title isn't capitalised.

Sync'd `Dt' documentation with reality.

14 years agoFixed tech@ mailing list pointer (noted by Ulrich Spoerlein).
Kristaps Dzonsons [Sun, 30 May 2010 10:36:10 +0000 (10:36 +0000)]
Fixed tech@ mailing list pointer (noted by Ulrich Spoerlein).

Fixed case of some anchor tag closings (no-op).

14 years agoAdded a final regression for `Ar' (won't work on old groff).
Kristaps Dzonsons [Sat, 29 May 2010 19:48:49 +0000 (19:48 +0000)]
Added a final regression for `Ar' (won't work on old groff).

14 years agoBump 1.10.0 version in Makefile.
Kristaps Dzonsons [Sat, 29 May 2010 19:45:32 +0000 (19:45 +0000)]
Bump 1.10.0 version in Makefile.

14 years agoAdded version bits to www pages.
Kristaps Dzonsons [Sat, 29 May 2010 19:45:08 +0000 (19:45 +0000)]
Added version bits to www pages.

Cleaned up www to be more compact and add a header for sections.

14 years agoGive libroff an extremely simple table-lookup instead of iterating over
Kristaps Dzonsons [Sat, 29 May 2010 19:41:47 +0000 (19:41 +0000)]
Give libroff an extremely simple table-lookup instead of iterating over
each and every macro.  The table keys on the first character then walks
a chain.  Good enough for now.

14 years agoMoved printing of empty word [back] into mdoc_action.c so that it's not
Kristaps Dzonsons [Sat, 29 May 2010 18:58:52 +0000 (18:58 +0000)]
Moved printing of empty word [back] into mdoc_action.c so that it's not
mirrored across front-ends.

14 years agoAdding `Ar' regression for empty-prior-closing-punctuation checkin.
Kristaps Dzonsons [Sat, 29 May 2010 18:50:44 +0000 (18:50 +0000)]
Adding `Ar' regression for empty-prior-closing-punctuation checkin.
NOTE: this will not work on old groff, which forgets to print `file ...'
when encountering an empty Ar node.

14 years agoCommit of patch floated on discuss@ a few days ago: if an in_line scope
Kristaps Dzonsons [Sat, 29 May 2010 18:47:54 +0000 (18:47 +0000)]
Commit of patch floated on discuss@ a few days ago: if an in_line scope
has not been opened and closing punctuation is encountered AND the macro
is marked as accepting no-content (or `Li'), then open an empty scope.

Added regression tests for `Fl' and `Li' testing this behaviour.

Also, squeeze hyph0.in tests into the last characters of each line so
that groff doesn't hyphenate and break the test.

14 years agoAllow bad -man dates to flow verbatim into the front-ends. Noted by
Kristaps Dzonsons [Wed, 26 May 2010 14:03:54 +0000 (14:03 +0000)]
Allow bad -man dates to flow verbatim into the front-ends.  Noted by
Ulrich Spoerlein.