aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_macro.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Close a preceding implicit block before opening an explicit block.Ingo Schwarze2012-06-031-17/+29
| | | | | | | | To allow doing so, no longer abuse rew_scope() to unwind explicit blocks; explicitly call man_unscope() instead. Fixing the indentation of slapd.conf(5) in the OpenLDAP port; thanks to guenther@ for the report.
* Minimal implementation of .EX and .EE for GNU compatibility.Ingo Schwarze2012-06-021-1/+3
| | | | | Do not use this, it is not portable and only defined in esr's man-ext. For example, sox(1) wants these macros.
* Add support for `OP', one of the extended man macros. This also requiresKristaps Dzonsons2012-01-031-1/+2
| | | | some man(7) changes to accomodate for the an-ext compatibility.
* Jumping out of man_unscope() for the root node is a bad ideaIngo Schwarze2011-12-041-3/+1
| | | | | | | | because that will skip root node validation, potentially entering rendering modules will NULL pointers lurking in the meta data. Instead, always validate the root node and (as suggested by joerg@) assert validity of the meta data before using it in the renderers. ok joerg@
* Fix condition. Not enough tea.Joerg Sonnenberger2011-11-181-2/+2
|
* Slightly adjust last: return successful as some times the correct errorJoerg Sonnenberger2011-11-181-2/+2
| | | | is raised later.
* Convert an assert into an explicit check. man_unscope can be triggeredJoerg Sonnenberger2011-11-181-2/+3
| | | | on unknown macros.
* When the HEAD scope of .TP is broken by another block macro,Ingo Schwarze2011-11-071-12/+12
| | | | | | | | 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-2/+2
| | | | found while syncing to OpenBSD
* Fix a bug in the -man parser where deleting nodes (such as `PP' or `LP'Kristaps Dzonsons2011-07-071-7/+7
| | | | | | 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-6/+1
| | | | | | | | 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-2/+2
| | | | | | | | 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-2/+2
| | | | function a parameter to suppress warnings.
* Merge man_args() into man_macro.c, the only place where it's called, andKristaps Dzonsons2011-03-231-4/+21
| | | | | | 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-21/+7
| | | | | 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-1/+2
| | | | | 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-1/+2
| | | | | | | | | 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-13/+12
| | | | Also convert man_vmsg to return void.
* Downgrade -man message of ignored empty paragraph to MANDOC_IGNPAR. TheKristaps Dzonsons2011-01-121-5/+13
| | | | | | | | | | | 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-3/+1
| | | | | | | | 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-1/+2
| | | | | 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-4/+1
| | | | which are now accomodated for the new libroff modifications.
* Kill man_action.c.Kristaps Dzonsons2010-11-301-9/+1
|
* Sync to OpenBSD: add missing Copyright years.Ingo Schwarze2010-07-311-2/+2
| | | | | 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-1/+2
| | | | -Thtml (I'm surprised to note that neither is LITERAL mode).
* Mechanical diff allowing the const struct regset to propogate throughKristaps Dzonsons2010-06-261-1/+4
| | | | libman and libmdoc.
* Churn as I finish email address migration kth.se -> bsd.lv.Kristaps Dzonsons2010-06-191-2/+2
|
* Enable the unified error/warning enumeration in mandoc.h that'sKristaps Dzonsons2010-05-171-11/+13
| | | | | | | | | | | 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-1/+2
|
* Remove `am', `ami', `de', `dei', and `.' from -man, as they're now in the ↵Kristaps Dzonsons2010-05-151-91/+5
| | | | roff preprocessor.
* Pull `ig' out of -man and leave it the roff preparser.Kristaps Dzonsons2010-05-151-4/+2
|
* Final (?) fix to issue pointed out by Sascha Wildner: roff instructions ↵Kristaps Dzonsons2010-03-291-20/+10
| | | | clobbering prior scope rules and line modes.
* Initial step in fixing badness reported by Sascha Wildner (wip).Kristaps Dzonsons2010-03-291-1/+16
|
* Lint fixes.Kristaps Dzonsons2010-03-271-2/+2
|
* Lint fixes.Kristaps Dzonsons2010-03-271-5/+1
|
* Fixed re-adjustment of scope in exiting roff instructions (libman).Kristaps Dzonsons2010-03-271-16/+86
| | | | | | 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-1/+3
|
* Fixed up some documentation in man.7: only documenting man.7 macros, not ↵Kristaps Dzonsons2010-03-251-6/+9
| | | | 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-10/+104
| | | | | | | 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-15/+12
| | | | | Removed ignoring of MAN_Vb argument (symmetry). Removed superfluous utsname inclusion.
* libman using enum mant instead of #defines for macros.Kristaps Dzonsons2010-03-231-8/+9
| | | | | 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-1/+8
| | | | set of patches by Ingo Schwarze.
* Accomodate (libman) for next-line macros followed by non-text macros `na', ↵Kristaps Dzonsons2010-03-221-6/+21
| | | | | | `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-1/+5
| | | | architectures. Thanks to Joerg Sonnenberger.
* Added `PD' to -man (doesn't do anything, yet).Kristaps Dzonsons2009-10-241-1/+2
|
* Added `UC' libman macro (has no effect).Kristaps Dzonsons2009-08-221-1/+2
| | | | | 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-6/+14
|
* Open explicit scope on libman exit now only generates warning.Kristaps Dzonsons2009-08-211-2/+3
| | | | Consecutive ELINE scopes are now pruned (with a warning).
* Fixed next-line scope error in libman block macros.Kristaps Dzonsons2009-08-201-3/+6
|
* Fixed (not documented anywhere of course) that `SH' and `SS' in libman have ↵Kristaps Dzonsons2009-08-201-3/+3
| | | | next-line head scope.