]> git.cameronkatri.com Git - mandoc.git/log
mandoc.git
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.

14 years agoDocumented `Ud'.
Kristaps Dzonsons [Wed, 26 May 2010 10:39:35 +0000 (10:39 +0000)]
Documented `Ud'.

Proper EOS handling for `Rv', `Ex', `Ud', and `Bt'.

Both `Bt' and `Ud' now warn about and discard line arguments (reported
by Ulrich Spoerlein).

Collapsed posts_xr into posts_wtext (harmless: they're the same thing).

Added regressions for `Ud' and `Bt'.

14 years agoFixed `Lb' to be in_line (reported by Ulrich Spoerlein).
Kristaps Dzonsons [Wed, 26 May 2010 09:35:35 +0000 (09:35 +0000)]
Fixed `Lb' to be in_line (reported by Ulrich Spoerlein).

Added `Lb' documentation to mdoc.7.

Removed harmless but superfluous pre_lb check (was just NULL entries).

Added regressions for `Lb' (NOTE that these will only run on new groff,
as old groff doesn't support `Lb' at all).

14 years agoMade index.sgml release notes, mostly cribbed from Ingo's m2k10 report.
Kristaps Dzonsons [Tue, 25 May 2010 23:02:32 +0000 (23:02 +0000)]
Made index.sgml release notes, mostly cribbed from Ingo's m2k10 report.

Added libroff references to index.sgml.

14 years agoFix man.7 to include AT and UC in its syntax table.
Kristaps Dzonsons [Tue, 25 May 2010 22:48:04 +0000 (22:48 +0000)]
Fix man.7 to include AT and UC in its syntax table.

14 years agoAdded roff.3, which documents the roff parser interface.
Kristaps Dzonsons [Tue, 25 May 2010 22:16:59 +0000 (22:16 +0000)]
Added roff.3, which documents the roff parser interface.

Small fix in mdoc.3 and man.3 pointing to old mdoc_cb and man_cb.

Fix in Makefile adding mandoc.h to HEADS.

Collapsed all HTML files into HTMLS variable (too confusing otherwise).

Removed "htmls" command from Makefile (only I used it and it's just
taking up space).

14 years agoClean-up: added `Nm mdoc' to mdoc.3.
Kristaps Dzonsons [Tue, 25 May 2010 21:46:48 +0000 (21:46 +0000)]
Clean-up: added `Nm mdoc' to mdoc.3.

Clean-up: new-sentence, new-line for man.3.

Clean-up: alpha-ordered man.3 `Nm' sections and prototypes.

14 years agoClean-up: new-sentence, new-line for mdoc.3.
Kristaps Dzonsons [Tue, 25 May 2010 21:38:05 +0000 (21:38 +0000)]
Clean-up: new-sentence, new-line for mdoc.3.

Clean-up: removed CAVEATS section (this should be either in the TODO
file or in mdoc.7 documenting mandoc incompatibilities).

Clean-up: alpha-ordered `Nm' and section headers.

14 years agoNoted areas where performance can be increased.
Kristaps Dzonsons [Tue, 25 May 2010 13:42:51 +0000 (13:42 +0000)]
Noted areas where performance can be increased.

14 years agoSmarten BADCHAR check to allow ASCII_HYPH.
Kristaps Dzonsons [Tue, 25 May 2010 12:44:53 +0000 (12:44 +0000)]
Smarten BADCHAR check to allow ASCII_HYPH.
Fix index.sgml not to puke (the relevant section will be re-written for the release anyway, but I hate seeing errors).

14 years agoForgot to add regression tests.
Kristaps Dzonsons [Tue, 25 May 2010 12:37:58 +0000 (12:37 +0000)]
Forgot to add regression tests.

