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

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

14 years agoMove `Sh' validation from mdoc_action.c. into mdoc_validate.c.
Kristaps Dzonsons [Mon, 29 Nov 2010 13:51:03 +0000 (13:51 +0000)]
Move `Sh' validation from mdoc_action.c. into mdoc_validate.c.
Surprisingly, both functions were doing pretty much the same thing.
Make sure that the changes incorporate the union of both.

14 years agoClarifying role of pre_pp (now pre_par), which was confusing me due to
Kristaps Dzonsons [Mon, 29 Nov 2010 13:12:24 +0000 (13:12 +0000)]
Clarifying role of pre_pp (now pre_par), which was confusing me due to
its name.  Added some more documentation just for clarity's sake.  No
functional change.

14 years agoNote that `Rv' and `Ex' have different values if a manual name has been
Kristaps Dzonsons [Mon, 29 Nov 2010 13:04:31 +0000 (13:04 +0000)]
Note that `Rv' and `Ex' have different values if a manual name has been
specified or not.

14 years agoMove `Mt', `Ar', and `Li' handling from mdoc_action.c into mdoc_validate.c.
Kristaps Dzonsons [Mon, 29 Nov 2010 13:02:47 +0000 (13:02 +0000)]
Move `Mt', `Ar', and `Li' handling from mdoc_action.c into mdoc_validate.c.

Clarify that `Mt' gets a default `~' (as per groff 1.20) and document it
in mdoc.7.

Made `Lk' be removed in mdoc_macro.c if it has no arguments.  This fixes
segfaults in mdoc_{term,html}.c that nobody's managed to raise yet.

14 years agoMigrate action for `Rs' into mdoc_validate.c.
Kristaps Dzonsons [Mon, 29 Nov 2010 12:22:28 +0000 (12:22 +0000)]
Migrate action for `Rs' into mdoc_validate.c.
Remove superfluous in-line order_rs function.
Merge `Rs' validations {BLOCK, BODY} -> {BODY}.
Make invalid children of `Rs' raise an error but otherwise be allowed.

14 years agonew: parametric .de, and header lines of excessive length
Ingo Schwarze [Wed, 3 Nov 2010 12:07:58 +0000 (12:07 +0000)]
new: parametric .de, and header lines of excessive length

14 years agoa bunch of small issues collected during p2k10
Ingo Schwarze [Fri, 29 Oct 2010 13:05:27 +0000 (13:05 +0000)]
a bunch of small issues collected during p2k10

14 years agoReferring to terms explained in other manuals, always use .Xr.
Ingo Schwarze [Fri, 29 Oct 2010 10:38:54 +0000 (10:38 +0000)]
Referring to terms explained in other manuals, always use .Xr.
Otherwise, hyperlinks can't be produced and people will likely
miss the additional information available.
Suggested by deraadt@.

14 years agoRemove a left-over ".Xr groff 1"; patch from jmc@.
Ingo Schwarze [Fri, 29 Oct 2010 00:05:53 +0000 (00:05 +0000)]
Remove a left-over ".Xr groff 1"; patch from jmc@.

14 years agoWhen mentioning a function documented elsewhere, .Xr is often better than .Fn.
Ingo Schwarze [Sun, 24 Oct 2010 14:49:35 +0000 (14:49 +0000)]
When mentioning a function documented elsewhere, .Xr is often better than .Fn.
Prodded by guenther@, ok jmc@.

14 years agolet .Bsx print just "BSD/OS" like in modern groff
Ingo Schwarze [Sat, 23 Oct 2010 23:31:10 +0000 (23:31 +0000)]
let .Bsx print just "BSD/OS" like in modern groff
from Ulrich Spoerlein <uqs at spoerlein dot net>

14 years agonew: escape sequence handling
Ingo Schwarze [Sat, 23 Oct 2010 22:40:13 +0000 (22:40 +0000)]
new: escape sequence handling
done: nested displays

14 years agotwo new TODOs based on submissions by Ulrich Spoerlein
Ingo Schwarze [Tue, 19 Oct 2010 21:40:27 +0000 (21:40 +0000)]
two new TODOs based on submissions by Ulrich Spoerlein

14 years agodream about .de support,
Ingo Schwarze [Sun, 17 Oct 2010 21:10:53 +0000 (21:10 +0000)]
dream about .de support,
and remove irrelevant stuff regarding tbl
now that it's imported into OpenBSD

14 years agoUse proper error for `An' multiple arguments.
Kristaps Dzonsons [Mon, 11 Oct 2010 15:46:19 +0000 (15:46 +0000)]
Use proper error for `An' multiple arguments.

Making IGNARGV be an ERROR, not a WARNING, as information is lost.

14 years agoQuiesce Linux header-inclusion warnings.
Kristaps Dzonsons [Mon, 11 Oct 2010 15:45:36 +0000 (15:45 +0000)]
Quiesce Linux header-inclusion warnings.

14 years agoInitial commit of cleaned-up validation code for -mdoc. Remove those
Kristaps Dzonsons [Mon, 11 Oct 2010 13:24:33 +0000 (13:24 +0000)]
Initial commit of cleaned-up validation code for -mdoc.  Remove those
ugly CPP macros in favour of real functions.  Enumerate areas of short-
term future cleanup, too.

14 years ago`Sm' no longer produces a linebreak when used in `Bd'.
Kristaps Dzonsons [Sun, 10 Oct 2010 09:59:48 +0000 (09:59 +0000)]
`Sm' no longer produces a linebreak when used in `Bd'.

