aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man.h
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* If -Tman is specified and input is -man, echo the preprocessed (`so'Kristaps Dzonsons2011-10-061-1/+2
| | | | | | | | | | | | | | 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 MAN_TAIL, which will be used by `UE' (forthcoming) and needs to beKristaps Dzonsons2011-03-231-1/+3
| | | | used for `RE'.
* Add some documentation and clean up mdoc.h/man.h.Kristaps Dzonsons2011-03-221-17/+2
|
* Step 1 of restructuring: libmandoc.h. Move all compiler-set-specificKristaps Dzonsons2011-03-221-10/+1
| | | | | | | | | | stuff into libmandoc.h, including old mdoc.h/man.h/roff.h functions now used by read.c. The motivation behind this is to tighten the relationship between the underlying compilers while keeping parse data hidden from general callers (e.g., main.c). While here, also move register values from mandoc.h into libmandoc.h as noted by schwarze@. See above for explanation.
* Consolidate messages. Have all parse-time messages (in libmdoc,Kristaps Dzonsons2011-03-201-2/+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 date handling,Ingo Schwarze2011-03-071-4/+3
| | | | | | | | | | | | as a first step to get rid of the frequent petty warnings in this area: - always store dates as strings, not as seconds since the Epoch - for input, try the three most common formats everywhere - for unrecognized format, just pass the date though verbatim - when there is no date at all, still use the current date Originally triggered by a one-line patch from Tim van der Molen, <tbvdm at xs4all dot nl>, which is included here. Feedback and OK on manual parts from jmc@. "please check this in" kristaps@
* Allow -man to process EQN as well. Also fix a segfault in missing caseKristaps Dzonsons2011-02-091-1/+3
| | | | statements in the post-handler for EQN in -mdoc and -man.
* Add initial libmdoc and libman top-most machinery for accepting TBLKristaps Dzonsons2011-02-061-2/+3
| | | | | directives. For now this will just ignore them (except for -Ttree, which just notes that an EQN's been accepted).
* If the first character of free-form text is whitespace, then a newlineKristaps Dzonsons2011-01-121-1/+2
| | | | shall precede outputted text (surprise!).
* Add -man support for tables. Like -mdoc, this consists of anKristaps Dzonsons2011-01-011-2/+6
| | | | | | | external-facing function man_addspan() (this required shuffling around the descope routine) and hooks elsewhere. Also fixed mdoc.c's post-validation of tables.
* Whack MDOC_ACTED and MAN_ACTED (these no longer exist).Kristaps Dzonsons2010-12-261-2/+1
|
* 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.
* Revert merging of {mdoc,man}.h -> mandoc.h.Kristaps Dzonsons2010-10-041-2/+94
| | | | While I'm add it, properly document all structures in these files.
* Unify mdoc and man enums and structs into mandoc.h. This is part of theKristaps Dzonsons2010-10-021-79/+1
| | | | | slow process of logically splitting formatting frontend and parser backend without pollution.
* Implement a simple, consistent user interface for error handling.Ingo Schwarze2010-08-201-5/+2
| | | | | | | | | | | | | | | | | 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.
* 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).
* Following clue-stick applied by schwarze@, back out const-ness of regsetKristaps Dzonsons2010-06-271-2/+2
| | | | | | | | | passed in to libmdoc and libman. Fix mdoc.3 and man.3 EXAMPLE sections to include regset. Add MDOC_SYNPRETTY flag cueing front-end to nicely format certain values as if SEC_SYNOPSIS were the current section.
* Downstream maintainers: this removes UGLY! I don't want divergingKristaps Dzonsons2010-06-271-5/+3
| | | | | | | | | functionality and UGLY works quite well thanks to schwarze@'s careful attention. This also backs out function-prototype changes for struct regset, instead stuffing a pointer to the regset directly into struct mdoc/man/roff.
* Churn-ish check-in getting mdoc_parseln() and man_parseln() to accept aKristaps Dzonsons2010-06-261-2/+4
| | | | const struct regset pointer. No functionality.
* Churn as I finish email address migration kth.se -> bsd.lv.Kristaps Dzonsons2010-06-191-2/+2
|
* Allow bad -man dates to flow verbatim into the front-ends. Noted byKristaps Dzonsons2010-05-261-1/+2
| | | | Ulrich Spoerlein.
* Enable the unified error/warning enumeration in mandoc.h that'sKristaps Dzonsons2010-05-171-7/+2
| | | | | | | | | | | 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
|
* Allow roff_parseln() to be re-run.Kristaps Dzonsons2010-05-161-2/+2
| | | | | | | | | Allow roff_parseln() to manipulate the line buffer offset. This is used in situations like `.ie n .TH FOO 1' or `.ie n .ie n', where the line buffer offset is recalculated then the roff parser re-run. Fix mdoc_parseln() and man_parseln() to accept the initial line offset. WARNING: backed-out ALL roff macros whilst accomodating for how roff handles multi-line conditionals (in short, re-running the parser).
* Remove `am', `ami', `de', `dei', and `.' from -man, as they're now in the ↵Kristaps Dzonsons2010-05-151-6/+1
| | | | roff preprocessor.
* Pull `ig' out of -man and leave it the roff preparser.Kristaps Dzonsons2010-05-151-2/+1
|
* Removed restriction on integer manual sections in -man.Kristaps Dzonsons2010-05-151-2/+2
|
* End-of-sentence spacing for -man -Tascii.Kristaps Dzonsons2010-05-121-1/+2
|
* Remove -fno-ign-chars as well-argued by Ingo Schwarze. Patch by Ingo ↵Kristaps Dzonsons2010-05-091-2/+1
| | | | Schwarze, too.
* Lint fixes.Kristaps Dzonsons2010-03-271-2/+2
|
* Using man_node_delete() instead of man_node_free()/man_node_freelist() and ↵Kristaps Dzonsons2010-03-241-1/+7
| | | | | | | 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).
* libman using enum mant instead of #defines for macros.Kristaps Dzonsons2010-03-231-38/+40
| | | | | 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-2/+5
| | | | set of patches by Ingo Schwarze.
* libmdoc and libman now using non-recoverable allocations (simpler code).Kristaps Dzonsons2009-10-301-2/+2
|
* Added `PD' to -man (doesn't do anything, yet).Kristaps Dzonsons2009-10-241-2/+3
|
* Fixed superfluous function declaration (spotted by Ulrich Sporlein).Kristaps Dzonsons2009-10-071-2/+1
|
* Added `UC' libman macro (has no effect).Kristaps Dzonsons2009-08-221-2/+3
| | | | | Corrected `UC' and `DT' not to print their arguments. Noted that `UC' and `DT' shouldn't be used.
* Added `DT' macro (pointed out by joerg@netbsd.org).Kristaps Dzonsons2009-08-201-2/+3
|
* Added RS/RE macro pair (had to adjust closing rules, sec/ssec/rs/par).Kristaps Dzonsons2009-08-191-2/+4
|
* Significant overhaul in libman. Macros are now block- and line-scoped (withKristaps Dzonsons2009-08-131-3/+11
| | | | | | | | 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-2/+3
| | | | Added `\c' to known escapes (only used in man, but still).
* Moved escape validation into libmandoc.h/mandoc.c (common between ↵Kristaps Dzonsons2009-07-041-1/+2
| | | | | | | libman/libmdoc1). libman supports MAN_IGN_ESCAPE (like MDOC_IGN_ESCAPE). All popular escapes now handled consistently.
* Added -fno-ign-chars support to libman.Kristaps Dzonsons2009-06-181-2/+4
| | | | | | | man_validate.c checks for non-tab/isprint words. libman hashtable fixed (was ignoring .br). Added ncount field to man_node, deprecating count() functions. Documented use of tabs in man.7.
* Removed MAN___: moved MAN_br to its index (comments not passed into parser).Kristaps Dzonsons2009-06-161-6/+5
| | | | Fix: hashtable not fully formed after removal of MDOC___.
* Fixed license email address.Kristaps Dzonsons2009-06-101-2/+2
|