OpenBSD CVS

CVS log for src/usr.bin/mandoc/eqn_html.c


[BACK] Up to [local] / src / usr.bin / mandoc

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.15 / (download) - annotate - [select for diffs], Sun Mar 17 18:20:07 2019 UTC (5 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, HEAD
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (colored)

The header file "html.h" uses enum roff_tok,
so "roff.h" must be included before it.
Diff from bcallah@ tweaked by me;
he found the bug by compiling with pcc.

Revision 1.14 / (download) - annotate - [select for diffs], Thu Dec 13 05:13:15 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.13: +2 -1 lines
Diff to previous 1.13 (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.13 / (download) - annotate - [select for diffs], Fri Jul 14 13:32:27 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.12: +4 -1 lines
Diff to previous 1.12 (colored)

do not print <math class="eqn"><mrow></mrow></math> for empty .EQ;
issue reported by bentley@

Revision 1.12 / (download) - annotate - [select for diffs], Sat Jul 8 14:51:01 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.11: +3 -3 lines
Diff to previous 1.11 (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.11 / (download) - annotate - [select for diffs], Wed Jul 5 15:03:20 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.10: +7 -4 lines
Diff to previous 1.10 (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.10 / (download) - annotate - [select for diffs], Fri Jun 23 22:59:27 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.9: +15 -9 lines
Diff to previous 1.9 (colored)

Consistently treat character escape sequences as operators,
not as letters, even if their names contain letters.

This is certainly not perfect, but code to recognize that \(*a is
not an operator but a letter would need a huge table, or Unicode
character property support, which won't happen at this time.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jun 23 02:31:39 2017 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.8: +50 -4 lines
Diff to previous 1.8 (colored)

Write text boxes as <mi>, <mn>, or <mo> as appropriate,
and write fontstyle or fontweight attributes where required.
Missing features reported by bentley@.

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jun 20 17:24:09 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.7: +9 -9 lines
Diff to previous 1.7 (colored)

KNF: remove parentheses from switch case labels; no binary change

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jan 17 01:47:46 2017 UTC (7 years, 4 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.6: +29 -35 lines
Diff to previous 1.6 (colored)

Simplify the usage of print_otag() by making it accept a variable
number of arguments.

Delete struct htmlpair and all the PAIR_*() macros.
Delete enum htmlattr, handle that in print_otag() instead.

Minus 190 lines of code; no functional change except better ordering
of attributes (class before style) in three cases.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Oct 12 19:10:56 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.5: +9 -5 lines
Diff to previous 1.5 (colored)

Improve error handling in the eqn(7) parser.
Get rid of the first fatal error, MANDOCERR_EQNSYNT.
In eqn(7), there is no need to be bug-compatible with groff, so there
is no need to abondon the whole equation in case of a syntax error.

In particular:
* Skip "back", "delim", "down", "fwd", "gfont", "gsize", "left",
  "right", "size", and "up" without arguments.
* Skip "gsize" and "size" with a non-numeric argument.
* Skip closing delimiters that are not open.
* Skip "above" outside piles.
* For diacritic marks and binary operators without a left operand,
  default to an empty box.
* Let piles and matrices take one argument rather than insisting
  on a braced list.  Let HTML output handle that, too.
* When rewinding, if the root box is guaranteed to match
  the termination condition, no error handling is needed.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Oct 10 15:25:06 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.4: +114 -145 lines
Diff to previous 1.4 (colored)

Partial eqn(7) rewrite by kristaps@ in order to get operator precedence right.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Oct 9 15:59:08 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.3: +15 -3 lines
Diff to previous 1.3 (colored)

parse and render "from" and "to" clauses in eqn, and render matrices;
written by kristaps@ during EuroBSDCon

Revision 1.3 / (download) - annotate - [select for diffs], Thu Oct 9 15:49:09 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.2: +156 -28 lines
Diff to previous 1.2 (colored)

initial bits of MathML rendering for eqn(7) -Thtml;
written by kristaps@ during EuroBSDCon

Revision 1.2 / (download) - annotate - [select for diffs], Sun Apr 20 16:44:44 2014 UTC (10 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.1: +5 -9 lines
Diff to previous 1.1 (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.1 / (download) - annotate - [select for diffs], Sun Sep 18 10:25:28 2011 UTC (12 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1

sync to version 1.11.5:
adding an implementation of the eqn(7) language
by kristaps@

So far, only .EQ/.EN blocks are handled, in-line equations are not, and
rendering is not yet very pretty, but the parser is fairly complete.

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.