diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/linebuf.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/include/gpxe/linebuf.h b/src/include/gpxe/linebuf.h index 72b477526..f4481ddfe 100644 --- a/src/include/gpxe/linebuf.h +++ b/src/include/gpxe/linebuf.h @@ -12,26 +12,17 @@ /** A line buffer */ struct line_buffer { - /** Current data in the buffer */ + /** Current string in the buffer */ char *data; - /** Length of current data */ + /** Length of current string, excluding the terminating NUL */ size_t len; - /** Bitmask of terminating characters to skip over */ - unsigned int skip_terminators; + /** String is ready to read */ + int ready; }; -/** - * Retrieve buffered-up line - * - * @v linebuf Line buffer - * @ret line Buffered line, or NULL if no line present - */ -static inline char * buffered_line ( struct line_buffer *linebuf ) { - return linebuf->data; -} - -extern int line_buffer ( struct line_buffer *linebuf, const char *data, - size_t len ); +extern char * buffered_line ( struct line_buffer *linebuf ); +extern int line_buffer ( struct line_buffer *linebuf, + const char **data, size_t *len ); extern void empty_line_buffer ( struct line_buffer *linebuf ); #endif /* _GPXE_LINEBUF_H */ |
