aboutsummaryrefslogtreecommitdiffstats
path: root/src/zix/common.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-09-28 17:34:07 +0000
committerDavid Robillard <d@drobilla.net>2014-09-28 17:34:07 +0000
commitfcb62b240e3f4b3a7257b6c1cd8e3b3a8cbd6d27 (patch)
treeb52ca39b387a6a0dc775d5751893a470c0aad943 /src/zix/common.h
parentbc7e103c41031a57829ada9181af056fb9ffc8f7 (diff)
downloadjalv-fcb62b240e3f4b3a7257b6c1cd8e3b3a8cbd6d27.tar.gz
jalv-fcb62b240e3f4b3a7257b6c1cd8e3b3a8cbd6d27.tar.bz2
jalv-fcb62b240e3f4b3a7257b6c1cd8e3b3a8cbd6d27.zip
Update Zix stuff.
Turns out the previous fix was already implemented long ago, along with several others, and I need to remember to update things... git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@5470 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/zix/common.h')
-rw-r--r--src/zix/common.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/zix/common.h b/src/zix/common.h
index 59e1f55..8ec40a1 100644
--- a/src/zix/common.h
+++ b/src/zix/common.h
@@ -36,8 +36,13 @@
# else
# define ZIX_API ZIX_LIB_IMPORT
# endif
+# define ZIX_PRIVATE static
+#elif defined(ZIX_INLINE)
+# define ZIX_API static inline
+# define ZIX_PRIVATE static inline
#else
# define ZIX_API
+# define ZIX_PRIVATE static
#endif
/** @endcond */
@@ -57,6 +62,28 @@ typedef enum {
ZIX_STATUS_BAD_PERMS,
} ZixStatus;
+static inline 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";
+ }
+ return "Unknown error";
+}
+
/**
Function for comparing two elements.
*/