CVS log for mandoc/mandoc_msg.c

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.12 / (download) - annotate - [select for diffs], Tue Sep 1 18:25:27 2020 UTC (4 months, 2 weeks ago) by schwarze
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +1 -0 lines
Diff to previous 1.11 (unified)

Ignore unreasonably large spacing modifiers in tbl layouts.

Jan Schreiber <jes at posteo dot de> ran afl on mandoc and it turned
out mandoc tried to use spacing modifiers so large that they would
trigger assertion failures in term_ascii.c, function locale_advance().

Revision 1.11 / (download) - annotate - [select for diffs], Fri Apr 24 12:02:33 2020 UTC (8 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.10: +5 -2 lines
Diff to previous 1.10 (unified)

provide a STYLE message when mandoc knows the file name and the extension
disagrees with the section number given in the .Dt or .TH macro;
feature suggested and patch tested by jmc@

Revision 1.10 / (download) - annotate - [select for diffs], Sun Jan 19 18:02:00 2020 UTC (11 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.9: +2 -1 lines
Diff to previous 1.9 (unified)

Introduce a new mdoc(7) macro .Tg ("tag") to explicitly mark a place
as defining a term.  Please only use it when automatic tagging does
not work.  Manual page authors will not be required to add the new
macro; using it remains optional.  HTML output is still rudimentary
in this version and will be polished later.

Thanks to kn@ for reminding me that i have been considering since
BSDCan 2014 whether something like this might be useful.  Given
that possibilities of making automatic tagging better are running
out and there are still several situations where automatic tagging
cannot do the job, i think the time is now ripe.

Feedback and no objection from millert@; OK espie@ inoguchi@ kn@.

Revision 1.9 / (download) - annotate - [select for diffs], Sun Jan 19 16:44:50 2020 UTC (11 months, 3 weeks ago) by schwarze
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (unified)

Align to the new, sane behaviour of the groff_mdoc(7) .Dd macro:
without an argument, use the empty string, and always concatenate
all arguments, no matter their number.
This allows reducing the number of arguments of mandoc_normdate()
and some other simplifications, at the same time polishing some
error messages by adding the name of the macro in question.

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jul 14 18:16:13 2019 UTC (18 months ago) by schwarze
Branch: MAIN
Changes since 1.7: +10 -1 lines
Diff to previous 1.7 (unified)

If messages are shown and output is printed without a pager, display
a heads-up on stderr at the end because otherwise, users may easily
miss the messages: because messages typically occur while parsing,
they typically preceed the output.  This is most useful with flag
combinations like "-c -W all" but may also help in some unusual
error scenarios.
Inconvenient ordering of output originally pointed out by espie@
for the example situation that /tmp/ is not writeable.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jul 10 19:39:01 2019 UTC (18 months, 1 week ago) by schwarze
Branch: MAIN
Changes since 1.6: +36 -8 lines
Diff to previous 1.6 (unified)

Some time ago, i simplified mandoc_msg() such that it can be used
everywhere and not only in the parsers.
For more uniform messages, use it at more places instead of err(3),
in particular in the main program.
While here, integrate a few trivial functions called at exactly one
place into the main option parser, and let a few more functions use
the normal convention of returning 0 for success and -1 for error.

Revision 1.6 / (download) - annotate - [select for diffs], Wed Mar 6 15:55:38 2019 UTC (22 months, 1 week ago) by schwarze
Branch: MAIN
CVS Tags: VERSION_1_14_5
Changes since 1.5: +3 -1 lines
Diff to previous 1.5 (unified)

this file needs to #include "config.h" because it calls getprogname();
found while testing on Debian jessie

Revision 1.5 / (download) - annotate - [select for diffs], Thu Jan 10 06:29:00 2019 UTC (2 years ago) by schwarze
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4 (unified)

Initializers for file-scope static variables should be compile-time
constants, and while stderr is a compile-time constant in OpenBSD,
Kelvin Sherlock <ksherlock at gmail dot com> reports that it isn't
on some other systems, for example on FreeBSD or Linux.
So do the initialization by calling mandoc_msg_setoutfile()
from main() instead.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Dec 16 00:21:05 2018 UTC (2 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.3: +1 -1 lines
Diff to previous 1.3 (unified)

s/OpenBSD/Id/ in CVS Ids

Revision 1.3 / (download) - annotate - [select for diffs], Sat Dec 15 19:30:26 2018 UTC (2 years, 1 month ago) by schwarze
Branch: MAIN
Changes since 1.2: +2 -0 lines
Diff to previous 1.2 (unified)

Several improvements to escape sequence handling.

* Add the missing special character \_ (underscore).
* Partial implementations of \a (leader character)
and \E (uninterpreted escape character).
* Parse and ignore \r (reverse line feed).
* Add a WARNING message about undefined escape sequences.
* Add an UNSUPP message about unsupported escape sequences.
* Mark \! and \? (transparent throughput)
and \O (suppress output) as unsupported.
* Treat the various variants of zero-width spaces as one-byte escape
sequences rather than as special characters, to avoid defining bogus
forms with square brackets.
* For special characters with one-byte names, do not define bogus
forms with square brackets, except for \[-], which is valid.
* In the form with square brackets, undefined special characters do not
fall back to printing the name verbatim, not even for one-byte names.
* Starting a special character name with a blank is an error.
* Undefined escape sequences never abort formatting of the input
string, not even in HTML output mode.
* Document the newly handled escapes, and a few that were missing.
* Regression tests for most of the above.

Revision 1.2 / (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.1: +1 -11 lines
Diff to previous 1.1 (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.1 / (download) - annotate - [select for diffs], Fri Dec 14 01:18:26 2018 UTC (2 years, 1 month ago) by schwarze
Branch: MAIN

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.

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