]> git.cameronkatri.com Git - mandoc.git/log
mandoc.git
14 years agoMerge from OpenBSD (similar to my original fix committed on Oct 15, 2010):
Ingo Schwarze [Tue, 4 Jan 2011 23:48:39 +0000 (23:48 +0000)]
Merge from OpenBSD (similar to my original fix committed on Oct 15, 2010):
For now, parse and ignore minimal column width specifications.
First step to get terminfo(5) to build.

14 years agoAdd tbl.7 to DOCUMENTATION. Removed old NEWS items.
Kristaps Dzonsons [Tue, 4 Jan 2011 23:32:39 +0000 (23:32 +0000)]
Add tbl.7 to DOCUMENTATION.  Removed old NEWS items.

14 years agoMoved table stuff from roff.7 into the new tbl.7 (suggested by Jason McIntyre).
Kristaps Dzonsons [Tue, 4 Jan 2011 23:32:21 +0000 (23:32 +0000)]
Moved table stuff from roff.7 into the new tbl.7 (suggested by Jason McIntyre).

Added cross-links to tbl.7 from other manuals.

14 years agoSupport `T{' and `T}' data blocks. When a standalone `T{' is
Kristaps Dzonsons [Tue, 4 Jan 2011 15:02:00 +0000 (15:02 +0000)]
Support `T{' and `T}' data blocks.  When a standalone `T{' is
encountered as a line's last data cell, move into TBL_PART_CDATA mode
whilst leaving the cell's designation as TBL_DATA_NONE.  When new data
arrives that's not a standalone `T}', append it to the cell contends.
Close out and warn appropriately.

14 years agoHave horizontal spanner not clobber pre-set width.
Kristaps Dzonsons [Tue, 4 Jan 2011 13:21:45 +0000 (13:21 +0000)]
Have horizontal spanner not clobber pre-set width.

14 years agoFix spacing for tables to use term_len(). Also make term.c properly
Kristaps Dzonsons [Tue, 4 Jan 2011 13:14:26 +0000 (13:14 +0000)]
Fix spacing for tables to use term_len().  Also make term.c properly
recode ASCII_HYPHEN and ASCII_NBRSP before passing back for widths.

14 years agoFix to make horizontal spanners in the layout be properly printed.
Kristaps Dzonsons [Tue, 4 Jan 2011 12:06:21 +0000 (12:06 +0000)]
Fix to make horizontal spanners in the layout be properly printed.
mandoc also now warns (so does tbl(1)) if a horizontal spanner is
specified along with data.

While here, fix up some documentation and uncomment the tbl reference.

14 years agoProtect tbl nodes from getting a post call.
Kristaps Dzonsons [Tue, 4 Jan 2011 10:31:15 +0000 (10:31 +0000)]
Protect tbl nodes from getting a post call.

14 years agoAdd skeleton for -T[x]html tbl stuff. Also start to put in some bits about
Kristaps Dzonsons [Tue, 4 Jan 2011 10:29:41 +0000 (10:29 +0000)]
Add skeleton for -T[x]html tbl stuff.  Also start to put in some bits about
the up-coming version, although we're not quite there yet.

14 years agoMultiple man(7) .IP and .TP fixes started during p2k10:
Ingo Schwarze [Tue, 4 Jan 2011 01:23:18 +0000 (01:23 +0000)]
Multiple man(7) .IP and .TP fixes started during p2k10:

Affecting both -Tascii and -Thtml:
* The .IP HEAD uses the second argument as the width, not the last one.
* Only print the first .IP HEAD argument, not all but the last.

Affecting only -Tascii:
* The .IP and .TP HEADs must be printed without literal mode,
but literal mode must be restored afterwards.
* After the .IP and .TP bodies, we only want term_newln(), not
term_flushln(), or we would get two blank lines in literal mode.
* The .TP HEAD does not use TWOSPACE, just like .IP doesn't either.
* In literal mode, clear NOLPAD after each line, or subsequent lines
would get no indentation whatsoever.

Affecting only -Thtml:
* Only print next-line .TP children, instead of all but the first.

OK kristaps@ on the -Tascii part; and:
"Can you work this into man_html.c, too?"

14 years agoPartial cleanup of argument count validation in mdoc(7):
Ingo Schwarze [Mon, 3 Jan 2011 23:53:51 +0000 (23:53 +0000)]
Partial cleanup of argument count validation in mdoc(7):

