aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--chars.h4
-rw-r--r--chars.in4
-rw-r--r--term.c4
3 files changed, 7 insertions, 5 deletions
diff --git a/chars.h b/chars.h
index c3627b53..1205bc76 100644
--- a/chars.h
+++ b/chars.h
@@ -1,4 +1,4 @@
-/* $Id: chars.h,v 1.1 2009/09/17 07:41:28 kristaps Exp $ */
+/* $Id: chars.h,v 1.2 2010/05/16 01:35:37 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -17,6 +17,8 @@
#ifndef CHARS_H
#define CHARS_H
+#define ASCII_NBRSP 31 /* non-breaking space */
+
__BEGIN_DECLS
enum chars {
diff --git a/chars.in b/chars.in
index 61a99e1d..0a39697c 100644
--- a/chars.in
+++ b/chars.in
@@ -1,4 +1,4 @@
-/* $Id: chars.in,v 1.22 2010/03/30 19:20:33 kristaps Exp $ */
+/* $Id: chars.in,v 1.23 2010/05/16 01:35:37 schwarze Exp $ */
/*
* Copyright (c) 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -31,7 +31,7 @@
*/
/* Non-breaking, non-collapsing space uses unit separator. */
-static const char ascii_nbrsp[2] = { 31, 0 };
+static const char ascii_nbrsp[2] = { ASCII_NBRSP, 0 };
CHAR_TBL_START
diff --git a/term.c b/term.c
index e43d9692..1641df3d 100644
--- a/term.c
+++ b/term.c
@@ -1,4 +1,4 @@
-/* $Id: term.c,v 1.134 2010/05/15 16:18:23 joerg Exp $ */
+/* $Id: term.c,v 1.135 2010/05/16 01:35:37 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -233,7 +233,7 @@ term_flushln(struct termp *p)
for ( ; i < (int)p->col; i++)
if (' ' == p->buf[i])
break;
- else if (31 == p->buf[i])
+ else if (ASCII_NBRSP == p->buf[i])
putchar(' ');
else
putchar(p->buf[i]);