X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Flstream.h;h=df469602ebe04a546ba3653707337e8e88968479;hb=df28933d74967579569614970a965eb590a6d74d;hp=e1674c21f6902ef84f0609b4bb7b98266485b662;hpb=3e447015251ce6dcde843cbed10d9033d5538622;p=chise%2Fxemacs-chise.git- diff --git a/src/lstream.h b/src/lstream.h index e1674c2..df46960 100644 --- a/src/lstream.h +++ b/src/lstream.h @@ -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); @@ -175,10 +175,10 @@ struct lstream ((lstr)->imp == lstream_##type) #ifdef ERROR_CHECK_TYPECHECK -INLINE struct lstream * +INLINE_HEADER struct lstream * error_check_lstream_type (struct lstream *stream, const Lstream_implementation *imp); -INLINE struct lstream * +INLINE_HEADER struct lstream * error_check_lstream_type (struct lstream *stream, const Lstream_implementation *imp) { @@ -265,20 +265,25 @@ void Lstream_set_character_mode (Lstream *str); #ifdef MULE #ifndef BYTE_ASCII_P -#include "mule-charset.h" +#include "multibyte.h" #endif -INLINE Emchar Lstream_get_emchar (Lstream *stream); -INLINE Emchar +#ifndef CHAR_ASCII_P +#include "character.h" +#endif + +INLINE_HEADER Emchar Lstream_get_emchar (Lstream *stream); +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 int Lstream_put_emchar (Lstream *stream, Emchar ch); -INLINE int +INLINE_HEADER int Lstream_put_emchar (Lstream *stream, Emchar ch); +INLINE_HEADER int Lstream_put_emchar (Lstream *stream, Emchar ch) { return CHAR_ASCII_P (ch) ? @@ -286,8 +291,8 @@ Lstream_put_emchar (Lstream *stream, Emchar ch) Lstream_fput_emchar (stream, ch); } -INLINE void Lstream_unget_emchar (Lstream *stream, Emchar ch); -INLINE void +INLINE_HEADER void Lstream_unget_emchar (Lstream *stream, Emchar ch); +INLINE_HEADER void Lstream_unget_emchar (Lstream *stream, Emchar ch) { if (CHAR_ASCII_P (ch))