]> git.cameronkatri.com Git - mandoc.git/log
mandoc.git
14 years agoHave Makefile build XHTML files too. VERSION_1_10_8
Kristaps Dzonsons [Fri, 24 Dec 2010 14:20:08 +0000 (14:20 +0000)]
Have Makefile build XHTML files too.

14 years agoApparently the U tag is deprecated, so use a SPAN instead (blah). Bump
Kristaps Dzonsons [Fri, 24 Dec 2010 14:14:00 +0000 (14:14 +0000)]
Apparently the U tag is deprecated, so use a SPAN instead (blah).  Bump
version date for release.

14 years agoAs per schwarze@'s suggestions, roll back the refcount structure in
Kristaps Dzonsons [Fri, 24 Dec 2010 14:00:40 +0000 (14:00 +0000)]
As per schwarze@'s suggestions, roll back the refcount structure in
favour of a simpler shim for normalised data in the node allocation and
free routines.  This removes the need to bump and copy references within
validator handlers, removes a pointer redirect, and also kills the
refcount structure itself.  Data is assumed to "live" either in a
MDOC_BLOCK or MDOC_ELEM and is copied accordingly.

14 years agoDrastically fix -T[x]html's handling of font-escape mode changes (i.e.,
Kristaps Dzonsons [Fri, 24 Dec 2010 00:46:49 +0000 (00:46 +0000)]
Drastically fix -T[x]html's handling of font-escape mode changes (i.e.,
using \fI or \fP).  Now, using these modes will cause a font to be
rendered for each word; furthermore, setting mode within a word will do
the correct thing.

Second, make -man use real font tags (B, I, SMALL) to set its font
instead of using font modes and fix up the pre-macro unsetting of the
current mode.

This fixes how roff.7 wasn't validating (<P> closing out a font mode)
and has been checked against gcc.1 (more will come).  I considered
failure to validate OUR manual to be a show-stopper for the up-coming
release.

14 years agoEnsure -Thtml has DIV as child of BLOCKQUOTE.
Kristaps Dzonsons [Thu, 23 Dec 2010 00:45:03 +0000 (00:45 +0000)]
Ensure -Thtml has DIV as child of BLOCKQUOTE.

14 years agoAdded last version notes and bumped version number and date.
Kristaps Dzonsons [Thu, 23 Dec 2010 00:30:20 +0000 (00:30 +0000)]
Added last version notes and bumped version number and date.

14 years agominor tweaks:
Ingo Schwarze [Wed, 22 Dec 2010 23:53:55 +0000 (23:53 +0000)]
minor tweaks:
1. improve .Bl wording (from jmc@)
2. jmc@ noted that the .Mt default (the same as in groff) makes no sense,
and there is no better default we could use; thus, regard it as
implementation dependent and do not document it
3. fix formatting of one COMPATIBILITY note: move "and" out of .Sx
ok kristaps@, jmc@

14 years agoAt the beginning of .Bl, .Sm is allowed,
Ingo Schwarze [Wed, 22 Dec 2010 22:05:38 +0000 (22:05 +0000)]
At the beginning of .Bl, .Sm is allowed,
and .Lp should cause a warning, not an error.
"I don't suppose I mind this." kristaps@

14 years agoBuild xhtml files for www site exemplaria.
Kristaps Dzonsons [Wed, 22 Dec 2010 11:58:02 +0000 (11:58 +0000)]
Build xhtml files for www site exemplaria.

14 years agoRevert IGNPAR to a warning after clue-stick applied by schwarze@:
Kristaps Dzonsons [Wed, 22 Dec 2010 11:38:17 +0000 (11:38 +0000)]
Revert IGNPAR to a warning after clue-stick applied by schwarze@:
although technically-speaking a lost macro is an error (e.g.,
MANDOCERR_MACRO), casting out some extra whitespace (note, IGNPAR only
happens in conditions where whitespace already exists!) is hardly an
error matter.

14 years agoImplement reference-counted version of original union mdoc_data. This
Kristaps Dzonsons [Wed, 22 Dec 2010 11:15:16 +0000 (11:15 +0000)]
Implement reference-counted version of original union mdoc_data.  This
simplifies clean-up and allows for more types without extra hassle.

Also made in-line literal types in -T[x]html use CODE instead of SPAN to
match how literal blocks use PRE.