* Do not segfault on empty .Db, .Rs, .Sm, and .St.
* Let check_count() really throw the requested level, not always ERROR.
* Downgrade most bad argument counts from ERROR to WARNING.
* And some related internal cleanup.

Looks fine to kristaps@.

Note that the macros using eerr_ge1() still need to be checked at a later
time; but as all the others are done, let's use what we already have.

14 years agoCalling a macro with fewer arguments than it is defined with is OK;
Ingo Schwarze [Mon, 3 Jan 2011 23:24:16 +0000 (23:24 +0000)]
Calling a macro with fewer arguments than it is defined with is OK;
the remaining ones default to the empty string, not to NULL.
Regression reported and fix tested by kristaps@.

14 years agoUnify roff macro argument parsing (in roff.c, roff_userdef()) and man macro
Ingo Schwarze [Mon, 3 Jan 2011 22:42:37 +0000 (22:42 +0000)]
Unify roff macro argument parsing (in roff.c, roff_userdef()) and man macro
argument parsing (in man_argv.c, man_args()), both having different bugs,
to use one common macro argument parser (in mandoc.c, mandoc_getarg()),
because from the point of view of roff, man macros are just roff macros,
hence their arguments are parsed in exactly the same way.

While doing so, fix these bugs:
 * Escaped blanks (i.e. those preceded by an odd number of backslashes)
   were mishandled as argument separators in unquoted arguments to
   user-defined roff macros.
 * Unescaped blanks preceded by an even number of backslashes were not
   recognized as argument separators in unquoted arguments to man macros.
 * Escaped backslashes (i.e. pairs of backslashes) were not reduced
   to single backslashes both in unquoted and quoted arguments both
   to user-defined roff macros and to man macros.
 * Escaped quotes (i.e. pairs of quotes inside quoted arguments) were
   not reduced to single quotes in man macros.

OK kristaps@

Note that mdoc macro argument parsing is yet another beast for no good
reason and is probably afflicted by similar bugs.  But i don't attempt
to fix that right now because it is intricately entangled with lots of
unrelated high-level mdoc(7) functionality, like delimiter handling and
column list phrase handling.  Disentagling that would waste too much
time now.

14 years agoRemove TODO for tbl.
Kristaps Dzonsons [Mon, 3 Jan 2011 21:53:46 +0000 (21:53 +0000)]
Remove TODO for tbl.

14 years agoSwitch on the `TS' documentation in roff.7. As per off-line discussion,
Kristaps Dzonsons [Mon, 3 Jan 2011 16:04:41 +0000 (16:04 +0000)]
Switch on the `TS' documentation in roff.7.  As per off-line discussion,
this may be moved to tbl.7, but for the time being, keep it in the
document as it's developed.

Also note that my handling of horizontal rules in layouts needs some
work.

14 years agoFor tbl: -man documents print an extra space before `TS' blocks.
Kristaps Dzonsons [Mon, 3 Jan 2011 15:30:25 +0000 (15:30 +0000)]
For tbl: -man documents print an extra space before `TS' blocks.

14 years agoAdd in support for number table cells that account for escapes and so
Kristaps Dzonsons [Mon, 3 Jan 2011 15:07:59 +0000 (15:07 +0000)]
Add in support for number table cells that account for escapes and so
on.  Note also that -Tps and -Tpdf, with these last two commits, produce
more readable output ("less crappy").

14 years agoClean up the tbl top-level printing code and document the parts of it.
Kristaps Dzonsons [Mon, 3 Jan 2011 14:57:04 +0000 (14:57 +0000)]
Clean up the tbl top-level printing code and document the parts of it.

14 years agoStart using term_strlen() instead of strlen(). tbl_term.c can now
Kristaps Dzonsons [Mon, 3 Jan 2011 14:45:59 +0000 (14:45 +0000)]
Start using term_strlen() instead of strlen().  tbl_term.c can now
properly handle embedded escapes when calculating its widths.  NOTE:
this doesn't yet apply to the decimal-point calculation.

14 years agoMake width calculations occur within tbl_term.c, not tbl.c. This allows
Kristaps Dzonsons [Mon, 3 Jan 2011 13:59:21 +0000 (13:59 +0000)]
Make width calculations occur within tbl_term.c, not tbl.c.  This allows
for front-ends to make decisions about widths, not the back-end.

