Age | Commit message (Collapse) | Author |
|
|
|
|
|
.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@.
|
|
We don't hardcode the paths to gunzip(1) and cmp(1) either.
Discussed with ajacoutot@.
|
|
~, `, and ' get translated to non-ASCII characters by most troff
implementations when generating PostScript/PDF output. When the original
ASCII character is meant, it needs to be manually escaped.
discussed with jmc@ schwarze@; ok schwarze@
|
|
|
|
and option arguments, except for -m because "-m an" and "-m andoc"
look just too weird. Of course, the traditional form without the
blank will continue to work.
|
|
confusing messages reported by Jan Stary <hans at stare dot cz>
|
|
improved diagnostics, minus six lines of code
|
|
|
|
Feedback provided by jmc@ some time ago helped me to get this much
more concise than my initial attempt.
"i'm fine with it going in" jmc@
|
|
Remove lots of lies, dozens of irrelevant implementation details,
and all references to groff versions older than 1.17. Move relevant
information to the pages where it belongs, and out of mandoc(1) in
particular. Add some missing general remarks to roff(7), where it
fits the character and purpose of the page much better.
|
|
|
|
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.
|
|
missing and unreadable files from SYSERR to ERROR.
Needed for upcoming work.
As a bonus, this minimally simplifies code and documentation.
|
|
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>.
|
|
|
|
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
|
|
ok schwarze@
|
|
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.
|
|
main.c: add -K to usage() and wrap nicely
ok schwarze
|
|
of kristaps@' version of the preconv(1) utility into mandoc(1);
positive feedback from bentley@ and no concern raised when shown on tech@
|
|
Replace hard-coded widths and alignments with a minimal embedded stylesheet.
Do not use <p> because it cannot appear inside block macros.
Remove the "summary" attribute because it is not HTML5.
Written by kristaps@ some months ago, finished during EuroBSDCon.
|
|
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.
|
|
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.
|
|
provide a unified set of command line options for mandoc(1), man(1),
apropos(1), and whatis(1), each option doing the same for all four.
Not adding any completely new options, only extending exiting ones
from one tool to the others. New options are:
* apropos & whatis -acfkw (in the past, these were man(1) only)
* apropos & whatis -a -IOTW (in the past, mandoc(1) only)
* mandoc -ac (in the past, man(1) only)
* man -IOTW (in the past, mandoc(1) only)
Before we can decide whether or not we want to replace src/usr.bin/man
with this implementation, considerable bugfixing, testing, and
performance measurements are needed, which i'd rather do in the tree
than outside. Note that these bugs only affect the new man(1) mode,
existing mandoc(1), apropos(1), and whatis(1) is fine.
The new functionality in mandoc(1), apropos(1), and whatis(1)
is fully enabled. To play with the new man(1), you can try:
# mv /usr/bin/man /usr/bin/oman
# ln -s /usr/bin/mandoc /usr/bin/man
Positive feedback about the general direction from sthen@ and jmc@,
and deraadt@ is not against it.
|
|
a line is a line, a column is a column"; suggested by jmc@
|
|
jmc@ wondered what it meant and agrees with this patch.
|
|
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.
|
|
consistently use the style ".An name Aq Mt email".
Triggered by a question from Jan Stary <hans at stare dot cz>,
ok jmc@.
|
|
|
|
default value for the mdoc(7) .Os macro.
Needed for man.cgi on the OpenBSD website.
Problem with man.cgi first noticed by deraadt@;
beck@ and deraadt@ agree with the way to solve the issue.
|
|
from kristaps@, ok jmc@.
|
|
|
|
just like the default right margin already is. This may be useful for
people with expensive screen real estate. Besides, it helps automated
man(7) to mdoc(7) output comparisons to validate -Tman output.
ok kristaps@ on an earlier version
|
|
of -Ofragment and -Tman; using input from jmc@ and kristaps@.
|
|
Implement .Rv in -Tman.
Let -man -Tman work a bit like cat(1).
Add the -Ofragment option to -T[x]html.
Minor fixes in -T[x]html.
Lots of apropos(1) and -Tman code cleanup.
|
|
specifier that makes it look nicer;
ok schwarze kristaps
|
|
adding an implementation of the eqn(7) language
by kristaps@
So far, only .EQ/.EN blocks are handled, in-line equations are not, and
rendering is not yet very pretty, but the parser is fairly complete.
|
|
to convert mdoc(7) documents to the man(7) language.
This is work in progress and will be developed in tree.
It does already handle the cat(1) manual,
but will hardly handle all your fancy manuals yet.
go ahead kristaps@ jmc@ millert@ deraadt@
|
|
|
|
* Unicode output support (no Unicode input yet, though).
* Refactoring: completely handle predefined strings in roff.c.
- New function mandoc_escape() replaces a2roffdeco() and mandoc_special().
- Start using mandoc_getarg() in mdoc_argv.c.
- Clean up parsing of delimiters in mdoc(7).
* And many minor fixes and lots of cleanup.
|
|
written by kristaps@, looked over by jmc@.
|
|
in particular, use <B>, <I> and <U> where appropriate.
Provide relative widths for header and footer lines.
Manuals: More concise short descriptions of output modes.
Correct a few places still talking about CSS2 to say CSS1.
Code examples should use .Dl, not .D1.
|
|
Use less <DIV>, use more <H1>, <H2>, <P>, <BR>, <PRE>, <UL>, <OL>, <DL> etc.
Triggered by input from Will Backman.
Remove CSS2 note in mandoc.1, which is no longer true.
|
|
|
|
do not talk about \s, it is ignored anyway
do not .Xr groff(1) any longer, just talk about GNU troff
because in the long run, groff may not even be installed
|
|
We now have sufficient practical experience to know what we want,
so this is intended to be final:
- provide -Wlevel (warning, error or fatal) to select what you care about
- provide -Wstop to stop after parsing a file with warnings you care about
- provide consistent exit status codes for those warnings you care about
- fully document what warnings, errors and fatal errors mean
- remove all other cruft from the user interface, less is more:
- remove all -f knobs along with the whole -f option
- remove the old -Werror because calling warnings "fatal" is silly
- always finish parsing each file, unless fatal errors prevent that
This commit also includes a couple of related simplifications behind
the scenes regarding error handling.
Feedback and OK kristaps@; Joerg Sonnenberger (NetBSD) and
Sascha Wildner (DragonFly BSD) agree with the general direction.
|
|
from kristaps@.
|