comparison src/lstream.h @ 404:2f8bb876ab1d r21-2-32

Import from CVS: tag r21-2-32
author cvs
date Mon, 13 Aug 2007 11:16:07 +0200
parents 74fd4e045ea6
children 697ef44129c6
comparison
equal deleted inserted replaced
403:9f011ab08d48 404:2f8bb876ab1d
173 173
174 #define LSTREAM_TYPE_P(lstr, type) \ 174 #define LSTREAM_TYPE_P(lstr, type) \
175 ((lstr)->imp == lstream_##type) 175 ((lstr)->imp == lstream_##type)
176 176
177 #ifdef ERROR_CHECK_TYPECHECK 177 #ifdef ERROR_CHECK_TYPECHECK
178 INLINE struct lstream * 178 INLINE_HEADER struct lstream *
179 error_check_lstream_type (struct lstream *stream, 179 error_check_lstream_type (struct lstream *stream,
180 const Lstream_implementation *imp); 180 const Lstream_implementation *imp);
181 INLINE struct lstream * 181 INLINE_HEADER struct lstream *
182 error_check_lstream_type (struct lstream *stream, 182 error_check_lstream_type (struct lstream *stream,
183 const Lstream_implementation *imp) 183 const Lstream_implementation *imp)
184 { 184 {
185 assert (stream->imp == imp); 185 assert (stream->imp == imp);
186 return stream; 186 return stream;
266 266
267 #ifndef BYTE_ASCII_P 267 #ifndef BYTE_ASCII_P
268 #include "mule-charset.h" 268 #include "mule-charset.h"
269 #endif 269 #endif
270 270
271 INLINE Emchar Lstream_get_emchar (Lstream *stream); 271 INLINE_HEADER Emchar Lstream_get_emchar (Lstream *stream);
272 INLINE Emchar 272 INLINE_HEADER Emchar
273 Lstream_get_emchar (Lstream *stream) 273 Lstream_get_emchar (Lstream *stream)
274 { 274 {
275 int c = Lstream_getc (stream); 275 int c = Lstream_getc (stream);
276 return BYTE_ASCII_P (c) ? (Emchar) c : 276 return BYTE_ASCII_P (c) ? (Emchar) c :
277 Lstream_get_emchar_1 (stream, c); 277 Lstream_get_emchar_1 (stream, c);
278 } 278 }
279 279
280 INLINE int Lstream_put_emchar (Lstream *stream, Emchar ch); 280 INLINE_HEADER int Lstream_put_emchar (Lstream *stream, Emchar ch);
281 INLINE int 281 INLINE_HEADER int
282 Lstream_put_emchar (Lstream *stream, Emchar ch) 282 Lstream_put_emchar (Lstream *stream, Emchar ch)
283 { 283 {
284 return CHAR_ASCII_P (ch) ? 284 return CHAR_ASCII_P (ch) ?
285 Lstream_putc (stream, ch) : 285 Lstream_putc (stream, ch) :
286 Lstream_fput_emchar (stream, ch); 286 Lstream_fput_emchar (stream, ch);
287 } 287 }
288 288
289 INLINE void Lstream_unget_emchar (Lstream *stream, Emchar ch); 289 INLINE_HEADER void Lstream_unget_emchar (Lstream *stream, Emchar ch);
290 INLINE void 290 INLINE_HEADER void
291 Lstream_unget_emchar (Lstream *stream, Emchar ch) 291 Lstream_unget_emchar (Lstream *stream, Emchar ch)
292 { 292 {
293 if (CHAR_ASCII_P (ch)) 293 if (CHAR_ASCII_P (ch))
294 Lstream_ungetc (stream, ch); 294 Lstream_ungetc (stream, ch);
295 else 295 else