CVS log for mandoc/main.h

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.30 / (download) - annotate - [select for diffs], Sun Mar 3 13:02:11 2019 UTC (17 months, 1 week ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5, HEAD
Changes since 1.29: +3 -2 lines
Diff to previous 1.29 (colored)

Reset HTML formatter state, in particular the id_unique hash,
after processing each manual page, such that the next page
starts from a clean state and doesn't continue suffix numbering.

Issue found while looking at https://github.com/Debian/debiman/issues/48
which was brought up by Orestis Ioannou <oorestisime at github>.

Revision 1.29 / (download) - annotate - [select for diffs], Sun Dec 30 00:49:55 2018 UTC (19 months, 1 week ago) by schwarze
Branch: MAIN
Changes since 1.28: +10 -10 lines
Diff to previous 1.28 (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.28 / (download) - annotate - [select for diffs], Thu Aug 23 19:33:27 2018 UTC (23 months, 2 weeks ago) by schwarze
Branch: MAIN
Changes since 1.27: +1 -2 lines
Diff to previous 1.27 (colored)

The upcoming .while request will have to re-execute roff(7) lines
parsed earlier, so they will have to be saved for reuse - but the
read.c preparser does not know yet whether a line contains a .while
request before passing it to the roff parser.  To cope with that,
save all parsed lines for now.  Even shortens the code by 20 lines.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Mar 3 14:23:23 2017 UTC (3 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_4, VERSION_1_14_3, VERSION_1_14_2
Changes since 1.26: +3 -1 lines
Diff to previous 1.26 (colored)

new -mdoc -Tmarkdown output mode; OK millert@ reyk@ tb@;
thanks to reyk@ and to Vsevolod at FreeBSD for suggesting it

Revision 1.26 / (download) - annotate - [select for diffs], Fri Jul 15 19:33:01 2016 UTC (4 years ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_1, VERSION_1_13
Changes since 1.25: +1 -3 lines
Diff to previous 1.25 (colored)

To remove the const qualifier from a pointer to an object - either
because we know it is actually mutable or because we are passing
it to a function that doesn't accept a const object but won't
actually attempt to modify it - simply casting from (const type *)
to (type *) is legal C and clearly expresses the intent.
So get rid of the obfuscating UNCONST macro.
Basic idea discussed with guenther@.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Jul 8 22:29:05 2016 UTC (4 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_4
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

ISO C99 7.19.2.5 doesn't like mixing putchar(3) and putwchar(3) on
the same stream, and actually, it fails spectacularly on glibc.
Portability issue pointed out by Svyatoslav Mishyn <juef at openmailbox
dot org> after testing on Void Linux.

Revision 1.24 / (download) - annotate - [select for diffs], Sat Nov 7 14:01:16 2015 UTC (4 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.23: +1 -5 lines
Diff to previous 1.23 (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.23 / (download) - annotate - [select for diffs], Tue Oct 13 22:59:54 2015 UTC (4 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.22: +7 -14 lines
Diff to previous 1.22 (colored)

Major character table cleanup:
* Use ohash(3) rather than a hand-rolled hash table.
* Make the character table static in the chars.c module:
There is no need to pass a pointer around, we most certainly
never want to use two different character tables concurrently.
* No need to keep the characters in a separate file chars.in;
that merely encourages downstream porters to mess with them.
* Sort the characters to agree with the mandoc_chars(7) manual page.
* Specify Unicode codepoints in hex, not decimal (that's the detail
that originally triggered this patch).
No functional change, minus 100 LOC, and i don't see a performance change.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Apr 18 16:06:40 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.21: +10 -11 lines
Diff to previous 1.21 (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.21 / (download) - annotate - [select for diffs], Fri Mar 27 21:33:20 2015 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.20: +17 -10 lines
Diff to previous 1.20 (colored)

Actually use the new man.conf(5) "output" directive.
Additional functionality, yet minus 45 lines of code.

Revision 1.20 / (download) - annotate - [select for diffs], Wed Dec 31 16:52:40 2014 UTC (5 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_3
Changes since 1.19: +3 -1 lines
Diff to previous 1.19 (colored)

When showing more than one formatted manual page, insert horizontal lines
between pages.  Suggested by Theo Buehler <theo at math dot ethz dot ch>.
Even in UTF-8 output mode, do not use fancy line drawing characters such
that you can easily use /^--- to skip to the next manual in your pager.

Revision 1.19 / (download) - annotate - [select for diffs], Mon Dec 1 08:05:52 2014 UTC (5 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_2
Changes since 1.18: +4 -4 lines
Diff to previous 1.18 (colored)

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

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

remove unneccessary inclusion protection; patch from deraadt@

Revision 1.17 / (download) - annotate - [select for diffs], Tue Oct 28 17:36:19 2014 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.16: +7 -8 lines
Diff to previous 1.16 (colored)

Make the character table available to libroff so it can check the
validity of character escape names and warn about unknown ones.
This requires mchars_spec2cp() to report unknown names again.
Fortunately, that doesn't require changing the calling code because
according to groff, invalid character escapes should not produce
output anyway, and now that we warn about them, that's fine.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Apr 20 16:46:04 2014 UTC (6 years, 3 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_1, VERSION_1_12_4, VERSION_1_12
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (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.15 / (download) - annotate - [select for diffs], Thu Oct 6 22:29:12 2011 UTC (8 years, 10 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_12_3, VERSION_1_12_2, VERSION_1_12_1, VERSION_1_12_0
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (colored)

If -Tman is specified and input is -man, echo the preprocessed (`so'
replaced by file) input.  This replaces earlier behaviour of doing
nothing, which I found unexpected (mandoc should always output).

This requires a buffer in read.c that saves the input lines before being
parsed, with a special hook if `so' is invoked.  This buffer is just
flushed to output if -mman is the input.

While mucking around doing this, I also alpha-ordered the mandoc.h
functions.

Ok schwarze@, with no screaming when the polished patch was published.

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

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

Revision 1.13 / (download) - annotate - [select for diffs], Sat Sep 17 15:00:51 2011 UTC (8 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.12: +3 -1 lines
Diff to previous 1.12 (colored)

Initial, incomplete support for -Tman
to convert mdoc(7) documents to the man(7) language.
This is work in progress and will be developed in tree.
It does already handle the cat(1) manual,
but will hardly handle all your fancy manuals yet.
go ahead  kristaps@ jmc@ millert@ deraadt@

Revision 1.12 / (download) - annotate - [select for diffs], Fri May 20 15:48:22 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_7, VERSION_1_11_6, VERSION_1_11_5, VERSION_1_11_4, VERSION_1_11_3
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (colored)

Flip on -Tutf8 backend support.  This forces the UTF-8 LC_CTYPE and does
little else.  Also remove the check for __STDC_ISO_10646__.  It turns
out that very few systems---even those that support it---actually
declare this and it's just causing problems instead of being useful.

Revision 1.11 / (download) - annotate - [select for diffs], Tue May 17 14:38:34 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored)

Add mode for -Tlocale.  This mode, with this commit, behaves exactly
like -Tascii.  While adding this, inline term_alloc() (was a one-liner),
remove some switches around the terminal encoding for the symbol table
(unnecessary), and split out ascii_alloc() into ascii_init(), which is
also called from locale_init().

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jul 31 23:52:58 2010 UTC (10 years ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_11_2, VERSION_1_11_1, VERSION_1_10_9, VERSION_1_10_8, VERSION_1_10_7, VERSION_1_10_6, VERSION_1_10_10
Changes since 1.9: +2 -2 lines
Diff to previous 1.9 (colored)

Sync to OpenBSD: add missing Copyright years.
I checked that substantial changes were committed
to these files during these years.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jul 25 11:44:31 2010 UTC (10 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_5
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored)

Initial PDF shim over PS.  This produces working PDF output with -Tpdf.
It's currently missing the xref table, so you'll get a warning in most
PDF viewers).  It also produces lots of redundant output, which will go
away once I get a better handle on the PDF spec.  The code doesn't
really touch any existing functionality; it's a bunch of conditionals
atop the -Tps (term_ps.c) implementation.  I'm checking it in now to
have it exist and be auditable.  It needs clean-up, polish, and general
care (and xref!).

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jun 29 14:53:14 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_5_PREPDF, VERSION_1_10_4, VERSION_1_10_3
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Add in -Opaper=xxx support for -Tps postscript.  This doesn't have any
functional changes beyond the getsubopt() parse in term_ps.c.  If you
want to test this (it only does -Opaper=a4 and -Opaper=letter; adding
more is trivial), make sure you specify (e.g.) -sPAPERSIZE=a4 to gs(1).

Revision 1.7 / (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.6: +2 -2 lines
Diff to previous 1.6 (colored)

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

Revision 1.6 / (download) - annotate - [select for diffs], Tue Jun 8 13:22:37 2010 UTC (10 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.5: +5 -2 lines
Diff to previous 1.5 (colored)

No functionality changes: just restructuring.  Deprecated
terminal_free() in favour of ps_free() and ascii_free().  Moved ps_*()
functions into term_ps.c so that they don't clutter up term.c.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jun 7 20:57:09 2010 UTC (10 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_1
Changes since 1.4: +2 -1 lines
Diff to previous 1.4 (colored)

First check-in of PostScript output.  This does not change any logic
within term.c, but does add a small shim over putchar() that switches on
the output engine.  Prints, for this initial version, only monospace and
without font decorations.  It's a start.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Jun 7 10:52:44 2010 UTC (10 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.3: +5 -2 lines
Diff to previous 1.3 (colored)

Add -Owidth=width option to mandoc -Tascii.  Asked for by joerg@ about a
thousand years ago.  Note that this is normalised to >=60.

Revision 1.3 / (download) - annotate - [select for diffs], Sat May 15 16:18:23 2010 UTC (10 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

Make the output width an option for ascii_alloc and use that to compute
the default margin. Hard-code 80 chars/line for now.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Jan 29 14:39:38 2010 UTC (10 years, 6 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
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

Fixed Makefile for `make lint' dep. on config.h
Added -Txhtml for XHTML output (minimal increase to programme logic).  Because groff has it and it bothers me that we don't.

Revision 1.1 / (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_15-pre2, VERSION_1_9_15-pre1, VERSION_1_9_14, VERSION_1_9_13, VERSION_1_9_12, VERSION_1_9_11, VERSION_1_9_10

Moved output definitions into main.h.
Pushed terminal_{mdoc,man} into {mdoc,man}_term.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