diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h index bc47ce7ba..8ea493b18 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -594,9 +594,9 @@ extern ssize_t open_read_close(const char *filename, void *buf, size_t maxsz) FA | |||
594 | // Reads byte-by-byte. Useful when it is important to not read ahead. | 594 | // Reads byte-by-byte. Useful when it is important to not read ahead. |
595 | // Bytes are appended to pfx (which must be malloced, or NULL). | 595 | // Bytes are appended to pfx (which must be malloced, or NULL). |
596 | extern char *xmalloc_reads(int fd, char *pfx, size_t *maxsz_p) FAST_FUNC; | 596 | extern char *xmalloc_reads(int fd, char *pfx, size_t *maxsz_p) FAST_FUNC; |
597 | /* Reads block up to *maxsz_p (default: MAX_INT(ssize_t)) */ | 597 | /* Reads block up to *maxsz_p (default: INT_MAX - 4095) */ |
598 | extern void *xmalloc_read(int fd, size_t *maxsz_p) FAST_FUNC; | 598 | extern void *xmalloc_read(int fd, size_t *maxsz_p) FAST_FUNC; |
599 | /* Returns NULL if file can't be opened */ | 599 | /* Returns NULL if file can't be opened (default max size: INT_MAX - 4095) */ |
600 | extern void *xmalloc_open_read_close(const char *filename, size_t *maxsz_p) FAST_FUNC; | 600 | extern void *xmalloc_open_read_close(const char *filename, size_t *maxsz_p) FAST_FUNC; |
601 | /* Autodetects .gz etc */ | 601 | /* Autodetects .gz etc */ |
602 | extern int open_zipped(const char *fname) FAST_FUNC; | 602 | extern int open_zipped(const char *fname) FAST_FUNC; |
@@ -619,6 +619,8 @@ extern char *bb_get_chunk_from_file(FILE *file, int *end) FAST_FUNC; | |||
619 | extern char *bb_get_chunk_with_continuation(FILE *file, int *end, int *lineno) FAST_FUNC; | 619 | extern char *bb_get_chunk_with_continuation(FILE *file, int *end, int *lineno) FAST_FUNC; |
620 | /* Reads up to (and including) TERMINATING_STRING: */ | 620 | /* Reads up to (and including) TERMINATING_STRING: */ |
621 | extern char *xmalloc_fgets_str(FILE *file, const char *terminating_string) FAST_FUNC; | 621 | extern char *xmalloc_fgets_str(FILE *file, const char *terminating_string) FAST_FUNC; |
622 | /* Same, with limited max size, and returns the length (excluding NUL): */ | ||
623 | extern char *xmalloc_fgets_str_len(FILE *file, const char *terminating_string, size_t *maxsz_p) FAST_FUNC; | ||
622 | /* Chops off TERMINATING_STRING from the end: */ | 624 | /* Chops off TERMINATING_STRING from the end: */ |
623 | extern char *xmalloc_fgetline_str(FILE *file, const char *terminating_string) FAST_FUNC; | 625 | extern char *xmalloc_fgetline_str(FILE *file, const char *terminating_string) FAST_FUNC; |
624 | /* Reads up to (and including) "\n" or NUL byte: */ | 626 | /* Reads up to (and including) "\n" or NUL byte: */ |