To pull this off, first make each tbl_head contain a unique index value
(0 <= index < total tbl_head elements) and remove the tbl_calc() routine
from the back-end.

Then, when encountering the first tbl_span in the front-end, dynamically
create an array of configurations (termp_tbl) keyed on each tbl_head's
unique index value.  Construct the decimals and widths at this time,
then continue parsing as before.

The termp_tbl and indexes are required because we pass a const tbl AST
into the front-end.

14 years agoTiny edit required after MDOC_HALT change.
Kristaps Dzonsons [Mon, 3 Jan 2011 13:55:26 +0000 (13:55 +0000)]
Tiny edit required after MDOC_HALT change.

14 years agoMake sure we don't continue recursively parsing once we've exited with
Kristaps Dzonsons [Mon, 3 Jan 2011 13:54:02 +0000 (13:54 +0000)]
Make sure we don't continue recursively parsing once we've exited with
failure (this had caused some segfaults with the new assert() call in
MAN_HALT and MDOC_HALT).

14 years agoSame treatment for MAN_HALT as for MDOC_HALT.
Kristaps Dzonsons [Mon, 3 Jan 2011 11:31:26 +0000 (11:31 +0000)]
Same treatment for MAN_HALT as for MDOC_HALT.

14 years agoClarified the role of MDOC_HALT in libmdoc functions by having accessor
Kristaps Dzonsons [Mon, 3 Jan 2011 11:27:32 +0000 (11:27 +0000)]
Clarified the role of MDOC_HALT in libmdoc functions by having accessor
functions assert() if they're called after MDOC_HALT is set.

This makes more sense than returning 0 because this return value is used
for parse errors, not programme-flow errors, and it's inconsistent to
use the same value for both.  Plus, prior to this, I'd return 0 without
printing an error message, which would cause failure to go unreported to
the operator.

14 years agoFix table to print nicely (merging error). Also have -Ttree push out some
Kristaps Dzonsons [Sun, 2 Jan 2011 20:34:05 +0000 (20:34 +0000)]
Fix table to print nicely (merging error).  Also have -Ttree push out some
header stuff.

14 years agoTurn on -Tascii tbl printing. The output still has some issues---I'm
Kristaps Dzonsons [Sun, 2 Jan 2011 12:21:07 +0000 (12:21 +0000)]
Turn on -Tascii tbl printing.  The output still has some issues---I'm
not sure whether it's in the header calculation or term.c squashing
spaces or whatever, but let's get this in for general testing as soon as
possible.

14 years agoAdd some final bits necessary in the upcoming -Tascii tbl stuff.
Kristaps Dzonsons [Sun, 2 Jan 2011 12:04:23 +0000 (12:04 +0000)]
Add some final bits necessary in the upcoming -Tascii tbl stuff.

14 years agoChurn to get parts of 'struct tbl' visible from mandoc.h: rename the
Kristaps Dzonsons [Sun, 2 Jan 2011 10:10:57 +0000 (10:10 +0000)]
Churn to get parts of 'struct tbl' visible from mandoc.h: rename the
existing 'struct tbl' as 'struct tbl_node', then move all option stuff
into a 'struct tbl' in mandoc.h.

This conflicted with a structure in chars.c, which was renamed.

14 years agoMerge in the width, decimal, and positioning code for individual data rows
Kristaps Dzonsons [Sat, 1 Jan 2011 23:00:46 +0000 (23:00 +0000)]
Merge in the width, decimal, and positioning code for individual data rows
from tbl.bsd.lv.  This is more or less verbatim, less queue macros and also
a check for NULL layout.

This concludes the back-end parsing for a little while, as the front-end
display may now be configured.

14 years agoAdd a warning if a data cell has no layout. Also make -Ttree show this
Kristaps Dzonsons [Sat, 1 Jan 2011 22:27:08 +0000 (22:27 +0000)]
Add a warning if a data cell has no layout.  Also make -Ttree show this
with a little star next to the entry (yeah, this is mostly for testing).

14 years agoPlug in the "head" concept for tables. A tbl_head specifies the full
Kristaps Dzonsons [Sat, 1 Jan 2011 22:19:15 +0000 (22:19 +0000)]
Plug in the "head" concept for tables.  A tbl_head specifies the full
layout for each row, including vertical spacers.  One grabs the tbl_head
for a row and iterates through each entry, plugging data from the
tbl_span into the header as appropriate.

