commit | 4fe7a2ec6c75266cf961537c362f14d2e9814a58 | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Tue Sep 01 06:41:32 2009 +0200 |
committer | Willy Tarreau <w@1wt.eu> | Sat Sep 19 14:53:47 2009 +0200 |
tree | 59d45cf5848e5dec1dd97fbc0bfd2521e2ded7fe | |
parent | aeac31979e1042591c0992a358373eb22c44d607 [diff] |
[MINOR] buffers: add peekchar and peekline functions for stream interfaces The buffer_si_peekline() function is sort of a fgets() to be used from a stream interface. It returns a complete line whenever possible, and does not update the buffer's pointer, so that the reader is free to consume what it wants to. buffer_si_peekchar() only returns one character, and also needs a call to buffer_skip() once the character is definitely consumed.