aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit2bd10d07080a87c7b6d1e64efa941615ce7144b9 (patch)
tree38d93131b7f21457739cc796bdbf92d30dc48d89 /term.h
parent1333797c489e45a9ce20753440cdba7ebadf299d (diff)
downloadmandoc-2bd10d07080a87c7b6d1e64efa941615ce7144b9.tar.gz
mandoc-2bd10d07080a87c7b6d1e64efa941615ce7144b9.tar.zst
mandoc-2bd10d07080a87c7b6d1e64efa941615ce7144b9.zip
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.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/term.h b/term.h
index 861abc70..d12e754f 100644
--- a/term.h
+++ b/term.h
@@ -1,4 +1,4 @@
-/* $Id: term.h,v 1.67 2010/06/28 23:26:09 kristaps Exp $ */
+/* $Id: term.h,v 1.68 2010/06/29 14:18:05 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -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 {