| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
like -Tascii. While adding this, inline term_alloc() (was a one-liner),
remove some switches around the terminal encoding for the symbol table
(unnecessary), and split out ascii_alloc() into ascii_init(), which is
also called from locale_init().
|
|
|
|
|
|
| |
which only held one entry; finally (as per the first), make "ps" member into a
pointer managed by term_ps.c. This frees up a nice chunk of memory during
run-time and in the binary.
|
|
|
|
|
|
| |
consist of type "int". This will take more work (especially in encode and
friends), but this is a strong start. This commit also consists of some
harmless lint fixes.
|
|
|
|
|
|
|
|
| |
so that everybody can use them. This follows the convention of
libXXXX.h being internal to a library and XXXX.h being the external
interface. Not only does this allow the removal of lots of redundant
NULL-checking code, it also sets the tone for adding new mandoc-global
routines.
|
|
|
|
|
|
|
|
|
| |
into PostScript and PDF documents behind the user's back.
Joerg Sonnenberger pointed out that almost all software
creating PostScript and PDF documents does so, even on OpenBSD,
but that doesn't make the leakage much better in my book.
According to all standards i could find, this information is optional.
Issue originally reported by deraadt@; "commit!" kristaps@.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* mdoc.c: blank lines outside literal mode are more similar to .sp than .Pp
* backslashes do not terminate macros; partial revert of mdoc.c 1.164;
the intention of that commit is fully achieved in roff.c
* mdoc_term.c: no need to list the same prototype twice
* mdoc_validate.c: drop .Pp before .sp just like .Pp before .Pp
* fix off-by-one found by jsg@ with parfait, OpenBSD term_ps.c 1.12
ok kristaps@
|
| |
|
|
|
|
|
|
| |
sys/types.h is the file you want to include."
From a downstream fix by deraadt@.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
fuction-isation of PS_GROWBUF. Obviously the original commit was never
actually tested, as -Tps and -Tpdf errored out immediately.
|
|
|
|
| |
doesn't exist in the default namespace on Solaris.
|
|
|
|
| |
single and multiple-manual mode (e.g., mandoc -Tpdf foo.1 bar.1).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It's currently missing the xref table, so you'll get a warning in most
PDF viewers). It also produces lots of redundant output, which will go
away once I get a better handle on the PDF spec. The code doesn't
really touch any existing functionality; it's a bunch of conditionals
atop the -Tps (term_ps.c) implementation. I'm checking it in now to
have it exist and be auditable. It needs clean-up, polish, and general
care (and xref!).
|
| |
|
|
|
|
| |
misalignments.
|
|
|
|
| |
ok kristaps@
|
|
|
|
| |
PS_NEWPAGE to do the job for us. Noted by Dillo.
|
|
|
|
|
| |
print it out for each new page. This also prevents superfluous
printings of the font before the %%Page: comment has been displayed.
|
|
|
|
| |
longer important.
|
|
|
|
| |
until actual text is ready to be displayed.
|
|
|
|
|
| |
Also renamed "psstate" -> "flags" (was wrongly implying some sort of
state machine).
|
|
|
|
| |
margins are 1/9 the length/width.
|
|
|
|
| |
sure header and footer accomodate for said line-height.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
"Internet" vaguely suggests using 11- or 9-Point for serifed fonts).
This verified on GNU/Linux, Mac OSX, Windows, and OpenBSD. Noted in
mandoc.1.
Then added a3, a4, a5, letter, legal, and custom page dimensions. These
seem to be the main players. Noted in mandoc.1.
Lintified the casting.
|
|
|
|
| |
by M. Deksters.
|
|
|
|
| |
puking on input.
|
| |
|
|
|
|
| |
termp_ps) to arbitrarily scale font. Tested with 10 (default), 12, 14.
|
| |
|
| |
|
|
|
|
| |
glyph units to make positioning more precise.
|
|
|
|
|
|
| |
functional changes beyond the getsubopt() parse in term_ps.c. If you
want to test this (it only does -Opaper=a4 and -Opaper=letter; adding
more is trivial), make sure you specify (e.g.) -sPAPERSIZE=a4 to gs(1).
|
|
|
|
|
| |
constructs. Push the stupid CPP defines for page boundaries and margins
into proper variables. Give enum termfont a proper TERMFONT__MAX.
|
|
|
|
|
| |
restructured to make a bit more readable. Also removed an unused entry
in the PS engine structure.
|
|
|
|
|
|
| |
by a [functionless] clean-up in term_ps.c, but this makes the
appropriate changes to "enable" initial proportional-width functionality
in term.c and fixes some areas of term_ps.c that were causing errors.
|
|
|
|
| |
These continues proportional-width glyph encoding.
|
|
|
|
|
| |
unclear about which units accept floats/integers, which leads me to
assume that it handles either and rounds as appropriate.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This paves the way for closing/reopening scope in the event that a font
changes.
|
|
|
|
| |
simple state machine. This paves the way for decorated text.
|
|
|
|
|
| |
apparently doesn't collapse in PostScript (surprise!). Makes output
files much more compact.
|
|
|
|
| |
we're at it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Made low-level engine functions into function pointers.
|