aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h15
-rw-r--r--include/usage.h2
2 files changed, 10 insertions, 7 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 07f74e476..3638b7e15 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -524,15 +524,16 @@ extern ssize_t nonblock_safe_read(int fd, void *buf, size_t count);
524extern ssize_t full_read(int fd, void *buf, size_t count); 524extern ssize_t full_read(int fd, void *buf, size_t count);
525extern void xread(int fd, void *buf, size_t count); 525extern void xread(int fd, void *buf, size_t count);
526extern unsigned char xread_char(int fd); 526extern unsigned char xread_char(int fd);
527// Read one line a-la fgets. Uses one read(), works only on seekable streams 527// Reads one line a-la fgets (but doesn't save terminating '\n').
528// Uses single full_read() call, works only on seekable streams.
528extern char *reads(int fd, char *buf, size_t count); 529extern char *reads(int fd, char *buf, size_t count);
529// Read one line a-la fgets. Reads byte-by-byte. 530// Reads one line a-la fgets (but doesn't save terminating '\n').
530// Useful when it is important to not read ahead. 531// Reads byte-by-byte. Useful when it is important to not read ahead.
531// Bytes are appended to pfx (which must be malloced, or NULL). 532// Bytes are appended to pfx (which must be malloced, or NULL).
532extern char *xmalloc_reads(int fd, char *pfx, size_t *maxsz_p); 533extern char *xmalloc_reads(int fd, char *pfx, size_t *maxsz_p);
533extern ssize_t read_close(int fd, void *buf, size_t count); 534extern ssize_t read_close(int fd, void *buf, size_t maxsz);
534extern ssize_t open_read_close(const char *filename, void *buf, size_t count); 535extern ssize_t open_read_close(const char *filename, void *buf, size_t maxsz);
535extern void *xmalloc_open_read_close(const char *filename, size_t *sizep); 536extern void *xmalloc_open_read_close(const char *filename, size_t *maxsz_p);
536 537
537extern ssize_t safe_write(int fd, const void *buf, size_t count); 538extern ssize_t safe_write(int fd, const void *buf, size_t count);
538// NB: will return short write on error, not -1, 539// NB: will return short write on error, not -1,
@@ -549,7 +550,7 @@ extern char *xmalloc_fgetline_str(FILE *file, const char *terminating_string);
549/* Reads up to (and including) "\n" or NUL byte */ 550/* Reads up to (and including) "\n" or NUL byte */
550extern char *xmalloc_fgets(FILE *file); 551extern char *xmalloc_fgets(FILE *file);
551/* Chops off '\n' from the end, unlike fgets: */ 552/* Chops off '\n' from the end, unlike fgets: */
552extern char *xmalloc_getline(FILE *file); 553extern char *xmalloc_fgetline(FILE *file);
553extern char *bb_get_chunk_from_file(FILE *file, int *end); 554extern char *bb_get_chunk_from_file(FILE *file, int *end);
554extern void die_if_ferror(FILE *file, const char *msg); 555extern void die_if_ferror(FILE *file, const char *msg);
555extern void die_if_ferror_stdout(void); 556extern void die_if_ferror_stdout(void);
diff --git a/include/usage.h b/include/usage.h
index f950a0a49..f830fb35c 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -133,6 +133,8 @@
133 "\n -f Control pipe (else exit after drawing image)" \ 133 "\n -f Control pipe (else exit after drawing image)" \
134 "\n commands: 'NN' (% for progress bar) or 'exit'" \ 134 "\n commands: 'NN' (% for progress bar) or 'exit'" \
135 135
136
137
136#define brctl_trivial_usage \ 138#define brctl_trivial_usage \
137 "COMMAND [BRIDGE [INTERFACE]]" 139 "COMMAND [BRIDGE [INTERFACE]]"
138#define brctl_full_usage \ 140#define brctl_full_usage \