diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/status.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/status.c b/src/status.c new file mode 100644 index 0000000..b932ff4 --- /dev/null +++ b/src/status.c @@ -0,0 +1,28 @@ +// Copyright 2014-2020 David Robillard <d@drobilla.net> +// SPDX-License-Identifier: ISC + +#include "zix/common.h" + +const char* +zix_strerror(const ZixStatus status) +{ + switch (status) { + case ZIX_STATUS_SUCCESS: + return "Success"; + case ZIX_STATUS_ERROR: + return "Unknown error"; + case ZIX_STATUS_NO_MEM: + return "Out of memory"; + case ZIX_STATUS_NOT_FOUND: + return "Not found"; + case ZIX_STATUS_EXISTS: + return "Exists"; + case ZIX_STATUS_BAD_ARG: + return "Bad argument"; + case ZIX_STATUS_BAD_PERMS: + return "Bad permissions"; + case ZIX_STATUS_REACHED_END: + return "Reached end"; + } + return "Unknown error"; +} |