summaryrefslogtreecommitdiffstats
path: root/term.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-12-22 23:34:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-12-22 23:34:13 +0000
commit3b2ca955f8a2aa20d55aed7f0b8fb63533fddb64 (patch)
treee82445f6f67dcbe0c89395f44bf802693714be39 /term.h
parentcac6ca6afd5184c9e640382fcad986fa5922cec9 (diff)
downloadmandoc-3b2ca955f8a2aa20d55aed7f0b8fb63533fddb64.tar.gz
Polishing the worms in my favourite can, term_flushln().
The TERMP_TWOSPACE flag i introduced in August 2009 was idiosyncratic and served only a very narrow purpose. Replace it by a more intuitive and more general termp attribute "trailspace", to be used together with TERMP_NOBREAK, to request a minimum amount of whitespace at the end of the current column. Adapt all code to the new interface. No functional change intended; code reviews to confirm that are welcome *eg*.
Diffstat (limited to 'term.h')
-rw-r--r--term.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/term.h b/term.h
index 2c6ece97..880fefb1 100644
--- a/term.h
+++ b/term.h
@@ -1,6 +1,7 @@
/* $Id$ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
+ * Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -63,6 +64,7 @@ struct termp {
size_t tabwidth; /* Distance of tab positions. */
size_t col; /* Bytes in buf. */
size_t viscol; /* Chars on current line. */
+ size_t trailspace; /* See termp_flushln(). */
int overstep; /* See termp_flushln(). */
int skipvsp; /* Vertical space to skip. */
int flags;
@@ -73,7 +75,6 @@ struct termp {
#define TERMP_NONOSPACE (1 << 7) /* No space (no autounset). */
#define TERMP_DANGLE (1 << 8) /* See term_flushln(). */
#define TERMP_HANG (1 << 9) /* See term_flushln(). */
-#define TERMP_TWOSPACE (1 << 10) /* See term_flushln(). */
#define TERMP_NOSPLIT (1 << 11) /* See termp_an_pre/post(). */
#define TERMP_SPLIT (1 << 12) /* See termp_an_pre/post(). */
#define TERMP_ANPREC (1 << 13) /* See termp_an_pre(). */