mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-01 07:04:10 +01:00
85d9219a62
The idea is to provide a more or less drop in replacement for readline to read from zlib/gzip streams. Take the opportunity to replace malloc with talloc.
29 lines
516 B
C
29 lines
516 B
C
#ifndef _UTIL_H
|
|
#define _UTIL_H
|
|
|
|
typedef enum util_status {
|
|
/**
|
|
* No error occurred.
|
|
*/
|
|
UTIL_SUCCESS = 0,
|
|
/**
|
|
* Out of memory.
|
|
*/
|
|
UTIL_OUT_OF_MEMORY,
|
|
/**
|
|
* End of stream reached while attempting to read.
|
|
*/
|
|
UTIL_EOF,
|
|
/**
|
|
* Low level error occured, consult errno.
|
|
*/
|
|
UTIL_ERRNO,
|
|
/**
|
|
* Zlib error occured, call gzerror for details.
|
|
*/
|
|
UTIL_GZERROR
|
|
} util_status_t;
|
|
|
|
const char *
|
|
util_error_string (util_status_t status);
|
|
#endif
|