/** \file string.h exported sybmols from string.c */
+/** A string buffer used for para_printf(). */
struct para_buffer {
+ /** The buffer. May be \p NULL. */
char *buf;
+ /** The size of \a buf. */
size_t size;
+ /** The next para_printf() will write at this offset. */
size_t offset;
};
__malloc char *para_hostname(void);
void valid_fd_012(void);
__printf_2_3 int para_printf(struct para_buffer *b, const char *fmt, ...);
+/** Used for for_each_line() and for_each_line_ro(). */
typedef int line_handler_t(char *, void *);
int for_each_line(char *buf, size_t size, line_handler_t *line_handler,
void *private_data);