X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/c9c047dcc6d21b98144fb15f654e4d8f4f10f2de..9c44ef13ed639445ee2e8a4037f7b3c5fcc11aa2:/util.h diff --git a/util.h b/util.h index a5a82a4..63ceef6 100644 --- a/util.h +++ b/util.h @@ -23,6 +23,7 @@ extern void buffer_assert_used(struct buffer_if *buffer, cstring_t file, int line); extern void buffer_new(struct buffer_if *buffer, int32_t len); extern void buffer_init(struct buffer_if *buffer, int32_t max_start_pad); +extern void buffer_destroy(struct buffer_if *buffer); extern void buffer_copy(struct buffer_if *dst, const struct buffer_if *src); extern void *buf_append(struct buffer_if *buf, int32_t amount); extern void *buf_prepend(struct buffer_if *buf, int32_t amount); @@ -97,6 +98,8 @@ enum async_linebuf_result { async_linebuf_broken, }; +const char *pollbadbit(int revents); /* returns 0, or bad bit description */ + enum async_linebuf_result async_linebuf_read(struct pollfd *pfd, struct buffer_if *buf, const char **emsg_out);