Mercurial > mplayer.hg
comparison stream/stream.h @ 33906:3c172a874b4b
Convert stream_read_line function into more generic stream_read_until function.
author | reimar |
---|---|
date | Mon, 15 Aug 2011 20:32:26 +0000 |
parents | 86b2ec222a2c |
children | a7784f6008a7 |
comparison
equal
deleted
inserted
replaced
33905:c0cb8c5e7fdb | 33906:3c172a874b4b |
---|---|
276 s->buf_pos+=x; mem+=x; len-=x; | 276 s->buf_pos+=x; mem+=x; len-=x; |
277 } | 277 } |
278 return total; | 278 return total; |
279 } | 279 } |
280 | 280 |
281 unsigned char* stream_read_line(stream_t *s,unsigned char* mem, int max, int utf16); | 281 uint8_t *stream_read_until(stream_t *s, uint8_t *mem, int max, uint8_t term, int utf16); |
282 inline static uint8_t *stream_read_line(stream_t *s, uint8_t *mem, int max, int utf16) | |
283 { | |
284 return stream_read_until(s, mem, max, '\n', utf16); | |
285 } | |
282 | 286 |
283 inline static int stream_eof(stream_t *s){ | 287 inline static int stream_eof(stream_t *s){ |
284 return s->eof; | 288 return s->eof; |
285 } | 289 } |
286 | 290 |