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

14 years agoFound nit in -T[x]html.
Kristaps Dzonsons [Wed, 8 Sep 2010 11:57:29 +0000 (11:57 +0000)]
Found nit in -T[x]html.

14 years agoChurny commit to quiet lint. No functional changes.
Kristaps Dzonsons [Sat, 4 Sep 2010 20:18:53 +0000 (20:18 +0000)]
Churny commit to quiet lint.  No functional changes.

14 years agoProperly handle -mdoc %A in all outputs. This has two-author entires
Kristaps Dzonsons [Sat, 4 Sep 2010 19:01:52 +0000 (19:01 +0000)]
Properly handle -mdoc %A in all outputs.  This has two-author entires
separated by only "and" while two or more are with ", and" for the last
author.

Also remove relevant TODO and add regression tests.

14 years agoRemoved 'br\} comment from TODO. This was fixed a few weeks ago.
Kristaps Dzonsons [Sat, 4 Sep 2010 18:52:21 +0000 (18:52 +0000)]
Removed 'br\} comment from TODO.  This was fixed a few weeks ago.

14 years agoFix premature return from sub-conditional roff statements. This fix
Kristaps Dzonsons [Sat, 4 Sep 2010 18:31:44 +0000 (18:31 +0000)]
Fix premature return from sub-conditional roff statements.  This fix
fully accomodates for the pod2man standard preamble!

14 years agoClarified EXIT STATUS sections. Discussed among schwarze@, Thomas, and
Kristaps Dzonsons [Sat, 4 Sep 2010 17:22:41 +0000 (17:22 +0000)]
Clarified EXIT STATUS sections.  Discussed among schwarze@, Thomas, and
Jason.  Patch by Jason.

14 years agoRemove the pod2man table entries. They can now be properly read and
Kristaps Dzonsons [Sun, 29 Aug 2010 11:36:49 +0000 (11:36 +0000)]
Remove the pod2man table entries.  They can now be properly read and
assigned within the pod2man preamble.

14 years agoAllow `.xx\}' where xx is a macro (e.g., `.br\}') to close scope. This is
Kristaps Dzonsons [Sun, 29 Aug 2010 11:29:51 +0000 (11:29 +0000)]
Allow `.xx\}' where xx is a macro (e.g., `.br\}') to close scope.  This is
experimental and hasn't been rigorously tested.  It's only implemented in
-mdoc for the time being.  This is absolutely required for pod2man.  It
does, however, make the pod2man preamble be processed in full.

14 years agoRemove overstrike `\o'. This isn't the best solution because we really
Kristaps Dzonsons [Sun, 29 Aug 2010 11:28:09 +0000 (11:28 +0000)]
Remove overstrike `\o'.  This isn't the best solution because we really
should be printing the contents, but for the time being, this is good
enough.

14 years agoMade -mdoc `Pp', `Lp', and `br' not FATAL when having arguments.
Kristaps Dzonsons [Sun, 29 Aug 2010 10:30:58 +0000 (10:30 +0000)]
Made -mdoc `Pp', `Lp', and `br' not FATAL when having arguments.

14 years agoMove mdoc/man template "The next is for" into the section itself. Added
Kristaps Dzonsons [Sat, 28 Aug 2010 22:08:38 +0000 (22:08 +0000)]
Move mdoc/man template "The next is for" into the section itself.  Added
OpenBSD compatibility notes.  Based on a patch by Jason McIntyre.

14 years ago"sys/param.h is for kernel interface programs.
Kristaps Dzonsons [Thu, 26 Aug 2010 13:00:59 +0000 (13:00 +0000)]
"sys/param.h is for kernel interface programs.
sys/types.h is the file you want to include."

From a downstream fix by deraadt@.

14 years agoFixed HISTORY to note mdoc's rewrite in groff-1.17, not groff-1.20.
Kristaps Dzonsons [Tue, 24 Aug 2010 14:03:46 +0000 (14:03 +0000)]
Fixed HISTORY to note mdoc's rewrite in groff-1.17, not groff-1.20.

14 years agoHandle nested, recursive mathematical subexpressions. This is
Kristaps Dzonsons [Tue, 24 Aug 2010 13:56:51 +0000 (13:56 +0000)]
Handle nested, recursive mathematical subexpressions.  This is
definitely not general, but it's good enough for pod2man definitions
(after I clean up the roff, which will be addressed in later fixes).

14 years agoStrip out `\k' escape.
Kristaps Dzonsons [Tue, 24 Aug 2010 13:39:37 +0000 (13:39 +0000)]
Strip out `\k' escape.

14 years agoStripping out of `\w' groff escape. Yet another for pod2man...
Kristaps Dzonsons [Tue, 24 Aug 2010 13:07:01 +0000 (13:07 +0000)]
Stripping out of `\w' groff escape.  Yet another for pod2man...

14 years agoHave the `ds' processor strip out `\\' as stipulated in groff.7. I only
Kristaps Dzonsons [Tue, 24 Aug 2010 12:48:43 +0000 (12:48 +0000)]
Have the `ds' processor strip out `\\' as stipulated in groff.7.  I only
care because pod2man uses this construct.

14 years agoStrip out the `\z' escape. This is the first recursive sequence,
Kristaps Dzonsons [Tue, 24 Aug 2010 12:18:48 +0000 (12:18 +0000)]
Strip out the `\z' escape.  This is the first recursive sequence,
getting mandoc ready to handle pod2man's complex escapes.

