summaryrefslogtreecommitdiff
path: root/apps/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/misc.h')
-rw-r--r--apps/misc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/misc.h b/apps/misc.h
index b5cf896b28..c8aa266d5f 100644
--- a/apps/misc.h
+++ b/apps/misc.h
@@ -22,3 +22,11 @@
22 Make sure to have space for 6 bytes in the buffer. 5 letters plus the 22 Make sure to have space for 6 bytes in the buffer. 5 letters plus the
23 terminating zero byte. */ 23 terminating zero byte. */
24char *num2max5(unsigned int bytes, char *max5); 24char *num2max5(unsigned int bytes, char *max5);
25
26/* Read (up to) a line of text from fd into buffer and return number of bytes
27 * read (which may be larger than the number of bytes stored in buffer). If
28 * an error occurs, -1 is returned (and buffer contains whatever could be
29 * read). A line is terminated by a LF char. Neither LF nor CR chars are
30 * stored in buffer.
31 */
32int read_line(int fd, char* buffer, int buffer_size);