aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit7763823a09119fdfe1ca1e3baef83ca1b5a39713 (patch)
tree5640a8fd9667aa8c0f607065cb19adf7754ab748 /term.h
parentc7089c4c53f1f303b3db0a33aa5dbb9c79ded016 (diff)
downloadmandoc-7763823a09119fdfe1ca1e3baef83ca1b5a39713.tar.gz
mandoc-7763823a09119fdfe1ca1e3baef83ca1b5a39713.tar.zst
mandoc-7763823a09119fdfe1ca1e3baef83ca1b5a39713.zip
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.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/term.h b/term.h
index 6aa9934e..f49e86fd 100644
--- a/term.h
+++ b/term.h
@@ -1,6 +1,7 @@
-/* $Id: term.h,v 1.94 2013/08/21 21:20:40 schwarze Exp $ */
+/* $Id: term.h,v 1.95 2013/12/22 23:34:13 schwarze Exp $ */
/*
* 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(). */