]> git.cameronkatri.com Git - mandoc.git/log
mandoc.git
14 years agoNote that `Dd' can be empty. This found following a thread on discuss@
Kristaps Dzonsons [Mon, 26 Jul 2010 13:45:49 +0000 (13:45 +0000)]
Note that `Dd' can be empty.  This found following a thread on discuss@
started by Sascha Wildner, 07/25/2010 06:30 AM.

14 years agoMerge schwarze@'s pass over mdoc.7. Fixed small new-sentence-new-line
Kristaps Dzonsons [Mon, 26 Jul 2010 12:51:56 +0000 (12:51 +0000)]
Merge schwarze@'s pass over mdoc.7.  Fixed small new-sentence-new-line
nit noted by Jason McIntyre.

"your diff looks ok" (Jason McIntyre)

14 years agoFix chars.in fall-through to ASCII mode. This bug only affected
Kristaps Dzonsons [Mon, 26 Jul 2010 10:20:06 +0000 (10:20 +0000)]
Fix chars.in fall-through to ASCII mode.  This bug only affected
-T[x]html.

14 years agoNote -Tpdf in www.
Kristaps Dzonsons [Mon, 26 Jul 2010 10:00:15 +0000 (10:00 +0000)]
Note -Tpdf in www.

14 years agoMerge Jason McIntyre's corrections to man.7.
Kristaps Dzonsons [Mon, 26 Jul 2010 10:00:03 +0000 (10:00 +0000)]
Merge Jason McIntyre's corrections to man.7.

"urgle": Jason McIntyre.  "This is all ok" schwarze@.

14 years agoAvoid running the "width" termp callback for each whitespace.
Kristaps Dzonsons [Sun, 25 Jul 2010 22:56:47 +0000 (22:56 +0000)]
Avoid running the "width" termp callback for each whitespace.

14 years agoFully-working -Tpdf: xref table is now generated. This works for both
Kristaps Dzonsons [Sun, 25 Jul 2010 22:15:07 +0000 (22:15 +0000)]
Fully-working -Tpdf: xref table is now generated.  This works for both
single and multiple-manual mode (e.g., mandoc -Tpdf foo.1 bar.1).

14 years agoMake PDF sections contiguous.
Kristaps Dzonsons [Sun, 25 Jul 2010 19:37:38 +0000 (19:37 +0000)]
Make PDF sections contiguous.

14 years agoEnsure that isalnum is called with unsigned char argument.
Joerg Sonnenberger [Sun, 25 Jul 2010 19:05:59 +0000 (19:05 +0000)]
Ensure that isalnum is called with unsigned char argument.

14 years agolist two additional issues
Ingo Schwarze [Sun, 25 Jul 2010 18:22:18 +0000 (18:22 +0000)]
list two additional issues

14 years agoInitial PDF shim over PS. This produces working PDF output with -Tpdf.
Kristaps Dzonsons [Sun, 25 Jul 2010 11:44:31 +0000 (11:44 +0000)]
Initial PDF shim over PS.  This produces working PDF output with -Tpdf.
It's currently missing the xref table, so you'll get a warning in most
PDF viewers).  It also produces lots of redundant output, which will go
away once I get a better handle on the PDF spec.  The code doesn't
really touch any existing functionality; it's a bunch of conditionals
atop the -Tps (term_ps.c) implementation.  I'm checking it in now to
have it exist and be auditable.  It needs clean-up, polish, and general
care (and xref!).

14 years agoCollapse `nf', `fi', `Vb', and `Ve' into one function as in man_html.c. VERSION_1_10_5_PREPDF
Kristaps Dzonsons [Fri, 23 Jul 2010 13:22:35 +0000 (13:22 +0000)]
Collapse `nf', `fi', `Vb', and `Ve' into one function as in man_html.c.

14 years agoEnable literal contexts (Vb/nf) in -T[x]html -man. This requires that a
Kristaps Dzonsons [Fri, 23 Jul 2010 12:27:27 +0000 (12:27 +0000)]
Enable literal contexts (Vb/nf) in -T[x]html -man.  This requires that a
new struct pass down in the call-tree (as also in man_term.c).

