CVS log for mandoc/out.h

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.35 / (download) - annotate - [select for diffs], Sun Sep 11 09:13:48 2022 UTC (18 months, 2 weeks ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.34: +1 -6 lines
Diff to previous 1.34 (colored) to selected 1.12 (colored)

Finally expand and delete the macro SCALE_VS_INIT().
It's nothing but obfuscation and only used at three places in a single file.
Removing it also makes the code three lines shorter.
The ugliness was already pointed out six years ago by mmcc@.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Apr 3 11:35:01 2020 UTC (3 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_6
Changes since 1.33: +4 -2 lines
Diff to previous 1.33 (colored) to selected 1.12 (colored)

Remove some stray argument names from function prototypes,
for consistency with the dominant style used in mandoc.
No functional change.
Patch from Martin Vahlensieck <academicsolutions dot ch>.

Revision 1.33 / (download) - annotate - [select for diffs], Sat Aug 18 20:18:14 2018 UTC (5 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5
Changes since 1.32: +3 -2 lines
Diff to previous 1.32 (colored) to selected 1.12 (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.32 / (download) - annotate - [select for diffs], Mon Jun 25 16:54:59 2018 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_4
Changes since 1.31: +1 -6 lines
Diff to previous 1.31 (colored) to selected 1.12 (colored)

Delete substantial amounts of code
now that we no longer use variable style= attributes.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Jun 27 18:25:02 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_3, VERSION_1_14_2
Changes since 1.30: +2 -1 lines
Diff to previous 1.30 (colored) to selected 1.12 (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.30 / (download) - annotate - [select for diffs], Mon Jun 12 20:14:18 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored) to selected 1.12 (colored)

fix column width calculation for text block cells

Revision 1.29 / (download) - annotate - [select for diffs], Thu Jun 8 18:11:22 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.28: +4 -2 lines
Diff to previous 1.28 (colored) to selected 1.12 (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.28 / (download) - annotate - [select for diffs], Thu Jun 8 12:54:58 2017 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.27: +3 -2 lines
Diff to previous 1.27 (colored) to selected 1.12 (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.27 / (download) - annotate - [select for diffs], Sat Nov 7 14:01:16 2015 UTC (8 years, 4 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_1, VERSION_1_13_4, VERSION_1_13
Changes since 1.26: +1 -4 lines
Diff to previous 1.26 (colored) to selected 1.12 (colored)

In private header files, __BEGIN_DECLS and __END_DECLS are pointless.
Because these work slightly differently on different systems,
they are becoming a maintenance burden in the portable version,
so delete them.

Besides, one of the chief design goals of the mandoc toolbox is to
make sure that nothing related to documentation requires C++.
Consequently, linking mandoc against any kind of C++ program would
defeat the purpose and is not supported.
I don't understand why kristaps@ added them in the first place.

Revision 1.26 / (download) - annotate - [select for diffs], Mon Dec 1 08:05:52 2014 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_3, VERSION_1_13_2
Changes since 1.25: +5 -3 lines
Diff to previous 1.25 (colored) to selected 1.12 (colored)

header cleanup:
* add missing forward declarations
* remove needless header inclusions
* some style unification

Revision 1.25 / (download) - annotate - [select for diffs], Mon Dec 1 04:05:32 2014 UTC (9 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.24: +1 -5 lines
Diff to previous 1.24 (colored) to selected 1.12 (colored)

remove unneccessary inclusion protection; patch from deraadt@

Revision 1.24 / (download) - annotate - [select for diffs], Tue Oct 14 02:16:06 2014 UTC (9 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.23: +4 -2 lines
Diff to previous 1.23 (colored) to selected 1.12 (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:28:03 2014 UTC (9 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_4, VERSION_1_12
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored) to selected 1.12 (colored)

The macro SCALE_HS_INIT() is always passed the result of strlen() or
an equivalent number as its argument, and strlen() measures the width
of a string in characters, not in basic units.  No functional change
right now, but important for the upcoming scaling unit fixes.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Apr 20 16:46:05 2014 UTC (9 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_1
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored) to selected 1.12 (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.21 / (download) - annotate - [select for diffs], Sun Jul 17 15:24:25 2011 UTC (12 years, 8 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_12_3, VERSION_1_12_2, VERSION_1_12_1, VERSION_1_12_0, VERSION_1_11_7, VERSION_1_11_6, VERSION_1_11_5
Changes since 1.20: +1 -2 lines
Diff to previous 1.20 (colored) to selected 1.12 (colored)

Remove unused function.

Revision 1.20 / (download) - annotate - [select for diffs], Fri Apr 29 22:18:12 2011 UTC (12 years, 11 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_4, VERSION_1_11_3, VERSION_1_11_2
Changes since 1.19: +1 -14 lines
Diff to previous 1.19 (colored) to selected 1.12 (colored)

Move "chars" interface out of out.h and into mandoc.h.  This doesn't
change any code but for renaming functions and types to be consistent
with other mandoc.h stuff.  The reason for moving into libmandoc is that
the rendering of special characters is part of mandoc itself---not an
external part.  From mandoc(1)'s perspective, this changes nothing, but
for other utilities, it's important to have these part of libmandoc.
Note this isn't documented [yet] in mandoc.3 because there are some
parts I'd like to change around beforehand.

Revision 1.19 / (download) - annotate - [select for diffs], Sat Apr 9 15:29:40 2011 UTC (12 years, 11 months ago) by kristaps
Branch: MAIN
Changes since 1.18: +1 -18 lines
Diff to previous 1.18 (colored) to selected 1.12 (colored)

Remove a2roffdeco() and mandoc_special() functions and replace them with
a public (mandoc.h) function mandoc_escape(), which merges the
functionality of both prior functions.

Reason: code duplication.  The a2roffdeco() and mandoc_special()
functions were pretty much the same thing and both quite complex.  This
allows one function to receive improvements in (e.g.) subexpression
handling and performance, instead of having to replicate functionality.

As such, the mandoc_escape() function already handles a superset of the
escapes handled in previous versions and has improvements in performance
(using strcspn(), for example) and reliable handling of subexpressions.

This code Works For Me, but may need work to catch any regressions.
Since the benefits are great (leaner code, simpler API), I'd rather have
it in-tree than floating as a patch.

Revision 1.18 / (download) - annotate - [select for diffs], Tue Mar 22 10:13:01 2011 UTC (13 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_1
Changes since 1.17: +45 -32 lines
Diff to previous 1.17 (colored) to selected 1.12 (colored)

Step 4: merge chars.h into out.h.  The functions in this file are
necessary to all [real] front-ends, so stop pretending it's special.
While here, add some documentation to the variable types.

Revision 1.17 / (download) - annotate - [select for diffs], Mon Mar 7 01:35:51 2011 UTC (13 years ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_10_10
Changes since 1.16: +1 -3 lines
Diff to previous 1.16 (colored) to selected 1.12 (colored)

Clean up date handling,
as a first step to get rid of the frequent petty warnings in this area:
 - always store dates as strings, not as seconds since the Epoch
 - for input, try the three most common formats everywhere
 - for unrecognized format, just pass the date though verbatim
 - when there is no date at all, still use the current date
Originally triggered by a one-line patch from Tim van der Molen,
<tbvdm at xs4all dot nl>, which is included here.
Feedback and OK on manual parts from jmc@.
"please check this in" kristaps@

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jan 30 16:05:37 2011 UTC (13 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.15: +3 -2 lines
Diff to previous 1.15 (colored) to selected 1.12 (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@ jmc@ and tested by Matthieu Herrb (matthieu at openbsd dot org)

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jan 5 15:37:23 2011 UTC (13 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_9
Changes since 1.14: +26 -15 lines
Diff to previous 1.14 (colored) to selected 1.12 (colored)

Stuff tbl_calc() into out.c so that it can be shared by all output modes
(isn't now, but will need to be, used by -T[x]html also).  Necessitated
a lot of churn in getting tbl_calc* code out of tbl_term.c and into
out.c, including renaming some structures and so on.  The abstraction is
in having a pointer to a wrapper function for calculating string widths.
The char devices use term_strlen and term_len; the others will probably
just use strlen().

While at it, remove some superfluous assertions in the tbl code.  This
allows all tbl manuals to clear.

Lastly, set the right-margin to be the maximum margin for each table
span.  This allows big, complicated tbl-pages like terminfo to be
displayed.  They're ugly, but they work.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jul 21 20:35:03 2010 UTC (13 years, 8 months 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
Changes since 1.13: +4 -3 lines
Diff to previous 1.13 (colored) to selected 1.12 (colored)

Accomodate for groff's crappy behaviour wherein an unrecognised
single-character escape (and ONLY this type of escape) will map back
into itself:

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

(From groff.7.)

Found by Jason McIntyre.

Revision 1.13 / (download) - annotate - [select for diffs], Sun Jul 18 22:55:06 2010 UTC (13 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.12: +1 -2 lines
Diff to previous 1.12 (colored)

Throw out a2roffdeco() in out.c for a readable version.  The prior one
was completely unmaintainable.  The new one is both readable and quite
similar to mandoc_special(), which in future versions will easily allow
throwing-away of unsupported escapes (such as \m).  It's also a fair bit
smaller.

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

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

Revision 1.12 / (download) - annotate - [selected], Fri Jun 25 19:50:23 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_4, VERSION_1_10_3
Changes since 1.11: +3 -6 lines
Diff to previous 1.11 (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.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Jun 19 20:46:28 2010 UTC (13 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_2
Changes since 1.10: +2 -2 lines
Diff to previous 1.10 (colored) to selected 1.12 (colored)

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

Revision 1.10 / (download) - annotate - [select for diffs], Wed Apr 7 11:25:38 2010 UTC (13 years, 11 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_25, VERSION_1_9_24, VERSION_1_9_23, VERSION_1_10_1
Changes since 1.9: +3 -1 lines
Diff to previous 1.9 (colored) to selected 1.12 (colored)

Add support/ignoring of \f(xy, \f[X...], \F(xy, \FX, \F[X...] roff-style font escapes (noted by Frantisek Holop).

Revision 1.9 / (download) - annotate - [select for diffs], Thu Nov 12 08:21:05 2009 UTC (14 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: 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-pre1, VERSION_1_9_15, VERSION_1_9_14
Changes since 1.8: +2 -1 lines
Diff to previous 1.8 (colored) to selected 1.12 (colored)

Fixed \c support for all input and output modes (documented in mandoc_char.7).

Revision 1.8 / (download) - annotate - [select for diffs], Sun Nov 8 09:23:35 2009 UTC (14 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.7: +10 -4 lines
Diff to previous 1.7 (colored) to selected 1.12 (colored)

a2roffdeco() now supports \s escapes.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Nov 7 08:26:45 2009 UTC (14 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.6: +13 -1 lines
Diff to previous 1.6 (colored) to selected 1.12 (colored)

Initial abstraction of front-end decoration events (special characters, text decorations, etc.).

Revision 1.6 / (download) - annotate - [select for diffs], Thu Oct 22 18:55:33 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_13, VERSION_1_9_12, VERSION_1_9_11, VERSION_1_9_10
Changes since 1.5: +4 -1 lines
Diff to previous 1.5 (colored) to selected 1.12 (colored)

Fixed maddening mismatch between groff and strftime mismatch of day ("%e").  Noted by Ulrich Sporlein.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Oct 18 19:02:11 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_9
Changes since 1.4: +3 -2 lines
Diff to previous 1.4 (colored) to selected 1.12 (colored)

Had out.h roff-scale converters accept default unit scale (because -mdoc and -man differ).

Revision 1.4 / (download) - annotate - [select for diffs], Fri Oct 9 06:54:11 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_8, VERSION_1_9_7
Changes since 1.3: +7 -4 lines
Diff to previous 1.3 (colored) to selected 1.12 (colored)

Scaling factor made floating point (as per groff.7) and, e.g., gnu/usr.bin/cvs/man/cvs.1.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Oct 7 12:35:24 2009 UTC (14 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.2: +32 -6 lines
Diff to previous 1.2 (colored) to selected 1.12 (colored)

Additions to -Tman -Thtml: all structural components tested & in place.
Fitted both -Thtml with handling of arbitrary vertical and horizontal scaling units (see groff(7)).  Undocumented until fitted into -Tascii (next release).

Revision 1.2, Mon Sep 21 13:06:13 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_5
Changes since 1.1: +1 -1 lines
FILE REMOVED

Removed new-born out.{h,c} (not a good idea).
Removed if 0 for HTML-mode output (why not).
Added option -oxxxx for passing options to output devices.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Sep 21 00:39:02 2009 UTC (14 years, 6 months ago) by kristaps
Branch: MAIN
Diff to selected 1.12 (colored)

Tentative addition of front-end utility functions (out.h) (not sure if it's necessary).
More -Thtml installments.

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