Mercurial > hg > xemacs-beta
diff src/lstream.h @ 442:abe6d1db359e r21-2-36
Import from CVS: tag r21-2-36
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:35:02 +0200 |
parents | 8de8e3f6228a |
children | 576fb035e263 |
line wrap: on
line diff
--- a/src/lstream.h Mon Aug 13 11:33:40 2007 +0200 +++ b/src/lstream.h Mon Aug 13 11:35:02 2007 +0200 @@ -74,7 +74,7 @@ typedef struct lstream_implementation { - CONST char *name; + const char *name; size_t size; /* Number of additional bytes to be allocated with this stream. Access this data using Lstream_data(). */ /* Read some data from the stream's end and store it into DATA, which @@ -92,7 +92,7 @@ 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); @@ -106,7 +106,7 @@ data. (This is useful, e.g., of you're dealing with a non-blocking file descriptor and are getting EWOULDBLOCK errors.) This function can be NULL if the stream is input-only. */ - ssize_t (*writer) (Lstream *stream, CONST unsigned char *data, size_t size); + ssize_t (*writer) (Lstream *stream, const unsigned char *data, size_t size); /* Return non-zero if the last write operation on the stream resulted in an attempt to block (EWOULDBLOCK). If this method does not exists, the implementation returns 0 */ @@ -145,7 +145,7 @@ struct lstream { struct lcrecord_header header; - CONST Lstream_implementation *imp; /* methods for this stream */ + const Lstream_implementation *imp; /* methods for this stream */ Lstream_buffering buffering; /* type of buffering in use */ size_t buffering_size; /* number of bytes buffered */ @@ -175,12 +175,12 @@ ((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 * + const Lstream_implementation *imp); +INLINE_HEADER struct lstream * error_check_lstream_type (struct lstream *stream, - CONST Lstream_implementation *imp) + const Lstream_implementation *imp) { assert (stream->imp == imp); return stream; @@ -199,8 +199,8 @@ (lstream_##type->m = type##_##m) -Lstream *Lstream_new (CONST Lstream_implementation *imp, - CONST char *mode); +Lstream *Lstream_new (const Lstream_implementation *imp, + const char *mode); void Lstream_reopen (Lstream *lstr); void Lstream_set_buffering (Lstream *lstr, Lstream_buffering buffering, int buffering_size); @@ -210,9 +210,9 @@ int Lstream_fgetc (Lstream *lstr); void Lstream_fungetc (Lstream *lstr, int c); ssize_t Lstream_read (Lstream *lstr, void *data, size_t size); -ssize_t Lstream_write (Lstream *lstr, CONST void *data, size_t size); +ssize_t Lstream_write (Lstream *lstr, const void *data, size_t size); int Lstream_was_blocked_p (Lstream *lstr); -void Lstream_unread (Lstream *lstr, CONST void *data, size_t size); +void Lstream_unread (Lstream *lstr, const void *data, size_t size); int Lstream_rewind (Lstream *lstr); int Lstream_seekable_p (Lstream *lstr); int Lstream_close (Lstream *lstr); @@ -268,8 +268,8 @@ #include "mule-charset.h" #endif -INLINE Emchar Lstream_get_emchar (Lstream *stream); -INLINE Emchar +INLINE_HEADER Emchar Lstream_get_emchar (Lstream *stream); +INLINE_HEADER Emchar Lstream_get_emchar (Lstream *stream) { int c = Lstream_getc (stream); @@ -277,8 +277,8 @@ 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 +286,8 @@ 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)) @@ -339,9 +339,9 @@ Lisp_Object make_lisp_string_input_stream (Lisp_Object string, Bytecount offset, Bytecount len); -Lisp_Object make_fixed_buffer_input_stream (CONST void *buf, size_t size); +Lisp_Object make_fixed_buffer_input_stream (const void *buf, size_t size); Lisp_Object make_fixed_buffer_output_stream (void *buf, size_t size); -CONST unsigned char *fixed_buffer_input_stream_ptr (Lstream *stream); +const unsigned char *fixed_buffer_input_stream_ptr (Lstream *stream); unsigned char *fixed_buffer_output_stream_ptr (Lstream *stream); Lisp_Object make_resizing_buffer_output_stream (void); unsigned char *resizing_buffer_stream_ptr (Lstream *stream);