14 years agoModified version of Ingo Schwarze's patch for hyphen-breaking.
Kristaps Dzonsons [Tue, 25 May 2010 12:37:20 +0000 (12:37 +0000)]
Modified version of Ingo Schwarze's patch for hyphen-breaking.
Breakable hyphens are cued in the back-ends (with ASCII_HYPH) and acted
upon in term.c or ignored in html.c.

Also cleaned up XML decl printing (no need for extra vars).

14 years agorecognize ".if n" as true;
Ingo Schwarze [Mon, 24 May 2010 23:54:18 +0000 (23:54 +0000)]
recognize ".if n" as true;
nothing fancy yet, no negation, no grammer, just that one letter;
from OpenBSD;
"looks fine" kristaps@

14 years agoprovide stubs to ignore .ds, .rm and .tr,
Ingo Schwarze [Mon, 24 May 2010 22:25:58 +0000 (22:25 +0000)]
provide stubs to ignore .ds, .rm and .tr,
which occur in the standard pod2man preamble;
from OpenBSD;
"sounds good" joerg@, "can be checked in" kristaps@

14 years agosync to OpenBSD:
Ingo Schwarze [Mon, 24 May 2010 21:51:20 +0000 (21:51 +0000)]
sync to OpenBSD:
save the visual cursor position in term_flushln()
and use that to avoid multiple blank lines in nested lists while
still putting subsequent empty list tags each on their own line;
"go ahead" kristaps@

14 years agoHandle literal tab characters both in literal context (.Bd -literal)
Ingo Schwarze [Mon, 24 May 2010 21:34:16 +0000 (21:34 +0000)]
Handle literal tab characters both in literal context (.Bd -literal)
and outside.  In literal context, tab stops are at each eigth column;
outside, they are at each fifth column.

from OpenBSD mdoc_term.c rev. 1.75;
"commit" kristaps@

14 years ago.Bl -tag -compact
Ingo Schwarze [Mon, 24 May 2010 19:33:51 +0000 (19:33 +0000)]
.Bl -tag -compact
.Sm off
.It ...
fixed by joerg@ in mdoc_action.c bsd.lv 1.61, OpenBSD 1.38

14 years agofix an obvious typo in print_bvspace():
Ingo Schwarze [Mon, 24 May 2010 14:35:59 +0000 (14:35 +0000)]
fix an obvious typo in print_bvspace():
rev. 1.125 broke vertical spacing in .Bl -column

14 years agorewrite the main mdoc text parser, mdoc_ptext(),
Ingo Schwarze [Mon, 24 May 2010 13:39:47 +0000 (13:39 +0000)]
rewrite the main mdoc text parser, mdoc_ptext(),
making it easier to understand and fixing various bugs:
* correctly strip whitespace from the end of text lines
* issue consistent warnings regarding trailing spaces and tabs
* escaped backslashes no longer escape the following character
ok kristaps@

14 years agoPlug second meta.source leak in `UT' handling.
Kristaps Dzonsons [Mon, 24 May 2010 13:36:53 +0000 (13:36 +0000)]
Plug second meta.source leak in `UT' handling.

14 years agoLifted 64-byte max width for Sh (now BUFSIZ).
Kristaps Dzonsons [Mon, 24 May 2010 12:31:16 +0000 (12:31 +0000)]
Lifted 64-byte max width for Sh (now BUFSIZ).

14 years agoFixed memory leak for `AT' (-man input).
Kristaps Dzonsons [Mon, 24 May 2010 12:22:43 +0000 (12:22 +0000)]
Fixed memory leak for `AT' (-man input).

14 years agoFix segfault in mixing old enum types for -Thtml -mdoc.
Kristaps Dzonsons [Mon, 24 May 2010 12:17:09 +0000 (12:17 +0000)]
Fix segfault in mixing old enum types for -Thtml -mdoc.

14 years agoremove unused enum merr;
Ingo Schwarze [Mon, 24 May 2010 12:05:04 +0000 (12:05 +0000)]
remove unused enum merr;
ok joerg@

