| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
and support the MACHINE environment variable as documented in man(1).
Missing feature reported by pascal@.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
do not allow later files to reset it to zero
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cd /usr/src/share/man/man4; vi newdev.4 Makefile; make install; man newdev
When a manual is missing from an outdated database, let man(1)
show it anyway, using a KISS file system lookup as a fallback.
Requested by deraadt@.
87 new lines of code doesn't seem too much bloat to me.
Of course, keeping your mandoc.db(5) files up to date with makewhatis(8)
or weekly(8) is still required for apropos(1) to find your new pages.
|
| |
|
|
|
|
|
|
| |
never as a section. Who would have thought that people call their
manual pages 7z(1), 9c(1), 9p(1), and 9p(3)...
Patch from Sebastien Marie <semarie dash openbsd at latrappe dot fr>.
|
|
|
|
|
|
| |
between pages. Suggested by Theo Buehler <theo at math dot ethz dot ch>.
Even in UTF-8 output mode, do not use fancy line drawing characters such
that you can easily use /^--- to skip to the next manual in your pager.
|
|
|
|
|
|
| |
and apropos(1) mode. While here, put a space character between
options and option arguments in error messages.
Both reported by Alessandro DE LAURENZIS <just22 dot adl at gmail dot com>.
|
|
|
|
| |
from jmc@
|
|
|
|
|
|
| |
as the first man(1) command line argument without -s:
Accept digits like "1", "2"; digit+letter like "3p", "1X"; and "n".
Issue reported by Svyatoslav Mishyn <juef at openmailbox dot org> (Crux Linux).
|
|
|
|
|
| |
show the open(n) Tcl manual, as documented in man(1). Issue reported
by Svyatoslav Mishyn <juef at openmailbox dot org> (Crux Linux).
|
|
|
|
| |
Compiler warnings about unused code reported by wiz@NetBSD.
|
|
|
|
| |
to help downstream distributions avoid naming conflicts.
|
|
|
|
|
| |
just like we do it on OpenBSD. Smaller and neater.
While here, let ./configure set INSTALL_TARGETS.
|
| |
|
|
|
|
|
|
|
|
| |
This doesn't change anything unless LC_CTYPE is set,
but it helps when running with LC_TYPE=something.UTF-8.
OK tedu@ and earlier positive feedback from:
bentley@ deraadt@ naddy@ stsp@ uqs@freebsd wiz@netbsd
|
|
|
|
|
| |
Don't bother the user with the PID of the child process,
store it inside the opaque mparse handle.
|
|
|
|
|
| |
that contained at least one match in order to not prefer mdoc(1) from
ports over mdoc(7). As a bonus, this results in a speedup.
|
|
|
|
|
|
| |
Usually, -h output is short, so the pager is just a nuisance.
Also, traditional man(1) does not use a pager for -h.
Triggered by a remark of deraadt@ on ICB.
|
|
|
|
| |
requested by tedu@
|
| |
|
|
|
|
|
|
|
|
| |
validity of character escape names and warn about unknown ones.
This requires mchars_spec2cp() to report unknown names again.
Fortunately, that doesn't require changing the calling code because
according to groff, invalid character escapes should not produce
output anyway, and now that we warn about them, that's fine.
|
|
|
|
| |
enhances functionality and reduces code and docs by more than 300 lines
|
|
|
|
| |
hinted at by Steffen Nurpmeso <sdaoden at yandex dot com>.
|
|
|
|
| |
Implemented by moving the zip code from makewhatis(8) to the parser lib.
|
|
|
|
|
|
|
| |
note in mandoc.db(5), such that man(1) -w and apropos(1) -w can
report the correct filename.
This is a prerequisite for letting apropos -a and man support
gzip'ed manuals in the future, which doesn't work yet.
|
|
|
|
|
|
|
| |
As usual, we get mandoc -h and apropos -h for free.
Try stuff like "apropos -h In=dirent" or "apropos -h Fa=timespec".
Only useful for terminal output, so -Tps, -Tpdf, -Thtml ignore -h for now.
|
|
|
|
|
|
|
| |
just like traditional man(1) does, such that .so links have a chance to
work. After this point, we don't need the current directory for anything
else before exit, so we don't need to worry about getting back and we can
safely ignore failure.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Basically, this does the same as man -l in Linux man-db.
The point is that now all functionality of the combined tool
is reachable from the man(1) command name:
apropos = man -k, whatis = man -f, mandoc = man -cl.
Originally suggested by Carsten dot Kunze at arcor dot de,
current maintainer of the Heirloom Documentation Tools.
While here, add various missing information to the usage()
and to the manuals.
|
| |
|
|
|
|
|
|
|
| |
from the file and copying them to the standard output.
This works even for mixed formats: "man -a groff mandoc" displays
groff(1) [formatted], mandoc(1) [unformatted], groff(7) [formatted],
and mandoc(7) [unformatted] in that order.
|
| |
|
| |
|
|
|
|
|
| |
but provide an option -c to not paginate;
taking inspiration from manpage.c, hence adding (c) 2012 kristaps@
|
|
|
|
|
|
| |
if there is more than one match, using traditional section priorities,
and implement man(1) -a (show all) output mode, not just for man(1),
but also for apropos(1) and whatis(1).
|
|
|
|
| |
Implement -w (list manual page filenames).
|
|
|
|
|
|
|
|
|
| |
Switch the argmode on the progname, including man(1).
Provide -f and -k options to switch the argmode.
Store the argmode inside struct search, generalizing the flags.
Derive the deftype from the argmode when needed instead of storing it.
Store the outkey inside struct search instead of passing it alone.
While here, get rid of the trailing blanks in Makefile.depend.
|
|
|
|
|
| |
This is the first step on the way to a man(1) implementation.
The new ./configure is flexible enough to make this step quite easy.
|
|
|
|
|
|
| |
Include <sys/types.h> where needed, it does not belong in config.h.
Remove <stdio.h> from config.h; if it is missing somewhere, it should
be added, but i cannot find a *.c file where it is missing.
|
|
|
|
| |
Suggested by and ok jmc@.
|
|
|
|
|
| |
with "mandoc: " or "makewhatis: ", respectively,
similar to what we already do for other messages.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when they are meaningful, to avoid confusing stuff like this:
$ mandoc /dev/null
mandoc: /dev/null:0:1: FATAL: not a manual
Instead, just say:
mandoc: /dev/null: FATAL: not a manual
Another example this applies to is documents having a prologue,
but lacking a body. Do not throw a FATAL error for these; instead,
issue a WARNING and show the empty document, in the man(7) case with
the same amount of blank lines as groff does. Also downgrade mdoc(7)
documents having content before the first .Sh from FATAL to WARNING.
|
|
|
|
|
|
|
| |
just like almost all other utility programs do.
Suggested by nick@ who wondered where messages came from
when calling mandoc(1) from inside a Perl script.
ok jmc@ nick@
|
|
|
|
|
| |
remove trailing whitespace and blanks before tabs, improve some indenting;
no functional change
|
|
|
|
|
|
|
| |
functions used for multiple languages (mdoc, man, roff), for example
mandoc_escape(), mandoc_getarg(), mandoc_eos(), and generic auxiliary
functions. Split the auxiliaries out into their own file and header.
While here, do some #include cleanup.
|
|
|
|
|
|
| |
single .so request, do not read the file pointed to, but instead
let mparse_result() provide the file name pointed to as a return
value. To be used by makewhatis(8) in the future.
|
|
|
|
|
|
|
|
| |
them an "options" argument, replacing the existing "inttype" and
"quick" arguments, preparing for a future MPARSE_SO option.
Store this argument in struct mparse and struct roff, replacing the
existing "inttype", "parsetype", and "quick" members.
No functional change except one tiny cosmetic fix in roff_TH().
|
|
|
|
|
|
| |
some files. To make it clear that he also put his contributions
under the ISC license, with his explicit permission, add his
Copyright notice to the relevant files. No code change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for accelerated generation of reduced-size databases.
Implement this by allowing the parsers to optionally
abort the parse sequence after the NAME section.
While here, garbage collect the unused void *arg attribute of
struct mparse and mparse_alloc() and fix some errors in mandoc(3).
This reduces the processing time of mandocdb(8) on /usr/share/man
by a factor of 2 and the database size by a factor of 4.
However, it still takes 5 times the time and 6 times the space
of makewhatis(8), so more work is clearly needed.
|