summaryrefslogtreecommitdiffstats
path: root/term.h
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-29 14:18:05 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-29 14:18:05 +0000
commit8842837488a4e122906083111d6152cb80757ea5 (patch)
treec0d05c24263905d569decdfc60b0b2a2eefc9ae8 /term.h
parentfa25d6bcf8d83e3ef6c401e70a10d5e73010dac8 (diff)
downloadmandoc-8842837488a4e122906083111d6152cb80757ea5.tar.gz
Give -Tps better PostScript hinting. Note that we're using Adobe-3.0
constructs. Push the stupid CPP defines for page boundaries and margins into proper variables. Give enum termfont a proper TERMFONT__MAX.
Diffstat (limited to 'term.h')
-rw-r--r--term.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/term.h b/term.h
index 298d232a..dad647de 100644
--- a/term.h
+++ b/term.h
@@ -33,7 +33,8 @@ enum termtype {
enum termfont {
TERMFONT_NONE = 0,
TERMFONT_BOLD,
- TERMFONT_UNDER
+ TERMFONT_UNDER,
+ TERMFONT__MAX
};
#define TERM_MAXMARGIN 100000 /* FIXME */
@@ -44,13 +45,22 @@ struct termp_ps {
int psstate; /* state of ps output */
#define PS_INLINE (1 << 0) /* we're in a word */
#define PS_MARGINS (1 << 1) /* we're in the margins */
- size_t pscol; /* visible column */
- size_t psrow; /* visible row */
+ size_t pscol; /* visible column (points) */
+ size_t psrow; /* visible row (points) */
char *psmarg; /* margin buf */
size_t psmargsz; /* margin buf size */
- size_t psmargcur; /* current pos in margin buf */
+ size_t psmargcur; /* cur index in margin buf */
char last; /* character buffer */
enum termfont lastf; /* last set font */
+ size_t pages; /* number of pages shown */
+ size_t lineheight; /* each line's height (points) */
+ size_t top; /* body top (points) */
+ size_t bottom; /* body bottom (points) */
+ size_t height; /* total height (points) */
+ size_t width; /* total width (points) */
+ size_t left; /* body left (points) */
+ size_t header; /* header position (points) */
+ size_t footer; /* footer position (points) */
};
struct termp {