Also add a line-break for `in', which isn't otherwise supported (yet).

Now -Thtml -man cvs.1 for GNU's cvs.1 isn't as ugly.

14 years agoAdd support for `Sm' in -T[x]html -mdoc.
Kristaps Dzonsons [Fri, 23 Jul 2010 00:08:57 +0000 (00:08 +0000)]
Add support for `Sm' in -T[x]html -mdoc.

14 years agoFix broken compilation, hopefully before anybody notices.
Kristaps Dzonsons [Thu, 22 Jul 2010 23:53:54 +0000 (23:53 +0000)]
Fix broken compilation, hopefully before anybody notices.

14 years agoAdded `in' macro support for -man -Tascii. This is not yet supported in
Kristaps Dzonsons [Thu, 22 Jul 2010 23:03:15 +0000 (23:03 +0000)]
Added `in' macro support for -man -Tascii.  This is not yet supported in
-Thtml (I'm surprised to note that neither is LITERAL mode).

14 years agoStart putting in release notes. A record is good because this release
Kristaps Dzonsons [Thu, 22 Jul 2010 14:30:06 +0000 (14:30 +0000)]
Start putting in release notes.  A record is good because this release
will have lots of small, incremental improvements.

14 years agoAccept "\s0" (i.e., properly ignore it). Found in the wild (e.g., gfdl.7).
Kristaps Dzonsons [Thu, 22 Jul 2010 14:03:50 +0000 (14:03 +0000)]
Accept "\s0" (i.e., properly ignore it).  Found in the wild (e.g., gfdl.7).

14 years agoBring `sp', `Sp', and `br' behaviour for -man in line with how -mdoc's
Kristaps Dzonsons [Thu, 22 Jul 2010 13:47:50 +0000 (13:47 +0000)]
Bring `sp', `Sp', and `br' behaviour for -man in line with how -mdoc's
is handled: correctly.  This removes superfluous line breaks in many
-man manuals.

14 years agoHave `nf' and `fi' flush lines. This is necessary or the LITERAL will
Kristaps Dzonsons [Thu, 22 Jul 2010 13:36:25 +0000 (13:36 +0000)]
Have `nf' and `fi' flush lines.  This is necessary or the LITERAL will
be meaningless when invoked within a non-flushing context.  This based
on a formatting bug report submitted by Jonathon Gray (jsg@) via
Christian Weisgerber (naddy@).

14 years agoIn the SYNOPSIS, .Nm at the beginning of an input line starts
Ingo Schwarze [Wed, 21 Jul 2010 21:55:33 +0000 (21:55 +0000)]
In the SYNOPSIS, .Nm at the beginning of an input line starts
an .Nm block, and gets special handling (new line, indentation).
But .Nm in the middle of a line is just a normal in-line element,
so make sure it does NOT get the special handling.
Partly fixes the test(1) SYNOPSIS; indentation after "[" is still
excessive, which is an unrelated and more difficult issue.
Reminded of the problem by jmc@;
OK kristaps@.

14 years agoAccomodate for groff's crappy behaviour wherein an unrecognised
Kristaps Dzonsons [Wed, 21 Jul 2010 20:35:03 +0000 (20:35 +0000)]
Accomodate for groff's crappy behaviour wherein an unrecognised
single-character escape (and ONLY this type of escape) will map back
into itself:

       "If a backslash is followed by a character that does not
constitute a defined escape sequence the backslash is silently
        ignored and the  character maps to itself."

(From groff.7.)

Found by Jason McIntyre.

14 years agoClarified mailing list purposes.
Kristaps Dzonsons [Wed, 21 Jul 2010 10:10:24 +0000 (10:10 +0000)]
Clarified mailing list purposes.

14 years agoTidy up the www page.
Kristaps Dzonsons [Wed, 21 Jul 2010 09:59:52 +0000 (09:59 +0000)]
Tidy up the www page.

