| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Reminded about the missing feature by millert@.
This reduces mandoc/groff differences in OpenBSD base by 25%.
ok millert@
|
|
|
|
|
| |
Issue first reported by naddy@ in rsync(1).
OpenBSD rev. 1.55.
|
|
|
|
|
|
|
| |
Fixes vertical spacing after "OPTIONS" in gcc(1).
Issue first reported by naddy@ in rsync(1).
OpenBSD rev. 1.54.
|
|
|
|
|
| |
Do not use this, it is not portable and only defined in esr's man-ext.
For example, sox(1) wants these macros.
|
|
|
|
| |
some man(7) changes to accomodate for the an-ext compatibility.
|
|
|
|
|
|
|
|
|
|
|
|
| |
volume name for the respective manual section, just like in mdoc(7).
This gives us nicer page headers for cvs(1), lynx(1), tic(1),
mkhybrid(8), and many curses(3) manuals.
ok kristaps@
To not break compatibility, i wrote a corresponding patch for GNU troff
which Werner Lemberg accepted upstream at rev. 1.65 of:
http://cvs.savannah.gnu.org/viewvc/groff/tmac/an-old.tmac?root=groff
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
|
| |
do not use the current date. This removes a gratuitous output difference
with respect to groff.
ok kristaps@
|
|
|
|
|
|
|
| |
and assert that print_bvspace cannot be called on NULL pointers.
No change in behaviour, none of these were bugs,
but the code becomes easier to understand.
Based on a clang report posted by joerg@; ok kristaps@.
|
| |
|
| |
|
|
|
|
|
| |
backend (the front-end already accomodated for this). Found indirectly
from a question by Brad Smith.
|
|
|
|
|
| |
through looking for user-defined escapes. This clears up a nice bit of
validation code.
|
|
|
|
|
|
|
|
|
|
|
|
| |
That is to say, with mingw32. This amounts to the following:
(1) break compat.c into compat_strlcpy.c and compat_strlcat.c
(2) add compat_getsubopt.c (from OpenBSD) and test-getsubopt.c
(3) add test-strptime.c for HAVE_STRPTIME
(4) add ifdef bits here and there, where necessary
(5) remove some harmless unportable stuff (u_char, localtime_r)
I've added the appropriate mdocml.zip target to the Makefile, too.
|
|
|
|
|
|
| |
-man. This actually seems to be what groff does. Sort-of. Anyway,
it's required to get perlpod pages rendered nicely, so until perlpod
stops producing shit, do it. Ok schwarze@.
|
|
|
|
|
|
|
|
|
|
|
| |
prompted by a TODO by schwarze@, originally from Gleydson Soares, that
an empty `SS' was raising an error (it hasn't for some time). It makes
sense these shouldn't warn, as omitting their contents doesn't change
anything in the structure of the document (groff and mandoc specifically
account for the whitespace between empty sections).
This doesn't change any manuals, which only refer to the line arguments
(or possibly next-line, in the case of man(7) syntax).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a public (mandoc.h) function mandoc_escape(), which merges the
functionality of both prior functions.
Reason: code duplication. The a2roffdeco() and mandoc_special()
functions were pretty much the same thing and both quite complex. This
allows one function to receive improvements in (e.g.) subexpression
handling and performance, instead of having to replicate functionality.
As such, the mandoc_escape() function already handles a superset of the
escapes handled in previous versions and has improvements in performance
(using strcspn(), for example) and reliable handling of subexpressions.
This code Works For Me, but may need work to catch any regressions.
Since the benefits are great (leaner code, simpler API), I'd rather have
it in-tree than floating as a patch.
|
|
|
|
| |
has no children. Noted by Brad, added to TODO by schwarze@.
|
|
|
|
|
| |
Don't have them do that (includes in header files = faugh), and have
individual files directly include these files.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Also convert man_vmsg to return void.
|
|
|
|
|
|
|
|
|
|
|
|
| |
as a first step to get rid of the frequent petty warnings in this area:
- always store dates as strings, not as seconds since the Epoch
- for input, try the three most common formats everywhere
- for unrecognized format, just pass the date though verbatim
- when there is no date at all, still use the current date
Originally triggered by a one-line patch from Tim van der Molen,
<tbvdm at xs4all dot nl>, which is included here.
Feedback and OK on manual parts from jmc@.
"please check this in" kristaps@
|
|
|
|
| |
statements in the post-handler for EQN in -mdoc and -man.
|
|
|
|
|
| |
directives. For now this will just ignore them (except for -Ttree,
which just notes that an EQN's been accepted).
|
|
|
|
|
|
|
| |
* .br .sp .nf .fi .na with arguments - just skip the arguments
* .TH lacking arguments - use empty strings instead like groff
* .TH with excessive arguments - skip those
Reminded by joerg@, ok kristaps@.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
warning. From a TODO by schwarze@, originally noted by Brad Smith.
|
|
|
|
|
|
|
| |
external-facing function man_addspan() (this required shuffling around
the descope routine) and hooks elsewhere.
Also fixed mdoc.c's post-validation of tables.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
schwarze@, but without the -T[x]html handling, which structurally does
not work. Also add man.7 documentation (not in original patch).
|
|
|
|
|
|
| |
Make non-uppercase warning only occur once.
Make scope-open-on-error warning only occur once.
|
|
|
|
| |
tested patch by schwarze@.
|
|
|
|
| |
which are now accomodated for the new libroff modifications.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now have sufficient practical experience to know what we want,
so this is intended to be final:
- provide -Wlevel (warning, error or fatal) to select what you care about
- provide -Wstop to stop after parsing a file with warnings you care about
- provide consistent exit status codes for those warnings you care about
- fully document what warnings, errors and fatal errors mean
- remove all other cruft from the user interface, less is more:
- remove all -f knobs along with the whole -f option
- remove the old -Werror because calling warnings "fatal" is silly
- always finish parsing each file, unless fatal errors prevent that
This commit also includes a couple of related simplifications behind
the scenes regarding error handling.
Feedback and OK kristaps@; Joerg Sonnenberger (NetBSD) and
Sascha Wildner (DragonFly BSD) agree with the general direction.
|
|
|
|
|
| |
I checked that substantial changes were committed
to these files during these years.
|
|
|
|
| |
-Thtml (I'm surprised to note that neither is LITERAL mode).
|
|
|
|
|
|
|
|
|
| |
specifically say that this is not allowed, and were it allowed, output
would be inconsistent across output media (-Tps will puke,
non-your-charset terminals will puke, etc.).
With this done, simplify check_text() to only check escapes and for
tabs. Add in a new tab warning, too.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
ASCII_HYPH, as per normal, but were screwing up mandoc_special(). Fixed
by making mandoc_special() first check isspace() instead of ! isgraph(),
then normalise its string as it passes out. This require de-constifying
some validation routines not already de-constified (those in libman),
but that's ok, because I'd like to be pushing actions into validation
routines to save on space and redundant calculations.
|
|
|
|
| |
Fix index.sgml not to puke (the relevant section will be re-written for the release anyway, but I hate seeing errors).
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
roff preprocessor.
|
| |
|
| |
|
| |
|