changeset 650:704cb139ec6b

[xemacs-hg @ 2001-08-24 08:52:07 by stephent] Make negative integers invalid again. <15238.5438.881529.885462@turnbull.sk.tsukuba.ac.jp>
author stephent
date Fri, 24 Aug 2001 08:52:09 +0000
parents 37441ddea94d
children 98b3721724bd
files src/ChangeLog src/buffer.h
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Aug 22 21:03:16 2001 +0000
+++ b/src/ChangeLog	Fri Aug 24 08:52:09 2001 +0000
@@ -1,3 +1,7 @@
+2001-08-24  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* buffer.h (valid_char_p): Make negative integers invalid again.
+
 2001-08-13  Ben Wing  <ben@xemacs.org>
 
 	* regex.c: need to include stddef.h for ptrdiff_t on Solaris, when
--- a/src/buffer.h	Wed Aug 22 21:03:16 2001 +0000
+++ b/src/buffer.h	Fri Aug 24 08:52:09 2001 +0000
@@ -553,12 +553,12 @@
 INLINE_HEADER int
 valid_char_p (Emchar ch)
 {
-  return ch <= 0xFF || non_ascii_valid_char_p (ch);
+  return (! (ch & ~0xFF)) || non_ascii_valid_char_p (ch);
 }
 
 #else /* not MULE */
 
-#define valid_char_p(ch) ((unsigned int) (ch) <= 0xff)
+#define valid_char_p(ch) (! (ch & ~0xFF))
 
 #endif /* not MULE */