(J90-7152): Unify JIS X 0208:1978 and 1983 code points.
[chise/xemacs-chise.git-] / src / lstream.h
index 6eba8b1..df46960 100644 (file)
@@ -92,7 +92,7 @@ typedef struct lstream_implementation
      the caller calls Lstream_read() with a very small size.
 
      This function can be NULL if the stream is output-only. */
-  /* The omniscient mly, blinded by the irresistable thrall of Common
+  /* The omniscient mly, blinded by the irresistible thrall of Common
      Lisp, thinks that it is bogus that the types and implementations
      of input and output streams are the same. */
   ssize_t (*reader) (Lstream *stream, unsigned char *data, size_t size);
@@ -265,7 +265,11 @@ void Lstream_set_character_mode (Lstream *str);
 #ifdef MULE
 
 #ifndef BYTE_ASCII_P
-#include "mule-charset.h"
+#include "multibyte.h"
+#endif
+
+#ifndef CHAR_ASCII_P
+#include "character.h"
 #endif
 
 INLINE_HEADER Emchar Lstream_get_emchar (Lstream *stream);
@@ -273,8 +277,9 @@ INLINE_HEADER Emchar
 Lstream_get_emchar (Lstream *stream)
 {
   int c = Lstream_getc (stream);
-  return BYTE_ASCII_P (c) ? (Emchar) c :
-    Lstream_get_emchar_1 (stream, c);
+  return (c < 0x80             /* c == EOF || BYTE_ASCII_P (c) */
+         ? (Emchar) c
+         : Lstream_get_emchar_1 (stream, c));
 }
 
 INLINE_HEADER int Lstream_put_emchar (Lstream *stream, Emchar ch);