14 years agoIf a .Bl -tag lacks a -width, skip all non-It macros for the implicit
Joerg Sonnenberger [Mon, 24 May 2010 11:59:37 +0000 (11:59 +0000)]
If a .Bl -tag lacks a -width, skip all non-It macros for the implicit
calculation. E.g. .Sm can occur as direct child of .Bl.

OK schwarze@

14 years agofix an obvious oversight introduced in rev. 1.5:
Ingo Schwarze [Mon, 24 May 2010 01:41:31 +0000 (01:41 +0000)]
fix an obvious oversight introduced in rev. 1.5:
MANDOCERR_BODYLOST is not intended to be fatal;
required to unbreak the OpenBSD build

14 years agoFix 1.125: Add missing return in termp_nm_pre.
Joerg Sonnenberger [Sat, 22 May 2010 20:41:48 +0000 (20:41 +0000)]
Fix 1.125: Add missing return in termp_nm_pre.

14 years agoTest .SH with only empty paragraph. Don't test .IP without body.
Joerg Sonnenberger [Sat, 22 May 2010 20:02:10 +0000 (20:02 +0000)]
Test .SH with only empty paragraph. Don't test .IP without body.

14 years agolines containing blank characters FIXED in OpenBSD,
Ingo Schwarze [Tue, 18 May 2010 20:06:03 +0000 (20:06 +0000)]
lines containing blank characters FIXED in OpenBSD,
and add one new .Bl -tag issue reported by Joerg

