]> git.notmuchmail.org Git - notmuch/blob - util/zlib-extra.h
cli: replace use of g_mime_message_get_date_as_string
[notmuch] / util / zlib-extra.h
1 #ifndef _ZLIB_EXTRA_H
2 #define _ZLIB_EXTRA_H
3
4 #include "util.h"
5 #include <zlib.h>
6
7 /* Like getline, but read from a gzFile. Allocation is with talloc.
8  * Returns:
9  *
10  *   UTIL_SUCCESS, UTIL_OUT_OF_MEMORY, UTIL_ERRNO, UTIL_GZERROR
11  *                      Consult util.h for description
12  *
13  *   UTIL_EOF           End of file encountered before
14  *                      any characters read
15  */
16 util_status_t
17 gz_getline (void *ctx, char **lineptr, ssize_t *bytes_read, gzFile stream);
18
19 /* return a suitable error string based on the return status
20  *  from gz_readline
21  */
22
23 const char *
24 gz_error_string (util_status_t status, gzFile stream);
25 #endif