| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-Wopenbsd and -Wnetbsd to check conventions for the base system of
a specific operating system. Mark operating system specific messages
with "(OpenBSD)" at the end.
Please use just "-Tlint" to check base system manuals (defaulting
to -Wall, which is now -Wbase), but prefer "-Tlint -Wstyle" for the
manuals of portable software projects you maintain that are not
part of OpenBSD base, to avoid bogus recommendations about base
system conventions that do not apply.
Issue originally reported by semarie@, solution using
an idea from tedu@, discussed with jmc@ and jca@.
|
| |
|
|
|
|
|
| |
It has been obsolete for more than two years.
Use -T html.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Switch -W all from meaning -W warning to meaning -W style.
The meaning of -T lint does *not* change, it still implies -W warning.
No messages on the new level yet, but they will come.
Usually, i do not lightly make the user interface larger.
But this has been planned for years, and EXIT STATUS 1
was reserved for it all the time. The message system
is now stable enough to finally implement it.
jmc@ regarding the concept: "really good idea"
|
|
|
|
|
|
| |
expression parser, such that "apropos -i 'Nm~dump\>'"
finds kdump(1) and WCOREDUMP(2) and you don't need
to type the counter-intuitive "apropos -- -i 'Nm~dump\>'".
|
|
|
|
|
| |
apropos) option. It will not be implemented. Featurism isn't the
plan for the future; simplicity is.
|
|
|
|
| |
suggested by and OK jmc@
|
|
|
|
|
|
| |
As observed by Jan Stary <hans at stare dot cz>, this is useful such
that after 'alias man="man -m $HOME/man"', 'man -l foo.1' still works.
Simplify and shorten the description of -m, and use .Ic for macros.
|
|
|
|
| |
thanks to reyk@ and to Vsevolod at FreeBSD for suggesting it
|
|
|
|
| |
Patch from semarie@, OK tb@.
|
|
|
|
| |
from Christos Zoulas <christos @ NetBSD>.
|
|
|
|
|
| |
mode and in other output modes, so do not error out prematurely.
Also sort local variables in main() while here.
|
|
|
|
| |
provide a -Onoval output option to show the unvalidated tree.
|
|
|
|
|
| |
and error out if they occur on the command line;
missing feature found in the TODO file
|
|
|
|
|
|
|
| |
such that "cat foo.mdoc | man -l" works.
Issue reported by Christian Neukirchen <chneukirchen at gmail dot com>
and also tested by him on Void Linux with both glibc and musl.
The patch makes sense to millert@.
|
|
|
|
|
|
| |
or during man_validate() have to affect the mandoc(1) EXIT STATUS.
Many thanks to <Yuri dot Pankov at gmail dot com> (illumos developer)
for reporting this regression.
|
|
|
|
|
|
|
|
|
|
|
|
| |
might be in stdio wide orientation due to prior formatting of an
unformatted manual in man -aTutf8 mode. So for now, use fflush(3)
followed by unbuffered write(2) instead. Fixes output corruption
on glibc discovered on Linux while testing a diff to fix a loosely
related bug reported by <jmates at ee dot washington dot edu>.
I detest the concept of stdio stream orientation. One day, i will
rewrite term_ascii.c to always use narrow streams, even in UTF-8
output mode. But that's too much work for today.
|
|
|
|
|
|
| |
fixing a NULL pointer access that happened when the first of multiple pages
shown was preformatted, as in "man -a groff troff".
Crash reported by <jmates at ee dot washington dot edu> on bugs@, thanks!
|
|
|
|
| |
found while investigating an unrelated bug report from jsg@
|
|
|
|
|
| |
Stop supporting systems that don't have mmap(3).
Drop the obsolete names_check() now that we deleted MLINKS.
|
|
|
|
|
|
|
| |
Triggered by a smaller patch from Christos Zoulas.
While here, unify style, move several config tests to config.h,
and delete the useless MANDOC_CONFIG_H.
|
|
|
|
|
|
|
|
|
| |
because we know it is actually mutable or because we are passing
it to a function that doesn't accept a const object but won't
actually attempt to modify it - simply casting from (const type *)
to (type *) is legal C and clearly expresses the intent.
So get rid of the obfuscating UNCONST macro.
Basic idea discussed with guenther@.
|
|
|
|
| |
hid among static functions, as noticed by tedu@ (my bad).
|
|
|
|
| |
noticed by Christos Zoulas with -Wmissing-prototypes
|
|
|
|
|
|
|
| |
is marked as DEPRECATED in OS X after 2011 or so, but has not been
removed and has no replacement.
ok schwarze@
|
|
|
|
|
|
|
| |
compatibility features - so we can safely use more -T on OpenBSD.
But don't do that in the portable version: more -T is unlikely
to work elsewhere.
Issue reported by Svyatoslav Mishyn <juef at openmailbox dot org>.
|
|
|
|
|
|
| |
the same stream, and actually, it fails spectacularly on glibc.
Portability issue pointed out by Svyatoslav Mishyn <juef at openmailbox
dot org> after testing on Void Linux.
|
|
|
|
| |
Patch from Peter Bray <pdb_ml at yahoo dot com dot au>.
|
|
|
|
|
|
|
| |
It could occasionally happen that the child process spawned less(1)
before the parent process passed the control of the terminal to the
child, and in that case, less(1) sometimes complained "Stopped (tty
output)". Issue reported by naddy@.
|
|
|
|
|
|
|
|
|
| |
the same name in sections with an alphabetical suffix (on OpenBSD,
mostly 3p), restoring behaviour of the traditional BSD man(1) that
got lost in the switch to the mandoc-based implementation.
Issue reported by jsg@, using an idea by mikeb@ for the solution,
and at least afresh1@ and jasper@ also seem in favour of the direction.
|
|
|
|
| |
patch from florian@
|
|
|
|
|
|
| |
Just return the file descriptor or -1 on error;
there is just one kind of error anyway.
Suggested by Christos Zoulas (NetBSD).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
closed the file descriptor passed to it after completing its work,
in particular considering the fact that it required its callers
to call open(2) or mparse_open() beforehand.
Change mparse_readfd() to not call close(2) and change the callers
to call close(2) afterwards, more or less bringing open and close
to the same level of the code and making review easier. Note that
man.cgi(8) already did that, even though it was wrong in the past.
Small restructuring suggested by Christos Zoulas (NetBSD).
|
|
|
|
|
|
|
| |
Make sure to always use the idiom 'if (pledge("'
such that it can easily be searched for.
No functional change.
Requested by deraadt@ some time ago.
|
|
|
|
|
| |
found by tb@ and millert@; parts of the code, in particular in tag.c,
by millert@; OK millert@.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the less(1) spawned by man(1), man(1) died uncleanly, leaving behind
its temp files, and killed less(1) uncleanly as well with SIGPIPE,
leaving the terminal in the wrong state.
Fix this by giving less(1) its own process group and handing it
control of the terminal, but in such a way that Ctrl-z (= SIGSTOP)
still works: In that case, let man(1) stop itself, too, and let it
continue the pager when it continues itself.
Joint work with millert@ who contributed most of the expertise
required, and also most parts of the code.
OK deraadt@ millert@
|
|
|
|
|
|
| |
Use the POSIX function getline(3) rather than the slightly
dangerous BSD function fgetln(3).
Remove the related compatibility code.
|
|
|
|
|
| |
In that case, the required prototypes are in "config.h".
Patch from Peter Bray <pdb_ml at yahoo dot com dot au>.
|
| |
|
|
|
|
|
|
|
| |
Suggested by Joerg@ Sonnenberger (NetBSD).
Last year, deraadt@ confirmed on tech@ that this "has the potential
to be more portable", and micro-optimizing for speed is not relevant
here. Also gets rid of one global variable.
|
| |
|
|
|
|
|
| |
refrain from dereferencing a NULL pointer during final deallocation.
Fixing a recent regression reported by czarkoff@
|
|
|
|
|
|
|
|
| |
level, validation must be separated from parsing and rewinding.
This first big step moves calling of the mdoc(7) post_*() functions
out of the parser loop into their own mdoc_validate() pass, while
using a new mdoc_state() module to make syntax tree state handling
available to both the parser loop and the validation pass.
|
|
|
|
| |
Delete the outmdoc, outman, and outfree function pointers.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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 were right between two adjacent case statement. Keep only
those 24 where the first case actually executes some code before
falling through to the next case.
|
|
|
|
|
|
|
|
|
|
| |
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...
|
|
|
|
| |
in preparation for pledge(2); no functional change intended.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
many (jmc@, millert@, espie@, deraadt@) considered revolting.
Instead, when using a pager, since we are using a temporary file
for tags anyway, use another temporary file for the formatted
page(s), as suggested by millert@ and similar to what the traditional
BSD man(1) did, except that we use only one single temporary output
file rather than one for each formatted manual page, such that
searching (both with / and :t) works across all the displayed files.
|