This is pulled in more or less verbatim from tbl.bsd.lv.  In fact, this
is verbatim except that lists macros are made into hard-coded lists (for
compatibility, as long-ago noted by joerg@).

14 years agoAdd bits for compilation on Mac.
Kristaps Dzonsons [Sat, 1 Jan 2011 21:23:01 +0000 (21:23 +0000)]
Add bits for compilation on Mac.

14 years agoMake some bit-flags into enums as they should be. Make printing of -Ttree
Kristaps Dzonsons [Sat, 1 Jan 2011 17:10:20 +0000 (17:10 +0000)]
Make some bit-flags into enums as they should be.  Make printing of -Ttree
tables a little bit smarter.

14 years agoMore checks for proper table exit.
Kristaps Dzonsons [Sat, 1 Jan 2011 16:18:39 +0000 (16:18 +0000)]
More checks for proper table exit.

14 years agoRaise an error if a table is closed without data.
Kristaps Dzonsons [Sat, 1 Jan 2011 16:10:40 +0000 (16:10 +0000)]
Raise an error if a table is closed without data.

14 years agoAdd documentation bits for libroff's new roff_span().
Kristaps Dzonsons [Sat, 1 Jan 2011 15:45:18 +0000 (15:45 +0000)]
Add documentation bits for libroff's new roff_span().

Add bits to remember tbl's invocation point.

Add ERROR class message if no data's in the table.

14 years agoMake -Ttree a bit more readable.
Kristaps Dzonsons [Sat, 1 Jan 2011 14:09:21 +0000 (14:09 +0000)]
Make -Ttree a bit more readable.

14 years agoMake -Ttree spit out table columns.
Kristaps Dzonsons [Sat, 1 Jan 2011 13:54:58 +0000 (13:54 +0000)]
Make -Ttree spit out table columns.

Add forgotten assignment of span to -man's TBL nodes.

14 years agoSwitch on tbl rows being added to the parse stream. Here we go!
Kristaps Dzonsons [Sat, 1 Jan 2011 13:37:40 +0000 (13:37 +0000)]
Switch on tbl rows being added to the parse stream.  Here we go!

14 years agoAdd -man support for tables. Like -mdoc, this consists of an
Kristaps Dzonsons [Sat, 1 Jan 2011 12:59:17 +0000 (12:59 +0000)]
Add -man support for tables.  Like -mdoc, this consists of an
external-facing function man_addspan() (this required shuffling around
the descope routine) and hooks elsewhere.

Also fixed mdoc.c's post-validation of tables.

14 years agoAdd basic -Ttree support for tables.
Kristaps Dzonsons [Sat, 1 Jan 2011 12:56:12 +0000 (12:56 +0000)]
Add basic -Ttree support for tables.

