summaryrefslogtreecommitdiffstats
path: root/term.h
Commit message (Collapse)AuthorAgeFilesLines
* correct lots of copyright notices;Ingo Schwarze2010-07-131-1/+1
| | | | ok kristaps@
* Suppress printing of newlines/space at start of new -Tps page.Kristaps Dzonsons2010-07-041-1/+2
| | | | | Also renamed "psstate" -> "flags" (was wrongly implying some sort of state machine).
* PostScript can now handle scaled glyph sizes (see "scale" in structKristaps Dzonsons2010-06-301-0/+1
| | | | termp_ps) to arbitrarily scale font. Tested with 10 (default), 12, 14.
* Pushed normalisation of scaling units into term_hspan().Kristaps Dzonsons2010-06-301-1/+1
|
* Move term_hspan() calculation into the output devices, where it belongs.Kristaps Dzonsons2010-06-301-0/+2
|
* Push paper calculation out of getsubopt() loop. Make all points be AFMKristaps Dzonsons2010-06-301-10/+10
| | | | glyph units to make positioning more precise.
* Give -Tps better PostScript hinting. Note that we're using Adobe-3.0Kristaps Dzonsons2010-06-291-4/+14
| | | | | constructs. Push the stupid CPP defines for page boundaries and margins into proper variables. Give enum termfont a proper TERMFONT__MAX.
* Clean-up of variable-width glyph support. Adds no new code; onlyKristaps Dzonsons2010-06-281-1/+0
| | | | | restructured to make a bit more readable. Also removed an unused entry in the PS engine structure.
* Basic implementation of .Bk/.Ek; from OpenBSD.Ingo Schwarze2010-06-271-0/+2
| | | | OK and one stylistic tweak by kristaps@.
* Initial chunks for variable-width fonts. Pushes all width calculationsKristaps Dzonsons2010-06-251-2/+7
| | | | | | | | in mdoc_term.c and man_term.c down into term.c. This is still not implemented in term.c, although stubs for width calculations are in place. From now on, offset, rmargin, and other layout variables are abstract screen widths. They will resolve to the the familiar values for -Tascii but -Tps will eventually use points instead of chars.
* Churn as I finish email address migration kth.se -> bsd.lv.Kristaps Dzonsons2010-06-191-1/+1
|
* Implement font-switching for PostScript. -Tps now supportsKristaps Dzonsons2010-06-111-0/+1
| | | | | | TERMFONT_BOLD (Courier-Bold) and TERMFONT_UNDER (Courier-Oblique). It doesn't look half bad. This accomplished through tricksy juggling of the one-char back-buffer.
* Teach -Tps to ignore backspace-encoding by using a one-char buffer and aKristaps Dzonsons2010-06-111-0/+1
| | | | simple state machine. This paves the way for decorated text.
* Have the standard manpage header and footer print on every page of -TpsKristaps Dzonsons2010-06-091-6/+9
| | | | | | | | | | | | | | | output. This is more tricky than you may think: we can't just call the header function out-of-state (i.e., before a flushln has occured) because we'd clobber our current state. Thus, we call at the beginning and dump the output into an auxiliary buffer. For the record, I don't think there's any other clean way to do this. The only other Way That Works is to copy-aside *all* termp state, zero it, and do the necessary headf/footf. This is just as complex, as memory needs to be alloc'd and free'd per margin. Unfortunately, this prohibits page numbering (the margin is only printed once), so I'll probably end up re-writing this down the line.
* Broke ascii_*() functions into term_ascii.cKristaps Dzonsons2010-06-081-6/+17
| | | | Made low-level engine functions into function pointers.
* No functionality changes: just restructuring. DeprecatedKristaps Dzonsons2010-06-081-0/+2
| | | | | terminal_free() in favour of ps_free() and ascii_free(). Moved ps_*() functions into term_ps.c so that they don't clutter up term.c.
* First check-in of PostScript output. This does not change any logicKristaps Dzonsons2010-06-071-0/+22
| | | | | | within term.c, but does add a small shim over putchar() that switches on the output engine. Prints, for this initial version, only monospace and without font decorations. It's a start.
* sync to OpenBSD:Ingo Schwarze2010-05-241-0/+1
| | | | | | | 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/+1
| | | | | | | | 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@
* Make the output width an option for ascii_alloc and use that to computeJoerg Sonnenberger2010-05-151-0/+1
| | | | the default margin. Hard-code 80 chars/line for now.
* Tiny EOS patch. Back-end cues front-end through flag. Front-end cues ↵Kristaps Dzonsons2010-05-121-0/+1
| | | | output engine with flag.
* -man also now has unbound margins for literal context.Kristaps Dzonsons2010-05-101-0/+2
|
* Fixed two very subtle bugs in retaining overstep and maxrmargin widths ↵Kristaps Dzonsons2010-03-231-0/+1
| | | | between parse sequences.
* Basically re-wrote -Tascii font handling: instead of incrementers forKristaps Dzonsons2009-11-121-6/+17
| | | | | | | | | 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.
* Correct support for `\fX' font modes in -Tascii.Kristaps Dzonsons2009-11-051-0/+4
|
* Made sure devices and formats recognise that -man and -mdoc have different ↵Kristaps Dzonsons2009-10-181-2/+2
| | | | 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-0/+3
| | | | Terminal scaling backend pushed into term.c.
* ascii_xxx -> chars_xxx (intended to hold more than just ascii encoding).Kristaps Dzonsons2009-09-171-5/+0
| | | | More html work.
* Made tree/term/out() functions return void.Kristaps Dzonsons2009-09-161-3/+1
| | | | Put err() functions back into front-ends (no use making it needlessly complex).
* Removed TERMP_BOLD, TERMP_UNDER, TERMP_STYLE in favour of recursive-friendly ↵Kristaps Dzonsons2009-09-151-3/+2
| | | | | | increments. Cleaned up confusing behaviour of p->flags.
* Moved indentation size into *term.c files.Kristaps Dzonsons2009-08-101-5/+0
| | | | Improved handling of libman `IP' macro (still needs work).
* Correct handling of \*(xx, \*[xxx], \*x versus \x, \(xx, \([xxx]: predefined ↵Kristaps Dzonsons2009-07-271-0/+1
| | | | strings and escape characters, respectively.
* Full support for `An -split/-nosplit'. Compat documented.Kristaps Dzonsons2009-07-241-0/+3
|
* Fixed transcription error of define values (bah).Kristaps Dzonsons2009-07-211-1/+1
|
* Bringing spacing more in line with groff, patches from schwarze@openbsd.org. ↵Kristaps Dzonsons2009-07-211-0/+1
| | | | Pre-testing.
* Removed unused TERMP_LITERAL.Kristaps Dzonsons2009-07-191-5/+4
|
* Renamed TERMP_NONOSPACE -> TERMP_DANGLE.Kristaps Dzonsons2009-07-141-10/+11
| | | | | Added TERMP_HANG. Reordered TERMP flags to be a little easier on my old eyes.
* Fixed license email address.Kristaps Dzonsons2009-06-101-1/+1
|
* Using proper license template (const).Kristaps Dzonsons2009-04-121-12/+10
|
* Manual .Dt fields CAPITALISED.Kristaps Dzonsons2009-04-121-1/+2
| | | | | | | | Indent set to 5 chars (nroff compat). Half-indent set to 3 chars (nroff compat). Default behaviour is loose-y (ignore macro/char/escape). Added -fstrict. Added unknown-character ignoring.
* Initial front-end formatting for -man pages.Kristaps Dzonsons2009-03-261-37/+0
|
* *** empty log message ***Kristaps Dzonsons2009-03-251-2/+2
|
* -man printing linked to -Ttree.Kristaps Dzonsons2009-03-231-0/+1
|
* First addition of -man macro support.Kristaps Dzonsons2009-03-231-1/+1
| | | | Abstraction of mdoc.
* Lint fixes.Kristaps Dzonsons2009-03-211-1/+1
|
* Support for `Bd' of all types (see mdoc.7 for newline/tab rules).VERSION.1.6.2Kristaps Dzonsons2009-03-201-10/+10
| | | | | Renamed term.c and terminal.c functions to be term_. Some bugfixes to lists.
* Split mdocterm.c -> main.c terminal.c.Kristaps Dzonsons2009-03-191-0/+7
| | | | | | Abstracted output with -T selector (default ascii). Name change: mdocterm -> mandoc. Re-imported tree with -Ttree.
* Many more ASCII escapes added.Kristaps Dzonsons2009-03-191-11/+9
| | | | | | Stripped nroff punt from mdocterm.c. Fixed multiple-file handling for mdocterm.c. Cleared up mdoc.h API.
* Clean up ASCII table's memory.Kristaps Dzonsons2009-03-171-0/+1
|
* Fixed mdoc_phrase escape handling.Kristaps Dzonsons2009-03-161-68/+20
| | | | | | | | | | | Added MDOC_IGNDELIM (Pf, soon Li, etc.). macro_constant_delimited ignargs -> argv.c parsing. Renamed macro functions to correspond to ontologies. `Fo' and `St' made callable (compat documented). strings.sh deprecated (directly using CPP). Abstracted ASCII translation into ascii.{c,in}. ASCII table uses a self-reordering chained hashtable. Removed old regressions.