14 years agoNit-picking assign in decl.
Kristaps Dzonsons [Wed, 21 Jul 2010 09:36:41 +0000 (09:36 +0000)]
Nit-picking assign in decl.

14 years agoLint-fixes (NetBSD).
Kristaps Dzonsons [Wed, 21 Jul 2010 09:15:48 +0000 (09:15 +0000)]
Lint-fixes (NetBSD).

14 years agoFinally make mdoc argv CPP-defines into a proper enum.
Kristaps Dzonsons [Wed, 21 Jul 2010 09:08:26 +0000 (09:08 +0000)]
Finally make mdoc argv CPP-defines into a proper enum.

14 years agoThe "wx" value is quite small, so use a u_short instead of a size_t.
Kristaps Dzonsons [Wed, 21 Jul 2010 08:24:39 +0000 (08:24 +0000)]
The "wx" value is quite small, so use a u_short instead of a size_t.

14 years agoStrip non-graphable input characters from input. The manuals
Kristaps Dzonsons [Tue, 20 Jul 2010 14:56:42 +0000 (14:56 +0000)]
Strip non-graphable input characters from input.  The manuals
specifically say that this is not allowed, and were it allowed, output
would be inconsistent across output media (-Tps will puke,
non-your-charset terminals will puke, etc.).

With this done, simplify check_text() to only check escapes and for
tabs.  Add in a new tab warning, too.

14 years agoUse floating-point -Tps "moveto" arguments to smooth out column and row
Kristaps Dzonsons [Tue, 20 Jul 2010 10:56:03 +0000 (10:56 +0000)]
Use floating-point -Tps "moveto" arguments to smooth out column and row
misalignments.

14 years agosync to OpenBSD:
Ingo Schwarze [Mon, 19 Jul 2010 23:21:39 +0000 (23:21 +0000)]
sync to OpenBSD:
* briefly mention the HISTORY of the man(7) language
* update the copyright notice
* improve the wording in a few places
* fix a couple of typos
including two suggestions from J.C. Roberts
feedback and ok jmc@, ok sobrado@ and kristaps@

14 years agoAll macros in mdoc.7 are now documented.
Kristaps Dzonsons [Mon, 19 Jul 2010 21:59:48 +0000 (21:59 +0000)]
All macros in mdoc.7 are now documented.

14 years agoFinished document -mdoc macros. Note `br' and `sp' remain.
Kristaps Dzonsons [Mon, 19 Jul 2010 15:43:10 +0000 (15:43 +0000)]
Finished document -mdoc macros.  Note `br' and `sp' remain.

Noted in arch.in and st.in that mdoc.7 must be updated if entries are
added.

14 years agoAdded documentation for several more macros. Only a few remaining!
Kristaps Dzonsons [Mon, 19 Jul 2010 15:28:11 +0000 (15:28 +0000)]
Added documentation for several more macros.  Only a few remaining!

Applied "new-sentence, new-line" here and there.

Refer to "whitespace", not "white-space".

Remove long-commented-out CAVEATS, all of which have been addressed or
at least discussed to some extent or another.

14 years agoRemove some FIXMEs: `Ms' accepts arbitrary text, so it can't/shouldn't
Kristaps Dzonsons [Mon, 19 Jul 2010 11:11:54 +0000 (11:11 +0000)]
Remove some FIXMEs: `Ms' accepts arbitrary text, so it can't/shouldn't
be converted into a symbol.

The `Pp' issue has also been fixed.

14 years agoFix spurrious newline emitted by `Pp' when specified before or after
Kristaps Dzonsons [Mon, 19 Jul 2010 11:06:31 +0000 (11:06 +0000)]
Fix spurrious newline emitted by `Pp' when specified before or after
`Sh'/`Ss'.  Reported by Jason McIntyre.

14 years agoChanged Unicode codepoint of left-arrow right-arrow to be the regular
Kristaps Dzonsons [Mon, 19 Jul 2010 10:49:30 +0000 (10:49 +0000)]
Changed Unicode codepoint of left-arrow right-arrow to be the regular
ASCII symbols.

