aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-06-11 07:23:04 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-06-11 07:23:04 +0000
commitfc5d71d822ac93dd1052a8f796bb03fd3e88ce3f (patch)
treea91f6e1dad8b2c70ae7e5faca225c435fc65ca9f /term.c
parent7a77114452fc90a6f9175095b3ba098129bede0b (diff)
downloadmandoc-fc5d71d822ac93dd1052a8f796bb03fd3e88ce3f.tar.gz
mandoc-fc5d71d822ac93dd1052a8f796bb03fd3e88ce3f.tar.zst
mandoc-fc5d71d822ac93dd1052a8f796bb03fd3e88ce3f.zip
Teach -Tps to ignore backspace-encoding by using a one-char buffer and a
simple state machine. This paves the way for decorated text.
Diffstat (limited to 'term.c')
-rw-r--r--term.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/term.c b/term.c
index bdcd2879..dbdc2441 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.146 2010/06/08 15:00:17 kristaps Exp $ */
+/* $Id: term.c,v 1.147 2010/06/11 07:23:04 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -603,10 +603,7 @@ encode(struct termp *p, const char *word, size_t sz)
* character by character.
*/
- if (TERMTYPE_PS == p->type) {
- buffera(p, word, sz);
- return;
- } else if (TERMFONT_NONE == (f = term_fonttop(p))) {
+ if (TERMFONT_NONE == (f = term_fonttop(p))) {
buffera(p, word, sz);
return;
}