summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
Commit message (Collapse)AuthorAgeFilesLines
* Moved printing of empty word [back] into mdoc_action.c so that it's notKristaps Dzonsons2010-05-291-2/+0
| | | | mirrored across front-ends.
* Commit of patch floated on discuss@ a few days ago: if an in_line scopeKristaps Dzonsons2010-05-291-0/+2
| | | | | | | | | | has not been opened and closing punctuation is encountered AND the macro is marked as accepting no-content (or `Li'), then open an empty scope. Added regression tests for `Fl' and `Li' testing this behaviour. Also, squeeze hyph0.in tests into the last characters of each line so that groff doesn't hyphenate and break the test.
* Documented `Ud'.Kristaps Dzonsons2010-05-261-0/+4
| | | | | | | | | | | Proper EOS handling for `Rv', `Ex', `Ud', and `Bt'. Both `Bt' and `Ud' now warn about and discard line arguments (reported by Ulrich Spoerlein). Collapsed posts_xr into posts_wtext (harmless: they're the same thing). Added regressions for `Ud' and `Bt'.
* sync to OpenBSD:Ingo Schwarze2010-05-241-8/+6
| | | | | | | save the visual cursor position in term_flushln() and use that to avoid multiple blank lines in nested lists while still putting subsequent empty list tags each on their own line; "go ahead" kristaps@
* Handle literal tab characters both in literal context (.Bd -literal)Ingo Schwarze2010-05-241-0/+5
| | | | | | | | and outside. In literal context, tab stops are at each eigth column; outside, they are at each fifth column. from OpenBSD mdoc_term.c rev. 1.75; "commit" kristaps@
* fix an obvious typo in print_bvspace():Ingo Schwarze2010-05-241-1/+1
| | | | rev. 1.125 broke vertical spacing in .Bl -column
* Fix 1.125: Add missing return in termp_nm_pre.Joerg Sonnenberger2010-05-221-0/+1
|
* Increase performance by stashing the list type in struct mdoc_node.Kristaps Dzonsons2010-05-171-90/+47
| | | | | | | This will eventually be used so that mdoc_macro can known whether to dump list line arguments into the body (`Bl -column' overflowing). Remove a2list() and arg_listtype() because of this.
* Enable the unified error/warning enumeration in mandoc.h that'sKristaps Dzonsons2010-05-171-2/+6
| | | | | | | | | | | 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.
* LIBRARY can also occur in section 9.Kristaps Dzonsons2010-05-151-1/+1
| | | | | | All manual sections (unknown, 3p, 3f, etc.) correctly handled by -mdoc. Useful warning printed if unknown manual section. Checking for manual sections (e.g., LIBRARY) checks only first character, so 3p, 3f, etc. are free.
* Make the output width an option for ascii_alloc and use that to computeJoerg Sonnenberger2010-05-151-1/+1
| | | | the default margin. Hard-code 80 chars/line for now.
* Fixed bug in -Thtml -mdoc where `Lb' would line-break in LIBRARY section.Kristaps Dzonsons2010-05-131-7/+7
| | | | | Fixed assumption that parse-point == 1 equates to beginning of line (false if whitespace separates macro and control character). Fixed line-break for non-first-macro in several SYNOPSIS macros.
* Tiny EOS patch. Back-end cues front-end through flag. Front-end cues ↵Kristaps Dzonsons2010-05-121-0/+3
| | | | output engine with flag.
* -man also now has unbound margins for literal context.Kristaps Dzonsons2010-05-101-2/+2
|
* Setting maxmargin, too (for completion).Kristaps Dzonsons2010-05-091-8/+12
|
* Allow literal contexts to have unbound line lengths (from Ingo Schwarze's ↵Kristaps Dzonsons2010-05-091-22/+55
| | | | mandoc TODO by way of Jason McIntyre).
* Fixed %T: it now correctly underlines, instead of quoting (noted by Jason ↵Kristaps Dzonsons2010-04-081-21/+1
| | | | McIntyre and posted on Ingo Schwarze' mandoc-todo list).
* Allow `Bd' to accept (warn about then ignore) in-line arguments.Kristaps Dzonsons2010-04-061-2/+2
|
* Let `Bl' accept arguments on the head line with a warning (these are ignored ↵Kristaps Dzonsons2010-04-061-1/+11
| | | | in the front-end device) (noted by Theo de Raadt).
* `Fl' now correctly suppresses the trailing space if followed by macros on ↵Kristaps Dzonsons2010-04-061-2/+2
| | | | the same line.
* Merged patch by Ingo Schwarze allowing `Xr' to pass through with no ↵Kristaps Dzonsons2010-04-031-1/+4
| | | | arguments (emits warning of course).
* Integrate Ingo Schwarze's patch for mdoc_iscdelim() (tri-state for opening ↵Kristaps Dzonsons2010-03-291-1/+1
| | | | | | | | | | | and closing macro punctuation). Modify blk_part_exp() to correctly handle leading punctuation before HEAD. Significantly clean up and document blk_part_exp(). Modify blk_part_imp() for to correctly handle leading punctuation before HEAD. Significantly clean up and document blk_part_imp(). Integrate Ingo Schwarze's patch for args() (using new mdoc_iscdelim() format). Documented bad `Ec' handling for later work in mdoc_term.c/mdoc_html.c.
* Fixed two very subtle bugs in retaining overstep and maxrmargin widths ↵Kristaps Dzonsons2010-03-231-0/+3
| | | | between parse sequences.
* Fix in handling Vt in SYNOPSIS with trailing punctuation. Spotted by Joerg ↵Kristaps Dzonsons2010-01-301-2/+18
| | | | Sonnenberger.
* Fix of subtle, but significant, resetting of tags when in list mode. ↵VERSION.1.9.15-pre2Kristaps Dzonsons2010-01-011-16/+19
| | | | Pointed out by Ingo Schwarze.
* More in-code documentation and clarity re-arrangements.Kristaps Dzonsons2010-01-011-36/+65
|
* Big check-in of compatibility layer. This should work on most major ↵Kristaps Dzonsons2010-01-011-5/+4
| | | | architectures. Thanks to Joerg Sonnenberger.
* Correct handling of arbitrary column lengths, which groff handles ↵Kristaps Dzonsons2010-01-011-13/+14
| | | | differently depending on number of visible columns.
* Cleaned-up column handling to be char-compatible with groff (thanks Ingo ↵Kristaps Dzonsons2010-01-011-25/+37
| | | | | | Schwarze). Fixed assertion in exceeded rmargin by ridiculous columns.
* Documented `Fl' in mdoc.7.Kristaps Dzonsons2010-01-011-10/+0
| | | | Backed out stipulation that `Fl ""' is ignored: this is not the case in !OpenBSD groffs.
* `Fl' has each argument be in a separate scope (thanks Ingo Schwarze).Kristaps Dzonsons2010-01-011-1/+16
| | | | | Situation of `Fl [arg]* "" [arg]*' is fixed: empty arguments are ignored. Note that OpenBSD crashes when this happens. Situation of `Fl' is fixed wrt trailing whitespace.
* Basically re-wrote -Tascii font handling: instead of incrementers forKristaps Dzonsons2009-11-121-66/+78
| | | | | | | | | bold and underline, we use a stack (no cascading, no double-font-mode). Font modes with \f only affect the current stack point, as documented in mdoc.7 and man.7. While -mdoc stacks fonts with embedded macros, -man replaces them (the stack is always size 1). This works for all invocations in supported systems' manual corpora to date. It doesn't support groff's insanity with line-scoped \f as documented in mdoc.7.
* Disable metafonts when printing document footer.Kristaps Dzonsons2009-11-101-0/+3
|
* Patch on DragonFly BSD syntax (thanks Sascha Wildner).Kristaps Dzonsons2009-10-311-1/+1
| | | | Noted inclusion into DragonFly BSD (thanks Sascha Wildner).
* More lint fixes.Kristaps Dzonsons2009-10-301-1/+0
| | | | Removed err.h from inclusions (less main.c--still in progress).
* Removed dynamic allocations of header/footer data.Kristaps Dzonsons2009-10-271-23/+8
|
* bzero() -> memset() (noted by Joerg Sonnenberger).Kristaps Dzonsons2009-10-271-1/+1
|
* Full `%U' support.Kristaps Dzonsons2009-10-261-38/+39
| | | | | | | `Lk' display fixed. Renamed arg2xxxx as a2xxxx for consistency. Renamed print_foot to print_man_foot for consistency. Removed default printing of `~' when `Lk' not provided (not sure where I got that from).
* Added `%U' to -mdoc (doesn't render in a nice way yet).Kristaps Dzonsons2009-10-241-0/+3
|
* Fixed maddening mismatch between groff and strftime mismatch of day ("%e"). ↵Kristaps Dzonsons2009-10-221-9/+3
| | | | Noted by Ulrich Sporlein.
* More fixes to scaling-width multipliers (which, just to make my life ↵Kristaps Dzonsons2009-10-191-3/+3
| | | | difficult, differ not only between -mdoc and -man, but between various invocation, e.g., -offset and -width).
* Made sure devices and formats recognise that -man and -mdoc have different ↵Kristaps Dzonsons2009-10-181-16/+13
| | | | syntax for scaling widths: -mdoc assumes no unit means that the value is a string literal while -man instead uses the default vertical/horizontal scale.
* Arbitrary horizontal and vertical scaling widths now handled by -mdoc -Tascii.Kristaps Dzonsons2009-10-181-53/+46
| | | | Terminal scaling backend pushed into term.c.
* Added support for `Bd -centered', which appears in newer groffs (not yet ↵Kristaps Dzonsons2009-10-151-0/+2
| | | | implemented in centre-capable front-ends, i.e., -Thtml).
* Moved output definitions into main.h.Kristaps Dzonsons2009-10-131-1/+16
| | | | Pushed terminal_{mdoc,man} into {mdoc,man}_term.c.
* Fix hang lists in -Tascii -Tmdoc, which seem to have been broken since ~1.8.x.Kristaps Dzonsons2009-10-101-35/+0
| | | | Noted similarity of HP/TP and -hang/-tag in mandoc.1.
* `Bd' literals in -Tascii -mdoc were losing the first line's newline. Fixed.Kristaps Dzonsons2009-10-071-0/+3
|
* `Fn' does not print empty ftype span.Kristaps Dzonsons2009-10-031-188/+179
| | | | -Tascii `node' and `meta' args in DECL_ARGS renamed to `n' and `m' to be more coherent with -Thtml.
* Fixed `Bd' prior vertical space (was ignoring -compact).Kristaps Dzonsons2009-09-261-59/+37
| | | | Fixed effect of embedding macros in `Bd' (was printing all on each line instead of grouping).
* -Tascii correctly prints `%T' in `Rs' with quotes.Kristaps Dzonsons2009-09-241-3/+22
| | | | | -Thtml behaves like -Tascii for printing. Printing of `Rs' elements cross-checked with new groff.