| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
in part based on ideas by bentley@.
While here, improve the documentation.
|
| |
|
| |
|
|
|
|
| |
From krw@, started by a diff from Mical Mazurek.
|
| |
|
|
|
|
| |
patch from florian@
|
|
|
|
|
|
|
|
| |
most uses by one, a few by two pointer checks, and only one by a
tiny loop - not only making data smaller, but code shorter as well.
This gets rid of an implicit invariant that confused both static
analysis tools and human auditors. No functional change.
|
|
|
|
|
| |
It is useful to see the program name, and we have err.h compat in place anyway.
Suggested by Christos Zoulas (NetBSD).
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
| |
so delete a redundant NULL check that confused Coverity in CID 1257471;
issue reported by wiz@, patch differs from what christos@ did in NetBSD.
No functional change.
|
|
|
|
|
| |
where only sizeof(enum termfont) is needed.
Fixes CID 1288941. From christos@ via wiz@, both at NetBSD.
|
|
|
|
|
| |
incremented, causing infinite loops.
Fixing CID 1288962. From christos@ via wiz@, both at NetBSD.
|
|
|
|
|
|
|
| |
tedu@ noticed that no Vt= database entries were generated.
Serguey Parkhomovsky suggested the deletion of parse_mdoc_body().
tb@ noticed that the fix requires more than just adding TYPE_Vt
to the MDOC_Vt mask in the mdoc_handler array.
|
|
|
|
| |
Patch from bentley@.
|
|
|
|
|
| |
Clean, simple URLs are best.
Patch from bentley@.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
like preparing queries or binding variables fail; that won't yield
useful results anyway but may generate huge pointless error messages.
Issue reported by deraadt@.
|
|
|
|
|
| |
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@
|
|
|
|
|
|
|
|
| |
Also add a comment in time2a() explaining why it isn't possible
to use just one single call to strftime().
Do some style cleanup while here.
No functional change.
Triggered by a very different patch from des@FreeBSD.
|
|
|
|
|
| |
On the other hand, it is a security risk because it might cause
buffer overflows. Use LC_CTYPE only, that's all we need.
|
| |
|
|
|
|
| |
found on Solaris 10 at OpenCSW
|
|
|
|
|
| |
even though that's required by POSIX.
Use -w and -r, that's just as good.
|
|
|
|
| |
for systems lacking it
|
|
|
|
|
|
| |
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>.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because these work slightly differently on different systems,
they are becoming a maintenance burden in the portable version,
so delete them.
Besides, one of the chief design goals of the mandoc toolbox is to
make sure that nothing related to documentation requires C++.
Consequently, linking mandoc against any kind of C++ program would
defeat the purpose and is not supported.
I don't understand why kristaps@ added them in the first place.
|
|
|
|
| |
noticed by Peter Bray <pdb_ml at yahoo dot com dot au>
|
|
|
|
| |
Bug reported by Peter Bray <pdb_ml at yahoo dot com dot au>.
|
|
|
|
| |
issue reported by Svyatoslav Mishyn, Peter Bray, and Daniel Levai.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compiled-in string. This is not a security risk, we read the file
manpath.conf from the same directory, anyway. No error handling
is needed; even if the files are absent, that's not an error.
This is more flexible without causing complication of the code or
the user interface. It helps the upcoming revamp of the online
manual pages on man.NetBSD.org.
Based on an idea by Jean-Yves Migeon <jeanyves dot migeon at free dot fr>,
but implemented in a much simpler way.
|
|
|
|
| |
Many thanks to bentley@ for doing this work.
|
| |
|
| |
|
|
|
|
| |
from guenther@, ok and tweaks jmc@
|
|
|
|
|
| |
its contents. Removing a gratuitious difference to groff output
found after a related bug report from krw@.
|
|
|
|
| |
Bug reported by krw@.
|
|
|
|
| |
fixing input like \fB\('e; issue reported by bentley@
|
| |
|
| |
|
|
|
|
|
| |
refrain from dereferencing a NULL pointer during final deallocation.
Fixing a recent regression reported by czarkoff@
|
|
|
|
|
|
| |
to the new separate validation pass, except for a tiny bit
needed by the parser which goes to the new mdoc_state() module;
cleaner, simpler, and surprisingly also shorter by 15 lines.
|
|
|
|
|
|
|
|
| |
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.
|