summaryrefslogtreecommitdiffstats
path: root/mandoc.1
Commit message (Collapse)AuthorAgeFilesLines
* Radical cleanup of COMPATIBILITY sections:Ingo Schwarze2015-01-291-107/+8
| | | | | | | | 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.
* Clean up eqn(7) error handling:Ingo Schwarze2015-01-281-7/+0
| | | | | | | | * When "define" fails, do not drop the whole equation. * Free memory after "undef". * Use standard mandoc error types instead of rolling our own. * Delete obfuscating EQN_MSG() macro. * Add function prototypes while here.
* * Polish tbl(7) error reporting.Ingo Schwarze2015-01-281-12/+37
| | | | | | * Do not print out macro names in tbl(7) data blocks. * Like with GNU tbl, let empty tables cause a blank line. * Avoid producing empty tables in -Tman.
* Rework tbl(7) layout parsing:Ingo Schwarze2015-01-261-2/+40
| | | | | | | | | | | * Continue parsing even if part of the input is invalid. * Do not require whitespace between cell specifications. * Allow tabs as well as blanks between modifiers. * Mark the 'm' modifier as unsupported. * Parse and ignore the 'p' and 'v' modifiers. * Better warning and error messages. * Get rid of a static buffer. Improved functionality but minus 50 lines of code.
* More improvements regarding tbl(7) options.Ingo Schwarze2015-01-261-0/+4
| | | | | | | | | * Treat "allbox" as an alias for "box" for now. * Parse and ignore the GNU tbl "nowarn" option. * For separation, allow spaces, tabs, and commas only. * Mark eqn(7) within tbl(7) as unsupported. * Simplify the option table. * Improve and sort documentation.
* Improve (or rather, rewrite) tbl(7) option parsing.Ingo Schwarze2015-01-261-8/+37
| | | | | | | | | | | | * Allow the layout to start after the semicolon on the options line. * Ignore leading commas. * Option arguments cannot contain closing parentheses. * Avoid needless UNSUPP messages. * Better ERROR reporting. * Delete unused "linesize" field in struct tbl_opts. * No need for static buffers. * Garbage collect one almost empty wrapper function. Improved functionality, but minus 40 lines of code.
* Support .RE with an argument; needed for audio/pms(1).Ingo Schwarze2015-01-241-2/+15
|
* typo fixes from jmc@Ingo Schwarze2015-01-201-1/+1
|
* Split the -Werror message level into -Werror (broken manual, probablyIngo Schwarze2015-01-201-22/+60
| | | | | | | | | | | | | 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
* Fatal errors no longer exist.Ingo Schwarze2015-01-151-51/+39
| | | | | | 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.
* To get rid of SYSERR entries in enum mandocerr, downgrade problems withIngo Schwarze2015-01-141-7/+11
| | | | | | missing and unreadable files from SYSERR to ERROR. Needed for upcoming work. As a bonus, this minimally simplifies code and documentation.
* mdoc(7) already uses the mandoc(1) -Ios argument in the footer lineIngo Schwarze2014-12-281-0/+3
| | | | | | 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>.
* Ignore mdoc(7) and man(7) macros inside tbl(7) code because theyIngo Schwarze2014-12-161-0/+1
| | | | | would abort the table in an unclean way, causing assertion failures found by jsg@.
* Switch the default output mode from -Tascii to -Tlocale.Ingo Schwarze2014-12-021-5/+7
| | | | | | | | 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
* Multiple fixes with respect to .Pf:Ingo Schwarze2014-11-301-0/+8
| | | | | | | * The first argument of .Pf is not parsed. * Normal delimiter handling does not apply to the first argument of .Pf. * Warn if nothing follows a prefix (inspired by groff_mdoc(7)). * In that case, do not suppress spacing.
* warn about attempts to call non-callable macros;Ingo Schwarze2014-11-301-0/+7
| | | | inspired by a similar warning in the groff_mdoc(7) macros
* Drop useless architecture table. Validating architecture namesIngo Schwarze2014-11-281-6/+0
| | | | | | is a job for makewhatis(8)/mandoc.db(5), not for the parser. Removes 150 lines from source files and 4k (1%) from the binary. Bloat found by deraadt@.
* Downgrade .Bd -file from FATAL to ERROR.Ingo Schwarze2014-11-271-11/+11
| | | | | Since this was the last remaining FATAL error in this area, this change will allow major simplifications in the mdoc(7) parser.
* "Aq foo" is not the same as "<foo>". Don't use it to mark up HTML;Ingo Schwarze2014-11-251-10/+2
| | | | from bentley@.
* Let -h imply -c (that is, not use the pager).Ingo Schwarze2014-11-111-1/+1
| | | | | | 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.
* fix a macro error in previous; from jmc@Ingo Schwarze2014-10-301-1/+1
|
* Report arguments to .EQ as an error, and simplify the code:Ingo Schwarze2014-10-251-0/+2
| | | | | | | * drop trivial wrapper function roff_openeqn() * drop unused first arg of function eqn_alloc() * drop usused member "name" of struct eqn_node While here, sync to OpenBSD by killing some trailing blanks.
* integrate preconv(1) into mandoc(1);Ingo Schwarze2014-10-251-0/+26
| | | | enhances functionality and reduces code and docs by more than 300 lines
* Improve error handling in the eqn(7) parser.Ingo Schwarze2014-10-121-9/+26
| | | | | | | | | | | | | | | | | | | Get rid of the first fatal error, MANDOCERR_EQNSYNT. In eqn(7), there is no need to be bug-compatible with groff, so there is no need to abondon the whole equation in case of a syntax error. In particular: * Skip "back", "delim", "down", "fwd", "gfont", "gsize", "left", "right", "size", and "up" without arguments. * Skip "gsize" and "size" with a non-numeric argument. * Skip closing delimiters that are not open. * Skip "above" outside piles. * For diacritic marks and binary operators without a left operand, default to an empty box. * Let piles and matrices take one argument rather than insisting on a braced list. Let HTML output handle that, too. * When rewinding, if the root box is guaranteed to match the termination condition, no error handling is needed.
* warn about parentheses in function names after .Fn and .Fo;Ingo Schwarze2014-10-111-0/+8
| | | | | particularly useful when converting from other languages to mdoc(7); feature suggested by bentley@
* Re-write of eqn(7) parser and MathML output.Kristaps Dzonsons2014-10-101-1/+5
| | | | | | | | | | This adds parser-level support for the grammar described by the eqn second-edition technical paper, "Typesetting Mathematics — User's Guide" (Kernighan, Cherry). The reason for this re-write is the grouping rules, which were not possible given the existing implementation. The re-write has also considerably simplified the HTML (and, if it ever is completed, terminal) front-end.
* If a tbl(7) layout contains unknown font modifiers, fall back to theIngo Schwarze2014-10-071-2/+7
| | | | | | default font rather than failing the whole table. Needed by some pages in books/man-pages-posix. Written on the plane back from EuroBSDCon in Sofia.
* Don't pretend we have a separate XHTML and HTML mode any more.Kristaps Dzonsons2014-09-271-16/+7
|
* warn about commas in function arguments; inspired by mdoclint(1)Ingo Schwarze2014-09-121-0/+7
|
* document new SEE ALSO .Xr warningsIngo Schwarze2014-09-121-0/+16
|
* warn about AUTHORS sections without .An macros, inspired by mdoclint(1)Ingo Schwarze2014-09-071-0/+6
|
* Implement the traditional -h option for man(1): show the SYNOPSIS only.Ingo Schwarze2014-09-031-1/+5
| | | | | | | 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.
* Introduce a man(1) -l option as an alias for mandoc -a.Ingo Schwarze2014-08-301-2/+38
| | | | | | | | | | | | | 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.
* implement MANPAGER and PAGERIngo Schwarze2014-08-221-0/+15
|
* mandoc -a, man, apropos -a, whatis -a now paginate by defaultIngo Schwarze2014-08-221-1/+16
| | | | | but provide an option -c to not paginate; taking inspiration from manpage.c, hence adding (c) 2012 kristaps@
* document warning and error messages, using quite some feedback from jmc@;Ingo Schwarze2014-08-081-26/+841
| | | | more cleanup is likely to happen when it's in
* Below DIAGNOSTICS, document the SYSERR message level;Ingo Schwarze2014-06-231-3/+5
| | | | jmc@ wondered what it meant and agrees with this patch.
* As suggested by jmc@, only include line and column numbers into messagesIngo Schwarze2014-06-201-4/+8
| | | | | | | | | | | | | | 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.
* For citing the names and email addresses of authors,Ingo Schwarze2013-07-131-2/+1
| | | | | | | consistently use the style ".An name Aq Mt email". Triggered by a question from Jan Stary <hans at stare dot cz>, ok jmc@.
* legancy -> legacy; reported by Chris HettrickIngo Schwarze2013-03-061-1/+1
|
* Support -Ios='OpenBSD 5.1' to override uname(3) as the source of theIngo Schwarze2012-05-271-0/+13
| | | | | | | | | | 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. "Please check them in and I'll look into them later!" kristaps@
* State default usage before listing arguments of a utility. Inspired by aKristaps Dzonsons2011-12-251-12/+13
| | | | patch to mandocdb.8 by schwarze@ some time ago. Ok jmc@.
* typo: overful -> overfull; thanks to jmc@Ingo Schwarze2011-11-131-1/+1
|
* Make the default left text margin configurable from the command line,Ingo Schwarze2011-11-131-0/+9
| | | | | | | 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
* A bit more precision and nicer wording in the descriptionsIngo Schwarze2011-10-091-7/+20
| | | | of -Ofragment and -Tman; using input from jmc@ and kristaps@.
* Nix end-of-line whitespace.Kristaps Dzonsons2011-10-061-1/+1
|
* If -Tman is specified and input is -man, echo the preprocessed (`so'Kristaps Dzonsons2011-10-061-4/+24
| | | | | | | | | | | | | | replaced by file) input. This replaces earlier behaviour of doing nothing, which I found unexpected (mandoc should always output). This requires a buffer in read.c that saves the input lines before being parsed, with a special hook if `so' is invoked. This buffer is just flushed to output if -mman is the input. While mucking around doing this, I also alpha-ordered the mandoc.h functions. Ok schwarze@, with no screaming when the polished patch was published.
* Add the -Ofragment option to -T[]x]html. This accomodates for embeddingKristaps Dzonsons2011-10-051-0/+6
| | | | | manual output in existing HTML or XHTML documents, e.g., when invoking mandoc from an SSI or CGI.
* restore alphabetical order for the -Toutput list, and use a widthIngo Schwarze2011-09-261-33/+33
| | | | | specifier that makes it look nicer; from jmc@, ok kristaps@
* forgotten Copyright bumps; no code changeIngo Schwarze2011-09-181-1/+1
| | | | found while syncing to OpenBSD