From 5aae14345a405f370fc687547d918a084ce6e53f Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 29 Apr 2015 18:35:00 +0000 Subject: Replace the kludge for the \z escape sequence by an actual implementation. As a side effect, minus ten lines of code. As another side effect, this also fixes the assertion failure that used to be triggered by "\z\o'ab'c" at the beginning of an output line, found by jsg@ with afl (test case 022/Apr27). --- term.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'term.h') diff --git a/term.h b/term.h index bda7f7da..0aa467b4 100644 --- a/term.h +++ b/term.h @@ -1,4 +1,4 @@ -/* $Id: term.h,v 1.113 2015/04/04 17:47:18 schwarze Exp $ */ +/* $Id: term.h,v 1.114 2015/04/29 18:35:00 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011-2015 Ingo Schwarze @@ -67,13 +67,14 @@ struct termp { int overstep; /* See termp_flushln(). */ int skipvsp; /* Vertical space to skip. */ int flags; -#define TERMP_SENTENCE (1 << 1) /* Space before a sentence. */ -#define TERMP_NOSPACE (1 << 2) /* No space before words. */ -#define TERMP_NONOSPACE (1 << 3) /* No space (no autounset). */ -#define TERMP_NBRWORD (1 << 4) /* Make next word nonbreaking. */ -#define TERMP_KEEP (1 << 5) /* Keep words together. */ -#define TERMP_PREKEEP (1 << 6) /* ...starting with the next one. */ -#define TERMP_SKIPCHAR (1 << 7) /* Skip the next character. */ +#define TERMP_SENTENCE (1 << 0) /* Space before a sentence. */ +#define TERMP_NOSPACE (1 << 1) /* No space before words. */ +#define TERMP_NONOSPACE (1 << 2) /* No space (no autounset). */ +#define TERMP_NBRWORD (1 << 3) /* Make next word nonbreaking. */ +#define TERMP_KEEP (1 << 4) /* Keep words together. */ +#define TERMP_PREKEEP (1 << 5) /* ...starting with the next one. */ +#define TERMP_BACKAFTER (1 << 6) /* Back up after next character. */ +#define TERMP_BACKBEFORE (1 << 7) /* Back up before next character. */ #define TERMP_NOBREAK (1 << 8) /* See term_flushln(). */ #define TERMP_BRIND (1 << 9) /* See term_flushln(). */ #define TERMP_DANGLE (1 << 10) /* See term_flushln(). */ -- cgit v1.2.3