14 years agoThrow out negative margin garbage in -man -T[x]html in favour of using
Kristaps Dzonsons [Wed, 22 Dec 2010 09:51:27 +0000 (09:51 +0000)]
Throw out negative margin garbage in -man -T[x]html in favour of using
TABLE and P and so on.  Now renders in text-based browsers.

14 years agoSync to OpenBSD:
Ingo Schwarze [Tue, 21 Dec 2010 01:46:44 +0000 (01:46 +0000)]
Sync to OpenBSD:
1) Now that growing buffers in main.c is safe, bring back the bugfix
distinguishing empty and undefined macros that was backed out in
the previous roff.c commit:  `de' initializes to "", not to NULL.
2) Roff only interpolates \* strings when the leading backslash is
not escaped; using optimizations suggested by joerg@ and kristaps@.
ok kristaps@

14 years agoSane behaviour for the growing of very small buffers:
Ingo Schwarze [Tue, 21 Dec 2010 01:22:03 +0000 (01:22 +0000)]
Sane behaviour for the growing of very small buffers:
Always grow at least to the minimum requested size.
Before this, a buffer of 1 byte was grown to 2 bytes,
which was too small and sometimes caused segfaults.
ok kristaps@

14 years agoClarify style inclusions and update release information.
Kristaps Dzonsons [Mon, 20 Dec 2010 13:57:49 +0000 (13:57 +0000)]
Clarify style inclusions and update release information.

14 years agoFix list-type being clobbered by margins. Last default styles in place.
Kristaps Dzonsons [Mon, 20 Dec 2010 13:39:24 +0000 (13:39 +0000)]
Fix list-type being clobbered by margins.  Last default styles in place.
Added `Sx' to be default-italic (as in OpenBSD's cvsweb).  Added `diag'
formatting, which had been lost.

14 years agoMore use default tags, this time I and U. Also fix a stack overflow
Kristaps Dzonsons [Mon, 20 Dec 2010 13:07:55 +0000 (13:07 +0000)]
More use default tags, this time I and U.  Also fix a stack overflow
segfault in the last commit.

14 years agoGive header and footer table cells default widths (using WIDTH and ALIGN
Kristaps Dzonsons [Mon, 20 Dec 2010 10:40:11 +0000 (10:40 +0000)]
Give header and footer table cells default widths (using WIDTH and ALIGN
atttributes) if no style is specified.

Give the default-bold elements a B tag instead of a SPAN tag, as this
can be overriden in the stylesheet.

Prune some unused attributes from html.h.

14 years agoMigrate schwarze@'s `Bk' argument patch to -T[x]html.
Kristaps Dzonsons [Sun, 19 Dec 2010 12:14:36 +0000 (12:14 +0000)]
Migrate schwarze@'s `Bk' argument patch to -T[x]html.

14 years agoHandle .Bk the same way as groff 1.20.1:
Ingo Schwarze [Sun, 19 Dec 2010 12:11:42 +0000 (12:11 +0000)]
Handle .Bk the same way as groff 1.20.1:
.Bk without arguments defaults to -words.
.Bk with invalid arguments (including -lines) has no effect.
ok kristaps@

14 years agoSync to the installed version in OpenBSD, excluding .ft documentation:
Ingo Schwarze [Sat, 18 Dec 2010 19:32:08 +0000 (19:32 +0000)]
Sync to the installed version in OpenBSD, excluding .ft documentation:
Be more careful to not confuse requests, macros and escape sequences.
Add more info at various places, including new SEE ALSO and HISTORY sections.
OK jmc@ kristaps@

14 years agoSync to OpenBSD: More precise description of .Xo, and don't talk
Ingo Schwarze [Sat, 18 Dec 2010 19:12:00 +0000 (19:12 +0000)]
Sync to OpenBSD: More precise description of .Xo, and don't talk
about deprecation, because there are cases were choosing .Xo or
backslash line continuation is merely a matter of taste, not a
difference in readability, and well-used .Xo is even slightly
more portable.
OK jmc@

14 years agoTweak default styles.
Kristaps Dzonsons [Fri, 17 Dec 2010 13:03:32 +0000 (13:03 +0000)]
Tweak default styles.

14 years agoDon't use EM for default widths; use BU instead.
Kristaps Dzonsons [Fri, 17 Dec 2010 12:57:49 +0000 (12:57 +0000)]
Don't use EM for default widths; use BU instead.