14 years agoAdd table processing structures to -mdoc. This consists of an
Kristaps Dzonsons [Sat, 1 Jan 2011 12:18:37 +0000 (12:18 +0000)]
Add table processing structures to -mdoc.  This consists of an
external-facing function mdoc_addspan(), then various bits to prohibit
printing and scanning (this requires some if's to be converted into
switch's).

14 years agoClean up {mdoc,man}_pmsg and vmsg invocations (ignore return values).
Kristaps Dzonsons [Sat, 1 Jan 2011 10:51:30 +0000 (10:51 +0000)]
Clean up {mdoc,man}_pmsg and vmsg invocations (ignore return values).

14 years agoExpose the parsed table API to the world and add accessors through the
Kristaps Dzonsons [Fri, 31 Dec 2010 18:19:43 +0000 (18:19 +0000)]
Expose the parsed table API to the world and add accessors through the
roff.h interface.

14 years agoPut parsed tables into a queue that's cleared at the end of parsing.
Kristaps Dzonsons [Fri, 31 Dec 2010 14:52:41 +0000 (14:52 +0000)]
Put parsed tables into a queue that's cleared at the end of parsing.
This completes the parsing phase of the new tbl implementation.

14 years agoAssign layout cells to parsed data. This follows primarily from
Kristaps Dzonsons [Thu, 30 Dec 2010 10:26:00 +0000 (10:26 +0000)]
Assign layout cells to parsed data.  This follows primarily from
tbl.bsd.lv, although it has been reimplemented.

14 years agoMove clean-up of parsed tbl nodes into the tbl_clear() function, called
Kristaps Dzonsons [Thu, 30 Dec 2010 09:34:06 +0000 (09:34 +0000)]
Move clean-up of parsed tbl nodes into the tbl_clear() function, called
once per invocation.

14 years agoPlan9 has a man(7) implementation that looks extremely archaic,
Ingo Schwarze [Thu, 30 Dec 2010 00:51:32 +0000 (00:51 +0000)]
Plan9 has a man(7) implementation that looks extremely archaic,
even more archaic than Solaris/Heirloom stuff; so that is quite
interesting from a perspective of compatibility and history.

14 years agoInitial check-in of table data-row processing. For the time being, this
Kristaps Dzonsons [Wed, 29 Dec 2010 16:44:23 +0000 (16:44 +0000)]
Initial check-in of table data-row processing.  For the time being, this
parses table data then throws it away immediately.  It does not yet try
to cross-check data rows against layout or anything.  This copied more
or less completely from tbl.bsd.lv.

14 years agoUse `Dl' instead of `D1' for code examples.
Kristaps Dzonsons [Wed, 29 Dec 2010 16:18:13 +0000 (16:18 +0000)]
Use `Dl' instead of `D1' for code examples.

14 years agoIn mdoc.7, don't use `D1' in place of `Dl' for code examples.
Kristaps Dzonsons [Wed, 29 Dec 2010 16:16:50 +0000 (16:16 +0000)]
In mdoc.7, don't use `D1' in place of `Dl' for code examples.

14 years agoUpdate (still-commented) manual bits for tbl.
Kristaps Dzonsons [Wed, 29 Dec 2010 15:21:34 +0000 (15:21 +0000)]
Update (still-commented) manual bits for tbl.

Also removed lots of superfluous switch cases by using tolower() and
handling only the lowercase keys.

14 years agoAdd handling for `T&', which restarts a table except for its options.
Kristaps Dzonsons [Wed, 29 Dec 2010 14:53:31 +0000 (14:53 +0000)]
Add handling for `T&', which restarts a table except for its options.

14 years agoMerge, with considerable changes, tbl.bsd.lv's layout-handling code.
Kristaps Dzonsons [Wed, 29 Dec 2010 14:38:14 +0000 (14:38 +0000)]
Merge, with considerable changes, tbl.bsd.lv's layout-handling code.

14 years agoInitial documentation for TBL, which for the time being is commented-out.
Kristaps Dzonsons [Wed, 29 Dec 2010 10:19:55 +0000 (10:19 +0000)]
Initial documentation for TBL, which for the time being is commented-out.

14 years agoWhack removed function from libroff.
Kristaps Dzonsons [Wed, 29 Dec 2010 01:18:23 +0000 (01:18 +0000)]
Whack removed function from libroff.

14 years agoSignificant update to options handling, which now departs almost
Kristaps Dzonsons [Wed, 29 Dec 2010 01:16:57 +0000 (01:16 +0000)]
Significant update to options handling, which now departs almost
completely with the BSD.lv code due to performance issues and flat-out
errors.

Performance issues: functions called per character.  Ugly.

Flat-out errors: disallowing "reserved" tokens as arguments to those
options accepting arguments.

Also added are two mandoc.h error codes for general tbl syntax errors
and for bad options.

14 years agoFix copyright email.
Kristaps Dzonsons [Tue, 28 Dec 2010 13:47:38 +0000 (13:47 +0000)]
Fix copyright email.

14 years agoAdding initial options processing (not hooked into parse yet). This is
Kristaps Dzonsons [Tue, 28 Dec 2010 13:46:07 +0000 (13:46 +0000)]
Adding initial options processing (not hooked into parse yet).  This is
more or less copied from tbl.bsd.lv and still needs integration with the
general mandoc framework, e.g., with error messages.

14 years agoTemporarily remove check for r->tbl at end of parse since we need the
Kristaps Dzonsons [Tue, 28 Dec 2010 10:59:07 +0000 (10:59 +0000)]
Temporarily remove check for r->tbl at end of parse since we need the
original parse point to generate a useful error message.

14 years agoFixed enum rofferr return value in tbl_read() (oops).
Kristaps Dzonsons [Tue, 28 Dec 2010 10:55:24 +0000 (10:55 +0000)]
Fixed enum rofferr return value in tbl_read() (oops).

14 years agoInitial tbl framework. Parse point is in libroff, which keeps a
Kristaps Dzonsons [Tue, 28 Dec 2010 10:51:03 +0000 (10:51 +0000)]
Initial tbl framework.  Parse point is in libroff, which keeps a
reference to a current tbl parse and routes ALL text into the tbl parse
after stripping reserved words and making block-level pre-processing
(e.g., `ig').  This is consistent with an analysis of embedded `TS/TE'
in manuals with sprinkled -mdoc, roff, and -man macros.

Fact of a parse is exposed to main.c by a return value (ROFF_TBL), which
will trigger main.c to add a foreign parsed body to the -mdoc or -man
parse stream.  This interface isn't in yet, but will follow the
parse-text functions in both libraries.  I put this login in main.c
because I don't want libroff calling directly into libmdoc or libman.

As a consequence, a parsed row can be pushed directly into any -mdoc or
-man context (put a `Bd -literal -offset indent' into a `TE/TS' block to
see why this is necessary).  It will then absorb formatting cues in the
front-ends.

A note on naming.  I decided on libroff.h instead of tbl.h because this
is purely within the roff layer.  Separate tbl implementations will
need, then, to interface with libroff.  This is "how it should be"
because tbl is tightly linked with roff in terms of `ds' and other
formatting macros, as well as, of course, special characters and other
roffisms.

14 years agoIn case an ID attribute is written in pieces, only protect the first
Ingo Schwarze [Mon, 27 Dec 2010 21:41:05 +0000 (21:41 +0000)]
In case an ID attribute is written in pieces, only protect the first
piece with a prepended 'x', not each piece, such that quoted and
unquoted .Sh, .Ss, and .Sx arguments are compatible with each other.
Fixing a bug reported by Nicolas Joly <njoly at NetBSD dot org>,
avoiding a regression in my first patch as pointed out by njoly as well.
"feel free to do so" kristaps@

14 years agoNote `Sx's connection to `Sh' and `Ss'.
Kristaps Dzonsons [Mon, 27 Dec 2010 20:39:46 +0000 (20:39 +0000)]
Note `Sx's connection to `Sh' and `Ss'.

14 years agoWhack MDOC_ACTED and MAN_ACTED (these no longer exist).
Kristaps Dzonsons [Sun, 26 Dec 2010 14:44:13 +0000 (14:44 +0000)]
Whack MDOC_ACTED and MAN_ACTED (these no longer exist).

14 years agopod2man re-writes this and that using `tr', which we don't implement. Noted
Kristaps Dzonsons [Sun, 26 Dec 2010 14:38:10 +0000 (14:38 +0000)]
pod2man re-writes this and that using `tr', which we don't implement.  Noted
by Andreas Vogele.

14 years agoAs pointed out by schwarze@, %T/%J renders with a normal double-quote, not
Kristaps Dzonsons [Sat, 25 Dec 2010 23:27:50 +0000 (23:27 +0000)]
As pointed out by schwarze@, %T/%J renders with a normal double-quote, not
the fancy double-quote.

14 years agoImplement schwarze@'s much more elegant version of my %T/%J fix.
Kristaps Dzonsons [Sat, 25 Dec 2010 23:25:53 +0000 (23:25 +0000)]
Implement schwarze@'s much more elegant version of my %T/%J fix.

14 years agoSpecifying both %T and %J in an `Rs' block causes the title to be quoted
Kristaps Dzonsons [Sat, 25 Dec 2010 13:50:37 +0000 (13:50 +0000)]
Specifying both %T and %J in an `Rs' block causes the title to be quoted
instead of underlined.  This only happens in -Tascii, as -T[x]html both
underlines and italicises.

14 years agoWhack superfluous font-family in mdocml's www style.css. Noted by
Kristaps Dzonsons [Fri, 24 Dec 2010 22:51:13 +0000 (22:51 +0000)]
Whack superfluous font-family in mdocml's www style.css.  Noted by
Anthony J. Bentley.  Thanks!

14 years agoMake `Fo' use a B instead of SPAN (left-over).
Kristaps Dzonsons [Fri, 24 Dec 2010 22:47:37 +0000 (22:47 +0000)]
Make `Fo' use a B instead of SPAN (left-over).

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.