14 years agoNote discarding of \m, \M, and \s in COMPATIBILITY sections.
Kristaps Dzonsons [Mon, 19 Jul 2010 10:48:36 +0000 (10:48 +0000)]
Note discarding of \m, \M, and \s in COMPATIBILITY sections.

14 years agoRemove \s TODO: these are intelligently ignored along with \m and \M.
Kristaps Dzonsons [Mon, 19 Jul 2010 09:21:58 +0000 (09:21 +0000)]
Remove \s TODO: these are intelligently ignored along with \m and \M.

14 years agoRemoved \s documentation, as we (1) never supported it, and (2) never
Kristaps Dzonsons [Mon, 19 Jul 2010 09:19:22 +0000 (09:19 +0000)]
Removed \s documentation, as we (1) never supported it, and (2) never
will.

Also whack the dot-separator from the embedded man.7 manual.

14 years agoDouble-up DECO_RESERVED switch branch for colours.
Kristaps Dzonsons [Mon, 19 Jul 2010 07:53:40 +0000 (07:53 +0000)]
Double-up DECO_RESERVED switch branch for colours.

14 years agoProperly discard \m colour escapes. Noted by J.C. Roberts.
Kristaps Dzonsons [Sun, 18 Jul 2010 23:06:18 +0000 (23:06 +0000)]
Properly discard \m colour escapes.  Noted by J.C. Roberts.

14 years agoThrow out a2roffdeco() in out.c for a readable version. The prior one
Kristaps Dzonsons [Sun, 18 Jul 2010 22:55:06 +0000 (22:55 +0000)]
Throw out a2roffdeco() in out.c for a readable version.  The prior one
was completely unmaintainable.  The new one is both readable and quite
similar to mandoc_special(), which in future versions will easily allow
throwing-away of unsupported escapes (such as \m).  It's also a fair bit
smaller.

DECO_SIZE has been removed: this crap, like colours, will not be
supported.

mandoc_special() also has #if 0'd switch branches for ALL groff.7
escapes and some lint fixes.

14 years agoMake "\ " produce non-breaking space.
Kristaps Dzonsons [Sun, 18 Jul 2010 18:04:25 +0000 (18:04 +0000)]
Make "\ " produce non-breaking space.

Noted by Theo de Raadt.  Ok schwarze@.

14 years agoText ending in a full stop, exclamation mark or question mark
Ingo Schwarze [Sun, 18 Jul 2010 17:00:26 +0000 (17:00 +0000)]
Text ending in a full stop, exclamation mark or question mark
should not flag the end of a sentence if:

1) The punctuation is followed by closing delimiters
and not preceded by alphanumeric characters, like in
"There is no full stop (.) in this sentence"

or

2) The punctuation is a child of a macro
and not preceded by alphanumeric characters, like in
"There is no full stop
.Pq \&.
in this sentence"

"looks fine" to kristaps@; tested by jmc@ and sobrado@

14 years agofixed .Sm spacing, but there are four new issues
Ingo Schwarze [Sun, 18 Jul 2010 16:42:03 +0000 (16:42 +0000)]
fixed .Sm spacing, but there are four new issues

14 years agoClean up mandoc_special() (in order later to catch \m). It also flags
Kristaps Dzonsons [Sun, 18 Jul 2010 12:10:08 +0000 (12:10 +0000)]
Clean up mandoc_special() (in order later to catch \m).  It also flags
several syntactic errors that weren't caught before.

Also un-puke chars.c on zero-length \[].

14 years agoAvoid letter-by-letter encoding by using strcspn() in term_word().
Kristaps Dzonsons [Sat, 17 Jul 2010 12:01:43 +0000 (12:01 +0000)]
Avoid letter-by-letter encoding by using strcspn() in term_word().

14 years agoBy letting strncmp() do its job and not helping it with a prior length
Kristaps Dzonsons [Sat, 17 Jul 2010 09:21:39 +0000 (09:21 +0000)]
By letting strncmp() do its job and not helping it with a prior length
check, we can remove the hard-coded length of all escape patterns.  This
frees up a nice chunk of memory.

