| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
mandocdb.c 1.231 & 1.232; configure 1.52 & 1.53; configure.local.example 1.21
|
| |
|
|
|
|
| |
from getting priority over names from .Sh NAME
|
|
|
|
|
|
|
|
| |
delete manpath(1) support. With the mandoc-based man(1), manpath(1)
is utterly useless. Just set MANPATH_DEFAULT in configure.local
for sane operating system defaults, use man.conf(5) for machine-
specific modifications, and use ${MANPATH}, -m, and -M for user
preferences.
|
|
|
|
|
| |
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.
|
|
|
|
| |
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@
|
|
|
|
| |
from Joerg Sonnenberger via Thomas Klausner, NetBSD.
|
|
|
|
| |
From krw@, started by a diff from Mical Mazurek.
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
callback functions into one common place, preparing for the use of
ohash for some additional purposes. No functional change.
|
|
|
|
| |
found by Svyatoslav Mishyn <juef at openmailbox dot org> with cppcheck.
|
|
|
|
|
| |
Fixes a segfault reported by bentley@.
While here, do some style cleanup in the same function.
|
|
|
|
|
|
| |
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...
|
| |
|
|
|
|
| |
(didn't blow up anywhere yet, but better safe than sorry)
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
No functional change except that for mdoc(7), it now skips leading
escape sequences just like it already did for man(7).
Escape sequences rarely occur in mdoc(7) code and if they do,
skipping them is an improvement in this context.
Minus 30 lines of code.
|
|
|
|
|
|
| |
man_node() from the mandoc(3) semi-public interface and the internal
wrapper functions print_mdoc() and print_man() from the HTML formatters.
Minus 60 lines of code, no functional change.
|
|
|
|
|
| |
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 struct mdoc_meta and struct man_meta by a unified struct roff_meta.
Written of the train from London to Exeter on the way to p2k15.
|
|
|
|
|
|
|
|
|
| |
Replace struct mdoc_node and struct man_node by a unified struct roff_node.
To be able to use the tok member for both mdoc(7) and man(7) without
defining all the macros in roff.h, sacrifice a tiny bit of type safety
and make tok an int rather than an enum.
Almost mechanical, no functional change.
Written on the Eurostar from Bruxelles to London on the way to 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.
|
|
|
|
| |
The next step will be to actually use the parsed data.
|
|
|
|
|
|
| |
typically 64bit platforms. This was basically broken since forever.
Not only is the padding used, but it was used uninitialized.
Problem reported by jmc@.
|
|
|
|
|
|
|
|
|
|
| |
This is relevant because some ports install files like man1/xsel.1x,
as reported by patrick keshishian <pkeshish at gmail dot com> on misc@.
We can probably improve functionality and simplify the code by ignoring
file name extensions altogether; we already know the section number from
the name of the directory. But so close to lock, i'm keeping the fix
minimal.
|