28 lines
625 B
C
28 lines
625 B
C
#ifndef IVY_COMMON_STATUS_H_
|
|
#define IVY_COMMON_STATUS_H_
|
|
|
|
#include <ivy/misc.h>
|
|
|
|
enum b_status;
|
|
|
|
enum ivy_status {
|
|
IVY_OK = 0,
|
|
IVY_ERR_EOF = -1,
|
|
IVY_ERR_IO_FAILURE = -2,
|
|
IVY_ERR_BAD_SYNTAX = -3,
|
|
IVY_ERR_NO_MEMORY = -4,
|
|
IVY_ERR_NOT_SUPPORTED = -5,
|
|
IVY_ERR_INTERNAL_FAILURE = -6,
|
|
IVY_ERR_BAD_STATE = -7,
|
|
IVY_ERR_INVALID_VALUE = -8,
|
|
IVY_ERR_NO_ENTRY = -9,
|
|
IVY_ERR_NAME_EXISTS = -10,
|
|
IVY_ERR_BAD_FORMAT = -11,
|
|
};
|
|
|
|
IVY_API const char *ivy_status_to_string(enum ivy_status status);
|
|
IVY_API enum ivy_status ivy_status_from_b_status(enum b_status status);
|
|
IVY_API enum ivy_status ivy_status_from_errno(int err);
|
|
|
|
#endif
|