* mdocml: sync to OpenBSD: introduce a #define to get rid of the magic
@ 2010-05-16 1:35 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2010-05-16 1:35 UTC (permalink / raw)
To: source
Log Message:
-----------
sync to OpenBSD:
introduce a #define to get rid of the magic number
describing the ASCII character used to represent non-breaking space;
ok kristaps
Modified Files:
--------------
mdocml:
chars.h
chars.in
term.c
Revision Data
-------------
Index: term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/term.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -Lterm.c -Lterm.c -u -p -r1.134 -r1.135
--- term.c
+++ term.c
@@ -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]);
Index: chars.in
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/chars.in,v
retrieving revision 1.22
retrieving revision 1.23
diff -Lchars.in -Lchars.in -u -p -r1.22 -r1.23
--- chars.in
+++ chars.in
@@ -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
Index: chars.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/chars.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lchars.h -Lchars.h -u -p -r1.1 -r1.2
--- chars.h
+++ chars.h
@@ -17,6 +17,8 @@
#ifndef CHARS_H
#define CHARS_H
+#define ASCII_NBRSP 31 /* non-breaking space */
+
__BEGIN_DECLS
enum chars {
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-16 1:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-16 1:35 mdocml: sync to OpenBSD: introduce a #define to get rid of the magic kristaps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).