14 years agoChange chars.in HTML encoding to be a Unicode codepoint (int), which is
Kristaps Dzonsons [Fri, 16 Jul 2010 22:33:30 +0000 (22:33 +0000)]
Change chars.in HTML encoding to be a Unicode codepoint (int), which is
later formatted in html.c.

14 years agoRemoved completed TODO.
Kristaps Dzonsons [Fri, 16 Jul 2010 22:10:04 +0000 (22:10 +0000)]
Removed completed TODO.

14 years agoFixed dquote to be \*q.
Kristaps Dzonsons [Fri, 16 Jul 2010 21:09:39 +0000 (21:09 +0000)]
Fixed dquote to be \*q.

14 years agoFix which escapes are used to format \".
Kristaps Dzonsons [Fri, 16 Jul 2010 10:25:54 +0000 (10:25 +0000)]
Fix which escapes are used to format \".

14 years agoAfter .Sm on, spacing ought to restart right away, before the next token,
Ingo Schwarze [Fri, 16 Jul 2010 00:03:37 +0000 (00:03 +0000)]
After .Sm on, spacing ought to restart right away, before the next token,
and not with a delay, after the next token.  But be careful not to cause
leading white space at the beginning of a line or column.
In OpenBSD, improves chmod(1), ksh(1), tar(1), ps(1) and probably many more.
ok kristaps@ and tested by jmc@ and sobrado@

14 years agodocument .Sm; prodded by kristaps@
Ingo Schwarze [Thu, 15 Jul 2010 23:50:15 +0000 (23:50 +0000)]
document .Sm; prodded by kristaps@

14 years agocorrect lots of copyright notices;
Ingo Schwarze [Tue, 13 Jul 2010 23:53:20 +0000 (23:53 +0000)]
correct lots of copyright notices;
ok kristaps@

14 years agoPre-tag checkin of release bits and shortlist. VERSION_1_10_4
Kristaps Dzonsons [Sun, 11 Jul 2010 23:07:47 +0000 (23:07 +0000)]
Pre-tag checkin of release bits and shortlist.

14 years agoremove three issues fixed near the end of the c2k10 hackathon
Ingo Schwarze [Sun, 11 Jul 2010 22:39:32 +0000 (22:39 +0000)]
remove three issues fixed near the end of the c2k10 hackathon

14 years agoRe-constitution of `ds' symbol processing. First, push the
Kristaps Dzonsons [Wed, 7 Jul 2010 15:04:54 +0000 (15:04 +0000)]
Re-constitution of `ds' symbol processing.  First, push the
roff_getstr() family of functions into roff.c with the "first_string"
directly in struct roff.  Second, pre-process each line for reserved
words in libroff, splicing and re-running a line if it has one (this
allows defined symbols to be macros).  Remove term.c's invocation of the
roff_getstrn() function.  Removed function documentation in roff.3 and
added roff.7 `ds' documentation.

14 years agoRevert Makefile to using mandoc.c instead of libmandoc.c. Remove
Kristaps Dzonsons [Tue, 6 Jul 2010 22:08:33 +0000 (22:08 +0000)]
Revert Makefile to using mandoc.c instead of libmandoc.c.  Remove
newborn libmandoc.c.

While here, remove superfluous dep of libman on mandoc.c.

14 years agoResurrect mandoc.c after bogus removal (was: libmandoc.c).
Kristaps Dzonsons [Tue, 6 Jul 2010 22:04:31 +0000 (22:04 +0000)]
Resurrect mandoc.c after bogus removal (was: libmandoc.c).

14 years agoGive -T[x]html `Bk -words' capability.
Kristaps Dzonsons [Tue, 6 Jul 2010 12:37:17 +0000 (12:37 +0000)]
Give -T[x]html `Bk -words' capability.

14 years agoBrought function arguments and style in ine with term_word() in term.c
Kristaps Dzonsons [Tue, 6 Jul 2010 11:10:53 +0000 (11:10 +0000)]
Brought function arguments and style in ine with term_word() in term.c
to make sharing of TERMP_KEEP easier.

14 years agoClarified `Bk' operation in mdoc.7.
Kristaps Dzonsons [Tue, 6 Jul 2010 11:07:21 +0000 (11:07 +0000)]
Clarified `Bk' operation in mdoc.7.

14 years agoDocumented `En', `Es', `Hf', `Ic', `Lp', `Nd', `No', `Oc', `Oo', `Op',
Kristaps Dzonsons [Tue, 6 Jul 2010 10:55:50 +0000 (10:55 +0000)]
Documented `En', `Es', `Hf', `Ic', `Lp', `Nd', `No', `Oc', `Oo', `Op',
`Pa', `Pc', `Po', `Pq', `Pp', and `Va'.

14 years agoProper `Bk -words' support: only suppress breaks within a line, but
Kristaps Dzonsons [Tue, 6 Jul 2010 10:54:05 +0000 (10:54 +0000)]
Proper `Bk -words' support: only suppress breaks within a line, but
allow end-of-line to break.  This fixes the bad behaviour found when
macros within `Bk' never break.

