CVS log for mandoc/mandoc.3

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.44 / (download) - annotate - [select for diffs], Sun Dec 30 00:49:55 2018 UTC (19 months, 1 week ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5, HEAD
Changes since 1.43: +15 -52 lines
Diff to previous 1.43 (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.43 / (download) - annotate - [select for diffs], Fri Dec 14 01:18:25 2018 UTC (19 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.42: +5 -81 lines
Diff to previous 1.42 (colored)

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.42 / (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.41: +8 -34 lines
Diff to previous 1.41 (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.41 / (download) - annotate - [select for diffs], Tue Jul 4 23:40:01 2017 UTC (3 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_4, VERSION_1_14_3, VERSION_1_14_2
Changes since 1.40: +3 -3 lines
Diff to previous 1.40 (colored)

various nits found with mandoc -Tlint

Revision 1.40 / (download) - annotate - [select for diffs], Sat Jun 24 14:38:32 2017 UTC (3 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.39: +25 -12 lines
Diff to previous 1.39 (colored)

Split -Wstyle into -Wstyle and the even lower -Wbase, and add
-Wopenbsd and -Wnetbsd to check conventions for the base system of
a specific operating system.  Mark operating system specific messages
with "(OpenBSD)" at the end.

Please use just "-Tlint" to check base system manuals (defaulting
to -Wall, which is now -Wbase), but prefer "-Tlint -Wstyle" for the
manuals of portable software projects you maintain that are not
part of OpenBSD base, to avoid bogus recommendations about base
system conventions that do not apply.

Issue originally reported by semarie@, solution using
an idea from tedu@, discussed with jmc@ and jca@.

Revision 1.39 / (download) - annotate - [select for diffs], Wed May 17 23:39:31 2017 UTC (3 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.38: +4 -6 lines
Diff to previous 1.38 (colored)

Delete the -T xhtml command line option.
It has been obsolete for more than two years.
Use -T html.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Jan 9 01:37:03 2017 UTC (3 years, 7 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_1, VERSION_1_13
Changes since 1.37: +29 -4 lines
Diff to previous 1.37 (colored)

Warnings and errors that occur during mdoc_validate()
or during man_validate() have to affect the mandoc(1) EXIT STATUS.
Many thanks to <Yuri dot Pankov at gmail dot com> (illumos developer)
for reporting this regression.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Jul 7 19:19:01 2016 UTC (4 years, 1 month ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_4
Changes since 1.36: +87 -96 lines
Diff to previous 1.36 (colored)

update developer documentation

Revision 1.36 / (download) - annotate - [select for diffs], Fri Jan 8 17:48:09 2016 UTC (4 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

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.35 / (download) - annotate - [select for diffs], Fri Jan 8 02:53:13 2016 UTC (4 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.34: +4 -7 lines
Diff to previous 1.34 (colored)

Simplify the mparse_open() interface.
Just return the file descriptor or -1 on error;
there is just one kind of error anyway.
Suggested by Christos Zoulas (NetBSD).

Revision 1.34 / (download) - annotate - [select for diffs], Fri Jan 8 02:13:39 2016 UTC (4 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.33: +7 -2 lines
Diff to previous 1.33 (colored)

It was very surprising that a function called mparse_readfd()
closed the file descriptor passed to it after completing its work,
in particular considering the fact that it required its callers
to call open(2) or mparse_open() beforehand.

Change mparse_readfd() to not call close(2) and change the callers
to call close(2) afterwards, more or less bringing open and close
to the same level of the code and making review easier.  Note that
man.cgi(8) already did that, even though it was wrong in the past.

Small restructuring suggested by Christos Zoulas (NetBSD).

Revision 1.33 / (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.32: +2 -12 lines
Diff to previous 1.32 (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.32 / (download) - annotate - [select for diffs], Sun Jul 19 06:05:16 2015 UTC (5 years ago) by schwarze
Branch: MAIN
Changes since 1.31: +8 -44 lines
Diff to previous 1.31 (colored)

Do not fork and exec gunzip(1), just link with libz instead.
As discussed with deraadt@, that's cleaner and will help tame(2).
Something like this was also suggested earlier by bapt at FreeBSD.
Minus 50 lines of code, deleting one interface function (mparse_wait),
no functional change intended.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Jan 15 04:26:40 2015 UTC (5 years, 6 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_3
Changes since 1.30: +15 -20 lines
Diff to previous 1.30 (colored)

Fatal errors no longer exist.
If a file can be opened, mandoc will produce some output;
at worst, the output may be almost empty.
Simplifies error handling and frees a message type for future use.

Revision 1.30 / (download) - annotate - [select for diffs], Thu Jan 15 02:29:26 2015 UTC (5 years, 6 months ago) by schwarze
Branch: MAIN
Changes since 1.29: +9 -12 lines
Diff to previous 1.29 (colored)

downgrade .so failure from FATAL to ERROR

Revision 1.29 / (download) - annotate - [select for diffs], Wed Nov 26 23:42:14 2014 UTC (5 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_2
Changes since 1.28: +19 -8 lines
Diff to previous 1.28 (colored)

Let mparse_readfd() use mparse_open() and mparse_wait()
and let mparse_open() fall back to .gz files
such that .so works even when the target is zipped,
requested by and in part using ideas from <bapt at FreeBSD>.
While here, make sure files are readable before forking,
both for efficiency and for better error reporting.

Revision 1.28 / (download) - annotate - [select for diffs], Wed Nov 26 21:40:17 2014 UTC (5 years, 8 months ago) by schwarze
Branch: MAIN
Changes since 1.27: +2 -12 lines
Diff to previous 1.27 (colored)

Simplify the mparse_open()/mparse_wait() interface.
Don't bother the user with the PID of the child process,
store it inside the opaque mparse handle.

Revision 1.27 / (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.26: +17 -3 lines
Diff to previous 1.26 (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.26 / (download) - annotate - [select for diffs], Wed Sep 3 23:21:47 2014 UTC (5 years, 11 months ago) by schwarze
Branch: MAIN
Changes since 1.25: +64 -2 lines
Diff to previous 1.25 (colored)

Add *.gz support to apropos(1) -a, man(1), and even mandoc(1).
Implemented by moving the zip code from makewhatis(8) to the parser lib.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Aug 5 05:48:56 2014 UTC (6 years ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_13_1, VERSION_1_12_4, VERSION_1_12
Changes since 1.24: +93 -181 lines
Diff to previous 1.24 (colored)

Sync library documentation with reality.
Split mandoc_escape(3), mandoc_malloc(3), and mchars_alloc(3)
out of mandoc(3), adding lots of new information.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Mar 23 11:25:26 2014 UTC (6 years, 4 months ago) by schwarze
Branch: MAIN
Changes since 1.23: +57 -27 lines
Diff to previous 1.23 (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.23 / (download) - annotate - [select for diffs], Sun Jan 5 20:26:36 2014 UTC (6 years, 7 months ago) by schwarze
Branch: MAIN
Changes since 1.22: +46 -9 lines
Diff to previous 1.22 (colored)

Add an option -Q (quick) to mandocdb(8)
for accelerated generation of reduced-size databases.

Implement this by allowing the parsers to optionally
abort the parse sequence after the NAME section.

While here, garbage collect the unused void *arg attribute of
struct mparse and mparse_alloc() and fix some errors in mandoc(3).

This reduces the processing time of mandocdb(8) on /usr/share/man
by a factor of 2 and the database size by a factor of 4.
However, it still takes 5 times the time and 6 times the space
of makewhatis(8), so more work is clearly needed.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Oct 6 17:01:52 2013 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_3
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored)

The .Lb arguments wants a "lib" prefix;
from Sascha Wildner via Franco Fichtner (DragonFly);
also fixing the same in the mdoc(7) example while i'm about it.

Revision 1.21 / (download) - annotate - [select for diffs], Sat Oct 5 20:30:05 2013 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.20: +4 -4 lines
Diff to previous 1.20 (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()
- do not complain about unused variables in test-*.c
- garbage collect a few unused variables elsewhere

Revision 1.20 / (download) - annotate - [select for diffs], Mon Sep 16 22:54:38 2013 UTC (6 years, 10 months ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_12_2
Changes since 1.19: +3 -4 lines
Diff to previous 1.19 (colored)

two improvements in the SYNOPSIS;
from Sascha Wildner <swildner at gmail dot com> (DragonFly)

Revision 1.19 / (download) - annotate - [select for diffs], Sat Jul 13 19:41:16 2013 UTC (7 years ago) by schwarze
Branch: MAIN
Changes since 1.18: +3 -4 lines
Diff to previous 1.18 (colored)

For citing the names and email addresses of authors,
consistently use the style ".An name Aq Mt email".

Triggered by a question from Jan Stary <hans at stare dot cz>,
ok jmc@.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Jun 2 03:48:26 2013 UTC (7 years, 2 months ago) by schwarze
Branch: MAIN
Changes since 1.17: +86 -2 lines
Diff to previous 1.17 (colored)

Note where these functions are declared and implemented.
That helps to find one's way when hacking on the code.

Revision 1.17 / (download) - annotate - [select for diffs], Fri Jan 13 15:27:14 2012 UTC (8 years, 6 months ago) by joerg
Branch: MAIN
CVS Tags: VERSION_1_12_1
Changes since 1.16: +5 -3 lines
Diff to previous 1.16 (colored)

Reflect reality, mandoc_escape does not skip the "\" itself, but expects
the caller to have done that.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Nov 8 00:15:23 2011 UTC (8 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.15: +4 -4 lines
Diff to previous 1.15 (colored)

Const-ify some mchars arguments.  I think these are non-const for historical
dumbness on my part.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Oct 18 13:25:38 2011 UTC (8 years, 9 months ago) by kristaps
Branch: MAIN
Changes since 1.14: +5 -5 lines
Diff to previous 1.14 (colored)

Fix mandoc_escape() function argument names.  From a fix by Abhinav
Upadhyay, thanks!

Revision 1.14 / (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_0
Changes since 1.13: +28 -2 lines
Diff to previous 1.13 (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.13 / (download) - annotate - [select for diffs], Thu Aug 18 08:58:44 2011 UTC (8 years, 11 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_7
Changes since 1.12: +4 -3 lines
Diff to previous 1.12 (colored)

Replace the old `An'/`Aq' AUTHORS note with `An'/`Mt'.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Jul 11 08:43:27 2011 UTC (9 years, 1 month ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_6, VERSION_1_11_5, VERSION_1_11_4
Changes since 1.11: +15 -7 lines
Diff to previous 1.11 (colored)

Make sure constants in mandoc.3 use the `Dv' macro.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jun 22 22:10:02 2011 UTC (9 years, 1 month ago) by kristaps
Branch: MAIN
Changes since 1.10: +52 -7 lines
Diff to previous 1.10 (colored)

Add more documentation for libmandoc.

Revision 1.10 / (download) - annotate - [select for diffs], Tue May 24 21:41:11 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_3
Changes since 1.9: +3 -5 lines
Diff to previous 1.9 (colored)

Document that spec2cp never returns 0.

Revision 1.9 / (download) - annotate - [select for diffs], Tue May 24 21:31:23 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.8: +1 -25 lines
Diff to previous 1.8 (colored)

Remove all references to ESCAPE_PREDEF, which is now not exposed passed
the libroff point.  This clears up a nice chunk of code.

Revision 1.8 / (download) - annotate - [select for diffs], Tue May 17 12:22:15 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.7: +4 -2 lines
Diff to previous 1.7 (colored)

Documentation: note COMPATIBILITY of -Tascii `?' printing in mandoc.1
and remove some long-fixed notes in sthe same section.  Also, add an
`Lb' for the mandoc library to mandoc.3 (noted by Sascha Wildner).

Revision 1.7 / (download) - annotate - [select for diffs], Tue May 17 11:50:20 2011 UTC (9 years, 2 months ago) by kristaps
Branch: MAIN
Changes since 1.6: +14 -4 lines
Diff to previous 1.6 (colored)

Flip on unicode output (via \[uNNNN]) in -T[x]html.  Here we go!

Revision 1.6 / (download) - annotate - [select for diffs], Sun May 1 10:40:52 2011 UTC (9 years, 3 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_2
Changes since 1.5: +88 -2 lines
Diff to previous 1.5 (colored)

Documenting the mchars_XXXX part of mandoc.h.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Apr 30 10:18:24 2011 UTC (9 years, 3 months ago) by kristaps
Branch: MAIN
Changes since 1.4: +3 -3 lines
Diff to previous 1.4 (colored)

No code change: fixing spelling errors.  From a patch by uqs@.  Thanks!

Revision 1.4 / (download) - annotate - [select for diffs], Tue Apr 19 16:30:00 2011 UTC (9 years, 3 months ago) by kristaps
Branch: MAIN
Changes since 1.3: +74 -2 lines
Diff to previous 1.3 (colored)

Add more documentation bits to mandoc.3.

Revision 1.3 / (download) - annotate - [select for diffs], Sat Apr 9 15:53:48 2011 UTC (9 years, 4 months ago) by kristaps
Branch: MAIN
Changes since 1.2: +43 -2 lines
Diff to previous 1.2 (colored)

Skeleton of documentation functions, types, and variables in mandoc.h.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Mar 28 21:49:42 2011 UTC (9 years, 4 months ago) by kristaps
Branch: MAIN
CVS Tags: VERSION_1_11_1
Changes since 1.1: +13 -3 lines
Diff to previous 1.1 (colored)

Put mandocerrs and mandoclevels arrays into libmandoc with accessors
mparse_strerror() and mparse_strlevel().

Revision 1.1 / (download) - annotate - [select for diffs], Tue Mar 22 10:02:50 2011 UTC (9 years, 4 months ago) by kristaps
Branch: MAIN

Step 3: consolidate manuals.  The parse functions in mdoc.h, roff.h, and
man.h are now part of libmandoc.h, so remove these from their respective
manuals (they're no longer public-facing and we don't need a libmandoc.3
(yet?)).  Before that, move the juicy data (parse tree syntax) into
new-born mandoc.3.  Peck around in Makefile and index.sgml to reflect
reality.

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