Up to [local] / src / usr.bin / mandoc
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.57 / (download) - annotate - [selected], Sun Oct 17 21:03:05 2021 UTC (2 years, 7 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,
HEAD
Changes since 1.56: +4 -4 lines
Diff to previous 1.56 (colored)
simplify a few accesses to fields of structs, using auxiliary pointer variables that are already present (and used nearby) in the code; no functional change
Revision 1.56 / (download) - annotate - [select for diffs], Sun Oct 17 20:47:54 2021 UTC (2 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.55: +6 -7 lines
Diff to previous 1.55 (colored) to selected 1.57 (colored)
Simplify the code building lists of spans, no output change intended. A comment in the code claimed that the list of spans would be sorted, but the sorting did not actually work. The layout "LSSS,LLSL" resulted in the list "0-3, 1-2", whereas the layout "LLSL,LSSS" resulted in the list "1-2, 0-3". Since sorting serves no purpose, just leave the list unsorted.
Revision 1.55 / (download) - annotate - [select for diffs], Tue Sep 28 17:06:17 2021 UTC (2 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.54: +18 -4 lines
Diff to previous 1.54 (colored) to selected 1.57 (colored)
Revert part of the previous diff to fix a regression (another endless loop) reported by Michael <Stapelberg at Debian> in the Linux md(4) manual. The reason the colwidth[] array is needed is not that it stores widths different from those in tbl->cols[].width, but that only part of the columns participate in the comparisons, i.e. only those intersecting at least one span the still requires width distribution.
Revision 1.54 / (download) - annotate - [select for diffs], Tue Sep 7 17:05:30 2021 UTC (2 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE,
OPENBSD_7_0
Changes since 1.53: +10 -34 lines
Diff to previous 1.53 (colored) to selected 1.57 (colored)
Fix an infinite loop that could occur during some cases of horizontally overlapping horizontal spans. One span would calculate a desired target width and start preparations for applying it to some columns, then the other span would overwrite the target width with a different value and also start preparations for applying that one to some columns, which could sometimes confuse the code doing the final distribution to the point of not doing anything at all before entering the next iteration. Fix this by making sure the distribution is done step by step, doing one step at a time rather than allowing multiple steps to conflict. Specifically, always do the smallest useful step first. This change also simplifies the code. For example, the local "colwidth" array is no longer needed. Note that the algorithm still differs from the one implemented in GNU tbl(1), which appears to not even try to harmonize column widths but seems to simply distribute the same amount to all constituent columns, no matter whether their intrinsic width is narrow or wide. Adopting a GNU-compatible algorithm might allow further simplifiction in addition to yielding even more similar output, but i do not want to implement any major changes of the algorithm at this time. The infinite loop was reported by <Oliver dot Corff at email dot de>.
Revision 1.53 / (download) - annotate - [select for diffs], Tue Sep 7 14:50:56 2021 UTC (2 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.52: +5 -4 lines
Diff to previous 1.52 (colored) to selected 1.57 (colored)
Correctly calculate required column widths for tables containing cells that horizontally span columns which contains "n" (number) formatted cells on other rows. This requires updating total column widths from "n" formatted cells before starting width distribution from the spanning cells to their constituent columns.
Revision 1.52 / (download) - annotate - [select for diffs], Tue Aug 10 12:36:42 2021 UTC (2 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.51: +3 -1 lines
Diff to previous 1.51 (colored) to selected 1.57 (colored)
Support two-character font names (BI, CW, CR, CB, CI) in the tbl(7) layout font modifier. Get rid of the TBL_CELL_BOLD and TBL_CELL_ITALIC flags and use the usual ESCAPE_FONT* enum mandoc_esc members from mandoc.h instead, which simplifies and unifies some code. While here, also support CB and CI in roff(7) \f escape sequences and in roff(7) .ft requests for all output modes. Using those is certainly not recommended because portability is limited even with groff, but supporting them makes some existing third-party manual pages look better, in particular in HTML output mode. Bug-compatible with groff as far as i'm aware, except that i consider font names starting with the '\n' (ASCII 0x0a line feed) character so insane that i decided to not support them. Missing feature reported by nabijaczleweli dot xyz in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992002. I used none of the code from the initial patch submitted by nabijaczleweli, but some of their ideas. Final patch tested by them, too.
Revision 1.51 / (download) - annotate - [select for diffs], Tue Dec 31 22:49:17 2019 UTC (4 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE,
OPENBSD_6_9,
OPENBSD_6_8_BASE,
OPENBSD_6_8,
OPENBSD_6_7_BASE,
OPENBSD_6_7
Changes since 1.50: +18 -6 lines
Diff to previous 1.50 (colored) to selected 1.57 (colored)
When all cells in a tbl(1) column are empty, set the column width to 1n rather than to 0n, in the same way as groff does. This fixes misformatting reported by bentley@ in xkeyboard-config(7).
Revision 1.50 / (download) - annotate - [select for diffs], Fri Mar 29 21:25:43 2019 UTC (5 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE,
OPENBSD_6_6,
OPENBSD_6_5_BASE,
OPENBSD_6_5
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored) to selected 1.57 (colored)
Set the maximum column index in a tbl(7) to the maximum *right* edge of any cell span, not to the maximum *left* edge, which may be smaller if the last column of the table is only reached by horizontal spans, but not by any regular cell in any row of the table. Otherwise, the algorithm calculating column widths accessed memomy after the end of the colwidth[] array, while it was trying to handle the rightmost column(s). Crash reported by Jason Thorpe <thorpej at NetBSD> via https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54069 and via Thomas Klausner (wiz@). Christos@ Zoulas sent a (correct, but slightly confusing) patch. The patch i'm committing here is easier to understand.
Revision 1.49 / (download) - annotate - [select for diffs], Thu Dec 13 11:55:14 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.48: +1 -2 lines
Diff to previous 1.48 (colored) to selected 1.57 (colored)
Cleanup, no functional change: Split the top level parser interface out of the utility header mandoc.h, into a new header mandoc_parse.h, for use in the main program and in the main parser only. Move enum mandoc_os into roff.h because struct roff_man is the place where it is stored. This allows removal of mandoc.h from seven files in low-level parsers and in formatters.
Revision 1.48 / (download) - annotate - [select for diffs], Wed Dec 12 21:54:30 2018 UTC (5 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.47: +2 -1 lines
Diff to previous 1.47 (colored) to selected 1.57 (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.47 / (download) - annotate - [select for diffs], Thu Nov 29 01:54:58 2018 UTC (5 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.46: +206 -43 lines
Diff to previous 1.46 (colored) to selected 1.57 (colored)
Better handle automatic column width assignments in the presence of horizontal spans, by implementing a moderately difficult iterative algoritm. The benefit is that spans containing long text no longer cause an excessive width of their starting column. The result is likely not optimal, in particular in the presence of many spans overlapping in complicated ways nor when spans interact with equalizing or maximizing colums. But i doubt the practical usefulness of making this more complicated. Issue originally reported in synaptics(4), which now looks better, by tedu@ three years ago, and reminded by Pali Rohar this summer.
Revision 1.46 / (download) - annotate - [select for diffs], Sun Nov 25 19:23:59 2018 UTC (5 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.45: +6 -6 lines
Diff to previous 1.45 (colored) to selected 1.57 (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.45 / (download) - annotate - [select for diffs], Sun Aug 19 23:10:16 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE,
OPENBSD_6_4
Changes since 1.44: +52 -34 lines
Diff to previous 1.44 (colored) to selected 1.57 (colored)
Do alignment of non-numeric strings in numeric cells the same way as groff, and also honour the explicit alignment indicator "\&". This required an almost complete rewrite of both the measurement function and the formatter function for numeric cells.
Revision 1.44 / (download) - annotate - [select for diffs], Sat Aug 18 20:17:58 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.43: +9 -4 lines
Diff to previous 1.43 (colored) to selected 1.57 (colored)
If a tbl(7) column contains both text cells and numeric cells, horizontally align the numbers in the same way as groff does.
Revision 1.43 / (download) - annotate - [select for diffs], Sat Aug 18 16:44:52 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.42: +5 -7 lines
Diff to previous 1.42 (colored) to selected 1.57 (colored)
Do not allocate a column for decimal points if all numbers are integers.
Revision 1.42 / (download) - annotate - [select for diffs], Tue Jun 27 18:23:29 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE,
OPENBSD_6_3,
OPENBSD_6_2_BASE,
OPENBSD_6_2
Changes since 1.41: +10 -3 lines
Diff to previous 1.41 (colored) to selected 1.57 (colored)
Implement spacing of columns as defined in the table layout; this is for example used by lftp(1) and, ironically, misused by our very own tbl(7) manual...
Revision 1.41 / (download) - annotate - [select for diffs], Thu Jun 15 00:27:22 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.40: +3 -2 lines
Diff to previous 1.40 (colored) to selected 1.57 (colored)
round default width of tbl(7) text blocks in the same way as groff
Revision 1.40 / (download) - annotate - [select for diffs], Wed Jun 14 18:23:26 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.39: +2 -4 lines
Diff to previous 1.39 (colored) to selected 1.57 (colored)
let \l use the right fill character
Revision 1.39 / (download) - annotate - [select for diffs], Mon Jun 12 22:05:41 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.38: +4 -3 lines
Diff to previous 1.38 (colored) to selected 1.57 (colored)
If a tbl(7) layout contains a 'w' (minimum width) modifier for a given column, that column contains no literal or numeric cell of larger width, and all text block cells in that column can be line wrapped to fit into that minimum width, groff does not increase that column width beyond the specified minimum: so do the same.
Revision 1.38 / (download) - annotate - [select for diffs], Mon Jun 12 20:14:03 2017 UTC (6 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.37: +19 -12 lines
Diff to previous 1.37 (colored) to selected 1.57 (colored)
fix column width calculation for text block cells
Revision 1.37 / (download) - annotate - [select for diffs], Thu Jun 8 18:11:15 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.36: +39 -15 lines
Diff to previous 1.36 (colored) to selected 1.57 (colored)
Implement w layout specifier (minimum column width). Improve width calculation of text blocks. Reduces the groff/mandoc diff in Base+Xenocara by about 800 lines.
Revision 1.36 / (download) - annotate - [select for diffs], Thu Jun 8 12:54:40 2017 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.35: +7 -8 lines
Diff to previous 1.35 (colored) to selected 1.57 (colored)
make the internal a2roffsu() interface more powerful by returning a pointer to the end of the parsed data, making it easier to parse subsequent bytes
Revision 1.35 / (download) - annotate - [select for diffs], Mon May 1 20:53:58 2017 UTC (7 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.34: +6 -3 lines
Diff to previous 1.34 (colored) to selected 1.57 (colored)
When trying to expand some columns in a table where the sum of the widths of the remaining columns is already wider than the line length, underflowing size_t and dying from ENOMEM is the wrong plan. Instead, simply refrain from expanding anything in such a situation, avoiding a crash that tb@ found with afl.
Revision 1.34 / (download) - annotate - [select for diffs], Mon Oct 12 00:07:27 2015 UTC (8 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE,
OPENBSD_6_1,
OPENBSD_6_0_BASE,
OPENBSD_6_0,
OPENBSD_5_9_BASE,
OPENBSD_5_9
Changes since 1.33: +1 -5 lines
Diff to previous 1.33 (colored) to selected 1.57 (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.33 / (download) - annotate - [select for diffs], Tue Oct 6 18:30:44 2015 UTC (8 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored) to selected 1.57 (colored)
modernize style: "return" is not a function; ok cmp(1)
Revision 1.32 / (download) - annotate - [select for diffs], Sat Sep 26 00:53:15 2015 UTC (8 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.31: +1 -2 lines
Diff to previous 1.31 (colored) to selected 1.57 (colored)
/* NOTREACHED */ after abort() is silly, delete it
Revision 1.31 / (download) - annotate - [select for diffs], Fri Jan 30 04:08:37 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE,
OPENBSD_5_8,
OPENBSD_5_7_BASE,
OPENBSD_5_7
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored) to selected 1.57 (colored)
Abolish struct tbl_head and replace it by an "int col" member in struct tbl_cell. No functional change, minus 40 lines of code.
Revision 1.30 / (download) - annotate - [select for diffs], Wed Jan 28 02:23:33 2015 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.29: +31 -7 lines
Diff to previous 1.29 (colored) to selected 1.57 (colored)
adjust formatting for the tbl(7) layout 'x' modifier (maximize column) to match groff for up to six maximized columns
Revision 1.29 / (download) - annotate - [select for diffs], Tue Dec 23 13:48:15 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.28: +1 -4 lines
Diff to previous 1.28 (colored) to selected 1.57 (colored)
support negative horizontal widths in man(7); minus twenty lines of code in spite of enhanced functionality
Revision 1.28 / (download) - annotate - [select for diffs], Tue Dec 23 09:31:17 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.27: +33 -34 lines
Diff to previous 1.27 (colored) to selected 1.57 (colored)
some scaling unit fixes: - .sp with an invalid argument is .sp 1v, not .sp 0v - in man(1), trailing garbage doesn't make scaling units invalid
Revision 1.27 / (download) - annotate - [select for diffs], Tue Dec 23 03:27:36 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.26: +13 -44 lines
Diff to previous 1.26 (colored) to selected 1.57 (colored)
In a2roffsu(), do not parse the number twice. Gets rid of 25 lines of code and one static buffer. No functional change for numbers shorter than BUFSIZ characters.
Revision 1.26 / (download) - annotate - [select for diffs], Thu Dec 4 02:05:16 2014 UTC (9 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored) to selected 1.57 (colored)
fix handling of roff requests having a default scale other than "n", in particular .sp which uses "v", when the scale is not specified; cures groff-mandoc differences in about a dozen Xenocara manuals
Revision 1.25 / (download) - annotate - [select for diffs], Tue Oct 14 18:16:57 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored) to selected 1.57 (colored)
even if a table has zero columns, do not segfault in the formatter; bug reported by bentley@
Revision 1.24 / (download) - annotate - [select for diffs], Tue Oct 14 02:16:02 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.23: +70 -6 lines
Diff to previous 1.23 (colored) to selected 1.57 (colored)
Rudimentary implementation of the e, x, and z table layout modifiers to equalize, maximize, and ignore the width of columns. Does not yet take vertical rulers into account, and does not do line breaks within table cells. Considerably improves the lftp(1) manual; issue noticed by sthen@.
Revision 1.23 / (download) - annotate - [select for diffs], Tue Aug 12 19:27:57 2014 UTC (9 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored) to selected 1.57 (colored)
In mdoc(7) and man(7), if a width is given as a bare number without specifying a unit, the implied unit is 'n' (on the terminal, one character position; in PostScript, half of the current font size in points), not 'u' (roff output device basic unit). No functional change right now, but important for the upcoming scaling unit fixes.
Revision 1.22 / (download) - annotate - [select for diffs], Fri Aug 8 16:00:23 2014 UTC (9 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored) to selected 1.57 (colored)
Clarity with respect to floating point handling: Write double constants as double rather than integer literals. Remove useless explicit (double) cast done at one place and nowhere else. No functional change.
Revision 1.21 / (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.20: +27 -26 lines
Diff to previous 1.20 (colored) to selected 1.57 (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.20 / (download) - annotate - [select for diffs], Fri Mar 21 22:17:01 2014 UTC (10 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.19: +2 -1 lines
Diff to previous 1.19 (colored) to selected 1.57 (colored)
The files mandoc.c and mandoc.h contained both specialised low-level functions used for multiple languages (mdoc, man, roff), for example mandoc_escape(), mandoc_getarg(), mandoc_eos(), and generic auxiliary functions. Split the auxiliaries out into their own file and header. While here, do some #include cleanup.
Revision 1.19 / (download) - annotate - [select for diffs], Sat Oct 5 21:17:29 2013 UTC (10 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE,
OPENBSD_5_5
Changes since 1.18: +1 -4 lines
Diff to previous 1.18 (colored) to selected 1.57 (colored)
Cleanup suggested by gcc-4.8.1, following hints by Christos Zoulas: - avoid bad qualifier casting in roff.c, roff_parsetext() by changing the mandoc_escape arguments to "const char const **" - avoid bad qualifier casting in mandocdb.c, index_merge() - garbage collect a few unused variables elsewhere
Revision 1.18 / (download) - annotate - [select for diffs], Fri May 31 21:37:09 2013 UTC (11 years ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE,
OPENBSD_5_4
Changes since 1.17: +10 -10 lines
Diff to previous 1.17 (colored) to selected 1.57 (colored)
The name "struct tbl" was badly misleading for two reasons: 1) This struct almost exclusively contains the table options. 2) Information about the table as a whole is actually in "struct tbl_node". Besides, "struct tbl" was almost impossible to search for. So rename it to "struct tbl_opts". No functional change.
Revision 1.17 / (download) - annotate - [select for diffs], Sat May 26 20:03:34 2012 UTC (12 years ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE,
OPENBSD_5_3,
OPENBSD_5_2_BASE,
OPENBSD_5_2
Changes since 1.16: +1 -20 lines
Diff to previous 1.16 (colored) to selected 1.57 (colored)
Do not handle vertical lines as additional tbl(7) columns, instead save their properties with the following column. This simplifies layout parsing and saves a lot of code related to column handling. At output time, print all white space and vertical lines separating columns before printing the following column, and none after printing the preceding column, considerably simplifying white space handling and width calculations. No functional change, but it saves 150 lines of code, and it allows the next patch to tbl_term.c, tbl_literal().
Revision 1.16 / (download) - annotate - [select for diffs], Tue Sep 20 23:05:46 2011 UTC (12 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE,
OPENBSD_5_1
Changes since 1.15: +11 -42 lines
Diff to previous 1.15 (colored) to selected 1.57 (colored)
Major rewrite of the horizontal spacing of tables to work both with and without frames and rulers. Started during BSDCan 2011 in Ottawa, finished during s2k11 in Ljubljana. ok kristaps@
Revision 1.15 / (download) - annotate - [select for diffs], Sun Sep 18 15:54:48 2011 UTC (12 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.14: +2 -44 lines
Diff to previous 1.14 (colored) to selected 1.57 (colored)
sync to version 1.11.7 from kristaps@ main new feature: support the roff(7) .tr request plus various bugfixes and some refactoring regressions are so minor that it's better to get this in and fix them in the tree
Revision 1.14 / (download) - annotate - [select for diffs], Sun May 29 21:22:18 2011 UTC (13 years ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE,
OPENBSD_5_0
Changes since 1.13: +1 -238 lines
Diff to previous 1.13 (colored) to selected 1.57 (colored)
Merge release 1.11.3, almost all code by kristaps@: * Unicode output support (no Unicode input yet, though). * Refactoring: completely handle predefined strings in roff.c. - New function mandoc_escape() replaces a2roffdeco() and mandoc_special(). - Start using mandoc_getarg() in mdoc_argv.c. - Clean up parsing of delimiters in mdoc(7). * And many minor fixes and lots of cleanup.
Revision 1.13 / (download) - annotate - [select for diffs], Thu Apr 21 22:59:54 2011 UTC (13 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.12: +3 -2 lines
Diff to previous 1.12 (colored) to selected 1.57 (colored)
Merge version 1.10.10: lots of cleanup and maintenance work by kristaps@. - move some main.c globals into struct curparse - move mandoc_*alloc to mandoc.h such that all code can use them - make mandoc_isdelim available to formatting frontends - dissolve mdoc_strings.c, move the code where it is used - make all error reporting functions void, their return values were useless - and various minor cleanups and fixes
Revision 1.12 / (download) - annotate - [select for diffs], Sun Jan 30 16:05:29 2011 UTC (13 years, 4 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE,
OPENBSD_4_9
Changes since 1.11: +45 -1 lines
Diff to previous 1.11 (colored) to selected 1.57 (colored)
Implement the \N'number' (numbered character) roff escape sequence. Don't use it in new manuals, it is inherently non-portable, but we need it for backward-compatibility with existing manuals, for example in Xenocara driver pages. ok kristaps@ matthieu@ jmc@
Revision 1.11 / (download) - annotate - [select for diffs], Tue Jan 25 12:07:26 2011 UTC (13 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored) to selected 1.57 (colored)
correct horizontal spacing of data cells correct alignment of centered cells adjust horizontal rule width to the new spacing ok kristaps@
Revision 1.10 / (download) - annotate - [select for diffs], Sun Jan 16 01:11:50 2011 UTC (13 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.9: +17 -13 lines
Diff to previous 1.9 (colored) to selected 1.57 (colored)
Various tbl improvements from kristaps@: * horizontal lines do not consume layout lines * skip excessive data cells * prepare rendering of spanned cells * support vertical spans
Revision 1.9 / (download) - annotate - [select for diffs], Sun Jan 9 14:30:48 2011 UTC (13 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.8: +206 -2 lines
Diff to previous 1.8 (colored) to selected 1.57 (colored)
Sync tbl handling to bsd.lv release 1.10.9: * .T} can be followed by a delimiter, then more data. * Do not limit table column widths (improves terminfo(5)). * Let numerical cells respect explicitly specified minimum cell widths. * Let terminal output survive missing data cells. * Parse and ignore arguments in parentheses on layout cell specifications. * Move tbl_calc() into out.c such that it can be used by all frontends. * Give tables an HTML class. * Some cleanup in tbl -Thtml code. All code by kristaps@.
Revision 1.8 / (download) - annotate - [select for diffs], Mon Sep 13 22:04:01 2010 UTC (13 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.7: +41 -2 lines
Diff to previous 1.7 (colored) to selected 1.57 (colored)
Parse and ignore the \k, \o, \w, and \z roff escapes, and recursively ignore embedded escapes and mathematical roff subexpressions. In roff copy mode, resolve "\\" to '\'. Allow ".xx\}" where xx is a macro to close roff conditional scope. Mandoc now handles the special character definitions in the pod2man(1) preamble, so remove the explicit redefinitions in chars.c/chars.in. From kristaps@. I have checked that this causes no relevant change to the Perl manuals. The only change introduced is that some non-ASCII characters rendered incorrectly before are now rendered incorrectly in a different way. For example, e accent aigu was "e", now is "e'" and c cedille was "c", now is "c,".
Revision 1.7 / (download) - annotate - [select for diffs], Wed Aug 18 02:38:40 2010 UTC (13 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.6: +11 -8 lines
Diff to previous 1.6 (colored) to selected 1.57 (colored)
Ignore \h (local horizontal motion) and \v (local vertical motion) escapes just in the same way as \s (font size) escapes, and handle \s escapes not having an explicit plus or minus sign. This fixes the very ugly rendering of "C++" in gcc(1). Reported by Thomas Jeunet, fixed by kristaps@.
Revision 1.6 / (download) - annotate - [select for diffs], Sun Jul 25 18:05:54 2010 UTC (13 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE,
OPENBSD_4_8
Changes since 1.5: +100 -179 lines
Diff to previous 1.5 (colored) to selected 1.57 (colored)
Sync to bsd.lv; in particular, pull in lots of bug fixes. new features: * support the .in macro in man(7) * support minimal PDF output * support .Sm in mdoc(7) HTML output * support .Vb and .nf in man(7) HTML output * complete the mdoc(7) manual bug fixes: * do not let mdoc(7) .Pp produce a newline before/after .Sh; reported by jmc@ * avoid double blank lines related to man(7) .sp and .br * let man(7) .nf and .fi flush the line; reported by jsg@ and naddy@ * let "\ " produce a non-breaking space; reported by deraadt@ * discard \m colour escape sequences; reported by J.C. Roberts * map undefined 1-character-escapes to the literal character itself maintenance: * express mdoc(7) arguments in terms of an enum for additional type-safety * simplify mandoc_special() and a2roffdeco() * use strcspn in term_word() in place of a manual loop * minor optimisations in the -Tps and -Thtml formatting frontends
Revision 1.5 / (download) - annotate - [select for diffs], Sun Jun 27 20:28:56 2010 UTC (13 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.4: +1 -3 lines
Diff to previous 1.4 (colored) to selected 1.57 (colored)
Remove "pt" from struct roffsu, as CSS (the only reason it was there) is unclear about which units accept floats/integers, which leads me to assume that it handles either and rounds as appropriate. from kristaps@
Revision 1.4 / (download) - annotate - [select for diffs], Wed Apr 7 23:15:05 2010 UTC (14 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.3: +96 -53 lines
Diff to previous 1.3 (colored) to selected 1.57 (colored)
Merge the good parts of 1.9.23, avoid the bad parts of 1.9.23, and keep local patches. Input in general: * Basic handling of roff-style font escapes \f, \F. * Quoted punctuation does not count as punctuation. mdoc(7) parser: * Make .Pf callable; noted by Claus Assmann. * Let .Bd and .Bl ignore unknown arguments; noted by deraadt@. * Do not warn when .Er is used outside certain sections. * Replace mdoc_node_free[list] by mdoc_node_delete. * Replace #define by enum for rew*() return values. man(7) parser: * When .TH is missing, use default section and date. Output in general: * Curly braces do not count as punctuation. * No space after .Fl w/o args when a macro follows on the same line. HTML output: * Unify PAIR_*_INIT macros, introduce new PAIR_ID_INIT(). * Print whitespace after, not before .Vt .Fn .Ft .Fo. Checked that all manuals in base still build.
Revision 1.3 / (download) - annotate - [select for diffs], Thu Dec 24 02:08:14 2009 UTC (14 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE,
OPENBSD_4_7
Changes since 1.2: +189 -1 lines
Diff to previous 1.2 (colored) to selected 1.57 (colored)
sync to 1.9.14: rewrite escape sequence handling: - new function a2roffdeco - font modes (\f) only affect the current stack point - implement scaling (\s) - implement space suppression (\c) - implement non-breaking space (\~) in -Tascii - many manual improvements
Revision 1.2 / (download) - annotate - [select for diffs], Tue Oct 27 21:40:07 2009 UTC (14 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.1: +47 -2 lines
Diff to previous 1.1 (colored) to selected 1.57 (colored)
sync to 1.9.11: adapt printing of dates to groff conventions, NetBSD portability fixes and some minor bugfixes and feature enhancements; also checked that my hyphenation code still works on top of this
Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 21 19:13:51 2009 UTC (14 years, 7 months ago) by schwarze
Branch: MAIN
Diff to selected 1.57 (colored)
sync to 1.9.9, featuring: * -Thtml output mode * roff scaling units * and some minor fixes for full changelogs, see http://bsd.lv/cgi-bin/cvsweb.cgi/