aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-06-13 06:47:47 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-06-13 06:47:47 +0000
commitd67cef2425fb5e75b75d52d9a308da6d29cd7a0d (patch)
tree5d034f518dfae9a933a701e8c42da4acbf0cb42d /include
parentf5f75c5e82d47613847c356664e47c4be69e73aa (diff)
downloadbusybox-w32-d67cef2425fb5e75b75d52d9a308da6d29cd7a0d.tar.gz
busybox-w32-d67cef2425fb5e75b75d52d9a308da6d29cd7a0d.tar.bz2
busybox-w32-d67cef2425fb5e75b75d52d9a308da6d29cd7a0d.zip
hush: fix read builtin to not read ahead past eol and to not use
insane amounts of stack. Testsuite updated.
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h
index ce62f4529..5aa95ea88 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -400,7 +400,11 @@ extern ssize_t safe_read(int fd, void *buf, size_t count);
400extern ssize_t full_read(int fd, void *buf, size_t count); 400extern ssize_t full_read(int fd, void *buf, size_t count);
401extern void xread(int fd, void *buf, size_t count); 401extern void xread(int fd, void *buf, size_t count);
402extern unsigned char xread_char(int fd); 402extern unsigned char xread_char(int fd);
403// Read one line a-la fgets. Uses one read(), works only on seekable streams
403extern char *reads(int fd, char *buf, size_t count); 404extern char *reads(int fd, char *buf, size_t count);
405// Read one line a-la fgets. Reads byte-by-byte.
406// Useful when it is important to not read ahead.
407extern char *xmalloc_reads(int fd, char *pfx);
404extern ssize_t read_close(int fd, void *buf, size_t count); 408extern ssize_t read_close(int fd, void *buf, size_t count);
405extern ssize_t open_read_close(const char *filename, void *buf, size_t count); 409extern ssize_t open_read_close(const char *filename, void *buf, size_t count);
406extern void *xmalloc_open_read_close(const char *filename, size_t *sizep); 410extern void *xmalloc_open_read_close(const char *filename, size_t *sizep);