14 years agoCleaned up library manuals: removed old escapes, added EXAMPLES, stripped
Kristaps Dzonsons [Sun, 10 Oct 2010 09:47:05 +0000 (09:47 +0000)]
Cleaned up library manuals: removed old escapes, added EXAMPLES, stripped
out some superfluous stuff.

14 years agoRevert merging of {mdoc,man}.h -> mandoc.h.
Kristaps Dzonsons [Mon, 4 Oct 2010 07:01:02 +0000 (07:01 +0000)]
Revert merging of {mdoc,man}.h -> mandoc.h.

While I'm add it, properly document all structures in these files.

14 years agostyle cleanup, no functional change:
Ingo Schwarze [Sat, 2 Oct 2010 15:15:55 +0000 (15:15 +0000)]
style cleanup, no functional change:
* make the initial maxvis/mmax calculation easier to understand
* where real, non-indexing casts happen, make them explicit
* avoid a few lint warnings that can easily be fixed
* remove one needless LINTED comment
"I like this" kristaps@

14 years agoUnify mdoc and man enums and structs into mandoc.h. This is part of the
Kristaps Dzonsons [Sat, 2 Oct 2010 10:14:37 +0000 (10:14 +0000)]
Unify mdoc and man enums and structs into mandoc.h.  This is part of the
slow process of logically splitting formatting frontend and parser backend
without pollution.

14 years ago* need a space before .No even if it starts with a closing delimiter
Ingo Schwarze [Fri, 1 Oct 2010 21:51:13 +0000 (21:51 +0000)]
* need a space before .No even if it starts with a closing delimiter
* slightly simplify .Pf *_IGNDELIM code, and share part of it with .No
* do not let opening delimiters fall out of the front of .Ns (from kristaps@)
This fixes a few spacing issues in csh(1) and ksh(1).
OK kristaps@

14 years agoFix small regression where `Op' had an extra space between the "[" and the SPAN.
Kristaps Dzonsons [Fri, 1 Oct 2010 12:09:55 +0000 (12:09 +0000)]
Fix small regression where `Op' had an extra space between the "[" and the SPAN.

14 years agoMerge from OpenBSD right after 1.10.6; now back to full sync.
Ingo Schwarze [Mon, 27 Sep 2010 23:03:44 +0000 (23:03 +0000)]
Merge from OpenBSD right after 1.10.6; now back to full sync.
* mdoc.c: blank lines outside literal mode are more similar to .sp than .Pp
* backslashes do not terminate macros; partial revert of mdoc.c 1.164;
  the intention of that commit is fully achieved in roff.c
