2014-03-29 18:53:17 +01:00
|
|
|
#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,
|
|
|
|
/**
|
2018-01-02 16:32:38 +01:00
|
|
|
* Low level error occurred, consult errno.
|
2014-03-29 18:53:17 +01:00
|
|
|
*/
|
|
|
|
UTIL_ERRNO,
|
|
|
|
/**
|
2018-01-02 16:32:38 +01:00
|
|
|
* Zlib error occurred, call gzerror for details.
|
2014-03-29 18:53:17 +01:00
|
|
|
*/
|
|
|
|
UTIL_GZERROR
|
|
|
|
} util_status_t;
|
|
|
|
|
|
|
|
const char *
|
|
|
|
util_error_string (util_status_t status);
|
|
|
|
#endif
|