summaryrefslogtreecommitdiffstats
path: root/man_macro.c
Commit message (Collapse)AuthorAgeFilesLines
* When the HEAD scope of .TP is broken by another block macro,Ingo Schwarze2011-11-071-11/+11
| | | | | | | | do not abort with a FATAL error, but report a report a WARNING, remove the broken .TP from the syntax tree, and prod on. Reported repeatedly by ports people, at least by brad@ and jeremy@. Also fixes rendition(4) in Xenocara. ok kristaps@
* forgotten Copyright bumps; no code changeIngo Schwarze2011-09-181-1/+1
| | | | found while syncing to OpenBSD
* Fix a bug in the -man parser where deleting nodes (such as `PP' or `LP'Kristaps Dzonsons2011-07-071-6/+6
| | | | | | in certain situations) caused the next macros to be assigned as siblings instead of child nodes to the original parent. Noticed and ok by schwarze@.
* Allow RS/RE blocks to nest. This requires first the syntax tree toKristaps Dzonsons2011-06-181-5/+0
| | | | | | | | accomodate for the fix, then for the front-ends. -T[x]html accepted the syntax tree natively, but -Tascii had to use relative offsets. It's quite a simple fix. From a TODO by {dcoppa,dsoares}@openbsd.
* Clean up parsing of delimiters in -mdoc. First, remove the "dowarn"Kristaps Dzonsons2011-04-191-1/+1
| | | | | | | | variable from mandoc_getarg() so that it prints the warning every time. Then, remove the warning from args_checkpunct(). This way, warnings are being posted at the correct time. This makes the flag argument to mdoc_zargs() superfluous, so make it be zero when it's invoked. Finally, move the args() flags into mdoc_argv.c and make them enums.
* Get mdoc_argv.c ready to use [some of] mandoc_getarg() by giving saidKristaps Dzonsons2011-04-171-1/+1
| | | | function a parameter to suppress warnings.
* Merge man_args() into man_macro.c, the only place where it's called, andKristaps Dzonsons2011-03-231-3/+20
| | | | | | make its return value boolean (we don't care about QWORD). We can move it into mdoc_macro.c because it's basically just a wrapper around mandoc_getarg(). Then blow away man_argv.c, which is left empty.
* First, make -man ARGS_EOLN et al. be an enum. Second, removeKristaps Dzonsons2011-03-231-20/+6
| | | | | ARGS_ERROR, as it is never returned by man_args(). Then clean up invocations of man_args() to only check for ARGS_EOLN.
* libmdoc.h and libman.h were including mdoc.h and man.h, respectively.Kristaps Dzonsons2011-03-221-0/+1
| | | | | Don't have them do that (includes in header files = faugh), and have individual files directly include these files.
* Consolidate messages. Have all parse-time messages (in libmdoc,Kristaps Dzonsons2011-03-201-0/+1
| | | | | | | | | libroff, etc., etc.) route into mandoc_msg() and mandoc_vmsg(), for the time being in libmandoc.h. This requires struct mparse to be passed into the allocation routines instead of mandocmsg and a void pointer. Then, move some of the functionality of the old mmsg() into read.c's mparse_mmsg() (check against wlevel and setting of file_status) and use main.c's mmsg() as simply a printing tool.
* Clean-up in libman: make all calls to man_*msg not check return value.Kristaps Dzonsons2011-03-171-12/+11
| | | | Also convert man_vmsg to return void.
* Downgrade -man message of ignored empty paragraph to MANDOC_IGNPAR. TheKristaps Dzonsons2011-01-121-4/+12
| | | | | | | | | | | change in man_macro.c was from an assertion caused by a subtle problem: (1) macro is removed, causing m->last to be m->last->parent; (2) by jumping to the m->last->parent after post-validation, the original m->last->parent is skipped; (3) the rewinder climbs to the root of the tree and aborts. The original issue recorded in the TODO by schwarze@, reminded by Brad Smith.
* Remove `i' and `r' macro handlers. These macros, originally part of theKristaps Dzonsons2010-12-081-2/+0
| | | | | | | | me package, aren't recognised by "groff -mandoc" so we don't need to do so either. Discussed on tech@ with schwarze@. While at it, remove references to `b' in man.7. As far as I know, this was never supported anyway.
* Add support for `ft' macro found in groff(7). Based on a patch byKristaps Dzonsons2010-12-061-0/+1
| | | | | schwarze@, but without the -T[x]html handling, which structurally does not work. Also add man.7 documentation (not in original patch).
* Remove `Sp', `Vb', and `Ve' (as per schwarze@'s changes in OpenBSD),Kristaps Dzonsons2010-12-051-3/+0
| | | | which are now accomodated for the new libroff modifications.
* Kill man_action.c.Kristaps Dzonsons2010-11-301-8/+0
|
* Sync to OpenBSD: add missing Copyright years.Ingo Schwarze2010-07-311-1/+1
| | | | | I checked that substantial changes were committed to these files during these years.
* Added `in' macro support for -man -Tascii. This is not yet supported inKristaps Dzonsons2010-07-221-0/+1
| | | | -Thtml (I'm surprised to note that neither is LITERAL mode).
* Mechanical diff allowing the const struct regset to propogate throughKristaps Dzonsons2010-06-261-0/+3
| | | | libman and libmdoc.
* Churn as I finish email address migration kth.se -> bsd.lv.Kristaps Dzonsons2010-06-191-1/+1
|
* Enable the unified error/warning enumeration in mandoc.h that'sKristaps Dzonsons2010-05-171-10/+12
| | | | | | | | | | | stringified in main.c. Allow `An' to handle an argument and child (with a warning). Allow `Rv' and `Ex' to work without a prior `Nm' as groff does (with a warning). Allow inconsistent column syntax to only raise a warning.
* Add support for .AT. Properly implement .UC. Add regress tests.Joerg Sonnenberger2010-05-171-0/+1
|
* Remove `am', `ami', `de', `dei', and `.' from -man, as they're now in the ↵Kristaps Dzonsons2010-05-151-90/+4
| | | | roff preprocessor.
* Pull `ig' out of -man and leave it the roff preparser.Kristaps Dzonsons2010-05-151-3/+1
|
* Final (?) fix to issue pointed out by Sascha Wildner: roff instructions ↵Kristaps Dzonsons2010-03-291-19/+9
| | | | clobbering prior scope rules and line modes.
* Initial step in fixing badness reported by Sascha Wildner (wip).Kristaps Dzonsons2010-03-291-0/+15
|
* Lint fixes.Kristaps Dzonsons2010-03-271-1/+1
|
* Lint fixes.Kristaps Dzonsons2010-03-271-4/+0
|
* Fixed re-adjustment of scope in exiting roff instructions (libman).Kristaps Dzonsons2010-03-271-15/+85
| | | | | | Added title-case check for (libman). Fixed premature closure of roff instruction scope (libman). Added documentation of ignored roff macros to man(3).
* Lint fixes.VERSION.1.9.17Kristaps Dzonsons2010-03-251-0/+2
|
* Fixed up some documentation in man.7: only documenting man.7 macros, not ↵Kristaps Dzonsons2010-03-251-5/+8
| | | | related ones (de, Vb, etc.), which aren't technically man. It's an open question as to where these /should/ be documented, however.
* Using man_node_delete() instead of man_node_free()/man_node_freelist() and ↵Kristaps Dzonsons2010-03-241-9/+103
| | | | | | | friends (much simpler). Split blk_imp() into blk_exp() (explicit macros), blk_dotted() (roff macros), and the original. Added de, dei, am, ami, and ig roff macros (for now, these are discarded within the parse).
* enum-ised rew_* return values (type-safety).Kristaps Dzonsons2010-03-241-14/+11
| | | | | Removed ignoring of MAN_Vb argument (symmetry). Removed superfluous utsname inclusion.
* libman using enum mant instead of #defines for macros.Kristaps Dzonsons2010-03-231-7/+8
| | | | | Clean-ups, better documentation in man_hash.c. Added extra space for "." in man_hash.c (unused for the time being).
* Support for pod2man standard header macros (Vb, Ve, Sp). Based largely on a ↵Kristaps Dzonsons2010-03-231-0/+7
| | | | set of patches by Ingo Schwarze.
* Accomodate (libman) for next-line macros followed by non-text macros `na', ↵Kristaps Dzonsons2010-03-221-5/+20
| | | | | | `sp', and `br'. Based on a patch by Ingo Schwarze.
* Big check-in of compatibility layer. This should work on most major ↵Kristaps Dzonsons2010-01-011-0/+4
| | | | architectures. Thanks to Joerg Sonnenberger.
* Added `PD' to -man (doesn't do anything, yet).Kristaps Dzonsons2009-10-241-0/+1
|
* Added `UC' libman macro (has no effect).Kristaps Dzonsons2009-08-221-0/+1
| | | | | Corrected `UC' and `DT' not to print their arguments. Noted that `UC' and `DT' shouldn't be used.
* Fixed next-line scoping of `.HP nnn' (has both next-line and on-line in head).Kristaps Dzonsons2009-08-211-5/+13
|
* Open explicit scope on libman exit now only generates warning.Kristaps Dzonsons2009-08-211-1/+2
| | | | Consecutive ELINE scopes are now pruned (with a warning).
* Fixed next-line scope error in libman block macros.Kristaps Dzonsons2009-08-201-2/+5
|
* Fixed (not documented anywhere of course) that `SH' and `SS' in libman have ↵Kristaps Dzonsons2009-08-201-2/+2
| | | | next-line head scope.
* Added `DT' macro (pointed out by joerg@netbsd.org).Kristaps Dzonsons2009-08-201-0/+1
|
* libman checks for open explicit scopes on exit.Kristaps Dzonsons2009-08-191-3/+13
|
* Added RS/RE macro pair (had to adjust closing rules, sec/ssec/rs/par).Kristaps Dzonsons2009-08-191-30/+71
|
* Small updates to man.7 (next-line break-exclusions, numerical width example).Kristaps Dzonsons2009-08-181-6/+21
| | | | Fully tested and correct scope-rewinding of block macros.
* Significant overhaul in libman. Macros are now block- and line-scoped (withKristaps Dzonsons2009-08-131-146/+217
| | | | | | | | next-line scope extensions possible). man.7 reflects block and line scoping, and also includes a REFERENCE section that will be used as a template for the big mdoc reference. Many fixes in next-line behaviour for both inline and block macros. Added some macros for compatibility (from me.7). Corrected quoted-literal handling for libman.
* Added `sp' support to libman.Kristaps Dzonsons2009-07-241-0/+1
| | | | Added `\c' to known escapes (only used in man, but still).
* Moved all formatted libman warn/error into man.c/libman.h.Kristaps Dzonsons2009-06-181-7/+5
| | | | Converted all formatted warn/errors into regular syntax.