14 years agoAdd a short HISTORY section to mdoc.7. Facts provided by schwarze@'s
Kristaps Dzonsons [Sun, 22 Aug 2010 15:49:28 +0000 (15:49 +0000)]
Add a short HISTORY section to mdoc.7.  Facts provided by schwarze@'s
detective-work in the UNIX archives.

14 years agoSort COMPATIBILITY in mdoc(7) (from schwarze@).
Kristaps Dzonsons [Sun, 22 Aug 2010 14:54:29 +0000 (14:54 +0000)]
Sort COMPATIBILITY in mdoc(7) (from schwarze@).

Update escape COMPATIBILITY in mdoc(7) and man(7) (ok schwarze@).

14 years agoBackout previous.
Ingo Schwarze [Sat, 21 Aug 2010 14:04:13 +0000 (14:04 +0000)]
Backout previous.
As Kristaps found out, i was wrong: .Bl -column phrases do not ignore
spacing rules for trailing punctuation in general.  In particular,
- the rightmost column of a column list is unaffected
- columns terminated by the .Ta macro instead of a tab are unaffected
- columns ending in a blank are unaffected
Spacing rules for trailing punctuation are only ignored when the tab
follows the punctuation immediately, without a blank in between,
because then the combination of punctuation and tab is treated by roff
as a word, and the punctuation is not recognized as isolated.
The reason this doesn't work in mandoc is that in the special case
of .Bl -column (not in general!), mandoc treats tabs as word delimiters.
We either need to solve this differently, or call it a bug in roff.

14 years agoCentralize handling of literal tabs in term_flushln() in one place,
Ingo Schwarze [Fri, 20 Aug 2010 23:34:02 +0000 (23:34 +0000)]
Centralize handling of literal tabs in term_flushln() in one place,
making the code simpler and easier to understand.
No functional change.

14 years agoWhen a column contains trailing spaces, calculate the padding
Ingo Schwarze [Fri, 20 Aug 2010 23:22:09 +0000 (23:22 +0000)]
When a column contains trailing spaces, calculate the padding
to the start of the next column correctly.
Fixing a problem found by jmc@ in sysctl(3), reminded by kettenis@.

14 years ago.Bl -column phrases ignore spacing rules for trailing punctuation
Ingo Schwarze [Fri, 20 Aug 2010 22:51:29 +0000 (22:51 +0000)]
.Bl -column phrases ignore spacing rules for trailing punctuation
and render it just like normal text.
Minimal fix of a formatting bug in operator(7) reported by ray@.

14 years agofix previous: when bailing out due to -Wstop,
Ingo Schwarze [Fri, 20 Aug 2010 08:13:43 +0000 (08:13 +0000)]
fix previous: when bailing out due to -Wstop,
skip output functions, but not *_endparse;
problem reported by kristaps@

14 years agoFixed Makefile auto-generation of manuals not to use -fstrict and [old] -Werror.
Kristaps Dzonsons [Fri, 20 Aug 2010 05:52:59 +0000 (05:52 +0000)]
Fixed Makefile auto-generation of manuals not to use -fstrict and [old] -Werror.

14 years agoImplement a simple, consistent user interface for error handling.
Ingo Schwarze [Fri, 20 Aug 2010 01:02:07 +0000 (01:02 +0000)]
Implement a simple, consistent user interface for error handling.
We now have sufficient practical experience to know what we want,
so this is intended to be final:
- provide -Wlevel (warning, error or fatal) to select what you care about
- provide -Wstop to stop after parsing a file with warnings you care about
- provide consistent exit status codes for those warnings you care about
- fully document what warnings, errors and fatal errors mean
- remove all other cruft from the user interface, less is more:
- remove all -f knobs along with the whole -f option
- remove the old -Werror because calling warnings "fatal" is silly
- always finish parsing each file, unless fatal errors prevent that
This commit also includes a couple of related simplifications behind
the scenes regarding error handling.
Feedback and OK  kristaps@;  Joerg Sonnenberger (NetBSD) and
Sascha Wildner (DragonFly BSD) agree with the general direction.

14 years agoUpdated hypermail link to summary.html.
Kristaps Dzonsons [Thu, 19 Aug 2010 20:49:34 +0000 (20:49 +0000)]
Updated hypermail link to summary.html.

14 years agoAdded mail archive periodically generated by hypermail.
Kristaps Dzonsons [Wed, 18 Aug 2010 15:57:16 +0000 (15:57 +0000)]
Added mail archive periodically generated by hypermail.

14 years agoMigrate `Xr groff 1' -> GNU troff. I no longer assume that groff is
Kristaps Dzonsons [Wed, 18 Aug 2010 08:41:40 +0000 (08:41 +0000)]
Migrate `Xr groff 1' -> GNU troff.  I no longer assume that groff is
installed on the host system.

14 years agoRemove references to \s in mandoc.1: we no longer document these and just
Kristaps Dzonsons [Wed, 18 Aug 2010 08:40:22 +0000 (08:40 +0000)]
Remove references to \s in mandoc.1: we no longer document these and just
flat-out ignore them.

14 years agoAdd joerg@'s note that br\} needs work in libroff.
Kristaps Dzonsons [Wed, 18 Aug 2010 08:39:54 +0000 (08:39 +0000)]
Add joerg@'s note that br\} needs work in libroff.