14 years agoMerged example.style.css into style.css. Adding version stuff.
Kristaps Dzonsons [Fri, 17 Dec 2010 11:42:14 +0000 (11:42 +0000)]
Merged example.style.css into style.css.  Adding version stuff.

14 years agoCorrectly labelled command-line as `Dl'.
Kristaps Dzonsons [Fri, 17 Dec 2010 11:41:45 +0000 (11:41 +0000)]
Correctly labelled command-line as `Dl'.

14 years agoPrevent double-printing of `D1' or `Dl' DIV.
Kristaps Dzonsons [Fri, 17 Dec 2010 11:19:42 +0000 (11:19 +0000)]
Prevent double-printing of `D1' or `Dl' DIV.

14 years agoCorrectly mark the examples as `Dl', not `D1'.
Kristaps Dzonsons [Fri, 17 Dec 2010 11:18:57 +0000 (11:18 +0000)]
Correctly mark the examples as `Dl', not `D1'.

14 years agoAdd a "list" top-level tag, too.
Kristaps Dzonsons [Fri, 17 Dec 2010 11:01:24 +0000 (11:01 +0000)]
Add a "list" top-level tag, too.

14 years agoRemove useless DIVs in favour of BRs. Fix `Ex' by having it print a prior
Kristaps Dzonsons [Fri, 17 Dec 2010 10:43:51 +0000 (10:43 +0000)]
Remove useless DIVs in favour of BRs.  Fix `Ex' by having it print a prior
BR.  Fix `Rv' by only having it print a BR if there's a prior.

14 years agoMake literal `Bd' use a PRE in -Thtml. Make `Bd' output in general use
Kristaps Dzonsons [Fri, 17 Dec 2010 10:37:26 +0000 (10:37 +0000)]
Make literal `Bd' use a PRE in -Thtml.  Make `Bd' output in general use
only a single DIV or PRE.  Tag all displays with display class.

14 years agoBanished -man -Thtml header and footer to example.style.css as well.
Kristaps Dzonsons [Fri, 17 Dec 2010 08:26:42 +0000 (08:26 +0000)]
Banished -man -Thtml header and footer to example.style.css as well.

14 years agoHave synopsis_pre() in -Thtml emit P or BR, not DIVs.
Kristaps Dzonsons [Fri, 17 Dec 2010 08:17:40 +0000 (08:17 +0000)]
Have synopsis_pre() in -Thtml emit P or BR, not DIVs.

Banish header and footer TABLE styling to example.style.css.

14 years agoMake SYNOPSIS `Nm' use a TABLE in -T[x]html mode. Also fix `Nd' using
Kristaps Dzonsons [Fri, 17 Dec 2010 01:02:00 +0000 (01:02 +0000)]
Make SYNOPSIS `Nm' use a TABLE in -T[x]html mode.  Also fix `Nd' using
desc-body instead of desc as its CSS key.

14 years agoSignificantly clean up Sh, Ss, SH, and SS handling in -Thtml. Now a
Kristaps Dzonsons [Fri, 17 Dec 2010 00:18:29 +0000 (00:18 +0000)]
Significantly clean up Sh, Ss, SH, and SS handling in -Thtml.  Now a
top-level DIV is used with only an H1 or H2 as the section header.  This
makes manuals much more readable in lynx, less complicated, and
relegates left-margin widths to example.style.css.

14 years agoSome default styles for lists. Needs more testing, but seems safe
Kristaps Dzonsons [Thu, 16 Dec 2010 23:23:34 +0000 (23:23 +0000)]
Some default styles for lists.  Needs more testing, but seems safe
enough.

14 years agoNote that we use CSS1, not CSS2.
Kristaps Dzonsons [Thu, 16 Dec 2010 23:07:01 +0000 (23:07 +0000)]
Note that we use CSS1, not CSS2.

Remove superfluous language in output-mode short description.

14 years agoGet widths to be propertly represented in -T[x]html.
Kristaps Dzonsons [Thu, 16 Dec 2010 22:57:20 +0000 (22:57 +0000)]
Get widths to be propertly represented in -T[x]html.

14 years agoMigrate `An' to use a pointer in its data, like everybody else. This is
Kristaps Dzonsons [Thu, 16 Dec 2010 17:14:48 +0000 (17:14 +0000)]
Migrate `An' to use a pointer in its data, like everybody else.  This is
the first step to having a simpler ref-counted system for "data"
associated with a node.

