linebuf.h

Go to the documentation of this file.
00001 #ifndef _GPXE_LINEBUF_H
00002 #define _GPXE_LINEBUF_H
00003 
00004 /** @file
00005  *
00006  * Line buffering
00007  *
00008  */
00009 
00010 FILE_LICENCE ( GPL2_OR_LATER );
00011 
00012 #include <stdint.h>
00013 #include <stddef.h>
00014 
00015 /** A line buffer */
00016 struct line_buffer {
00017         /** Current string in the buffer */
00018         char *data;
00019         /** Length of current string, excluding the terminating NUL */
00020         size_t len;
00021         /** String is ready to read */
00022         int ready;
00023 };
00024 
00025 extern char * buffered_line ( struct line_buffer *linebuf );
00026 extern ssize_t line_buffer ( struct line_buffer *linebuf,
00027                              const char *data, size_t len );
00028 extern void empty_line_buffer ( struct line_buffer *linebuf );
00029 
00030 #endif /* _GPXE_LINEBUF_H */

Generated on Tue Apr 6 20:01:08 2010 for gPXE by  doxygen 1.5.7.1