summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/term.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2010-06-26 19:08:01 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2010-06-26 19:08:01 +0000
commitb73e2a049f3087a55bcace404c2bd5b6a454113c (patch)
treeeec9756c7796e7f6840eab3eba3d39ce8b1eb0be /usr.bin/mandoc/term.h
parent0f83144b07f58e6a194b77936b2b410e777ae5b9 (diff)
As a first step towards variable-width font support,
move all width calculations in term_*.c, *_width(). From kristaps.
Diffstat (limited to 'usr.bin/mandoc/term.h')
-rw-r--r--usr.bin/mandoc/term.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/mandoc/term.h b/usr.bin/mandoc/term.h
index 5b4aa3b4a58..f149c876c79 100644
--- a/usr.bin/mandoc/term.h
+++ b/usr.bin/mandoc/term.h
@@ -1,4 +1,4 @@
-/* $Id: term.h,v 1.21 2010/06/26 17:56:43 schwarze Exp $ */
+/* $Id: term.h,v 1.22 2010/06/26 19:08:00 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -91,6 +91,7 @@ struct termp {
void (*end)(struct termp *);
void (*endline)(struct termp *);
void (*advance)(struct termp *, size_t);
+ size_t (*width)(const struct termp *, char);
const void *argf; /* arg for headf/footf */
union {
struct termp_ps ps;
@@ -107,8 +108,12 @@ void term_begin(struct termp *, term_margin,
term_margin, const void *);
void term_end(struct termp *);
-size_t term_hspan(const struct roffsu *);
-size_t term_vspan(const struct roffsu *);
+size_t term_hspan(const struct termp *,
+ const struct roffsu *);
+size_t term_vspan(const struct termp *,
+ const struct roffsu *);
+size_t term_strlen(const struct termp *, const char *);
+size_t term_len(const struct termp *, size_t);
enum termfont term_fonttop(struct termp *);
const void *term_fontq(struct termp *);