| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
its contents. Removing a gratuitious difference to groff output
found after a related bug report from krw@.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
That's more readable and less error-prone than fumbling around
with argv[0], fprintf(3), strerror(3), perror(3), and exit(3).
It's a bad idea to boycott good interfaces merely because standards
committees ignore them. Instead, let's provide compatibility modules
for archaic systems (like commercial Solaris) that still don't have
them. The compat module has an UCB Copyright (c) 1993...
|
| |
|
|
|
|
|
|
|
| |
.Vt type global_variable No = Dv defined_constant ;
is the best way to specify in the SYNOPSIS how a global variable
is initialized in the rare case where that matters.
Issue noticed by jmc@.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
* mdoc_word_alloc(), man_word_alloc() -> roff_word_alloc()
* mdoc_word_append(), man_word_append() -> roff_word_append()
* mdoc_addspan(), man_addspan() -> roff_addtbl()
* mdoc_addeqn(), man_addeqn() -> roff_addeqn()
Minus 50 lines of code, no functional change.
|
|
|
|
|
|
| |
high-level parsers to allow further unification of functions that
only need to recognize this code, but that don't care about different
high-level macrosets beyond that.
|
|
|
|
|
| |
Minus 80 lines of code, no functional change.
Written on the train from Koeln to Wolfsburg returning from p2k15.
|
|
|
|
|
| |
and call them from mparse_alloc() and choose_parser(),
preparing unified allocation of struct roff_man.
|
|
|
|
|
| |
arguments of mparse_result() by one. No functional change.
Written on the ICE Bruxelles-Koeln on the way back from p2k15.
|
|
|
|
|
| |
Almost completely mechanical, no functional change.
Written on the train from Exeter to London returning from p2k15.
|
|
|
|
|
|
| |
Replace enum mdoc_type and enum man_type by a unified enum roff_type.
Almost mechanical, no functional change.
Written on the ICE train from Frankfurt to Bruxelles on the way to p2k15.
|
|
|
|
|
|
|
|
| |
from man(1), man(1) dies from SIGPIPE. Exiting man(1) is fine in this
case, generating more output would be pointless, but without handling
SIGPIPE, the exit code from man(1) was wrong and csh(1) printed an
ugly message "Broken pipe". Fix this by handling SIGPIPE explicitly.
Issue noticed by deraadt@.
|
|
|
|
| |
Cluestick applied by joerg at NetBSD.
|
|
|
|
|
| |
all required by POSIX. So don't compare it against against
an unsigned constant.
|
|
|
|
|
|
| |
from throwing a bogus error "wait: No child processes".
As reported by Baptiste Daroussin <bapt at FreeBSD dot org>,
clearing the state variable curp->child after use was forgotten.
|
|
|
|
| |
confusing messages reported by Jan Stary <hans at stare dot cz>
|
|
|
|
|
|
|
| |
No change to messages about them (ignore them right before line feeds,
report errors elsewhere).
naddy@ found a manual in the wild containing lots of these (ysm(1)),
and i can't imagine a situation where dropping them could be problematic.
|
|
|
|
| |
by more specific messages, improving diagnostics for .cc .tr .Bl -column
|
| |
|
|
|
|
|
| |
replacing the last instances by more specific warnings.
Improved functionality, minus 50 lines of code.
|
|
|
|
| |
better handle .Fo with more than one argument
|
| |
|
|
|
|
| |
and the respective argument of check_count()
|
|
|
|
|
|
|
|
| |
* When "define" fails, do not drop the whole equation.
* Free memory after "undef".
* Use standard mandoc error types instead of rolling our own.
* Delete obfuscating EQN_MSG() macro.
* Add function prototypes while here.
|
|
|
|
|
|
| |
* Do not print out macro names in tbl(7) data blocks.
* Like with GNU tbl, let empty tables cause a blank line.
* Avoid producing empty tables in -Tman.
|
|
|
|
|
|
|
|
|
|
|
| |
* Continue parsing even if part of the input is invalid.
* Do not require whitespace between cell specifications.
* Allow tabs as well as blanks between modifiers.
* Mark the 'm' modifier as unsupported.
* Parse and ignore the 'p' and 'v' modifiers.
* Better warning and error messages.
* Get rid of a static buffer.
Improved functionality but minus 50 lines of code.
|
|
|
|
|
|
|
|
|
| |
* Treat "allbox" as an alias for "box" for now.
* Parse and ignore the GNU tbl "nowarn" option.
* For separation, allow spaces, tabs, and commas only.
* Mark eqn(7) within tbl(7) as unsupported.
* Simplify the option table.
* Improve and sort documentation.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Allow the layout to start after the semicolon on the options line.
* Ignore leading commas.
* Option arguments cannot contain closing parentheses.
* Avoid needless UNSUPP messages.
* Better ERROR reporting.
* Delete unused "linesize" field in struct tbl_opts.
* No need for static buffers.
* Garbage collect one almost empty wrapper function.
Improved functionality, but minus 40 lines of code.
|
| |
|
|
|
|
|
|
|
| |
in the input stream (SOH, STX, ETX, ENQ, ACK, BEL, BS) for specific
purposes (leaders, backspace, delimiters, .tr), but making sure
these don't leak through to the output is tricky, so mark them as
unsupported for now.
|
|
|
|
|
| |
fixes error message content and a use after free
for .so with non-existent target when -Wall or -Tlint is given.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
using mandoc is better than using groff) and -Wunsupp (manual using
unsupported low-level roff(7) feature, probably using groff is better
than using mandoc). Once this feature is complete, it is intended
to help porting, making the decision whether to USE_GROFF easier.
As a first step, distinguish four classes of roff(7) requests:
1. Supported (currently 24 requests)
2. Currently ignored because unimportant (120) -> no message
3. Ignored for good because insecure (14) -> -Werror
4. Currently unsupported (68) -> these trigger the new -Wunsupp messages
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
allows to get rid of ROFF_ERR
|
|
|
|
|
|
| |
missing and unreadable files from SYSERR to ERROR.
Needed for upcoming work.
As a bonus, this minimally simplifies code and documentation.
|
|
|
|
|
| |
We already do the same for malloc(3) failure.
The is no virtue in trying to survive failure of fork(2) and the like.
|
|
|
|
|
|
| |
when .Os has no argument, so do the same for man(7) when .TH has less
than four arguments; there is no reason to treat both differently.
Issue found following a question from Thomas Klausner <wiz at NetBSD>.
|
|
|
|
|
| |
would abort the table in an unclean way, causing assertion failures
found by jsg@.
|
|
|
|
|
|
|
| |
which is not part of the parser. Besides, the parser *does* modify
the input buffer, so marking it "const" in the mparse_readmem()
interface is an outright lie. Fix all this by killing the const,
the UNCONST, and the bogus inclusion.
|
|
|
|
|
|
|
| |
* The first argument of .Pf is not parsed.
* Normal delimiter handling does not apply to the first argument of .Pf.
* Warn if nothing follows a prefix (inspired by groff_mdoc(7)).
* In that case, do not suppress spacing.
|
|
|
|
| |
inspired by a similar warning in the groff_mdoc(7) macros
|
|
|
|
|
|
| |
is a job for makewhatis(8)/mandoc.db(5), not for the parser.
Removes 150 lines from source files and 4k (1%) from the binary.
Bloat found by deraadt@.
|
|
|
|
| |
no functional change, minus 15 lines of code.
|
|
|
|
|
| |
Since this was the last remaining FATAL error in this area,
this change will allow major simplifications in the mdoc(7) parser.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Don't bother the user with the PID of the child process,
store it inside the opaque mparse handle.
|
|
|
|
|
|
| |
and reduces the number of arguments of many functions.
While here, sprinkle some KNF.
No functional change.
|