Age | Commit message (Collapse) | Author |
|
no functional change, minus 15 lines of code.
|
|
and some cleanup; no functional change, minus 70 lines.
|
|
they are ignored, just in the same way as for request names
and for low-level macro names.
This also cures a warning in the pod2man(1) preamble.
|
|
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.
|
|
that start at the beginning of an input line
but end before the end of an input line
|
|
|
|
in the roff parser instead of in three other places in other parsers.
No functional change.
|
|
Drop pre-handlers, they were almost unused.
Drop the needless complexity of allowing more than one post-handler.
This saves one internal interface function, one static function, one
private struct definition, sixteen static arrays, and 45 lines of code.
No functional change.
|
|
|
|
and remove three unused global flags. No functional change.
|
|
Hierarchical naming and mention macro names in messages.
|
|
removing one function argument, one function definition,
three function invocations and two pointless assert()s.
No functional change.
|
|
* Mention invalid escape sequences and string names, and fallbacks.
* Hierarchical naming.
|
|
does not have any arguments. Crash found by nigel@ in kermit(1).
|
|
remove trailing whitespace and blanks before tabs, improve some indenting;
no functional change
|
|
Found by naddy@ in the textproc/enchant(1) port.
Of course, do not use this in new manuals.
|
|
some manuals containing overzealous escaping in their NAME section.
|
|
entries for .Nd in mandocdb(8), instead use the macro content
recursively. This improves indexing of more than 200 manuals
in Xenocara, i.e. more than 15%, in particular GL and some Xkb.
|
|
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.
|
|
some files. To make it clear that he also put his contributions
under the ISC license, with his explicit permission, add his
Copyright notice to the relevant files. No code change.
|
|
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().
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.
|
|
No functional change.
|
|
Improves the rendering of gpg(1); issue reported by jca on ports.
|
|
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.
|
|
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
|
|
and ignore .sp after .PP. This fixes vertical spacing
for blank lines after .PP and for .sp after .PP.
|
|
Needed for sqlite3(1) as reported by espie@.
|
|
Do not use this, it is not portable and only defined in esr's man-ext.
For example, sox(1) wants these macros.
|
|
Do not use this GNU extension, we take it for compatibility only.
|
|
do not abort(), but delete the head together with the block itself.
Problem found and patch provided by joerg@, thanks!
|
|
do not abort with a FATAL error, but report a regular ERROR,
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.
|
|
Implement .Rv in -Tman.
Let -man -Tman work a bit like cat(1).
Add the -Ofragment option to -T[x]html.
Minor fixes in -T[x]html.
Lots of apropos(1) and -Tman code cleanup.
|
|
main new feature: support the roff(7) .tr request
plus various bugfixes and some refactoring
regressions are so minor that it's better to get this in
and fix them in the tree
|
|
adding an implementation of the eqn(7) language
by kristaps@
So far, only .EQ/.EN blocks are handled, in-line equations are not, and
rendering is not yet very pretty, but the parser is fairly complete.
|
|
Again lots of cleanup and maintenance work by kristaps@.
- simplify error reporting: less function pointers, more mandoc_[v]msg
- main: split document parsing out of main.c into read.c
- roff, mdoc, man: improved recognition of control characters
- roff: better handling of if/else stack overflows
- roff: add some predefined strings for backward compatibility
- mdoc, man: empty sections are not errors
- mdoc: move delimiter handling to libmdoc
- some header restructuring and some minor features and fixes
This merge causes two minor regressions
that i will fix in separate commits right afterwards.
|
|
lots of cleanup and maintenance work by kristaps@.
- move some main.c globals into struct curparse
- move mandoc_*alloc to mandoc.h such that all code can use them
- make mandoc_isdelim available to formatting frontends
- dissolve mdoc_strings.c, move the code where it is used
- make all error reporting functions void, their return values were useless
- and various minor cleanups and fixes
|
|
Written by kristaps@.
For now, i'm adding one line to each of the four frontends
to just pass the input text through to the output,
not yet interpreting any of then eqn keywords.
|
|
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@
|
|
- Remember the line-number of a tbl_span, and use it in messages.
- Put *_span_alloc() functions right into the *_addspan() ones,
since these are the only places they are called from.
|
|
then it will start a new output line;
from kristaps@.
|
|
by assert(3)ing valid parser state in the main parsing functions;
from kristaps@.
|
|
there are still a few bugs, but fixing these will be easier in tree.
|
|
Ignore the return values, they are constant anyway.
From kristaps@.
|
|
me package, aren't recognised by "groff -mandoc" so we don't need to do
so either. Besides, they are not used in base or Xenocara, and only at
two or three places in one single port, which are probably typos.
From kristaps@.
|
|
No more functional changes, just sync ordering, comments and white space.
|
|
Same as for mdoc_action.c, but much simpler.
Work by kristaps@, re-applying OpenBSD changes on top.
|
|
it is time to remove the .Sp, .Vb, and .Ve kludge
that was added to the man(7) library to build Perl manuals.
|
|
to MANDOCERR_LINESCOPE, i.e. from FATAL to ERROR.
That is, when an element next line scope is empty except for one
or more NSCOPED macros (like in .B .br .br .B), throw away the
empty element including its NSCOPED children such that the parser
can prod on.
While here, improve the error message and tell the user which element
has been thrown away.
|
|
Of course, we don't want to encourage low-level physical markup,
but pod2man(1) writes such requests, so Perl manuals contain them,
and some Xenocara and lots and lots of ports manuals use them as well.
In base and Xenocara, this will reduce mandoc -Tlint ERROR noise;
in ports, it will improve rendering of many manuals.
|
|
requests .am, .ami, .am1, .dei, and .rm for a long time.
Since ignoring them can (rarely) cause information loss and serious
misformatting, throw an ERROR: NOT IMPLEMENTED when finding them.
Implementing them would not be too difficult, but they are so rare
in practice that i can find better use for my time right now.
In this context,
- Put the string "NOT IMPLEMENTED" into two other error messages
as well, to distinguish them from those caused by broken input.
- Print the string "unknown macro" once, not twice in the error message
associated with MANDOCERR_MACRO, and begin printing the buffer at the
point where the unknown macro really is, not at the start of line.
|