From 7763823a09119fdfe1ca1e3baef83ca1b5a39713 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 22 Dec 2013 23:34:13 +0000 Subject: 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*. --- term.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'term.h') 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 + * Copyright (c) 2011, 2012, 2013 Ingo Schwarze * * 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(). */ -- cgit v1.2.3