DragonFly BSD
DragonFly commits List (threaded) for 2005-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/include ctype.h


From: YONETANI Tomokazu <qhwt+dfly@xxxxxxxxxx>
Date: Fri, 6 May 2005 13:56:58 +0900

On Fri, May 06, 2005 at 12:33:21AM +0200, Sascha Wildner wrote:
> Could joerg's commit also be the reason why buildkernel for LINT chokes 
> on ukbdmap.h (e.g. this file somehow does not correctly get generated by 
> kbdcontrol)?

Probably.
I'll commit the following patch instead after doing some more
tests, because our __libc_ctype is a 16bit-wide array,
not 8bit as NetBSD's.

Index: include/ctype.h
===================================================================
RCS file: /home/source/dragonfly/cvs/src/include/ctype.h,v
retrieving revision 1.7
diff -u -r1.7 ctype.h
--- include/ctype.h	2 May 2005 17:41:05 -0000	1.7
+++ include/ctype.h	6 May 2005 02:41:25 -0000
@@ -51,6 +51,7 @@
 #define	_C	0x20
 #define	_X	0x40
 #define	_B	0x80
+#define	_W	0x100
 
 extern const __uint16_t	*__libc_ctype_;
 extern const __int16_t	*__libc_tolower_tab_;
@@ -92,7 +93,7 @@
 #define	isalpha(c)	((int)((__libc_ctype_ + 1)[(int)(c)] & (_U|_L)))
 #define	isxdigit(c)	((int)((__libc_ctype_ + 1)[(int)(c)] & (_N|_X)))
 #define	isalnum(c)	((int)((__libc_ctype_ + 1)[(int)(c)] & (_U|_L|_N)))
-#define	isprint(c)	((int)((__libc_ctype_ + 1)[(int)(c)] & (_P|_U|_L|_N|_S)))
+#define	isprint(c)	((int)((__libc_ctype_ + 1)[(int)(c)] & (_P|_U|_L|_N|_W)))
 #define	isgraph(c)	((int)((__libc_ctype_ + 1)[(int)(c)] & (_P|_U|_L|_N)))
 #define	iscntrl(c)	((int)((__libc_ctype_ + 1)[(int)(c)] & _C))
 #define	tolower(c)	((int)((__libc_tolower_tab_ + 1)[(int)(c)]))
Index: lib/libc/gen/ctype.c
===================================================================
RCS file: /home/source/dragonfly/cvs/src/lib/libc/gen/ctype.c,v
retrieving revision 1.1
diff -u -r1.1 ctype.c
--- lib/libc/gen/ctype.c	16 Mar 2005 06:54:41 -0000	1.1
+++ lib/libc/gen/ctype.c	6 May 2005 02:24:22 -0000
@@ -47,7 +47,7 @@
 	_C,	_C|_S|_B,	_C|_S,	_C|_S,	_C|_S,	_C|_S,	_C,	_C,
 	_C,	_C,	_C,	_C,	_C,	_C,	_C,	_C,
 	_C,	_C,	_C,	_C,	_C,	_C,	_C,	_C,
-	_S|_B,	_P,	_P,	_P,	_P,	_P,	_P,	_P,
+	_S|_B|_W,	_P,	_P,	_P,	_P,	_P,	_P,	_P,
 	_P,	_P,	_P,	_P,	_P,	_P,	_P,	_P,
 	_N,	_N,	_N,	_N,	_N,	_N,	_N,	_N,
 	_N,	_N,	_P,	_P,	_P,	_P,	_P,	_P,
Index: lib/libc/gen/isctype.c
===================================================================
RCS file: /home/source/dragonfly/cvs/src/lib/libc/gen/isctype.c,v
retrieving revision 1.3
diff -u -r1.3 isctype.c
--- lib/libc/gen/isctype.c	21 Apr 2005 16:36:34 -0000	1.3
+++ lib/libc/gen/isctype.c	6 May 2005 01:53:09 -0000
@@ -91,7 +91,7 @@
 int
 isprint(int c)
 {
-	return((__libc_ctype_ + 1)[c] & (_P|_U|_L|_N|_B));
+	return((__libc_ctype_ + 1)[c] & (_P|_U|_L|_N|_B|_W));
 }
 
 #undef ispunct



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]