comparison src/lstream.h @ 185:3d6bfa290dbd r20-3b19

Import from CVS: tag r20-3b19
author cvs
date Mon, 13 Aug 2007 09:55:28 +0200
parents 131b0175ea99
children 262b8bb4a523
comparison
equal deleted inserted replaced
184:bcd2674570bf 185:3d6bfa290dbd
124 in the stream will already have been written out. */ 124 in the stream will already have been written out. */
125 int (*closer) (Lstream *stream); 125 int (*closer) (Lstream *stream);
126 /* Mark this object for garbage collection. Same semantics as 126 /* Mark this object for garbage collection. Same semantics as
127 a standard Lisp_Object marker. This function can be NULL. */ 127 a standard Lisp_Object marker. This function can be NULL. */
128 Lisp_Object (*marker) (Lisp_Object lstream, void (*markfun) (Lisp_Object)); 128 Lisp_Object (*marker) (Lisp_Object lstream, void (*markfun) (Lisp_Object));
129 } Lstream_implementation; 129 } Lstream_implementation;
130 130
131 #define DEFINE_LSTREAM_IMPLEMENTATION(name,c_name,size) \ 131 #define DEFINE_LSTREAM_IMPLEMENTATION(name,c_name,size) \
132 Lstream_implementation c_name[1] = \ 132 Lstream_implementation c_name[1] = \
133 { { (name), (size) } } 133 { { (name), (size) } }
134 134
209 void Lstream_set_character_mode (Lstream *str); 209 void Lstream_set_character_mode (Lstream *str);
210 210
211 /* Call the function equivalent if the out buffer is full. Otherwise, 211 /* Call the function equivalent if the out buffer is full. Otherwise,
212 add to the end of the out buffer and, if line buffering is called for 212 add to the end of the out buffer and, if line buffering is called for
213 and the character marks the end of a line, write out the buffer. */ 213 and the character marks the end of a line, write out the buffer. */
214 214
215 #define Lstream_putc(stream, c) \ 215 #define Lstream_putc(stream, c) \
216 ((stream)->out_buffer_ind >= (stream)->out_buffer_size ? \ 216 ((stream)->out_buffer_ind >= (stream)->out_buffer_size ? \
217 Lstream_fputc (stream, c) : \ 217 Lstream_fputc (stream, c) : \
218 ((stream)->out_buffer[(stream)->out_buffer_ind++] = \ 218 ((stream)->out_buffer[(stream)->out_buffer_ind++] = \
219 (unsigned char) (c), \ 219 (unsigned char) (c), \