| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
Do not abuse strstr(3) to check whether one long string starts with
another long string. Instead, use strncmp(3) with the proper length.
In set_basedir(), also reset *basedir in the error brances for extra safety.
While here, invert some more Yoda conditions in the neighbourhood.
|
|
|
|
|
|
| |
symbolic constants for tagging priorities.
This review also made me find a minor bug: do not upgrade
TAG_FALLBACK to TAG_WEAK when there is trailing whitespace.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
incomplete short layout lines followed by longer lines,
and spans at the beginning of layout lines
|
|
|
|
|
|
|
|
|
| |
last layout cell that was explicitly specified, properly initialize
the spacing attribute to indicate that the default is to be used.
Failing to do so and leaving the spacing at zero in this case caused
misformatting when another row further down the table had even more
explicitly specified cells.
Bug found while trying to write regression tests for tbl_term.c rev. 1.73.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When both the first and the third column are spans, do not use
the number of columns of the span starting in column two
for the span starting in column zero.
With afl, Jan Schreiber <jes at posteo dot de> found cases where
this caused NULL pointer accesses because too many layout cells
were consumed.
While here, make the code more similar at the three places
that iterate over data cells.
|
|
|
|
| |
column numbers, options, layout rows, cell types, cell modifiers.
|
| |
|
|
|
|
|
| |
issue reported by Tim Baumgard <at bmgrd dot com>.
landry@ and florian@ agree with the general direction.
|
|
|
|
|
|
|
| |
Closing a gap reported by bentley@, who also sent a patch,
but i'm explaining it somewhat differently.
While here, remove duplicate information from the text.
OK bentley@
|
|
|
|
| |
Bug found by bentley@ with input like "delim $$ delim off".
|
|
|
|
|
| |
actually tests which parts of text lines are processed with eqn(7)
and which are not.
|
|
|
|
| |
No functional change for the portable test suite.
|
|
|
|
|
|
| |
no longer exist and NROFF/NOPTS were replaced with GROFF/GOPTS.
This doesn't change how things work in the protable version
of the test suite.
|
|
|
|
|
|
| |
after kn@ reported that the descriptions were incomplete and somewhat
inaccurate.
OK jmc@ kn@
|
|
|
|
|
| |
to 1n rather than to 0n, in the same way as groff does.
This fixes misformatting reported by bentley@ in xkeyboard-config(7).
|
|
|
|
|
|
|
| |
of a conditional inside a .ce request block. Instead, abort the .ce
block just like when there is no conditional in between.
Bug found by espie@ working on the textproc/fstrcmp port.
|
| |
|
|
|
|
| |
and delete release number verification from groff_mdoc(7)
|
|
|
|
|
|
| |
This is the intended behavior and already the case in terminal output.
Incorrect output noticed by Eldred Habert.
Patch from bentley@.
|
|
|
|
|
|
| |
This ensures that in a modern browser that understands the header,
mandoc rendering bugs cannot possibly be interpreted as JavaScript.
Patch from bentley@.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
macro, which is usually close to the beginning of the file, right
after the Copyright header comments. But espie@ found horrible
input files in the textproc/fstrcmp port that generate lots of parse
nodes before even getting to the header macro. In some formatters,
comment nodes after some kinds of real content triggered assertions.
So make sure generation of comment nodes stops once real content is
encountered.
|
| |
|
|
|
|
|
|
| |
return the appropriate 40x status code rather than 200.
Improvement suggested and diff tested
by John Gardner <gardnerjohng at gmail dot com>.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which apparently didn't work since the .Pp/<p> reorg.
The new logic is more similar to what the terminal formatter does:
1. Before a node that starts a new mdoc(7) input line,
start a new HTML output line.
2. An empty input line or a .Pp causes an empty output line.
3. Nothing needs to be done at the end of a node.
Severe misformatting was reported in table(5) by
Edgar Pettijohn <edgar at pettijohn dash web dot com> on misc@.
|
|
|
|
|
|
| |
1. Relax checking to accept function types of the form
"ret_type (fname)(args)" (suggested by Yuri Pankov <yuripv dot net>).
2. Tighten checking to require the closing parenthesis.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I don't think there ever was a reason for doing so.
Besides, there is a discrepacy with respect to the point in the
document affected. That flag controls whitespace at the current
formatting point. But when HTML_BUFFER is in effect, the line break
and indentation is typically inserted one word further to the left.
Anything happening at that point to the left can't reasonably
influence spacing at the different point further to the right.
Among other effects, this change avoids some spurious line breaks
in HTML code at points where they weren't supposed to happen, line
breaks that in some cases caused undesirable, visible whitespace
when the resulting HTML was rendered.
|
| |
|
|
|
|
|
|
|
|
|
| |
contained in flow containers; never put them directly into sections.
This helps to format paragraphs with the CSS class selector .Pp.
Suggested by bentley@ and also by Colin Watson <cjwatson at debian>
via Michael Stapelberg <stapelberg at debian>,
see https://github.com/Debian/debiman/issues/116
|
|
|
|
|
|
|
|
|
|
| |
it is supposed to be a one-line description. For the case where .Nd
generates flow content (which is very bad style but syntactically
valid), rely on the new feature of html_close_paragraph() to close
out the <span> prematurely, effectively moving the flow content out
of the .Nd for HTML presentation. For the final closing, also rely
on the new html_close_paragraph() functionality, this time triggered
by the subsequent block, which will typically be .Sh SYNOPSIS.
|
|
|
|
|
|
|
|
| |
dependent on individual HTML elements, and simpler: don't just close
<p>, <pre>, and <a>, but any element that establishes phrasing
context. This doesn't change output for any OpenBSD manual page,
but it will allow using this function more safely and at more places
in the future.
|
| |
|
|
|
|
|
|
|
| |
Tested on the complete manual page trees of Version 7 AT&T UNIX,
4.4BSD-Lite2, POSIX-2013, OpenBSD 2.2 to 6.5 and -current,
FreeBSD 10.0 to 12.0, NetBSD 6.1.5 to 8.1, DragonFly 3.8.2 to 5.6.1,
and Linux 4.05 to 5.02.
|
|
|
|
| |
delete unimportant .Pp rule and shorten overly specific selectors
|
|
|
|
|
|
| |
Delete the "argc" argument from fs_search() which is now always 1,
and move error reporting to the main() program where it is more
logically placed and easier to see.
|
|
|
|
| |
so delete the second copy. No functional change.
|
|
|
|
|
|
|
|
| |
show the results in the order of the command line arguments.
Implemented by separating the code for man(1) and apropos(1)
in the main() program.
Surprisingly, the number of lines of code remains unchanged.
Issue reported by deraadt@, additional input from millert@.
|
|
|
|
|
| |
Unify code to process one single input file
and move it into a dedicated new function.
|
|
|
|
|
| |
Also, move setting of tag_files.tagname into tag_init().
No functional change.
|
|
|
|
|
|
| |
For clarity, stop storing the same information (in this case, -O
settings) in two structs. Give the local struct in main.c a more
descriptive name (output state).
|
|
|
|
|
|
|
|
| |
Mixing parser and formatter state in the same struct was a bad idea,
so pull the parser state and configuration out of it.
This makes sure output options are not passed into parser functions
and parser options are not passed into output functions.
While here, add comments to the important local variables in main().
|
|
|
|
|
| |
Move process group management out of main() into its own function
because it has its own, self-contained logic and its own local variables.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
though it is obvious that this can never become as good as for
mdoc(7) pages. As a first step, tag alphabetic arguments of .IP
macros, which are often used for lists of options and keywords.
Try "man -O tag=g as" to get the point.
Thanks to Leah Neukirchen for recently reminding me that exploring
how much can be done in this respect may be worthwhile: it is likely
to slightly improve usability while adding only small amounts of
relatively straightforward code.
|
|
|
|
|
|
|
|
|
|
|
|
| |
soon as the condition can be detected and do not pass it to less(1).
This may happen for man(7) pages, for preformatted pages, and for
very simple pages like true(1). The main benefit is that :t inside
less(1) yields the clearer diagnostic message "No tags file" rather
than the mildly confusing "No such tag in tags file": the latter
might encourage further, futile attempts to jump to other tags.
Improvement suggested by Leah Neukirchen <leah at vuxu dot org>
from The Void.
|