CVS log for mandoc/tree.c

[BACK] Up to [cvsweb.bsd.lv] / mandoc

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.89 / (download) - annotate - [select for diffs], Wed Apr 8 11:56:04 2020 UTC (3 months, 4 weeks ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.88: +39 -49 lines
Diff to previous 1.88 (colored)

Use a separate node->tag attribute rather than abusing the node->string
attribute for the purpose.  No functional change intended.
The purpose is to make it possible to later attach tags to text nodes.

Revision 1.88 / (download) - annotate - [select for diffs], Tue Apr 7 22:56:02 2020 UTC (3 months, 4 weeks ago) by schwarze
Branch: MAIN
Changes since 1.87: +5 -2 lines
Diff to previous 1.87 (colored)

Separate the place to put the <a href> permalink (now marked
with NODE_HREF) from the target element of the link (still marked
with NODE_ID).  In many cases, use this to move the target to the
beginning of the paragraph, such that readers don't get dropped
into the middle of a sentence.

Revision 1.87 / (download) - annotate - [select for diffs], Fri Mar 13 15:32:29 2020 UTC (4 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.86: +10 -2 lines
Diff to previous 1.86 (colored)

Split tagging into a validation part including prioritization
in tag.{h,c} and {mdoc,man}_validate.c
and into a formatting part including command line argument checking
in term_tag.{h,c}, html.c, and {mdoc|man}_{term|html}.c.

Immediate functional benefits include:
* Improved prioritization of automatic tags for .Em and .Sy.
* Avoiding bogus automatic tags when .Em, .Fn, or .Sy are explicitly tagged.
* Explicit tagging of .Er and .Fl now works in HTML output.
* Automatic tagging of .IP and .TP now works in HTML output.
But mainly, this patch provides clean earth to build further improvements on.

Technical changes:
* Main program: Write a tag file for ASCII and UTF-8 output only.
* All formatters: There is no more need to delay writing the tags.
* mdoc(7)+man(7) formatters: No more need for elaborate syntax tree inspection.
* HTML formatter: If available, use the "string" attribute as the tag.
* HTML formatter: New function to write permalinks, to reduce code duplication.

Style cleanup in the vicinity while here:
* mdoc(7) terminal formatter: To set up bold font for children,
defer to termp_bold_pre() rather than calling term_fontpush() manually.
* mdoc(7) terminal formatter: Garbage collect some duplicate functions.
* mdoc(7) HTML formatter: Unify <code> handling, delete redundant functions.
* Where possible, use switch statements rather than if cascades.
* Get rid of some more Yoda notation.

The necessity for such changes was first discussed with kn@, but i didn't
bother him with a request to review the resulting -673/+782 line patch.

Revision 1.86 / (download) - annotate - [select for diffs], Thu Feb 27 21:43:45 2020 UTC (5 months, 1 week ago) by schwarze
Branch: MAIN
Changes since 1.85: +8 -1 lines
Diff to previous 1.85 (colored)

Fully support explicit tagging of .Sh and .Ss.
This fixes the offset of two lines in terminal output
and this improves HTML output by putting the id= attribute
and <a> element into the respective <h1> or <h2> element rather
than writing an additional <mark> element.

To that end, introduce node flags NODE_ID (to make the node a link
target, for example by writing an HTML id= attribute or by calling
tag_put()) and NODE_HREF (to make the node a link source, used only
in HTML output, used only to write an <a class="permalink"> element).

In particular:
* In the validator, generalize the concept of the "next node"
such that it also works before .Sh and .Ss.
* If the first argument of .Tg is empty, don't forget to complain
if there are additional arguments, which will be ignored.
* In the terminal formatter, support writing of explicit tags
for all kinds of nodes, not just for .Tg.
* In deroff(), allow nodes to have an explicit string representation
even when they aren't text nodes.  Use this for explicitly tagged
section headers.  Suprisingly, this is sufficient to make HTML
output work, without explicit code changes in the HTML formatter.
* In syntax tree output, display NODE_ID and NODE_HREF.

Revision 1.85 / (download) - annotate - [select for diffs], Sat Jan 11 16:03:42 2020 UTC (6 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.84: +95 -12 lines
Diff to previous 1.84 (colored)

Print more tbl(7) details to help debugging:
column numbers, options, layout rows, cell types, cell modifiers.

Revision 1.84 / (download) - annotate - [select for diffs], Tue Jan 1 05:56:34 2019 UTC (19 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5
Changes since 1.83: +16 -12 lines
Diff to previous 1.83 (colored)

display the NODE_NOFILL flag indicating no-fill mode

Revision 1.83 / (download) - annotate - [select for diffs], Sun Dec 30 00:49:56 2018 UTC (19 months, 1 week ago) by schwarze
Branch: MAIN
Changes since 1.82: +6 -6 lines
Diff to previous 1.82 (colored)

Cleanup, no functional change:

The struct roff_man used to be a bad mixture of internal parser
state and public parsing results.  Move the public results to the
parsing result struct roff_meta, which is already public.  Move the
rest of struct roff_man to the parser-internal header roff_int.h.

Since the validators need access to the parser state, call them
from the top level parser during mparse_result() rather than from
the main programs, also reducing code duplication.

This keeps parser internal state out of thee main programs (five
in mandoc portable) and out of eight formatters.

Revision 1.82 / (download) - annotate - [select for diffs], Thu Dec 13 05:23:38 2018 UTC (19 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.81: +2 -1 lines
Diff to previous 1.81 (colored)

Cleanup, no functional change:
No need to expose the eqn(7) syntax tree data structures everywhere.
Move them to their own include file, "eqn.h".
While here, delete the unused enum eqn_pilet.

Revision 1.81 / (download) - annotate - [select for diffs], Wed Dec 12 21:54:35 2018 UTC (19 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.80: +2 -1 lines
Diff to previous 1.80 (colored)

Cleanup, no functional change:
No need to expose the tbl(7) syntax tree data structures everywhere.
Move them to their own include file, "tbl.h", and improve comments.

Revision 1.80 / (download) - annotate - [select for diffs], Sun Nov 25 19:24:20 2018 UTC (20 months, 1 week ago) by schwarze
Branch: MAIN
Changes since 1.79: +32 -26 lines
Diff to previous 1.79 (colored)

In tbl(7) -T html output,
span cells horizontally and vertically as requested by the layout.
Does not handle spans requested in the data section yet.

To be able to do this, record the number of rows spanned
in the first data cell (struct tbl_dat) of a vertical span.

Missing feature reported by Pali dot Rohar at gmail dot com.

Revision 1.79 / (download) - annotate - [select for diffs], Tue Aug 14 01:27:48 2018 UTC (23 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.78: +3 -1 lines
Diff to previous 1.78 (colored)

support tail arguments on the .ME and .UE macros,
used for example in the ditroff(7) manual of the groff package

Revision 1.78 / (download) - annotate - [select for diffs], Wed Apr 11 17:11:13 2018 UTC (2 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_4
Changes since 1.77: +10 -2 lines
Diff to previous 1.77 (colored)

preserve comments before .Dd when converting mdoc(7) to man(7)
with mandoc -Tman; suggested by Thomas Klausner <wiz at NetBSD>

Revision 1.77 / (download) - annotate - [select for diffs], Sat Jul 8 14:51:05 2017 UTC (3 years ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_3, VERSION_1_14_2
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored)

1. Eliminate struct eqn, instead use the existing members
of struct roff_node which is allocated for each equation anyway.
2. Do not keep a list of equation parsers, one parser is enough.
Minus fifty lines of code, no functional change.

Revision 1.76 / (download) - annotate - [select for diffs], Fri Jul 7 19:39:30 2017 UTC (3 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.75: +1 -4 lines
Diff to previous 1.75 (colored)

garbage collect unused enum member EQN_ROOT

Revision 1.75 / (download) - annotate - [select for diffs], Wed Jul 5 15:03:27 2017 UTC (3 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.74: +1 -2 lines
Diff to previous 1.74 (colored)

The EQN_LISTONE box type is pointless.
Simplify by just using EQN_LIST with expectargs = 1.
Noticed while investigating a bug report from bentley@.
No functional change.

Revision 1.74 / (download) - annotate - [select for diffs], Mon Apr 24 23:06:18 2017 UTC (3 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.73: +7 -7 lines
Diff to previous 1.73 (colored)

Continue parser unification:
* Make enum rofft an internal interface as enum roff_tok in "roff.h".
* Represent mdoc and man macros in enum roff_tok.
* Make TOKEN_NONE a proper enum value and use it throughout.
* Put the prologue macros first in the macro tables.
* Unify mdoc_macroname[] and man_macroname[] into roff_name[].

Revision 1.73 / (download) - annotate - [select for diffs], Fri Feb 10 15:45:28 2017 UTC (3 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_1, VERSION_1_13
Changes since 1.72: +3 -1 lines
Diff to previous 1.72 (colored)

In -Ttree output mode, show the BROKEN node flag and
provide a -Onoval output option to show the unvalidated tree.

Revision 1.72 / (download) - annotate - [select for diffs], Thu Jan 12 17:29:33 2017 UTC (3 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.71: +28 -4 lines
Diff to previous 1.71 (colored)

show meta data for -Ttree output

Revision 1.71 / (download) - annotate - [select for diffs], Tue Jan 10 13:47:00 2017 UTC (3 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.70: +7 -7 lines
Diff to previous 1.70 (colored)

unify names of AST node flags; no change of cpp output

Revision 1.70 / (download) - annotate - [select for diffs], Tue Jan 10 12:53:08 2017 UTC (3 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.69: +5 -1 lines
Diff to previous 1.69 (colored)

Introduce flags NODE_NOSRC and NODE_NOPRT for AST nodes.
Use them to mark generated nodes and nodes that shall not produce output.
Let -Ttree output mode display these new flags.
Use NODE_NOSRC for .Ar, .Mt, and .Pa default arguments.
Use NODE_NOPRT for .Dd, .Dt, and .Os.

These will help to make handling of text production macros more rigorous.

Revision 1.69 / (download) - annotate - [select for diffs], Mon Oct 12 00:08:16 2015 UTC (4 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_4
Changes since 1.68: +1 -6 lines
Diff to previous 1.68 (colored)

To make the code more readable, delete 283 /* FALLTHROUGH */ comments
that were right between two adjacent case statement.  Keep only
those 24 where the first case actually executes some code before
falling through to the next case.

Revision 1.68 / (download) - annotate - [select for diffs], Sat Sep 26 12:55:16 2015 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.67: +18 -8 lines
Diff to previous 1.67 (colored)

Show the flags MDOC_DELIMO, MDOC_DELIMC, MDOC_EOS, and MAN_EOS.
Drop the "block-" prefixes from the node type names.

Revision 1.67 / (download) - annotate - [select for diffs], Sat Sep 26 00:54:04 2015 UTC (4 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.66: +1 -5 lines
Diff to previous 1.66 (colored)

/* NOTREACHED */ after abort() is silly, delete it

Revision 1.66 / (download) - annotate - [select for diffs], Sat Apr 18 17:53:21 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.65: +3 -3 lines
Diff to previous 1.65 (colored)

Delete the wrapper functions mdoc_meta(), man_meta(), mdoc_node(),
man_node() from the mandoc(3) semi-public interface and the internal
wrapper functions print_mdoc() and print_man() from the HTML formatters.
Minus 60 lines of code, no functional change.

Revision 1.65 / (download) - annotate - [select for diffs], Sat Apr 18 16:06:41 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.64: +3 -3 lines
Diff to previous 1.64 (colored)

Replace the structs mdoc and man by a unified struct roff_man.
Almost completely mechanical, no functional change.
Written on the train from Exeter to London returning from p2k15.

Revision 1.64 / (download) - annotate - [select for diffs], Thu Apr 2 22:48:18 2015 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.63: +5 -5 lines
Diff to previous 1.63 (colored)

Second step towards parser unification:
Replace struct mdoc_node and struct man_node by a unified struct roff_node.
To be able to use the tok member for both mdoc(7) and man(7) without
defining all the macros in roff.h, sacrifice a tiny bit of type safety
and make tok an int rather than an enum.
Almost mechanical, no functional change.
Written on the Eurostar from Bruxelles to London on the way to p2k15.

Revision 1.63 / (download) - annotate - [select for diffs], Thu Apr 2 21:36:51 2015 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.62: +40 -39 lines
Diff to previous 1.62 (colored)

First step towards parser unification:
Replace enum mdoc_type and enum man_type by a unified enum roff_type.
Almost mechanical, no functional change.
Written on the ICE train from Frankfurt to Bruxelles on the way to p2k15.

Revision 1.62 / (download) - annotate - [select for diffs], Thu Feb 5 00:14:13 2015 UTC (5 years, 6 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_3
Changes since 1.61: +2 -5 lines
Diff to previous 1.61 (colored)

Simplify by deleting the "lastline" member of struct mdoc_node.
Minus one struct member, minus 17 lines of code, no functional change.

Revision 1.61 / (download) - annotate - [select for diffs], Tue Feb 3 18:37:59 2015 UTC (5 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.60: +21 -13 lines
Diff to previous 1.60 (colored)

reduce indentation for better readability

Revision 1.60 / (download) - annotate - [select for diffs], Fri Nov 28 05:51:32 2014 UTC (5 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_2
Changes since 1.59: +1 -6 lines
Diff to previous 1.59 (colored)

Simplify by making many functions in the man(7) parser void,
and some cleanup; no functional change, minus 70 lines.

Revision 1.59 / (download) - annotate - [select for diffs], Mon Oct 20 01:43:48 2014 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.58: +13 -11 lines
Diff to previous 1.58 (colored)

show the {MDOC,MAN}_EQN node, it contains interesting information,
in particular line and column numbers and flags;
but hide the uninteresting EQN_ROOT box

Revision 1.58 / (download) - annotate - [select for diffs], Fri Oct 10 15:26:29 2014 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

sync Copyright years after merge to OpenBSD; no code change

Revision 1.57 / (download) - annotate - [select for diffs], Fri Oct 10 12:19:25 2014 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.56: +28 -9 lines
Diff to previous 1.56 (colored)

Make eqn(7) -Ttree output more useful:
* Reduce noise by not printing default attributes.
* Print missing "top" and "bottom" attributes.
* Print mnemonics, not code numbers for expression positions.
* Do not print unused "pile" attribute.

Revision 1.56 / (download) - annotate - [select for diffs], Fri Oct 10 08:44:24 2014 UTC (5 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.55: +8 -3 lines
Diff to previous 1.55 (colored)

Re-write of eqn(7) parser and MathML output.
This adds parser-level support for the grammar described by the eqn
second-edition technical paper, "Typesetting Mathematics — User's Guide"
(Kernighan, Cherry).
The reason for this re-write is the grouping rules, which were not
possible given the existing implementation.
The re-write has also considerably simplified the HTML (and, if it ever
is completed, terminal) front-end.

Revision 1.55 / (download) - annotate - [select for diffs], Sun Sep 28 11:32:33 2014 UTC (5 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.54: +3 -3 lines
Diff to previous 1.54 (colored)

Make eqn tree output a bit more useful.

Revision 1.54 / (download) - annotate - [select for diffs], Sun Aug 10 23:54:41 2014 UTC (5 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_4, VERSION_1_12
Changes since 1.53: +3 -3 lines
Diff to previous 1.53 (colored)

Get rid of HAVE_CONFIG_H, it is always defined; idea from libnbcompat.
Include <sys/types.h> where needed, it does not belong in config.h.
Remove <stdio.h> from config.h; if it is missing somewhere, it should
be added, but i cannot find a *.c file where it is missing.

Revision 1.53 / (download) - annotate - [select for diffs], Wed Jul 2 07:10:38 2014 UTC (6 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_1
Changes since 1.52: +4 -4 lines
Diff to previous 1.52 (colored)

Change column display in -Ttree to be 1-based instead of 0-based
such that column numbers agree between messages and -Ttree.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Apr 20 16:46:05 2014 UTC (6 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.51: +54 -59 lines
Diff to previous 1.51 (colored)

KNF: case (FOO):  ->  case FOO:, remove /* LINTED */ and /* ARGSUSED */,
remove trailing whitespace and blanks before tabs, improve some indenting;
no functional change

Revision 1.51 / (download) - annotate - [select for diffs], Sat Mar 8 15:50:41 2014 UTC (6 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.50: +6 -3 lines
Diff to previous 1.50 (colored)

To find out whether .TP head arguments are same-line or next-line arguments,
use the MAN_LINE flag instead of the man_node line member.
This is required such that user-defined macros wrapping .TP work correctly.

Issue found by Havard Eidnes in Tcl_NewStringObj(3), reported via
the NetBSD bug tracking system and Thomas Klausner <wiz at NetBSD>.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Dec 24 19:11:46 2013 UTC (6 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_3
Changes since 1.49: +6 -2 lines
Diff to previous 1.49 (colored)

When deciding whether two consecutive macros are on the same input line,
we have to compare the line where the first one *ends* (not where it begins)
to the line where the second one starts.
This fixes the bug that .Bk allowed output line breaks right after block
macros spanning more than one input line, even when the next macro follows
on the same line.

Revision 1.49 / (download) - annotate - [select for diffs], Sun Sep 15 17:33:57 2013 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_2
Changes since 1.48: +6 -3 lines
Diff to previous 1.48 (colored)

For some mdoc(7) macros, it is (unfortunately) semantically significant
whether they are the first macro on the line or called by another macro.
To help debugging, indicate this property "first macro on a new input line"
by prefixing an asterisk to the line number in -Ttree output.

Revision 1.48 / (download) - annotate - [select for diffs], Sat May 18 17:08:43 2013 UTC (7 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.47: +3 -8 lines
Diff to previous 1.47 (colored)

Remove the variable sz because it's invariantly == 0,
along with the dead code testing whether it's positive.
Reported by Ulrich Spoerlein <uqs@spoerlein.net>,
found by Coverity Scan CID 975717.

While here, remove the now unused **params array as well,
which Coverity apparently missed, at least it wasn't reported...

Revision 1.47 / (download) - annotate - [select for diffs], Sun Sep 18 14:14:15 2011 UTC (8 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_1, VERSION_1_12_0
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

forgotten Copyright bumps; no code change
found while syncing to OpenBSD

Revision 1.46 / (download) - annotate - [select for diffs], Sat Jul 23 12:01:54 2011 UTC (9 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_7, VERSION_1_11_6, VERSION_1_11_5
Changes since 1.45: +18 -23 lines
Diff to previous 1.45 (colored)

Add matrix support.  Also remove "above" notion, as all elements in a
list are delimited by their "aboveness" and it's superfluous.

Revision 1.45 / (download) - annotate - [select for diffs], Fri Jul 22 09:57:04 2011 UTC (9 years ago) by kristaps
Branch: MAIN
Changes since 1.44: +10 -1 lines
Diff to previous 1.44 (colored)

Give lists their own eqn function.

Revision 1.44 / (download) - annotate - [select for diffs], Thu Jul 21 23:30:39 2011 UTC (9 years ago) by kristaps
Branch: MAIN
Changes since 1.43: +8 -5 lines
Diff to previous 1.43 (colored)

Complete eqn.7 parsing.  Features all productions from the original 1975
CACM paper in an LR(1) parse (1 -> eqn_rewind()).  Right now the code is
a little jungly, but will clear up as I consolidate parse components.
The AST structure will also be cleaned up, as right now it's pretty ad
hoc (this won't change the parse itself).  I added the mandoc_strndup()
function will here.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Jul 21 15:21:13 2011 UTC (9 years ago) by kristaps
Branch: MAIN
Changes since 1.42: +8 -4 lines
Diff to previous 1.42 (colored)

Support `size' constructs in eqn.7.  Generalise mandoc_strontou to this
effect.

Revision 1.42 / (download) - annotate - [select for diffs], Thu Jul 21 14:13:00 2011 UTC (9 years ago) by kristaps
Branch: MAIN
Changes since 1.41: +7 -7 lines
Diff to previous 1.41 (colored)

Full support for eqn positionals (above, over, sup, sub, etc.).

Revision 1.41 / (download) - annotate - [select for diffs], Thu Jul 21 13:37:04 2011 UTC (9 years ago) by kristaps
Branch: MAIN
Changes since 1.40: +7 -4 lines
Diff to previous 1.40 (colored)

Add eqn subexpression fonts.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Jul 21 13:18:24 2011 UTC (9 years ago) by kristaps
Branch: MAIN
Changes since 1.39: +4 -4 lines
Diff to previous 1.39 (colored)

Add support for markers.  These decorate the last box: see eqn.7.

Revision 1.39 / (download) - annotate - [select for diffs], Thu Jul 21 12:30:44 2011 UTC (9 years ago) by kristaps
Branch: MAIN
Changes since 1.38: +9 -4 lines
Diff to previous 1.38 (colored)

Support nested `{, }' subexpressions in eqn.  Document in code.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Jul 21 11:34:53 2011 UTC (9 years ago) by kristaps
Branch: MAIN
Changes since 1.37: +45 -25 lines
Diff to previous 1.37 (colored)

Flip eqn into using parsed nodes.  I've temporarily disabled printing
these in the front-ends except for -Ttree, which will display the parsed
tree.

While here, fix that quoted strings aren't scanned for replacement parts.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Mar 23 12:33:01 2011 UTC (9 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_4, VERSION_1_11_3, VERSION_1_11_2, VERSION_1_11_1
Changes since 1.36: +6 -1 lines
Diff to previous 1.36 (colored)

Add MAN_TAIL, which will be used by `UE' (forthcoming) and needs to be
used for `RE'.

Revision 1.36 / (download) - annotate - [select for diffs], Wed Feb 9 09:18:15 2011 UTC (9 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_10
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

Allow -man to process EQN as well.  Also fix a segfault in missing case
statements in the post-handler for EQN in -mdoc and -man.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Feb 9 09:05:52 2011 UTC (9 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

Allow EQN data to be pushed down into libmdoc via mdoc_addeqn().  Only
the adding itself is implemented; equation data is not yet shown.

Revision 1.34 / (download) - annotate - [select for diffs], Sun Feb 6 22:02:58 2011 UTC (9 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.33: +4 -5 lines
Diff to previous 1.33 (colored)

Let the line-number of a tbl_span be remembered.

Revision 1.33 / (download) - annotate - [select for diffs], Sun Feb 6 21:44:36 2011 UTC (9 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.32: +13 -1 lines
Diff to previous 1.32 (colored)

Add initial libmdoc and libman top-most machinery for accepting TBL
directives.  For now this will just ignore them (except for -Ttree,
which just notes that an EQN's been accepted).

Revision 1.32 / (download) - annotate - [select for diffs], Mon Jan 10 14:40:30 2011 UTC (9 years, 6 months ago) by kristaps
Branch: MAIN
Changes since 1.31: +7 -2 lines
Diff to previous 1.31 (colored)

First, make extra data cells be thrown away.  This makes "dp->layout"
always hold, which cleans up the table stuff a bit.

Second, set a "spans" value per data cell consisting of the number of
skipped TBL_CELL_SPAN layout cells.

Third, make tbl_term.c understand how to skip over spanned sections when
iterating over the header queue.

What remains is to calculate the widths of spanned cells.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Jan 3 13:59:21 2011 UTC (9 years, 7 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_9
Changes since 1.30: +1 -14 lines
Diff to previous 1.30 (colored)

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.

Revision 1.30 / (download) - annotate - [select for diffs], Sun Jan 2 20:34:05 2011 UTC (9 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.29: +29 -12 lines
Diff to previous 1.29 (colored)

Fix table to print nicely (merging error).  Also have -Ttree push out some
header stuff.

Revision 1.29 / (download) - annotate - [select for diffs], Sat Jan 1 22:27:08 2011 UTC (9 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.28: +2 -2 lines
Diff to previous 1.28 (colored)

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).

Revision 1.28 / (download) - annotate - [select for diffs], Sat Jan 1 17:10:20 2011 UTC (9 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.27: +44 -16 lines
Diff to previous 1.27 (colored)

Make some bit-flags into enums as they should be.  Make printing of -Ttree
tables a little bit smarter.

Revision 1.27 / (download) - annotate - [select for diffs], Sat Jan 1 14:09:21 2011 UTC (9 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.26: +3 -2 lines
Diff to previous 1.26 (colored)

Make -Ttree a bit more readable.

Revision 1.26 / (download) - annotate - [select for diffs], Sat Jan 1 13:54:58 2011 UTC (9 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.25: +47 -19 lines
Diff to previous 1.25 (colored)

Make -Ttree spit out table columns.

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

Revision 1.25 / (download) - annotate - [select for diffs], Sat Jan 1 12:56:12 2011 UTC (9 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.24: +13 -1 lines
Diff to previous 1.24 (colored)

Add basic -Ttree support for tables.

Revision 1.24 / (download) - annotate - [select for diffs], Wed Jul 7 15:04:54 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_8, VERSION_1_10_7, VERSION_1_10_6, VERSION_1_10_5_PREPDF, VERSION_1_10_5, VERSION_1_10_4
Changes since 1.23: +1 -2 lines
Diff to previous 1.23 (colored)

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.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Jun 29 19:20:38 2010 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.22: +5 -2 lines
Diff to previous 1.22 (colored)

Support for badly nested blocks, written around the time of
the Rostock mandoc hackathon and tested and polished since,
supporting constructs like:

.Ao Bo    Ac    Bc        (exp breaking exp)
.Aq Bo    eol   Bc        (imp breaking exp)
.Ao Bq    Ac    eol       (exp breaking imp)
.Ao Bo So Bc    Ac  Sc    (double break, inner before outer)
.Ao Bo So Ac    Bc  Sc    (double break, outer before inner)
.Ao Bo    Ac So Bc  Sc    (broken breaker)
.Ao Bo So Bc Do Ac  Sc Dc (broken double breaker)

There are still two known issues which are tricky:

1) Breaking two identical explicit blocks (Ao Bo Bo Ac or Aq Bo Bo eol)
fails outright, triggering a bogus syntax error.
2) Breaking a block by two identical explicit blocks (Ao Ao Bo Ac Ac Bc
or Ao Ao Bq Ac Ac eol) still has a minor rendering error left:
"<ao1 <ao2 [bo ac2> ac1> bc]>" should not have the final ">".

We can fix these later in the tree, let's not grow this diff too large.

"get it in" kristaps@

Revision 1.22 / (download) - annotate - [select for diffs], Sat Jun 26 15:36:37 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_3
Changes since 1.21: +2 -1 lines
Diff to previous 1.21 (colored)

Churn-ish check-in getting mdoc_parseln() and man_parseln() to accept a
const struct regset pointer.  No functionality.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Jun 19 20:46:28 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_2
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

Churn as I finish email address migration kth.se -> bsd.lv.

Revision 1.20 / (download) - annotate - [select for diffs], Mon May 17 22:11:42 2010 UTC (10 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_1
Changes since 1.19: +2 -1 lines
Diff to previous 1.19 (colored)

Enable the unified error/warning enumeration in mandoc.h that's
stringified in main.c.

Allow `An' to handle an argument and child (with a warning).

Allow `Rv' and `Ex' to work without a prior `Nm' as groff does (with a
warning).

Allow inconsistent column syntax to only raise a warning.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jan 1 17:14:31 2010 UTC (10 years, 7 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_25, VERSION_1_9_24, VERSION_1_9_23, VERSION_1_9_22, VERSION_1_9_21, VERSION_1_9_20, VERSION_1_9_19, VERSION_1_9_18, VERSION_1_9_17, VERSION_1_9_16, VERSION_1_9_15-pre2, VERSION_1_9_15
Changes since 1.18: +5 -1 lines
Diff to previous 1.18 (colored)

Big check-in of compatibility layer.  This should work on most major architectures. Thanks to Joerg Sonnenberger.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Oct 30 18:53:09 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_15-pre1, VERSION_1_9_14, VERSION_1_9_13, VERSION_1_9_12
Changes since 1.17: +1 -2 lines
Diff to previous 1.17 (colored)

More lint fixes.
Removed err.h from inclusions (less main.c--still in progress).

Revision 1.17 / (download) - annotate - [select for diffs], Mon Oct 26 17:05:44 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.16: +2 -1 lines
Diff to previous 1.16 (colored)

Added time.h to various files for FreeBSD compilation (thanks Ulrich Sporlein).

Revision 1.16 / (download) - annotate - [select for diffs], Tue Oct 13 10:57:25 2009 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_9, VERSION_1_9_11, VERSION_1_9_10
Changes since 1.15: +2 -1 lines
Diff to previous 1.15 (colored)

Moved output definitions into main.h.
Pushed terminal_{mdoc,man} into {mdoc,man}_term.c.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Sep 16 09:41:24 2009 UTC (10 years, 10 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_8, VERSION_1_9_7, VERSION_1_9_6, VERSION_1_9_5
Changes since 1.14: +3 -5 lines
Diff to previous 1.14 (colored)

Made tree/term/out() functions return void.
Put err() functions back into front-ends (no use making it needlessly complex).

Revision 1.14 / (download) - annotate - [select for diffs], Thu Aug 13 11:45:29 2009 UTC (10 years, 11 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_2, VERSION_1_9_1, VERSION_1_9_0
Changes since 1.13: +16 -1 lines
Diff to previous 1.13 (colored)

Significant overhaul in libman.  Macros are now block- and line-scoped (with
next-line scope extensions possible).  man.7 reflects block and line scoping,
and also includes a REFERENCE section that will be used as a template for the
big mdoc reference.  Many fixes in next-line behaviour for both inline and
block macros.  Added some macros for compatibility (from me.7).  Corrected
quoted-literal handling for libman.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jun 10 20:18:44 2009 UTC (11 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_8_5, VERSION_1_8_4, VERSION_1_8_3, VERSION_1_8_2, VERSION_1_8_1, VERSION_1_8_0, VERSION_1_7_24, VERSION_1_7_23, VERSION_1_7_22, VERSION_1_7_21, VERSION_1_7_20, VERSION_1_7_19, VERSION_1_7_17, VERSION_1_7_16, VERSION_1_7_15, VERSION_1_7_14
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

Fixed license email address.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Apr 12 19:45:26 2009 UTC (11 years, 3 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_13
Changes since 1.11: +10 -12 lines
Diff to previous 1.11 (colored)

Using proper license template (const).

Revision 1.11 / (download) - annotate - [select for diffs], Fri Apr 3 11:08:39 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_12, VERSION_1_7_10, OPENBSD_CHECKIN
Changes since 1.10: +21 -15 lines
Diff to previous 1.10 (colored)

Proper resetting of memory.
Array boundary fixed (-W).

Revision 1.10 / (download) - annotate - [select for diffs], Mon Mar 23 15:20:51 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_5
Changes since 1.9: +59 -7 lines
Diff to previous 1.9 (colored)

-man printing linked to -Ttree.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Mar 19 16:20:37 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_6_5, VERSION_1_6_2
Changes since 1.8: +2 -1 lines
Diff to previous 1.8 (colored)

NetBSD lintified.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Mar 19 16:17:27 2009 UTC (11 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.7: +36 -31 lines
Diff to previous 1.7 (colored)

Split mdocterm.c -> main.c terminal.c.
Abstracted output with -T selector (default ascii).
Name change: mdocterm -> mandoc.
Re-imported tree with -Ttree.

Revision 1.7, Mon Feb 23 07:09:13 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_5_1, VERSION_1_3_6, VERSION_1_3_15
Changes since 1.6: +1 -1 lines
FILE REMOVED

termact.c -> term.c
term.c -> mdocterm.c
tree.c -> mdoctree.c
Fixed/finished mmain.h.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Feb 21 21:00:06 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.5: +2 -3 lines
Diff to previous 1.5 (colored)

Split mdocml -> mdocterm, mdoctree (new manuals, etc.).
Escape-recognition term.c.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Feb 20 23:35:36 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.4: +4 -2 lines
Diff to previous 1.4 (colored)

More flesh in terminal-encoder.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Feb 20 11:04:23 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.3: +0 -0 lines
Diff to previous 1.3 (colored)

Re-added tree.c (for now).
Added initial terminal-output filter (term.c).

Revision 1.3, Fri Feb 20 07:45:41 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.2: +1 -1 lines
FILE REMOVED

Removed (moving) tree.c.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Jan 17 14:04:25 2009 UTC (11 years, 6 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_2_0
Changes since 1.1: +39 -9 lines
Diff to previous 1.1 (colored)

Separating output filters.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Jan 16 15:58:50 2009 UTC (11 years, 6 months ago) by kristaps
Branch: MAIN

Initial separation of tree/mdocml.1.
Finished mdoc.3.
Broken build: mdocml.c.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb