Moved read_line() to misc.c

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3647 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2003-05-04 02:04:31 +00:00
parent 93e47b922f
commit 75b41a88f6
3 changed files with 48 additions and 36 deletions

View file

@ -22,3 +22,11 @@
Make sure to have space for 6 bytes in the buffer. 5 letters plus the
terminating zero byte. */
char *num2max5(unsigned int bytes, char *max5);
/* Read (up to) a line of text from fd into buffer and return number of bytes
* read (which may be larger than the number of bytes stored in buffer). If
* an error occurs, -1 is returned (and buffer contains whatever could be
* read). A line is terminated by a LF char. Neither LF nor CR chars are
* stored in buffer.
*/
int read_line(int fd, char* buffer, int buffer_size);