14 years agoRemove stray note on `i', which we no longer support.
Kristaps Dzonsons [Thu, 16 Dec 2010 11:23:08 +0000 (11:23 +0000)]
Remove stray note on `i', which we no longer support.

14 years agoNote that `Sh' and `Ss' are now rigorously checked for paragraph macros.
Kristaps Dzonsons [Thu, 16 Dec 2010 01:00:29 +0000 (01:00 +0000)]
Note that `Sh' and `Ss' are now rigorously checked for paragraph macros.
Merge other TODO regarding `It' and paragraphs.

14 years agoBack out last: apparently `Bl', `It', and `Pp' need a little bit more
Kristaps Dzonsons [Thu, 16 Dec 2010 00:57:50 +0000 (00:57 +0000)]
Back out last: apparently `Bl', `It', and `Pp' need a little bit more
study to see exactly what's legal and what's not.

14 years agoAllow `It' to have a trailing paragraph if the surrounding list is in
Kristaps Dzonsons [Thu, 16 Dec 2010 00:53:04 +0000 (00:53 +0000)]
Allow `It' to have a trailing paragraph if the surrounding list is in
compact mode.

14 years agoFirst, make `Pp' (next to `Sm') be allowed as the first element of a
Kristaps Dzonsons [Thu, 16 Dec 2010 00:25:35 +0000 (00:25 +0000)]
First, make `Pp' (next to `Sm') be allowed as the first element of a
`Bl' (before any `It' have been invoked).  Next, have the existence of
either macro raise a warning, as it's technically not legal according to
mdoc.7.

Second, delete any `Pp' as the first element of a `Bl' (i.e., before an
`It') ONLY when -compact has not been specified.  This matches with the
latest version of groff.  This deletion happens prior to the above
check, so double-warnings will not be issued.

14 years agoRemove `Pp' and `Lp' checks in front-ends to make sure we're not
Kristaps Dzonsons [Wed, 15 Dec 2010 23:44:02 +0000 (23:44 +0000)]
Remove `Pp' and `Lp' checks in front-ends to make sure we're not
printing as the first or last child of an `Ss' or `Sh': this is now
ensured within the validator.

14 years agoAdd a "last child" member of struct mdoc_node.
Kristaps Dzonsons [Wed, 15 Dec 2010 23:39:40 +0000 (23:39 +0000)]
Add a "last child" member of struct mdoc_node.

Remove `Pp' or `Lp' if it is the FIRST or LAST child of an `Sh' or `Sh' body.

Make "skipping paragraph" be an error, not a warning, as information (an
invoked macro) is ignored.

14 years agoAdd some more bits to CSS example.
Kristaps Dzonsons [Wed, 15 Dec 2010 17:21:24 +0000 (17:21 +0000)]
Add some more bits to CSS example.

14 years agoUse a single P tag for paragraph breaks (which can be configured for
Kristaps Dzonsons [Wed, 15 Dec 2010 17:19:41 +0000 (17:19 +0000)]
Use a single P tag for paragraph breaks (which can be configured for
paragraph breaking in CSS).

Use -man's handling of `sp' and `br', which accomodates for scaling
widths (-mdoc wasn't).

14 years agoMake sure that new list types don't emit whitespace before or after (we
Kristaps Dzonsons [Wed, 15 Dec 2010 16:35:21 +0000 (16:35 +0000)]
Make sure that new list types don't emit whitespace before or after (we
have to do this manually).

14 years agoClarifying styles.
Kristaps Dzonsons [Wed, 15 Dec 2010 16:22:22 +0000 (16:22 +0000)]
Clarifying styles.

14 years agoClarify purpose of "lit".
Kristaps Dzonsons [Wed, 15 Dec 2010 16:08:18 +0000 (16:08 +0000)]
Clarify purpose of "lit".

Make `Dl' and `D1' both use BLOCKQUOTE instead of DIVs.

14 years agoRemove stupid outer DIV tag in favour of regular BODY and HTML that can
Kristaps Dzonsons [Wed, 15 Dec 2010 15:59:23 +0000 (15:59 +0000)]
Remove stupid outer DIV tag in favour of regular BODY and HTML that can
be handled in CSS.

Clarified "lit" tag (will be the subject of future clarification).

Removed CSS2 note in mandoc.1, which is no longer the case.

14 years agoAdded list-type style tips.
Kristaps Dzonsons [Wed, 15 Dec 2010 15:32:01 +0000 (15:32 +0000)]
Added list-type style tips.