"Excellent" schwarze@

14 years agoMove register information into mandoc.h, which is where it should have
Kristaps Dzonsons [Mon, 5 Jul 2010 20:10:22 +0000 (20:10 +0000)]
Move register information into mandoc.h, which is where it should have
been in the first place (mandoc.h contains system-wide declarations).

14 years agoRenamed mandoc.c to libmandoc.c. This is in the efforts of getting a
Kristaps Dzonsons [Mon, 5 Jul 2010 20:00:55 +0000 (20:00 +0000)]
Renamed mandoc.c to libmandoc.c.  This is in the efforts of getting a
cleaner namespace for functions across the entire system (mandoc.h:
getting parsed-string values, or declarations necessary for the AST
data), and compiler functions (libmandoc.h: back-end functions and
declarations).

14 years agoManual clean-ups. Add syntax message for `Bd', `Bk', and `Bl'.
Kristaps Dzonsons [Mon, 5 Jul 2010 13:12:32 +0000 (13:12 +0000)]
Manual clean-ups.  Add syntax message for `Bd', `Bk', and `Bl'.
Document `Eo' and `Ec'.  Add context-end notes `Ec' and `Fc'.

14 years agoRemove caching TODO: this has been committed.
Kristaps Dzonsons [Mon, 5 Jul 2010 10:45:14 +0000 (10:45 +0000)]
Remove caching TODO: this has been committed.

14 years agoSuppress duplicate "Page: 1 1" -Tps printing and instead relay on
Kristaps Dzonsons [Mon, 5 Jul 2010 08:46:09 +0000 (08:46 +0000)]
Suppress duplicate "Page: 1 1" -Tps printing and instead relay on
PS_NEWPAGE to do the job for us.  Noted by Dillo.

14 years agoAssert my copyright, making it explicit that i'm granting the same license
Ingo Schwarze [Sun, 4 Jul 2010 22:04:04 +0000 (22:04 +0000)]
Assert my copyright, making it explicit that i'm granting the same license
on those parts of the code and text that i have written as Kristaps is.
"fine with me" kristaps@

14 years agoCache column sizes and char pointer into mdoc_bl. Finally get rid of
Kristaps Dzonsons [Sun, 4 Jul 2010 21:59:30 +0000 (21:59 +0000)]
Cache column sizes and char pointer into mdoc_bl.  Finally get rid of
the loops here and there to track down the MDOC_Column arguments.

14 years agogv(1) doesn't remember the last set font when displaying new pages, so
Kristaps Dzonsons [Sun, 4 Jul 2010 20:17:42 +0000 (20:17 +0000)]
gv(1) doesn't remember the last set font when displaying new pages, so
print it out for each new page.  This also prevents superfluous
printings of the font before the %%Page: comment has been displayed.

14 years agoSet line-height to be 1.4em. Removed check for minimum margins that are no
Kristaps Dzonsons [Sun, 4 Jul 2010 20:06:59 +0000 (20:06 +0000)]
Set line-height to be 1.4em.  Removed check for minimum margins that are no
longer important.

14 years agoSuppress printing blank eof pages in -Tps. Delay printing of Page:
Kristaps Dzonsons [Sun, 4 Jul 2010 19:57:26 +0000 (19:57 +0000)]
Suppress printing blank eof pages in -Tps.  Delay printing of Page:
until actual text is ready to be displayed.

14 years agoSuppress printing of newlines/space at start of new -Tps page.
Kristaps Dzonsons [Sun, 4 Jul 2010 19:42:25 +0000 (19:42 +0000)]
Suppress printing of newlines/space at start of new -Tps page.

Also renamed "psstate" -> "flags" (was wrongly implying some sort of
state machine).

14 years agoBacked out margin calculations in favour of much simpler rule of thumb:
Kristaps Dzonsons [Sun, 4 Jul 2010 19:24:00 +0000 (19:24 +0000)]
Backed out margin calculations in favour of much simpler rule of thumb:
margins are 1/9 the length/width.

14 years agoAuto-margins. Documented in mandoc.1. Also bumped line-height and made
Kristaps Dzonsons [Sun, 4 Jul 2010 10:53:04 +0000 (10:53 +0000)]
Auto-margins.  Documented in mandoc.1.  Also bumped line-height and made
sure header and footer accomodate for said line-height.

14 years agoAllow empty `Fo' to get by without an assertion.
Kristaps Dzonsons [Sat, 3 Jul 2010 17:17:15 +0000 (17:17 +0000)]
Allow empty `Fo' to get by without an assertion.

14 years agoNote to myself on what I need to do regarding inter-library functions.
Kristaps Dzonsons [Sat, 3 Jul 2010 16:09:03 +0000 (16:09 +0000)]
Note to myself on what I need to do regarding inter-library functions.

14 years agoRudimentary implementation of user-defined strings;
Ingo Schwarze [Sat, 3 Jul 2010 16:02:12 +0000 (16:02 +0000)]
Rudimentary implementation of user-defined strings;
no time for more refinement right now.
In particular, fixes terminfo(3) and mdoc.samples(7).
ok kristaps@, who will add the HTML frontend bits

14 years agoThe roff escape function "\s" is definitely not urgent,
Ingo Schwarze [Sat, 3 Jul 2010 00:48:09 +0000 (00:48 +0000)]
The roff escape function "\s" is definitely not urgent,
but it is used in the tree and we should not forget.

14 years agoNot only for -tag lists, but for -hang, -ohang, -inset, -diag,
Ingo Schwarze [Fri, 2 Jul 2010 17:42:23 +0000 (17:42 +0000)]
Not only for -tag lists, but for -hang, -ohang, -inset, -diag,
and -item list as well, empty bodies are OK, they do not even
warrant a warning, much less the error they were throwing.
According to kristaps, joerg@ also brought this up some time ago.
ok kristaps@ jmc@

14 years agoCached `An' arguments in struct mdoc_an. Note that this isn't a
Kristaps Dzonsons [Fri, 2 Jul 2010 15:03:14 +0000 (15:03 +0000)]
Cached `An' arguments in struct mdoc_an.  Note that this isn't a
pointer like the other data members, as there's no need to copy it around.

14 years agoFix: was checking HEAD for arguments.
Kristaps Dzonsons [Fri, 2 Jul 2010 13:12:47 +0000 (13:12 +0000)]
Fix: was checking HEAD for arguments.

14 years agoAdd documentation for Bf/Ef.
Kristaps Dzonsons [Fri, 2 Jul 2010 13:07:46 +0000 (13:07 +0000)]
Add documentation for Bf/Ef.

14 years agoStash `Bf' parameters into struct mdoc_bf.
Kristaps Dzonsons [Fri, 2 Jul 2010 12:54:33 +0000 (12:54 +0000)]
Stash `Bf' parameters into struct mdoc_bf.

14 years agoLint fixes.
Kristaps Dzonsons [Fri, 2 Jul 2010 10:53:28 +0000 (10:53 +0000)]
Lint fixes.

14 years agoLint tweak.
Kristaps Dzonsons [Fri, 2 Jul 2010 10:50:50 +0000 (10:50 +0000)]
Lint tweak.

14 years agoAdded TODO to sanitise `Nm' blocks such that HEAD optionally contains
Kristaps Dzonsons [Fri, 2 Jul 2010 10:43:21 +0000 (10:43 +0000)]
Added TODO to sanitise `Nm' blocks such that HEAD optionally contains
only a TEXT element consisting of the name.

14 years agoImplemented -Thtml bits for handling `Nm' blocks.
Kristaps Dzonsons [Fri, 2 Jul 2010 10:42:46 +0000 (10:42 +0000)]
Implemented -Thtml bits for handling `Nm' blocks.

14 years agoRemove my own dumb FIXME and mark a static function defn as static.
Kristaps Dzonsons [Thu, 1 Jul 2010 23:01:47 +0000 (23:01 +0000)]
Remove my own dumb FIXME and mark a static function defn as static.

14 years agoMake struct_bl and struct_bd into pointers. This removes the need to do
Kristaps Dzonsons [Thu, 1 Jul 2010 22:56:17 +0000 (22:56 +0000)]
Make struct_bl and struct_bd into pointers.  This removes the need to do
copying on internals after modification.  Even more importantly, if an
ENDBODY token is provided, it would have been impossible for post-change
copying of the data to take place in the BLOCK.  This allows it to
happen by dint of pointers.

Also did some bikeshedding in mdoc_term.c: checking against enum type
and explicitly casting to the "post" function to void.  This is for my
own readability.

14 years agoIn the mdoc(7) parser, inspect roff registers early such that all parts
Ingo Schwarze [Thu, 1 Jul 2010 22:35:54 +0000 (22:35 +0000)]
In the mdoc(7) parser, inspect roff registers early such that all parts
of the parser can use the resulting cues.  In particular, this allows
to use .nr nS to force SYNOPSIS-style .Nm indentation outside the
SYNOPSIS as needed by ifconfig(8).

To actually make this useable, .Pp must rewind .Nm, or the rest of the
section would end up indented.  Implement a quick hack for now,
a generic solution can be designed later.

ok kristaps@ and tested by sobrado@

14 years agoPrevent validator from puking on ENDBODY `Bl' nodes.
Kristaps Dzonsons [Thu, 1 Jul 2010 21:44:47 +0000 (21:44 +0000)]
Prevent validator from puking on ENDBODY `Bl' nodes.

14 years agoCorrect handling of trailing punctuation in MDOC_DELIM blk_full HEADs.
Ingo Schwarze [Thu, 1 Jul 2010 21:12:00 +0000 (21:12 +0000)]
Correct handling of trailing punctuation in MDOC_DELIM blk_full HEADs.
The bug was uncovered by SYNOPSIS .Nm as this happened to be the first
block with this particular combination of properties.
Found the hard way by kristaps@ in NetBSD gcc-contrib(1),
fix by me.

14 years agoImprove .Nm indentation in the SYNOPSIS;
Ingo Schwarze [Thu, 1 Jul 2010 15:38:56 +0000 (15:38 +0000)]
Improve .Nm indentation in the SYNOPSIS;
kristaps@ will do the missing HTML part soon.
"looks nicer" jmc@
"seems perfect to me" sobrado@
"slap it in" kristaps@

14 years agoMore reality-checks for the p->end type.
Kristaps Dzonsons [Thu, 1 Jul 2010 14:34:03 +0000 (14:34 +0000)]
More reality-checks for the p->end type.

14 years agop->end is an enum: treat it as such.
Kristaps Dzonsons [Thu, 1 Jul 2010 14:28:12 +0000 (14:28 +0000)]
p->end is an enum: treat it as such.