* mdoc_term.c: no need to list the same prototype twice
* mdoc_validate.c: drop .Pp before .sp just like .Pp before .Pp
* fix off-by-one found by jsg@ with parfait, OpenBSD term_ps.c 1.12
ok kristaps@

14 years agoAdded TODO for more `Pp' warnings.
Kristaps Dzonsons [Mon, 27 Sep 2010 22:42:48 +0000 (22:42 +0000)]
Added TODO for more `Pp' warnings.

14 years agoA minor issue with \& between .Pp found while merging 1.10.6.
Ingo Schwarze [Mon, 27 Sep 2010 21:33:52 +0000 (21:33 +0000)]
A minor issue with \& between .Pp found while merging 1.10.6.

14 years agoPrepping for version. VERSION_1_10_6
Kristaps Dzonsons [Mon, 27 Sep 2010 12:34:21 +0000 (12:34 +0000)]
Prepping for version.

14 years agoConsider both `Lp' and `Pp' when stripping prior paragraph marks.
Kristaps Dzonsons [Mon, 27 Sep 2010 11:25:03 +0000 (11:25 +0000)]
Consider both `Lp' and `Pp' when stripping prior paragraph marks.

14 years agoSuppress whitespace following Pp, Lp, sp, and the other newline-emitting
Kristaps Dzonsons [Mon, 27 Sep 2010 11:21:39 +0000 (11:21 +0000)]
Suppress whitespace following Pp, Lp, sp, and the other newline-emitting
macros within an unfilled or literal `Bd'.

14 years agoRemove finished TODO.
Kristaps Dzonsons [Mon, 27 Sep 2010 10:47:48 +0000 (10:47 +0000)]
Remove finished TODO.

14 years agoIgnore double-`Pp' and `Pp' before `Bd' and `Bl' (unless -compact is
Kristaps Dzonsons [Mon, 27 Sep 2010 09:26:27 +0000 (09:26 +0000)]
Ignore double-`Pp' and `Pp' before `Bd' and `Bl' (unless -compact is
specified).

14 years agoAdded MIPS64. From a patch by Jason McIntyre.
Kristaps Dzonsons [Mon, 27 Sep 2010 06:56:44 +0000 (06:56 +0000)]
Added MIPS64.  From a patch by Jason McIntyre.

14 years agosync to OpenBSD:
Ingo Schwarze [Sun, 26 Sep 2010 23:05:46 +0000 (23:05 +0000)]
sync to OpenBSD:
new sentence, new line;
from jmc@

14 years agoIf an explicit scope is still open at the end of an input file,
Ingo Schwarze [Sun, 26 Sep 2010 20:22:28 +0000 (20:22 +0000)]
If an explicit scope is still open at the end of an input file,
report an ERROR:  We can still render the page by just closing
the open scope, but it is likely that information will be missing
or document structure mangled.
Before, man(7) only reported a WARNING (which is dangerous because
we cannot be sure rendering is correct) and mdoc(7) ran into FATAL
(which is too drastic, there is no reason not to show what we have).
"looks good" kristaps@

14 years agosync to OpenBSD:
Ingo Schwarze [Sun, 26 Sep 2010 19:46:48 +0000 (19:46 +0000)]
sync to OpenBSD:
note that IMPLEMENTATION NOTES is not used in OpenBSD
add missing comma in "sections 1, 6, & 8 only" below EXIT STATUS
below SEE ALSO, add an .Xr to man(1), and from man(7) to mdoc(7)

14 years agoConsolidated all -T[x]html punctuation macros into one function.
Kristaps Dzonsons [Sun, 26 Sep 2010 10:32:14 +0000 (10:32 +0000)]
Consolidated all -T[x]html punctuation macros into one function.

14 years agoLinted function arguments.
Kristaps Dzonsons [Sun, 26 Sep 2010 10:00:42 +0000 (10:00 +0000)]
Linted function arguments.

14 years agoBig clean-up consolidating all punctuation opening/closing functions into
Kristaps Dzonsons [Sun, 26 Sep 2010 09:16:02 +0000 (09:16 +0000)]
Big clean-up consolidating all punctuation opening/closing functions into
a single one.  This makes code auditing easier and cuts down on
bytesize.

I also removed some NOSPACE clauses that were handled implicitly by the
punctuation itself, e.g., a NOSPACE prior to printing ')', which in
term.c has its leading whitespace automatically suppressed.

14 years agoRemove fixed TODO and add a new one.
Kristaps Dzonsons [Sat, 25 Sep 2010 16:52:15 +0000 (16:52 +0000)]
Remove fixed TODO and add a new one.

14 years agoA `%T' invoked outside of `Rs' should not produce trailing punctuation.
Kristaps Dzonsons [Sat, 25 Sep 2010 16:41:33 +0000 (16:41 +0000)]
A `%T' invoked outside of `Rs' should not produce trailing punctuation.
This from a TODO entry.  Also stripped the superfluous NOSPACE, which is
handled in term_word() or print_text() anyway.

