# HG changeset patch # User aurel # Date 1279748450 0 # Node ID 869753e625c49eda477376be08a85d8d03d28b80 # Parent 1b2b5dbcf54913dcbe2260eebc46437e38a31c14 document ff_get_line() diff -r 1b2b5dbcf549 -r 869753e625c4 internal.h --- a/internal.h Wed Jul 21 21:40:10 2010 +0000 +++ b/internal.h Wed Jul 21 21:40:50 2010 +0000 @@ -167,6 +167,17 @@ */ void ff_put_v(ByteIOContext *bc, uint64_t val); +/** + * Read a whole line of text from ByteIOContext. Stop reading after reaching + * either a \n, a \0 or EOF. The returned string is always \0 terminated, + * and may be truncated if the buffer is too small. + * + * @param s the read-only ByteIOContext + * @param buf buffer to store the read line + * @param maxlen size of the buffer + * @return the length of the string written in the buffer, not including the + * final \0 + */ int ff_get_line(ByteIOContext *s, char *buf, int maxlen); #define SPACE_CHARS " \t\r\n"