CVS log for mandoc/man_macro.c

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.145 / (download) - annotate - [select for diffs], Wed Sep 9 17:01:10 2020 UTC (4 months, 1 week ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.144: +7 -5 lines
Diff to previous 1.144 (unified)

Element next-line scopes can nest.  Consequently, even when closing
one element next-line scope, the MAN_ELINE flag must not yet be
cleared if the parent macro is another element macro having next-line
scope, or an assertion failure is caused if all this is wrapped in
another macro that has block next-line scope, for example .TP.
Bug found in an afl run performed by Jan Schreiber <jes at posteo dot de>.

Revision 1.144 / (download) - annotate - [select for diffs], Sat Jan 5 18:59:46 2019 UTC (2 years ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5
Changes since 1.143: +5 -2 lines
Diff to previous 1.143 (unified)

In HTML output, man(7) .RS blocks get formatted as <div class="Bd-indent">,
and i can see no reasonable alternative: they do indeed represent indented
displays.  They certainly require flow context and make no sense in phrasing
context.  Consequently, they have to suspend no-fill mode during their head,
in just the same way as other paragraph-type macros do it.

This fixes HTML syntax errors that resulted from .nf followed by .RS.

Revision 1.143 / (download) - annotate - [select for diffs], Sat Jan 5 00:36:50 2019 UTC (2 years ago) by schwarze
Branch: MAIN
Changes since 1.142: +4 -2 lines
Diff to previous 1.142 (unified)

Some high-level block macros have an effect similar to temporarily
suspending no-fill mode during their head.  Model this with an
additional roff parser state flag ROFF_NONOFILL.  That is much
simpler than it would be to save and restore the ROFF_NOFILL flag
itself, in particular since the latter can be switched (with lasting
effect) by the .nf and .fi requests even while its effect is
temporarily suspended.

This commit does not change formatting yet, but prepares for future
formatting simplifications and improvements.

Revision 1.142 / (download) - annotate - [select for diffs], Mon Dec 31 10:04:39 2018 UTC (2 years ago) by schwarze
Branch: MAIN
Changes since 1.141: +2 -2 lines
Diff to previous 1.141 (unified)

Cleanup, no functional change:
Since the man(7) and roff(7) validators no longer use the parser
state flag ROFF_NOFILL, we can finally get rid of the function
man_state(), resulting in a better separation of parsing and validation.

Revision 1.141 / (download) - annotate - [select for diffs], Mon Dec 31 08:03:46 2018 UTC (2 years ago) by schwarze
Branch: MAIN
Changes since 1.140: +6 -1 lines
Diff to previous 1.140 (unified)

For .EX and .EE, set the fill mode parser state directly in the
macro parsing function, in the same way as the roff parser already
does it for the .nf and .fi requests.  This is a preparation for
getting rid of the ugly function man_state() later on.

Revision 1.140 / (download) - annotate - [select for diffs], Mon Dec 31 07:08:12 2018 UTC (2 years ago) by schwarze
Branch: MAIN
Changes since 1.139: +4 -11 lines
Diff to previous 1.139 (unified)

Move parsing of the .nf and .fi (fill mode) requests from the man(7)
parser to the roff(7) parser.  As a side effect, .nf and .fi are
now also parsed in mdoc(7) input, though the mdoc(7) formatters
still ignore most of their effect.

Revision 1.139 / (download) - annotate - [select for diffs], Mon Dec 31 04:55:46 2018 UTC (2 years ago) by schwarze
Branch: MAIN
Changes since 1.138: +1 -3 lines
Diff to previous 1.138 (unified)

Cleanup, minus 15 LOC, no functional change:
Simplify the way the man(7) and mdoc(7) validators are called.
Reset the parser state with a common function before calling them.
There is no need to again reset the parser state afterwards,
the parsers are no longer used after validation.
This allows getting rid of man_node_validate() and mdoc_node_validate()
as separate functions.

Revision 1.138 / (download) - annotate - [select for diffs], Sun Dec 30 00:49:55 2018 UTC (2 years ago) by schwarze
Branch: MAIN
Changes since 1.137: +2 -2 lines
Diff to previous 1.137 (unified)

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.137 / (download) - annotate - [select for diffs], Fri Dec 21 17:15:18 2018 UTC (2 years ago) by schwarze
Branch: MAIN
Changes since 1.136: +13 -7 lines
Diff to previous 1.136 (unified)

Rename mandoc_getarg() to roff_getarg() and pass it the roff parser
struct as an argument such that after copy-in, it can call roff_expand()
once again, which used to be called roff_res() before this.  This
fixes a subtle low-level roff(7) parsing bug reported by Fabio
Scotoni <fabio at esse dot ch> in the 4.4BSD-Lite2 mdoc.samples(7)
manual page, because that page used an escaped escape sequence in
a macro argument.

To expand escaped escape sequences in quoted mdoc(7) arguments, too,
stop bypassing the call to roff_getarg() in mdoc_argv.c, function args()
for this case.  This does not solve the case of escaped escape sequences
in quoted .Bl -column phrases yet.

Because roff_expand() can make the string longer, roff_getarg() can no
longer operate in-place but needs to malloc(3) the returned string.
In the high-level parsers, free(3) that string after processing it.

Revision 1.136 / (download) - annotate - [select for diffs], Fri Dec 14 06:33:14 2018 UTC (2 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.135: +2 -2 lines
Diff to previous 1.135 (unified)

Cleanup, no functional change:
Now that message handling is properly encapsulated,
remove struct mparse pointers from four structs (roff, roff_man,
tbl_node, eqn_node) and from the argument lists of five functions
(roff_alloc, roff_man_alloc, mandoc_getarg, tbl_alloc, eqn_alloc).
Except for being passed to the main program as an opaque object,
it now only occurs in read.c, as it should, and not across 15 files
like in the past.

Revision 1.135 / (download) - annotate - [select for diffs], Fri Dec 14 05:18:02 2018 UTC (2 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.134: +15 -17 lines
Diff to previous 1.134 (unified)

Almost mechanical diff to remove the "struct mparse *" argument
from mandoc_msg(), where it is no longer used.
While here, rename mandoc_vmsg() to mandoc_msg() and retire the
old version:  There is really no point in having another function
merely to save "%s" in a few places.
Minus 140 lines of code.

Revision 1.134 / (download) - annotate - [select for diffs], Fri Dec 14 01:18:25 2018 UTC (2 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.133: +2 -1 lines
Diff to previous 1.133 (unified)

Major cleanup; may imply minor changes in edge cases of error reporting.

Finally, drop support for the run-time configurable mandocmsg()
callback.  It was over-engineered from the start, never used for
anything in a decade, and repeatedly caused maintenance headaches.

Consolidate reporting infrastructure into two files, mandoc.h and
mandoc_msg.c, mopping up the bits and pieces that were scattered
around main.c, read.c, mandoc_parse.h, libmandoc.h, the prototypes
of four parsing-related functions, and both parser structs.

Revision 1.133 / (download) - annotate - [select for diffs], Sun Aug 26 16:21:24 2018 UTC (2 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.132: +37 -32 lines
Diff to previous 1.132 (unified)

Support nesting of elements with next-line scope.
For example, ksh93(1) needs this for .B\n.SM.

Revision 1.132 / (download) - annotate - [select for diffs], Sat Aug 18 20:41:54 2018 UTC (2 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.131: +3 -2 lines
Diff to previous 1.131 (unified)

paragraphs can contain .MT and .UR blocks

Revision 1.131 / (download) - annotate - [select for diffs], Sat Aug 18 17:32:37 2018 UTC (2 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.130: +7 -1 lines
Diff to previous 1.130 (unified)

.RE causes a line break even if .RS is not open

Revision 1.130 / (download) - annotate - [select for diffs], Sat Aug 18 15:13:32 2018 UTC (2 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.129: +3 -1 lines
Diff to previous 1.129 (unified)

end of sentence detection after .ME and .UE, useful for some GNU manuals

Revision 1.129 / (download) - annotate - [select for diffs], Sat Aug 18 14:02:56 2018 UTC (2 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.128: +9 -2 lines
Diff to previous 1.128 (unified)

Two consecutive .SY blocks only get a blank line in between
if the first one is explicitly closed with .YS.

Revision 1.128 / (download) - annotate - [select for diffs], Sat Aug 18 02:08:27 2018 UTC (2 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.127: +6 -1 lines
Diff to previous 1.127 (unified)

implement the GNU man-ext .SY/.YS (synopsis block) macro in man(7),
used in most manual pages of the groff package

Revision 1.127 / (download) - annotate - [select for diffs], Fri Aug 17 20:33:37 2018 UTC (2 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.126: +16 -10 lines
Diff to previous 1.126 (unified)

Remove more pointer arithmetic passing via regions outside the array
that is undefined according to the C standard.  Robert Elz <kre at
munnari dot oz dot au> pointed out i wasn't quite done yet.

Revision 1.126 / (download) - annotate - [select for diffs], Thu Aug 16 23:43:37 2018 UTC (2 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.125: +3 -2 lines
Diff to previous 1.125 (unified)

implement the GNU man-ext .TQ macro in man(7),
used for example by groff_diff(7)

Revision 1.125 / (download) - annotate - [select for diffs], Wed Aug 15 15:37:25 2018 UTC (2 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.124: +2 -2 lines
Diff to previous 1.124 (unified)

fix incomplete variable renaming in previous;
found by Thomas Klausner <wiz at NetBSD> via a compiler warning

Revision 1.124 / (download) - annotate - [select for diffs], Tue Aug 14 01:27:48 2018 UTC (2 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.123: +27 -20 lines
Diff to previous 1.123 (unified)

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

Revision 1.123 / (download) - annotate - [select for diffs], Sun Jun 25 11:45:37 2017 UTC (3 years, 6 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_4, VERSION_1_14_3, VERSION_1_14_2
Changes since 1.122: +6 -1 lines
Diff to previous 1.122 (unified)

add support for the MT and ME mailto macros, used for example in wg(8);
patch from bentley@

Revision 1.122 / (download) - annotate - [select for diffs], Sat Jun 17 16:47:48 2017 UTC (3 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.121: +2 -2 lines
Diff to previous 1.121 (unified)

if .in is used inside the .TP head, it's always relative

Revision 1.121 / (download) - annotate - [select for diffs], Tue Jun 13 19:34:40 2017 UTC (3 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.120: +15 -2 lines
Diff to previous 1.120 (unified)

Partial support for the \n[an-margin] number register.

Manuals autogenerated from reStructuredText are reckless enough
to peek at this non-portable, implementation-dependent, highly
groff-specific internal register - for no good reason, because the
man(7) language natively provides in a much simpler way what they
are trying to emulate here with much fragility.

A full implementation would be very hard because it would require
access to output-device-specific formatting data at the roff(7)
preprocessor stage, which mandoc doesn't support at all.
So hardcode a few magic numbers as reStructuredText expects them
for terminal output.  For other output modes (like HTML), code using
this register is utterly broken anyway.

Revision 1.120 / (download) - annotate - [select for diffs], Fri May 5 15:17:32 2017 UTC (3 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.119: +2 -4 lines
Diff to previous 1.119 (unified)

Move .sp to the roff modules.  Enough infrastructure is in place
now that this actually saves code: -70 LOC.

Revision 1.119 / (download) - annotate - [select for diffs], Fri May 5 13:17:54 2017 UTC (3 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.118: +1 -2 lines
Diff to previous 1.118 (unified)

move .ll to the roff modules

Revision 1.118 / (download) - annotate - [select for diffs], Fri May 5 02:06:19 2017 UTC (3 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.117: +2 -3 lines
Diff to previous 1.117 (unified)

Move handling of the roff(7) .ft request from the man(7)
modules to the new roff(7) modules.  As a side effect,
mdoc(7) now handles .ft, too.  Of course, do not use that.

Revision 1.117 / (download) - annotate - [select for diffs], Thu May 4 17:48:28 2017 UTC (3 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.116: +2 -4 lines
Diff to previous 1.116 (unified)

Parser reorg:
Generate the first node on the roff level: .br
Fix some column numbers in diagnostic messages while here.

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

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.115 / (download) - annotate - [select for diffs], Tue Jan 10 13:47:00 2017 UTC (4 years ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_1, VERSION_1_13
Changes since 1.114: +6 -6 lines
Diff to previous 1.114 (unified)

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

Revision 1.114 / (download) - annotate - [select for diffs], Fri Jan 8 17:48:09 2016 UTC (5 years ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_4
Changes since 1.113: +2 -2 lines
Diff to previous 1.113 (unified)

Delete the redundant "nchild" member of struct roff_node, replacing
most uses by one, a few by two pointer checks, and only one by a
tiny loop - not only making data smaller, but code shorter as well.

This gets rid of an implicit invariant that confused both static
analysis tools and human auditors.  No functional change.

Revision 1.113 / (download) - annotate - [select for diffs], Thu Oct 22 21:54:23 2015 UTC (5 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.112: +5 -19 lines
Diff to previous 1.112 (unified)

move man(7) validation into the dedicated validation phase, too

Revision 1.112 / (download) - annotate - [select for diffs], Tue Oct 6 18:32:19 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.111: +3 -3 lines
Diff to previous 1.111 (unified)

modernize style: "return" is not a function

Revision 1.111 / (download) - annotate - [select for diffs], Sat Sep 26 00:54:04 2015 UTC (5 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.110: +1 -2 lines
Diff to previous 1.110 (unified)

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

Revision 1.110 / (download) - annotate - [select for diffs], Fri Sep 4 21:25:00 2015 UTC (5 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.109: +3 -3 lines
Diff to previous 1.109 (unified)

Fill mode changes don't break next-line scope in all cases,
in particular not for tagged paragraphs.
Issue found by Christian Neukirchen <chneukirchen at gmail dot com>
in the exiv2(1) manual page.

Revision 1.109 / (download) - annotate - [select for diffs], Thu Apr 23 15:35:59 2015 UTC (5 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.108: +2 -3 lines
Diff to previous 1.108 (unified)

Get rid of two empty wrapper functions.  No functional change.

Revision 1.108 / (download) - annotate - [select for diffs], Sun Apr 19 14:57:38 2015 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.107: +4 -5 lines
Diff to previous 1.107 (unified)

Unify trickier node handling functions.
* man_elem_alloc() -> roff_elem_alloc()
* man_block_alloc() -> roff_block_alloc()
The functions mdoc_elem_alloc() and mdoc_block_alloc() remain for
now because they need to do mdoc(7)-specific argument processing.

Revision 1.107 / (download) - annotate - [select for diffs], Sun Apr 19 14:25:41 2015 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.106: +5 -5 lines
Diff to previous 1.106 (unified)

Unify some node handling functions that use TOKEN_NONE.
* mdoc_word_alloc(), man_word_alloc() -> roff_word_alloc()
* mdoc_word_append(), man_word_append() -> roff_word_append()
* mdoc_addspan(), man_addspan() -> roff_addtbl()
* mdoc_addeqn(), man_addeqn() -> roff_addeqn()
Minus 50 lines of code, no functional change.

Revision 1.106 / (download) - annotate - [select for diffs], Sun Apr 19 13:50:25 2015 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.105: +9 -7 lines
Diff to previous 1.105 (unified)

Unify node handling functions:
* node_alloc() for mdoc and man_node_alloc() -> roff_node_alloc()
* node_append() for mdoc and man_node_append() -> roff_node_append()
* mdoc_head_alloc() and man_head_alloc() -> roff_head_alloc()
* mdoc_body_alloc() and man_body_alloc() -> roff_body_alloc()
* mdoc_node_unlink() and man_node_unlink() -> roff_node_unlink()
* mdoc_node_free() and man_node_free() -> roff_node_free()
* mdoc_node_delete() and man_node_delete() -> roff_node_delete()
Minus 130 lines of code, no functional change.

Revision 1.105 / (download) - annotate - [select for diffs], Sat Apr 18 16:06:40 2015 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.104: +9 -9 lines
Diff to previous 1.104 (unified)

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.104 / (download) - annotate - [select for diffs], Fri Apr 3 23:19:15 2015 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.103: +34 -119 lines
Diff to previous 1.103 (unified)

Vastly simplify man(7) block unwinding, similar to mdoc_macro.c 1.171.
Drop one enum type, two static functions, 70 lines of code.
Also fixes the mpeg_encode(1) manual reported broken by naddy@.

Revision 1.103 / (download) - annotate - [select for diffs], Fri Apr 3 17:00:52 2015 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.102: +2 -2 lines
Diff to previous 1.102 (unified)

It turns out the man(7) parser suffers from unintelligible handling
of block rewinding, just like then mdoc(7) parser did.
First step in getting rid of rew_scope():
Replace the only call where the target block is known.
This commit is analogous to mdoc_macro.c rev. 1.167.
One down, three to go.

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

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.101 / (download) - annotate - [select for diffs], Thu Apr 2 21:36:50 2015 UTC (5 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.100: +30 -29 lines
Diff to previous 1.100 (unified)

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.100 / (download) - annotate - [select for diffs], Fri Mar 20 14:47:52 2015 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.99: +2 -2 lines
Diff to previous 1.99 (unified)

The .PD macro can occur in next-line scope.  Fixes zshmisc(1).
Issue reported by Christian Neukirchen <chneukirchen at gmail dot com>.

Revision 1.99 / (download) - annotate - [select for diffs], Fri Mar 20 12:54:22 2015 UTC (5 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.98: +18 -16 lines
Diff to previous 1.98 (unified)

Simplify by almost halving the number of macro flags:
1. MAN_EXPLICIT was used iff fp == blk_exp, so just test fp.
2. MAN_FSCOPED was used only for TP, so just test for TP.
3. MAN_NOCLOSE was completely unused.
No functional change.

Revision 1.98 / (download) - annotate - [select for diffs], Fri Feb 6 11:54:36 2015 UTC (5 years, 11 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_3
Changes since 1.97: +11 -17 lines
Diff to previous 1.97 (unified)

better error reporting regarding .OP .RS .UR .TH arguments

Revision 1.97 / (download) - annotate - [select for diffs], Fri Feb 6 09:38:43 2015 UTC (5 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.96: +8 -1 lines
Diff to previous 1.96 (unified)

better diagnostics about excess arguments to .PD .ft .sp

Revision 1.96 / (download) - annotate - [select for diffs], Fri Feb 6 08:28:35 2015 UTC (5 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.95: +8 -1 lines
Diff to previous 1.95 (unified)

better error reporting for .br .fi .nf with arguments

Revision 1.95 / (download) - annotate - [select for diffs], Sat Jan 24 10:08:53 2015 UTC (5 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.94: +13 -2 lines
Diff to previous 1.94 (unified)

preserve .PP before .RE; effect found in audio/pms(1)

Revision 1.94 / (download) - annotate - [select for diffs], Sat Jan 24 02:41:49 2015 UTC (5 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.93: +1 -2 lines
Diff to previous 1.93 (unified)

Strangely, ignoring the roff(7) .na request was implemented in the man(7)
parser.  Simplify the code by moving it into the roff(7) parser, also
making it work for mdoc(7).

Revision 1.93 / (download) - annotate - [select for diffs], Sat Jan 24 01:58:33 2015 UTC (5 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.92: +23 -3 lines
Diff to previous 1.92 (unified)

Support .RE with an argument; needed for audio/pms(1).

Revision 1.92 / (download) - annotate - [select for diffs], Tue Dec 16 17:26:00 2014 UTC (6 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.91: +3 -3 lines
Diff to previous 1.91 (unified)

Explicit block closure macros clobber next-line block head scope,
just like explicit block macros themselves.
Fixing an assertion failure jsg@ found with afl.

Revision 1.91 / (download) - annotate - [select for diffs], Fri Nov 28 05:51:32 2014 UTC (6 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_2
Changes since 1.90: +54 -87 lines
Diff to previous 1.90 (unified)

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

Revision 1.90 / (download) - annotate - [select for diffs], Mon Nov 3 23:18:39 2014 UTC (6 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.89: +11 -8 lines
Diff to previous 1.89 (unified)

Allow the five man(7) font macros to concatenate their line arguments,
the same way the mdoc(7) macros marked MDOC_JOIN do it.
In -Thtml, this removes bogus <br/> when the font macros are used
in no-fill mode; issue found by jsg@ in the Xcursor(3) SYNOPSIS.
As a bonus, this slightly reduces the size of the syntax tree.

Revision 1.89 / (download) - annotate - [select for diffs], Mon Aug 18 16:36:54 2014 UTC (6 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_4, VERSION_1_12
Changes since 1.88: +13 -2 lines
Diff to previous 1.88 (unified)

When the first child of the node being validated gets deleted during
validation, man_node_unlink() switches to MAN_NEXT_CHILD.  After
that, we have to switch back to MAN_NEXT_SIBLING after completing
validation, or subsequent parsing would add content into an already
closed node, clobbering potentially existing children, causing
information loss and a memory leak.  Bug found by kristaps@ with
valgrind in groff(7) on Mac OS X.

Note that the switch back must be conditional, for if the node being
validated itself gets deleted, we must *not* go to MAN_NEXT_SIBLING,
which would not only yield wrong results in general but also crash
in malformed manuals having an empty paragraph before the first .SH,
for example OpenBSD c++filt(1).

Revision 1.88 / (download) - annotate - [select for diffs], Sun Aug 10 23:54:41 2014 UTC (6 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.87: +3 -3 lines
Diff to previous 1.87 (unified)

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.87 / (download) - annotate - [select for diffs], Wed Jul 30 23:01:39 2014 UTC (6 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_1
Changes since 1.86: +30 -8 lines
Diff to previous 1.86 (unified)

Improve handling of next-line scope broken by end of file.
Detect the condition earlier, report in the error message
which block is broken, and delete the broken block.
Consequently, empty section headers can no longer happen.

Revision 1.86 / (download) - annotate - [select for diffs], Wed Jul 30 21:18:24 2014 UTC (6 years, 5 months ago) by schwarze
Branch: MAIN
Changes since 1.85: +1 -8 lines
Diff to previous 1.85 (unified)

garbage collect three unused global flags; no functional change

Revision 1.85 / (download) - annotate - [select for diffs], Wed Jul 9 11:28:26 2014 UTC (6 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.84: +1 -3 lines
Diff to previous 1.84 (unified)

delete forgotten, obsolete rew_warn() prototype

Revision 1.84 / (download) - annotate - [select for diffs], Mon Jul 7 21:36:20 2014 UTC (6 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.83: +4 -3 lines
Diff to previous 1.83 (unified)

Clean up ERROR messages related to document structure and macros:
Hierarchical naming and mention macro names in messages.

Revision 1.83 / (download) - annotate - [select for diffs], Mon Jul 7 19:18:15 2014 UTC (6 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.82: +22 -46 lines
Diff to previous 1.82 (unified)

Simplify man_unscope(), removing 18 lines of code, that is,
removing one function argument, one function definition,
three function invocations and two pointless assert()s.
No functional change.

Revision 1.82 / (download) - annotate - [select for diffs], Sun Apr 20 16:46:04 2014 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.81: +23 -37 lines
Diff to previous 1.81 (unified)

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

Revision 1.81 / (download) - annotate - [select for diffs], Sun Mar 30 19:47:48 2014 UTC (6 years, 9 months ago) by schwarze
Branch: MAIN
Changes since 1.80: +2 -1 lines
Diff to previous 1.80 (unified)

Implement the roff(7) .ll (line length) request.
Found by naddy@ in the textproc/enchant(1) port.
Of course, do not use this in new manuals.

Revision 1.80 / (download) - annotate - [select for diffs], Tue Dec 31 23:23:10 2013 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.79: +2 -2 lines
Diff to previous 1.79 (unified)

Simplify: Remove an unused argument from the mandoc_eos() function.
No functional change.

Revision 1.79 / (download) - annotate - [select for diffs], Wed Dec 25 00:50:05 2013 UTC (7 years ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_3
Changes since 1.78: +2 -1 lines
Diff to previous 1.78 (unified)

s/[Nn]ull/NUL/ in comments where appropriate;
suggested by Thomas Klausner <wiz @ NetBSD dot org>.

Revision 1.78 / (download) - annotate - [select for diffs], Sun Dec 22 13:25:17 2013 UTC (7 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.77: +10 -1 lines
Diff to previous 1.77 (unified)

Implement end-of-sentence spacing at the end of man(7) macro lines.

Patch from Franco Fichtner <franco at lastsummer dot de> (DragonFly).

Revision 1.77 / (download) - annotate - [select for diffs], Mon Nov 11 00:37:55 2013 UTC (7 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.76: +7 -5 lines
Diff to previous 1.76 (unified)

In the parser, when closing an explicit block that is not open,
close below-subsection implicit scopes that may still be open.
In the formatter, make sure indentation is reset when leaving a scope,
not only when entering the next one.

Improves the formatting of gpg(1); issue reported by jca on ports.

Revision 1.76 / (download) - annotate - [select for diffs], Thu Oct 17 20:54:58 2013 UTC (7 years, 3 months ago) by schwarze
Branch: MAIN
Changes since 1.75: +6 -1 lines
Diff to previous 1.75 (unified)

Implement the .UR/.UE block (uniform resource identifier) introduced in the
man-ext macros by Eric S. Raymond, enabled by default in groff_man(7).
Usual disclaimer: You don't write new man(7) code, so you are not going
to use these, either.
Improves e.g. the bzr(1) and etherape(1) manuals.
Thanks to naddy@ for bringing these to my attention.

Revision 1.75 / (download) - annotate - [select for diffs], Sat Nov 17 00:26:33 2012 UTC (8 years, 2 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_2
Changes since 1.74: +61 -61 lines
Diff to previous 1.74 (unified)

Cleanup naming of local variables to make the code easier on the eye:
Settle for "struct man *man", "struct mdoc *mdoc", "struct meta *meta"
and avoid the confusing "*m" which was sometimes this, sometimes that.
No functional change.

ok kristaps@ some time ago

Revision 1.74 / (download) - annotate - [select for diffs], Tue Jun 12 12:47:14 2012 UTC (8 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.73: +2 -2 lines
Diff to previous 1.73 (unified)

Fix an assert() raised by `RS' when following `TP'.
The reason was that `RS' wasn't BSCOPE'd, so the next-line (BLINE) scope
opened by `TP' would still be in the HEAD macro.
This was from joerg@'s archive of failures.

Revision 1.73 / (download) - annotate - [select for diffs], Sun Jun 3 09:52:07 2012 UTC (8 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.72: +29 -17 lines
Diff to previous 1.72 (unified)

Close a preceding implicit block before opening an explicit block.

To allow doing so, no longer abuse rew_scope() to unwind explicit blocks;
explicitly call man_unscope() instead.

Fixing the indentation of slapd.conf(5) in the OpenLDAP port;
thanks to guenther@ for the report.

Revision 1.72 / (download) - annotate - [select for diffs], Sat Jun 2 20:16:23 2012 UTC (8 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.71: +3 -1 lines
Diff to previous 1.71 (unified)

Minimal implementation of .EX and .EE for GNU compatibility.
Do not use this, it is not portable and only defined in esr's man-ext.
For example, sox(1) wants these macros.

Revision 1.71 / (download) - annotate - [select for diffs], Tue Jan 3 15:16:24 2012 UTC (9 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_12_1
Changes since 1.70: +2 -1 lines
Diff to previous 1.70 (unified)

Add support for `OP', one of the extended man macros.  This also requires
some man(7) changes to accomodate for the an-ext compatibility.

Revision 1.70 / (download) - annotate - [select for diffs], Sun Dec 4 00:44:12 2011 UTC (9 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.69: +1 -3 lines
Diff to previous 1.69 (unified)

Jumping out of man_unscope() for the root node is a bad idea
because that will skip root node validation, potentially entering
rendering modules will NULL pointers lurking in the meta data.
Instead, always validate the root node and (as suggested by joerg@)
assert validity of the meta data before using it in the renderers.
ok joerg@

Revision 1.69 / (download) - annotate - [select for diffs], Fri Nov 18 17:06:19 2011 UTC (9 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.68: +2 -2 lines
Diff to previous 1.68 (unified)

Fix condition. Not enough tea.

Revision 1.68 / (download) - annotate - [select for diffs], Fri Nov 18 16:43:29 2011 UTC (9 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.67: +2 -2 lines
Diff to previous 1.67 (unified)

Slightly adjust last: return successful as some times the correct error
is raised later.

Revision 1.67 / (download) - annotate - [select for diffs], Fri Nov 18 16:39:08 2011 UTC (9 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.66: +3 -2 lines
Diff to previous 1.66 (unified)

Convert an assert into an explicit check. man_unscope can be triggered
on unknown macros.

Revision 1.66 / (download) - annotate - [select for diffs], Mon Nov 7 01:24:40 2011 UTC (9 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.65: +12 -12 lines
Diff to previous 1.65 (unified)

When the HEAD scope of .TP is broken by another block macro,
do not abort with a FATAL error, but report a report a WARNING,
remove the broken .TP from the syntax tree, and prod on.
Reported repeatedly by ports people, at least by brad@ and jeremy@.
Also fixes rendition(4) in Xenocara.
ok kristaps@

Revision 1.65 / (download) - annotate - [select for diffs], Sun Sep 18 14:14:15 2011 UTC (9 years, 4 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_0
Changes since 1.64: +2 -2 lines
Diff to previous 1.64 (unified)

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

Revision 1.64 / (download) - annotate - [select for diffs], Thu Jul 7 05:42:32 2011 UTC (9 years, 6 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_7, VERSION_1_11_6, VERSION_1_11_5, VERSION_1_11_4
Changes since 1.63: +7 -7 lines
Diff to previous 1.63 (unified)

Fix a bug in the -man parser where deleting nodes (such as `PP' or `LP'
in certain situations) caused the next macros to be assigned as siblings
instead of child nodes to the original parent.  Noticed and ok by
schwarze@.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Jun 18 17:36:52 2011 UTC (9 years, 7 months ago) by kristaps
Branch: MAIN
Changes since 1.62: +1 -6 lines
Diff to previous 1.62 (unified)

Allow RS/RE blocks to nest.  This requires first the syntax tree to
accomodate for the fix, then for the front-ends.  -T[x]html accepted the
syntax tree natively, but -Tascii had to use relative offsets.  It's
quite a simple fix.

From a TODO by {dcoppa,dsoares}@openbsd.

Revision 1.62 / (download) - annotate - [select for diffs], Tue Apr 19 16:38:48 2011 UTC (9 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_3, VERSION_1_11_2
Changes since 1.61: +2 -2 lines
Diff to previous 1.61 (unified)

Clean up parsing of delimiters in -mdoc.  First, remove the "dowarn"
variable from mandoc_getarg() so that it prints the warning every time.
Then, remove the warning from args_checkpunct().  This way, warnings
are being posted at the correct time.  This makes the flag argument to
mdoc_zargs() superfluous, so make it be zero when it's invoked.  Finally,
move the args() flags into mdoc_argv.c and make them enums.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Apr 17 09:08:19 2011 UTC (9 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.60: +2 -2 lines
Diff to previous 1.60 (unified)

Get mdoc_argv.c ready to use [some of] mandoc_getarg() by giving said
function a parameter to suppress warnings.

Revision 1.60 / (download) - annotate - [select for diffs], Wed Mar 23 15:33:57 2011 UTC (9 years, 10 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_1
Changes since 1.59: +21 -4 lines
Diff to previous 1.59 (unified)

Merge man_args() into man_macro.c, the only place where it's called, and
make its return value boolean (we don't care about QWORD).  We can move
it into mdoc_macro.c because it's basically just a wrapper around
mandoc_getarg().  Then blow away man_argv.c, which is left empty.

Revision 1.59 / (download) - annotate - [select for diffs], Wed Mar 23 12:40:04 2011 UTC (9 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.58: +7 -21 lines
Diff to previous 1.58 (unified)

First, make -man ARGS_EOLN et al. be an enum.  Second, remove
ARGS_ERROR, as it is never returned by man_args().  Then clean up
invocations of man_args() to only check for ARGS_EOLN.

Revision 1.58 / (download) - annotate - [select for diffs], Tue Mar 22 14:33:05 2011 UTC (9 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.57: +2 -1 lines
Diff to previous 1.57 (unified)

libmdoc.h and libman.h were including mdoc.h and man.h, respectively.
Don't have them do that (includes in header files = faugh), and have
individual files directly include these files.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Mar 20 16:02:05 2011 UTC (9 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.56: +2 -1 lines
Diff to previous 1.56 (unified)

Consolidate messages.  Have all parse-time messages (in libmdoc,
libroff, etc., etc.) route into mandoc_msg() and mandoc_vmsg(), for the
time being in libmandoc.h.  This requires struct mparse to be passed
into the allocation routines instead of mandocmsg and a void pointer.
Then, move some of the functionality of the old mmsg() into read.c's
mparse_mmsg() (check against wlevel and setting of file_status) and use
main.c's mmsg() as simply a printing tool.

Revision 1.56 / (download) - annotate - [select for diffs], Thu Mar 17 11:56:17 2011 UTC (9 years, 10 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_10
Changes since 1.55: +12 -13 lines
Diff to previous 1.55 (unified)

Clean-up in libman: make all calls to man_*msg not check return value.
Also convert man_vmsg to return void.

Revision 1.55 / (download) - annotate - [select for diffs], Wed Jan 12 16:55:22 2011 UTC (10 years ago) by kristaps
Branch: MAIN
Changes since 1.54: +13 -5 lines
Diff to previous 1.54 (unified)

Downgrade -man message of ignored empty paragraph to MANDOC_IGNPAR.  The
change in man_macro.c was from an assertion caused by a subtle problem:
(1) macro is removed, causing m->last to be m->last->parent; (2) by jumping
to the m->last->parent after post-validation, the original
m->last->parent is skipped; (3) the rewinder climbs to the root of the
tree and aborts.

The original issue recorded in the TODO by schwarze@, reminded by Brad
Smith.

Revision 1.54 / (download) - annotate - [select for diffs], Wed Dec 8 10:58:22 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_9, VERSION_1_10_8
Changes since 1.53: +1 -3 lines
Diff to previous 1.53 (unified)

Remove `i' and `r' macro handlers.  These macros, originally part of the
me package, aren't recognised by "groff -mandoc" so we don't need to do
so either.  Discussed on tech@ with schwarze@.

While at it, remove references to `b' in man.7.  As far as I know, this
was never supported anyway.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Dec 6 15:31:19 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_7
Changes since 1.52: +2 -1 lines
Diff to previous 1.52 (unified)

Add support for `ft' macro found in groff(7).  Based on a patch by
schwarze@, but without the -T[x]html handling, which structurally does
not work.  Also add man.7 documentation (not in original patch).

Revision 1.52 / (download) - annotate - [select for diffs], Sun Dec 5 16:14:16 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.51: +1 -4 lines
Diff to previous 1.51 (unified)

Remove `Sp', `Vb', and `Ve' (as per schwarze@'s changes in OpenBSD),
which are now accomodated for the new libroff modifications.

Revision 1.51 / (download) - annotate - [select for diffs], Tue Nov 30 15:36:28 2010 UTC (10 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.50: +1 -9 lines
Diff to previous 1.50 (unified)

Kill man_action.c.

Revision 1.50 / (download) - annotate - [select for diffs], Sat Jul 31 23:52:58 2010 UTC (10 years, 5 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_10_6
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (unified)

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

Revision 1.49 / (download) - annotate - [select for diffs], Thu Jul 22 23:03:15 2010 UTC (10 years, 6 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_5_PREPDF, VERSION_1_10_5
Changes since 1.48: +2 -1 lines
Diff to previous 1.48 (unified)

Added `in' macro support for -man -Tascii.  This is not yet supported in
-Thtml (I'm surprised to note that neither is LITERAL mode).

Revision 1.48 / (download) - annotate - [select for diffs], Sat Jun 26 16:07:08 2010 UTC (10 years, 6 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_10_4, VERSION_1_10_3
Changes since 1.47: +4 -1 lines
Diff to previous 1.47 (unified)

Mechanical diff allowing the const struct regset to propogate through
libman and libmdoc.

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

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

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

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.45 / (download) - annotate - [select for diffs], Mon May 17 10:50:32 2010 UTC (10 years, 8 months ago) by joerg
Branch: MAIN
Changes since 1.44: +2 -1 lines
Diff to previous 1.44 (unified)

Add support for .AT. Properly implement .UC. Add regress tests.

Revision 1.44 / (download) - annotate - [select for diffs], Sat May 15 22:44:04 2010 UTC (10 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.43: +5 -91 lines
Diff to previous 1.43 (unified)

Remove `am', `ami', `de', `dei', and `.' from -man, as they're now in the roff preprocessor.

Revision 1.43 / (download) - annotate - [select for diffs], Sat May 15 20:51:40 2010 UTC (10 years, 8 months ago) by kristaps
Branch: MAIN
Changes since 1.42: +2 -4 lines
Diff to previous 1.42 (unified)

Pull `ig' out of -man and leave it the roff preparser.

Revision 1.42 / (download) - annotate - [select for diffs], Mon Mar 29 10:10:35 2010 UTC (10 years, 9 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
Changes since 1.41: +10 -20 lines
Diff to previous 1.41 (unified)

Final (?) fix to issue pointed out by Sascha Wildner: roff instructions clobbering prior scope rules and line modes.

Revision 1.41 / (download) - annotate - [select for diffs], Mon Mar 29 04:52:14 2010 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.40: +16 -1 lines
Diff to previous 1.40 (unified)

Initial step in fixing badness reported by Sascha Wildner (wip).

Revision 1.40 / (download) - annotate - [select for diffs], Sat Mar 27 10:14:32 2010 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_19, VERSION_1_9_18
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (unified)

Lint fixes.

Revision 1.39 / (download) - annotate - [select for diffs], Sat Mar 27 10:13:16 2010 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.38: +1 -5 lines
Diff to previous 1.38 (unified)

Lint fixes.

Revision 1.38 / (download) - annotate - [select for diffs], Sat Mar 27 10:04:56 2010 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.37: +86 -16 lines
Diff to previous 1.37 (unified)

Fixed re-adjustment of scope in exiting roff instructions (libman).
Added title-case check for (libman).
Fixed premature closure of roff instruction scope (libman).
Added documentation of ignored roff macros to man(3).

Revision 1.37 / (download) - annotate - [select for diffs], Thu Mar 25 07:39:25 2010 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_17
Changes since 1.36: +3 -1 lines
Diff to previous 1.36 (unified)

Lint fixes.

Revision 1.36 / (download) - annotate - [select for diffs], Thu Mar 25 07:28:16 2010 UTC (10 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.35: +9 -6 lines
Diff to previous 1.35 (unified)

Fixed up some documentation in man.7: only documenting man.7 macros, not related ones (de, Vb, etc.), which aren't technically man.  It's an open question as to where these /should/ be documented, however.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Mar 24 20:10:53 2010 UTC (10 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.34: +104 -10 lines
Diff to previous 1.34 (unified)

Using man_node_delete() instead of man_node_free()/man_node_freelist() and friends (much simpler).
Split blk_imp() into blk_exp() (explicit macros), blk_dotted() (roff macros), and the original.
Added de, dei, am, ami, and ig roff macros (for now, these are discarded within the parse).

Revision 1.34 / (download) - annotate - [select for diffs], Wed Mar 24 03:46:02 2010 UTC (10 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.33: +12 -15 lines
Diff to previous 1.33 (unified)

enum-ised rew_* return values (type-safety).
Removed ignoring of MAN_Vb argument (symmetry).
Removed superfluous utsname inclusion.

Revision 1.33 / (download) - annotate - [select for diffs], Tue Mar 23 21:50:43 2010 UTC (10 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.32: +9 -8 lines
Diff to previous 1.32 (unified)

libman using enum mant instead of #defines for macros.
Clean-ups, better documentation in man_hash.c.
Added extra space for "." in man_hash.c (unused for the time being).

Revision 1.32 / (download) - annotate - [select for diffs], Tue Mar 23 11:30:48 2010 UTC (10 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.31: +8 -1 lines
Diff to previous 1.31 (unified)

Support for pod2man standard header macros (Vb, Ve, Sp).  Based largely on a set of patches by Ingo Schwarze.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Mar 22 05:59:32 2010 UTC (10 years, 10 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_16
Changes since 1.30: +21 -6 lines
Diff to previous 1.30 (unified)

Accomodate (libman) for next-line macros followed by non-text macros `na', `sp', and `br'.
Based on a patch by Ingo Schwarze.

Revision 1.30 / (download) - annotate - [select for diffs], Fri Jan 1 17:14:28 2010 UTC (11 years ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_15-pre2, VERSION_1_9_15
Changes since 1.29: +5 -1 lines
Diff to previous 1.29 (unified)

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

Revision 1.29 / (download) - annotate - [select for diffs], Sat Oct 24 05:45:05 2009 UTC (11 years, 2 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, VERSION_1_9_11, VERSION_1_9_10
Changes since 1.28: +2 -1 lines
Diff to previous 1.28 (unified)

Added `PD' to -man (doesn't do anything, yet).

Revision 1.28 / (download) - annotate - [select for diffs], Sat Aug 22 09:10:38 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_9, VERSION_1_9_8, VERSION_1_9_7, VERSION_1_9_6, VERSION_1_9_5, VERSION_1_9_2
Changes since 1.27: +2 -1 lines
Diff to previous 1.27 (unified)

Added `UC' libman macro (has no effect).
Corrected `UC' and `DT' not to print their arguments.
Noted that `UC' and `DT' shouldn't be used.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Aug 21 13:14:07 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_1
Changes since 1.26: +14 -6 lines
Diff to previous 1.26 (unified)

Fixed next-line scoping of `.HP nnn' (has both next-line and on-line in head).

Revision 1.26 / (download) - annotate - [select for diffs], Fri Aug 21 12:12:12 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.25: +3 -2 lines
Diff to previous 1.25 (unified)

Open explicit scope on libman exit now only generates warning.
Consecutive ELINE scopes are now pruned (with a warning).

Revision 1.25 / (download) - annotate - [select for diffs], Thu Aug 20 13:55:19 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.24: +6 -3 lines
Diff to previous 1.24 (unified)

Fixed next-line scope error in libman block macros.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Aug 20 13:51:55 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (unified)

Fixed (not documented anywhere of course) that `SH' and `SS' in libman have next-line head scope.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Aug 20 11:51:07 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.22: +2 -1 lines
Diff to previous 1.22 (unified)

Added `DT' macro (pointed out by joerg@netbsd.org).

Revision 1.22 / (download) - annotate - [select for diffs], Wed Aug 19 12:15:58 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.21: +14 -4 lines
Diff to previous 1.21 (unified)

libman checks for open explicit scopes on exit.

Revision 1.21 / (download) - annotate - [select for diffs], Wed Aug 19 09:14:50 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.20: +72 -31 lines
Diff to previous 1.20 (unified)

Added RS/RE macro pair (had to adjust closing rules, sec/ssec/rs/par).

Revision 1.20 / (download) - annotate - [select for diffs], Tue Aug 18 08:48:30 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_9_0
Changes since 1.19: +22 -7 lines
Diff to previous 1.19 (unified)

Small updates to man.7 (next-line break-exclusions, numerical width example).
Fully tested and correct scope-rewinding of block macros.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Aug 13 11:45:29 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
Changes since 1.18: +217 -146 lines
Diff to previous 1.18 (unified)

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.18 / (download) - annotate - [select for diffs], Fri Jul 24 20:22:24 2009 UTC (11 years, 5 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_8_5, VERSION_1_8_4
Changes since 1.17: +2 -1 lines
Diff to previous 1.17 (unified)

Added `sp' support to libman.
Added `\c' to known escapes (only used in man, but still).

Revision 1.17 / (download) - annotate - [select for diffs], Thu Jun 18 10:53:58 2009 UTC (11 years, 7 months ago) by kristaps
Branch: MAIN
CVS Tags: 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
Changes since 1.16: +6 -8 lines
Diff to previous 1.16 (unified)

Moved all formatted libman warn/error into man.c/libman.h.
Converted all formatted warn/errors into regular syntax.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jun 16 19:55:28 2009 UTC (11 years, 7 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_19
Changes since 1.15: +2 -3 lines
Diff to previous 1.15 (unified)

Removed MAN___: moved MAN_br to its index (comments not passed into parser).
Fix: hashtable not fully formed after removal of MDOC___.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jun 10 20:18:43 2009 UTC (11 years, 7 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_17, VERSION_1_7_16, VERSION_1_7_15, VERSION_1_7_14
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (unified)

Fixed license email address.

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

Using proper license template (const).

Revision 1.13 / (download) - annotate - [select for diffs], Sun Apr 5 16:34:22 2009 UTC (11 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_12, VERSION_1_7_10, OPENBSD_CHECKIN
Changes since 1.12: +2 -1 lines
Diff to previous 1.12 (unified)

man(3) doesn't use err.h anymore.
Added .i to man(3).
Fixed up manuals.
Fixed up webpage.
Assertion fixes in man(3) (hashtable).
Fixed assertion for .IP in mandoc -man.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Apr 2 06:51:44 2009 UTC (11 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.11: +2 -1 lines
Diff to previous 1.11 (unified)

mdoc_tokhash -> hash
Initial man hashtab (BROKEN).

Revision 1.11 / (download) - annotate - [select for diffs], Tue Mar 31 13:50:19 2009 UTC (11 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.10: +1 -2 lines
Diff to previous 1.10 (unified)

General clean-ups.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Mar 27 14:56:15 2009 UTC (11 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (unified)

Added some new manuals (mdoc.3 mandoc_char.7).
Support for .br in libman.

Revision 1.9 / (download) - annotate - [select for diffs], Thu Mar 26 14:38:11 2009 UTC (11 years, 9 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_7_5
Changes since 1.8: +43 -1 lines
Diff to previous 1.8 (unified)

Initial front-end formatting for -man pages.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Mar 26 11:16:21 2009 UTC (11 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.7: +12 -9 lines
Diff to previous 1.7 (unified)

Fixed inheritence of initial macro into man_macro.
Removed warnxs from man_macro (man_vwarn).

Revision 1.7 / (download) - annotate - [select for diffs], Wed Mar 25 16:07:36 2009 UTC (11 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.6: +20 -7 lines
Diff to previous 1.6 (unified)

Actions in place for prologue parsing.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Mar 25 15:36:05 2009 UTC (11 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.5: +22 -3 lines
Diff to previous 1.5 (unified)

Added man_action.c, renamed mdoc_action.c.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Mar 25 15:17:49 2009 UTC (11 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.4: +8 -3 lines
Diff to previous 1.4 (unified)

Added man validator, renamed mdoc validator.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Mar 23 15:41:09 2009 UTC (11 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.3: +12 -4 lines
Diff to previous 1.3 (unified)

-man linked to mandoc in documentation.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Mar 23 15:20:51 2009 UTC (11 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.2: +93 -53 lines
Diff to previous 1.2 (unified)

-man printing linked to -Ttree.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Mar 23 14:31:58 2009 UTC (11 years, 10 months ago) by kristaps
Branch: MAIN
Changes since 1.1: +20 -20 lines
Diff to previous 1.1 (unified)

Linux fixes.

Revision 1.1 / (download) - annotate - [select for diffs], Mon Mar 23 14:22:11 2009 UTC (11 years, 10 months ago) by kristaps
Branch: MAIN

First addition of -man macro support.
Abstraction of mdoc.

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