14 years agoAdd `Rs' vertical-space in -T[x]html "SEE ALSO" section. Remove
Kristaps Dzonsons [Sat, 25 Sep 2010 15:51:30 +0000 (15:51 +0000)]
Add `Rs' vertical-space in -T[x]html "SEE ALSO" section.  Remove
corresponding TODO entry.

Also have the "." after an `Rs' block trigger inter-sentence spacing.

14 years agoRemoved TODO that was fixed by parsing escapes in offset strings.
Kristaps Dzonsons [Sat, 25 Sep 2010 15:29:12 +0000 (15:29 +0000)]
Removed TODO that was fixed by parsing escapes in offset strings.

14 years agoWhen the HEAD of an .Nm block in the SYNOPSIS might be wider
Ingo Schwarze [Thu, 23 Sep 2010 20:40:00 +0000 (20:40 +0000)]
When the HEAD of an .Nm block in the SYNOPSIS might be wider
than the column containing it, the TERMP_HANG flag is required,
but avoid the flag when we know that the HEAD is shorter,
because in that case, the flag might ruin the alignment.

Problem originally reported by jmc@, who also spotted a regression
in an earlier version of this patch.

"feel free to commit" kristaps@

14 years agoCount trailing escaped blanks correctly;
Ingo Schwarze [Thu, 23 Sep 2010 20:26:00 +0000 (20:26 +0000)]
Count trailing escaped blanks correctly;
those ruined the alignment of columns.
Tested by jmc@, and kristaps@ agrees with the direction.

14 years agoenclosures sometimes cause bogus end-of-sentence
Ingo Schwarze [Thu, 23 Sep 2010 19:52:36 +0000 (19:52 +0000)]
enclosures sometimes cause bogus end-of-sentence

14 years agoAllow string lengths to account for escapes. Now all calls to calculate
Kristaps Dzonsons [Wed, 15 Sep 2010 14:36:16 +0000 (14:36 +0000)]
Allow string lengths to account for escapes.  Now all calls to calculate
column width in -Tascii, -Tpdf, and -Tps will account for "more real"
string lengths.

Example:

.Bl -tag -width \s[+123424]foo
.It bar
baz
.El

The size escape will be correctly tossed.

.Bl -tag -width \(aqbar
.It \(aqbar
baz
.El

The \(aq will be correctly handled.

14 years agoRemove last pod2man escapes. These render ok, although \*(-- renders as
Kristaps Dzonsons [Wed, 15 Sep 2010 13:10:30 +0000 (13:10 +0000)]
Remove last pod2man escapes.  These render ok, although \*(-- renders as
O- because the underlying macro depends on \(*W, which a prior pod2man
preamble `tr' macro rewrites as "-".  This is an error in groff as this
tramples on the real \(*W, or Greek omega.

14 years agoPrevent .Lp from looping endlessly on punctuation.
Ingo Schwarze [Mon, 13 Sep 2010 20:15:43 +0000 (20:15 +0000)]
Prevent .Lp from looping endlessly on punctuation.
Same fix as the previous one.

14 years agoPrevent `Pp' from looping endlessly on punctuation. Bug reported by
Kristaps Dzonsons [Mon, 13 Sep 2010 12:21:34 +0000 (12:21 +0000)]
Prevent `Pp' from looping endlessly on punctuation.  Bug reported by
Marc Espie.