14 years agoIn-progress move from -T[x]html using DIVs for its lists to using DL,
Kristaps Dzonsons [Wed, 15 Dec 2010 14:52:16 +0000 (14:52 +0000)]
In-progress move from -T[x]html using DIVs for its lists to using DL,
OL, and UL.  Issue raised by Will Backman, solution proposed by
schwarze@.

14 years agoMake SYNOPSIS sections and code having .nr nS enabled
Ingo Schwarze [Sat, 11 Dec 2010 14:40:51 +0000 (14:40 +0000)]
Make SYNOPSIS sections and code having .nr nS enabled
behave as if the whole code were wrapped in .Bk/.Ek,
i.e. keeping input lines together on output lines.
This is compatible with new groff behaviour and deviates
from historical groff.
Tweaked version of a patch sent by kristaps@ on July 16, 2010.
ok kristaps@ jmc@ sobrado@ millert@

14 years agoAbort endless loops during roff macro and string expansion.
Ingo Schwarze [Fri, 10 Dec 2010 20:58:56 +0000 (20:58 +0000)]
Abort endless loops during roff macro and string expansion.
For now, use the simplest conceivable approach, like groff does:
Just a fixed, ugly input stack limit.
"check it in" kristaps@

14 years agodone: .de; todo: """"; loops in macro and string expansion
Ingo Schwarze [Thu, 9 Dec 2010 23:44:39 +0000 (23:44 +0000)]
done: .de; todo: """"; loops in macro and string expansion

