X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=string.h;h=6759c261318232f1cf3b61aedc15911412422982;hp=16f461081598c782879a53ffd7be235090601ebb;hb=d9f939fe8a68267a62b68546b17e1ec9a34aab0b;hpb=1a4b98e797ab5ebb1ee1daa707aa0d520379ccc9 diff --git a/string.h b/string.h index 16f46108..6759c261 100644 --- a/string.h +++ b/string.h @@ -6,9 +6,13 @@ /** \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; }; @@ -29,6 +33,7 @@ __must_check unsigned split_args(char *args, char *** const argv_ptr, const char __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);