14 years agoIncrease performance by stashing the list type in struct mdoc_node.
Kristaps Dzonsons [Mon, 17 May 2010 23:57:06 +0000 (23:57 +0000)]
Increase performance by stashing the list type in struct mdoc_node.
This will eventually be used so that mdoc_macro can known whether to
dump list line arguments into the body (`Bl -column' overflowing).

Remove a2list() and arg_listtype() because of this.

14 years agoAdded tech@ mailing list.
Kristaps Dzonsons [Mon, 17 May 2010 23:50:05 +0000 (23:50 +0000)]
Added tech@ mailing list.

14 years agoEnable the unified error/warning enumeration in mandoc.h that's
Kristaps Dzonsons [Mon, 17 May 2010 22:11:42 +0000 (22:11 +0000)]
Enable the unified error/warning enumeration in mandoc.h that's
stringified in main.c.

Allow `An' to handle an argument and child (with a warning).

Allow `Rv' and `Ex' to work without a prior `Nm' as groff does (with a
warning).

Allow inconsistent column syntax to only raise a warning.

14 years agoMultiple empty .PPs don't add a vspace either
Joerg Sonnenberger [Mon, 17 May 2010 11:15:28 +0000 (11:15 +0000)]
Multiple empty .PPs don't add a vspace either

14 years agoEntry for .AT and .UC
Joerg Sonnenberger [Mon, 17 May 2010 11:00:25 +0000 (11:00 +0000)]
Entry for .AT and .UC

14 years agoAdd support for .AT. Properly implement .UC. Add regress tests.
Joerg Sonnenberger [Mon, 17 May 2010 10:50:32 +0000 (10:50 +0000)]
Add support for .AT. Properly implement .UC. Add regress tests.

14 years agoTests for sane and insane handling of lines before and after .SH/.SS
Joerg Sonnenberger [Mon, 17 May 2010 10:43:48 +0000 (10:43 +0000)]
Tests for sane and insane handling of lines before and after .SH/.SS

14 years agogroff uses three vspaces before the footer too.
Joerg Sonnenberger [Mon, 17 May 2010 10:26:49 +0000 (10:26 +0000)]
groff uses three vspaces before the footer too.

14 years agoDocumented ie/el.
Kristaps Dzonsons [Mon, 17 May 2010 02:38:13 +0000 (02:38 +0000)]
Documented ie/el.
Installing roff.7 and added it to index.sgml.
Small fix for `D1' and `Bd' in -Thtml.

14 years agoUse a default prefix of /usr/local. Honour DESTDIR for install targets.
Joerg Sonnenberger [Mon, 17 May 2010 02:19:44 +0000 (02:19 +0000)]
Use a default prefix of /usr/local. Honour DESTDIR for install targets.

14 years agoThe function term_flushln() had effectively forked in OpenBSD.
Ingo Schwarze [Mon, 17 May 2010 02:03:49 +0000 (02:03 +0000)]
The function term_flushln() had effectively forked in OpenBSD.
This is the bsd.lv part of the main step to bring it back in sync.
At the same time, this prevents trailing whitespace in the output:
We delay writing blanks until we are sure printable characters follow.

This is achieved by
* remembering the end of the word instead of its length
* and not using vbl any longer for the control of line breaking
* such that vbl can sum up all kinds of white space
* before writing a word, printing all the blanks collected in vbl
* within the word, adding NBSP chars to vbl, then continuing with the word
* after the word, adding blanks to vbl, then starting the next word

"looks good" kristaps@

14 years agoFull support for ie/el. This completes the initial roff support.
Kristaps Dzonsons [Mon, 17 May 2010 02:01:05 +0000 (02:01 +0000)]
Full support for ie/el.  This completes the initial roff support.
Added test files for ie/el.
Using `if 0' as a baseline for "false" roff instructions instead of `if t'.

14 years agoOops: forgot to make roff_cblock() understand the new macros.
Kristaps Dzonsons [Mon, 17 May 2010 00:46:35 +0000 (00:46 +0000)]
Oops: forgot to make roff_cblock() understand the new macros.

14 years agolibroff now intelligently throws away `am', `ami', `am1', `de', `dei',
Kristaps Dzonsons [Mon, 17 May 2010 00:37:26 +0000 (00:37 +0000)]
libroff now intelligently throws away `am', `ami', `am1', `de', `dei',
and `de1'.  This is also documented in roff.7.

14 years agolibroff now is aware of which sub-nodes should be interpreted even in a
Kristaps Dzonsons [Mon, 17 May 2010 00:06:36 +0000 (00:06 +0000)]
libroff now is aware of which sub-nodes should be interpreted even in a
conditional-negative context so as to preserve structural integrity.
Initial "rules" (deny/allow) are now inherited for future work in
evaluating conditionals.

Lint-fix noted by Joerg.

Added regression tests for zany constructs.

14 years agoAdd a test case for nesting of .RS/.RE
Joerg Sonnenberger [Sun, 16 May 2010 22:36:18 +0000 (22:36 +0000)]
Add a test case for nesting of .RS/.RE

14 years ago`ig' support in all its glory. Try
Kristaps Dzonsons [Sun, 16 May 2010 22:28:33 +0000 (22:28 +0000)]
`ig' support in all its glory.  Try

  .ig ig
  asdf
  .ig
  fdsa
  ..

or

  .ig if
  asdf
  .if n \
  foo

for a laugh.  It all works.  Lots of regression tests supporting this
and documentation for the same.

14 years agoAdd a basic regression test for .Bl -bullet and the various interactions
Joerg Sonnenberger [Sun, 16 May 2010 20:39:20 +0000 (20:39 +0000)]
Add a basic regression test for .Bl -bullet and the various interactions
with .Bd.

14 years agoRegression tests in place for `.if' in libroff.
Kristaps Dzonsons [Sun, 16 May 2010 19:08:11 +0000 (19:08 +0000)]
Regression tests in place for `.if' in libroff.
Check against some strange `.if' constructs I missed.
Added initial roff.7 manual.

14 years agoFully skip first and last line for the purpose of cmp.
Joerg Sonnenberger [Sun, 16 May 2010 18:10:24 +0000 (18:10 +0000)]
Fully skip first and last line for the purpose of cmp.

14 years agoSkip first line when comparing output.
Joerg Sonnenberger [Sun, 16 May 2010 18:02:11 +0000 (18:02 +0000)]
Skip first line when comparing output.

14 years agomandoc should be a variable.
Kristaps Dzonsons [Sun, 16 May 2010 17:54:01 +0000 (17:54 +0000)]
mandoc should be a variable.
Consensus is on using a *.in for regression tests (symmetry-broken by Ingo).

14 years agoRemove temp files on success.
Joerg Sonnenberger [Sun, 16 May 2010 17:41:37 +0000 (17:41 +0000)]
Remove temp files on success.

14 years agoAdd a basic regression testing script.
Joerg Sonnenberger [Sun, 16 May 2010 17:40:09 +0000 (17:40 +0000)]
Add a basic regression testing script.

14 years agoRe-admit the simple case of `.ig' that works with groff's stranger invocations.
Kristaps Dzonsons [Sun, 16 May 2010 14:47:19 +0000 (14:47 +0000)]
Re-admit the simple case of `.ig' that works with groff's stranger invocations.

14 years agoSupport for the general case of `if', which will boil out into other
Kristaps Dzonsons [Sun, 16 May 2010 13:49:23 +0000 (13:49 +0000)]
Support for the general case of `if', which will boil out into other
constructs: single-level and multi-level blocks; nested, varied-level
blocks; recalculating buffer (begin) boundaries pushed correctly into
the back-ends, and so on.  This will allow, once conditions are turned
on, for things like `.ie n .TH FOO 1' then `.el .Dd Mdocdate'.  Read
it and weep.

14 years agoAllow roff_parseln() to be re-run.
Kristaps Dzonsons [Sun, 16 May 2010 10:59:36 +0000 (10:59 +0000)]
Allow roff_parseln() to be re-run.
Allow roff_parseln() to manipulate the line buffer offset.  This is used
in situations like `.ie n .TH FOO 1' or `.ie n .ie n', where the line
buffer offset is recalculated then the roff parser re-run.
Fix mdoc_parseln() and man_parseln() to accept the initial line offset.
WARNING: backed-out ALL roff macros whilst accomodating for how roff
handles multi-line conditionals (in short, re-running the parser).

14 years agosync to OpenBSD:
Ingo Schwarze [Sun, 16 May 2010 01:35:37 +0000 (01:35 +0000)]
sync to OpenBSD:
introduce a #define to get rid of the magic number
describing the ASCII character used to represent non-breaking space;
ok kristaps

14 years agoFix allowing silly '\'' control character.
Kristaps Dzonsons [Sun, 16 May 2010 00:04:46 +0000 (00:04 +0000)]
Fix allowing silly '\'' control character.

14 years agoRemoved `.' entry from -man hashtable.
Kristaps Dzonsons [Sat, 15 May 2010 22:49:58 +0000 (22:49 +0000)]
Removed `.' entry from -man hashtable.

14 years agoRemove `am', `ami', `de', `dei', and `.' from -man, as they're now in the roff prepro...
Kristaps Dzonsons [Sat, 15 May 2010 22:44:04 +0000 (22:44 +0000)]
Remove `am', `ami', `de', `dei', and `.' from -man, as they're now in the roff preprocessor.

14 years agoBacked-out warning messages (lots).
Kristaps Dzonsons [Sat, 15 May 2010 22:28:22 +0000 (22:28 +0000)]
Backed-out warning messages (lots).

14 years agoThe `am', `ami', `de', and holy `dei' are all being properly ignored.
Kristaps Dzonsons [Sat, 15 May 2010 22:22:51 +0000 (22:22 +0000)]
The `am', `ami', `de', and holy `dei' are all being properly ignored.

14 years agoThe `ig' now supports `ig end-macro'.
Kristaps Dzonsons [Sat, 15 May 2010 21:53:11 +0000 (21:53 +0000)]
The `ig' now supports `ig end-macro'.
Initial warning/error messages in place (still experimental).