14 years agoAllow quote macros (`Op', `Aq', `Bq', `Dq', `Pq', `Ql', `Qq', `Sq', and
Kristaps Dzonsons [Thu, 9 Dec 2010 10:32:22 +0000 (10:32 +0000)]
Allow quote macros (`Op', `Aq', `Bq', `Dq', `Pq', `Ql', `Qq', `Sq', and
`Brq') to have zero arguments without warning.  This makes sense because
the multi-line quote macros (`Oo/Oc' etc.) allow zero children anyway.
Furthermore, the documentation doesn't state that they're required to
have children.

Originally reported by Alex Kozlov, thanks!

14 years agoRemove `i' and `r' macro handlers. These macros, originally part of the
Kristaps Dzonsons [Wed, 8 Dec 2010 10:58:22 +0000 (10:58 +0000)]
Remove `i' and `r' macro handlers.  These macros, originally part of the
me package, aren't recognised by "groff -mandoc" so we don't need to do
so either.  Discussed on tech@ with schwarze@.

While at it, remove references to `b' in man.7.  As far as I know, this
was never supported anyway.

14 years agoTag an internal release, 1.10.7, that marks being in sync with OpenBSD's VERSION_1_10_7
Kristaps Dzonsons [Mon, 6 Dec 2010 17:07:28 +0000 (17:07 +0000)]
Tag an internal release, 1.10.7, that marks being in sync with OpenBSD's
changes these last months (less tbl).  There are still some issues that
require thought, but this extends beyond synchronisation.

This WILL NOT be pushed to the main site; it's merely a logical tag so
that there's a common fall-back in future changes.

Note that the TODO file is NOT up to date.  This is ok since the tag is
purely internal.

14 years agoBring schwarze@'s mandoc.h and main.c errors and warnings entirely in sync,
Kristaps Dzonsons [Mon, 6 Dec 2010 16:55:35 +0000 (16:55 +0000)]
Bring schwarze@'s mandoc.h and main.c errors and warnings entirely in sync,
except for the tbl one which will be the focus of later study.

14 years agoImport changes by schwarze@ and Jason McIntyre into manuals. These are
Kristaps Dzonsons [Mon, 6 Dec 2010 16:37:32 +0000 (16:37 +0000)]
Import changes by schwarze@ and Jason McIntyre into manuals.  These are
for the new libroff macros, the new libman macros, and for the sake of
general clarity.

Note that `ft' documentation is NOT included, as I've kept it in -man:
it's highly confusing to have it in roff.7 when it's not implemented for
both -man and -mdoc, as at least in theory, roff.7 should include only
macros recognised by BOTH formats.

14 years agoTypo: man_in_pre -> man_ign_pre for `ft'.
Kristaps Dzonsons [Mon, 6 Dec 2010 15:31:44 +0000 (15:31 +0000)]
Typo: man_in_pre -> man_ign_pre for `ft'.

14 years agoAdd support for `ft' macro found in groff(7). Based on a patch by
Kristaps Dzonsons [Mon, 6 Dec 2010 15:31:19 +0000 (15:31 +0000)]
Add support for `ft' macro found in groff(7).  Based on a patch by
schwarze@, but without the -T[x]html handling, which structurally does
not work.  Also add man.7 documentation (not in original patch).

14 years agoSmall merges from schwarze@'s man_html.c edits.
Kristaps Dzonsons [Mon, 6 Dec 2010 14:12:48 +0000 (14:12 +0000)]
Small merges from schwarze@'s man_html.c edits.

14 years agoLet some man_term.c cleanups bleed into man_html.c.
Kristaps Dzonsons [Mon, 6 Dec 2010 14:07:01 +0000 (14:07 +0000)]
Let some man_term.c cleanups bleed into man_html.c.

14 years agoMy favourite: removing lots of code in favour of smaller, tighter code.
Kristaps Dzonsons [Mon, 6 Dec 2010 14:04:11 +0000 (14:04 +0000)]
My favourite: removing lots of code in favour of smaller, tighter code.
Merge patch by schwarze@ consolidating RB, BR, etc. into one function.
man_html.c already does this.

14 years agoMake return(man_nmsg(...)) by a simple declaration.
Kristaps Dzonsons [Mon, 6 Dec 2010 13:56:56 +0000 (13:56 +0000)]
Make return(man_nmsg(...)) by a simple declaration.

Make non-uppercase warning only occur once.

Make scope-open-on-error warning only occur once.

14 years agoHeader for `PP', `P', and `LP' should never be printed.
Kristaps Dzonsons [Mon, 6 Dec 2010 13:53:07 +0000 (13:53 +0000)]
Header for `PP', `P', and `LP' should never be printed.

14 years agoAllow HP/IP/etc. to have no arguments, as they're optional. From a field-
Kristaps Dzonsons [Mon, 6 Dec 2010 13:50:41 +0000 (13:50 +0000)]
Allow HP/IP/etc. to have no arguments, as they're optional.  From a field-
tested patch by schwarze@.

14 years agoAllow multiple ELINE macros without raising a fatal error. From a field-
Kristaps Dzonsons [Mon, 6 Dec 2010 13:49:02 +0000 (13:49 +0000)]
Allow multiple ELINE macros without raising a fatal error.  From a field-
tested patch by schwarze@.

14 years agoTrack down a bug of empty `de XX' macros causing uncertain behaviour by
Kristaps Dzonsons [Mon, 6 Dec 2010 13:25:25 +0000 (13:25 +0000)]
Track down a bug of empty `de XX' macros causing uncertain behaviour by
returning empty strings in roff_getstrn() instead of NULL.  This caused
maddeningly irregular segfaults in the pod2man preamble for `de IX'.
But only on DEC alpha.

Also integrate the kinda-probably-safe assertion relaxation in term.c,
field-tested by schwarze@.  This allows ALL [unpreprocessed] base and
xenocara manuals for all BSD systems to run without segfault.

14 years agoMerge schwarze@'s relaxation of scope-breaking rules: allow implicit
Kristaps Dzonsons [Mon, 6 Dec 2010 11:01:19 +0000 (11:01 +0000)]
Merge schwarze@'s relaxation of scope-breaking rules: allow implicit
ending of scopes and drop stray scope-endings.

14 years agoRemove `Sp', `Vb', and `Ve' (as per schwarze@'s changes in OpenBSD),
Kristaps Dzonsons [Sun, 5 Dec 2010 16:14:16 +0000 (16:14 +0000)]
Remove `Sp', `Vb', and `Ve' (as per schwarze@'s changes in OpenBSD),
which are now accomodated for the new libroff modifications.

14 years agoRemove repeat notification of -width omission. From a patch by schwarze@.
Kristaps Dzonsons [Sun, 5 Dec 2010 15:59:27 +0000 (15:59 +0000)]
Remove repeat notification of -width omission.  From a patch by schwarze@.

14 years agoRemove long-standing FIXME regarding the consolidation of WIDTHARG and
Kristaps Dzonsons [Sun, 5 Dec 2010 15:55:01 +0000 (15:55 +0000)]
Remove long-standing FIXME regarding the consolidation of WIDTHARG and
NOARGV warnings.  From patch by schwarze@.

14 years agoMerge schwarze@'s patch to allow uname() to fail without causing an exit.
Kristaps Dzonsons [Sun, 5 Dec 2010 15:49:37 +0000 (15:49 +0000)]
Merge schwarze@'s patch to allow uname() to fail without causing an exit.

14 years agoMerge schwarze@'s changes allowing nested displays. Tweak the patch by
Kristaps Dzonsons [Sun, 5 Dec 2010 15:37:30 +0000 (15:37 +0000)]
Merge schwarze@'s changes allowing nested displays.  Tweak the patch by
making sure output doesn't add a superfluous newline with the nested displays.
Also add a COMPATIBILITY note.

Rename a macro (DATESIZ) to be in line with OpenBSD (DATESIZE).

14 years agoTrack the parser status both per file (file_status), such that
Ingo Schwarze [Thu, 2 Dec 2010 20:41:46 +0000 (20:41 +0000)]
Track the parser status both per file (file_status), such that
we can for example skip rendering on FATAL parsing errors,
and globally (exit_status), such that we know what to return.
Without this, following files produced no rendered output
once a single file suffered from a FATAL error.
Bug reported by kristaps@, fix by me.

14 years agoMerge schwarze@'s changes to allow for user-defined strings. This
Kristaps Dzonsons [Thu, 2 Dec 2010 10:53:03 +0000 (10:53 +0000)]
Merge schwarze@'s changes to allow for user-defined strings.  This
primarily adds a roff_userdef() function for parsing new defines and
modifies the look-up procedure.

NOTE: there is a bug hidden away in this update that causes an infinite
loop in some pages.  The cause is for the moment unknown.

14 years agoFix enum/int mixing.
Kristaps Dzonsons [Wed, 1 Dec 2010 17:00:05 +0000 (17:00 +0000)]
Fix enum/int mixing.

14 years agoMerge OpenBSD's `so' handling (plus some documentation). Great work to
Kristaps Dzonsons [Wed, 1 Dec 2010 16:54:25 +0000 (16:54 +0000)]
Merge OpenBSD's `so' handling (plus some documentation).  Great work to
schwarze@ and joerg@ for his comments!

14 years agoMake sure that the manual section defaults to `1' if it's unset. This
Kristaps Dzonsons [Wed, 1 Dec 2010 16:38:57 +0000 (16:38 +0000)]
Make sure that the manual section defaults to `1' if it's unset.  This
behaviour only happens if `Dt' isn't specified, which can be exhibited
by running mandoc -mdoc on a man manual.

14 years agoFix a subtle error in the new main.c where the parse type (mdoc/man) was
Kristaps Dzonsons [Wed, 1 Dec 2010 16:28:23 +0000 (16:28 +0000)]
Fix a subtle error in the new main.c where the parse type (mdoc/man) was
being inherited during the parse sequence, making pset() meaningless.
Make sure that the mdoc/man curp pointer is set for each parse from a
persistent object.

This flushes out an obscure error where `man' pages called with `mdoc'
will parse and segfault due to a missing title.  Never happened earlier
because `mdoc' pages were guaranteed to have a prologue.  Fix this
later.

Also document the new main.c functions.  Please make sure these sort of
things are documented!  Throw in some whitespace to make things a bit
more readable.

14 years agoMerge restructuring of main.c code. This provided by schwarze@ and inspected
Kristaps Dzonsons [Wed, 1 Dec 2010 15:09:01 +0000 (15:09 +0000)]
Merge restructuring of main.c code.  This provided by schwarze@ and inspected
carefully by joerg@.  Merge roff.h header for compilation's sake (this is not
yet implemented in roff.c.).

THIS IS A BUGGY CHECK-IN.  The manual type is erroneously kept between runs
of the compiler.  This is a known bug.

14 years agoFixed a goddamn subtle error causing MDOC_LITERAL to remain set after a
Kristaps Dzonsons [Wed, 1 Dec 2010 13:05:13 +0000 (13:05 +0000)]
Fixed a goddamn subtle error causing MDOC_LITERAL to remain set after a
call to `Dl' or `Bd -literal' or unfilled.

14 years agoRe-ordering of roff requests as per OpenBSD.
Kristaps Dzonsons [Wed, 1 Dec 2010 10:31:34 +0000 (10:31 +0000)]
Re-ordering of roff requests as per OpenBSD.

Made `rm' be an error (again, OpenBSD...).

14 years agoLow-hanging fruit: add OpenBSD's `ad', `hy', `ne', and `nh' handling.
Kristaps Dzonsons [Wed, 1 Dec 2010 10:21:25 +0000 (10:21 +0000)]
Low-hanging fruit: add OpenBSD's `ad', `hy', `ne', and `nh' handling.

Rename roff_line() -> roff_line_ignore().

14 years agoRestore the Id tag that i clobbered in my previous commit,
Ingo Schwarze [Tue, 30 Nov 2010 21:44:59 +0000 (21:44 +0000)]
Restore the Id tag that i clobbered in my previous commit,
as pointed out by kristaps@.  Sorry!

14 years agoMerge OpenBSD mdoc.7 rev. 1.56 and 1.57:
Ingo Schwarze [Tue, 30 Nov 2010 20:45:55 +0000 (20:45 +0000)]
Merge OpenBSD mdoc.7 rev. 1.56 and 1.57:
Define the terms "callable" and "parsed" with more precision.
Be more specific about what .Xo can be used for.
Be more specific about what "historic groff" refers to.
Explicitely mention the nine argument limit below COMPATIBILITY.
feedback and ok jmc@

14 years agoKill man_action.c.
Kristaps Dzonsons [Tue, 30 Nov 2010 15:36:28 +0000 (15:36 +0000)]
Kill man_action.c.

14 years agoMove all man_action.c routines into man_validate.c
Kristaps Dzonsons [Tue, 30 Nov 2010 15:24:27 +0000 (15:24 +0000)]
Move all man_action.c routines into man_validate.c

14 years agoSimplify the many if ( ! mdoc_nmsg()) return(0) etc. calls with just the
Kristaps Dzonsons [Tue, 30 Nov 2010 14:27:37 +0000 (14:27 +0000)]
Simplify the many if ( ! mdoc_nmsg()) return(0) etc. calls with just the
error printing, as this is superseded by exit_status in main.c.

Make check_argv() and check_text() return void.

Make MDOC_Std test in check_argv() to pre_std().

Re-write post_root() to check more conditions before returning.

14 years agomdoc_action.c is no more. Attic it and remove it from the Makefile.
Kristaps Dzonsons [Tue, 30 Nov 2010 13:04:14 +0000 (13:04 +0000)]
mdoc_action.c is no more.  Attic it and remove it from the Makefile.
Remove references to MDOC_ACTED (it was only assertions) and the pre-
and post-action functions.

14 years agoMoved all prologue actions from mdoc_action.c into mdoc_validate.c. The
Kristaps Dzonsons [Tue, 30 Nov 2010 12:59:20 +0000 (12:59 +0000)]
Moved all prologue actions from mdoc_action.c into mdoc_validate.c.  The
file is now ready for removal.

14 years agoMove post_bl() and subfunctions from mdoc_action.c into mdoc_validate.c.
Kristaps Dzonsons [Tue, 30 Nov 2010 12:35:10 +0000 (12:35 +0000)]
Move post_bl() and subfunctions from mdoc_action.c into mdoc_validate.c.

14 years agoMove -column list validation and normal-formisation from mdoc_action.c
Kristaps Dzonsons [Tue, 30 Nov 2010 10:32:05 +0000 (10:32 +0000)]
Move -column list validation and normal-formisation from mdoc_action.c
into mdoc_validate.c.

14 years agoMigrate `Nm' and `Pa' handling from mdoc_action.c into mdoc_validate.c.
Kristaps Dzonsons [Mon, 29 Nov 2010 16:06:46 +0000 (16:06 +0000)]
Migrate `Nm' and `Pa' handling from mdoc_action.c into mdoc_validate.c.

Document that `Pa' is replaced by a tilde, just like `Mt'.

14 years agoRemove left-over rsord[] in mdoc_actions.c.
Kristaps Dzonsons [Mon, 29 Nov 2010 15:45:15 +0000 (15:45 +0000)]
Remove left-over rsord[] in mdoc_actions.c.

Remove MANDOCERR_BADLIB (not used).

Moved `St' handling from mdoc_action.c into mdoc_validate.c.

Moved relevant MDOC_LITERAL macros (`Dl', `Bd' subtypes) from
mdoc_action.c into mdoc_validate.c.

14 years agoMove `Lb' handling from mdoc_action.c into mdoc_validate.c.
Kristaps Dzonsons [Mon, 29 Nov 2010 14:56:43 +0000 (14:56 +0000)]
Move `Lb' handling from mdoc_action.c into mdoc_validate.c.