(Vutf_2000_version): New variable [moved from chartab.c].
[chise/xemacs-chise.git-] / src / lstream.h
index 6800934..877f66c 100644 (file)
@@ -167,8 +167,8 @@ struct lstream
   size_t unget_buffer_ind; /* pointer to next buffer spot to write a character */
 
   size_t byte_count;
-  long flags;  /* Align pointer for 64 bit machines (kny) */
-  char data[1];
+  int flags;
+  max_align_t data[1];
 };
 
 #define LSTREAM_TYPE_P(lstr, type) \
@@ -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);