summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-07-11 16:17:36 +0000
committerDavid Robillard <d@drobilla.net>2016-07-11 16:17:36 +0000
commit59a5d4b884db6cd9b5b98f8aaeb0b153bdc6405a (patch)
treea55ec3187df590bbf4967f567380d019830bc7bc
parentfe5479d4709ac2d6bd699478fcab824671f60243 (diff)
downloadzix-59a5d4b884db6cd9b5b98f8aaeb0b153bdc6405a.tar.gz
zix-59a5d4b884db6cd9b5b98f8aaeb0b153bdc6405a.tar.bz2
zix-59a5d4b884db6cd9b5b98f8aaeb0b153bdc6405a.zip
Clean up headers
git-svn-id: http://svn.drobilla.net/zix/trunk@105 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
-rw-r--r--zix/btree.h3
-rw-r--r--zix/common.h23
-rw-r--r--zix/hash.h2
3 files changed, 11 insertions, 17 deletions
diff --git a/zix/btree.h b/zix/btree.h
index 2de5565..29c01d3 100644
--- a/zix/btree.h
+++ b/zix/btree.h
@@ -17,13 +17,14 @@
#ifndef ZIX_BTREE_H
#define ZIX_BTREE_H
-#include <stdbool.h>
#include <stddef.h>
#include "zix/common.h"
#ifdef __cplusplus
extern "C" {
+#else
+# include <stdbool.h>
#endif
/**
diff --git a/zix/common.h b/zix/common.h
index 8ec40a1..8c52926 100644
--- a/zix/common.h
+++ b/zix/common.h
@@ -66,24 +66,17 @@ 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";
+ 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.
*/
diff --git a/zix/hash.h b/zix/hash.h
index e6f4028..e95b773 100644
--- a/zix/hash.h
+++ b/zix/hash.h
@@ -81,7 +81,7 @@ zix_hash_size(const ZixHash* hash);
If no matching value is found, ZIX_STATUS_SUCCESS will be returned, and @p
inserted will be pointed to the copy of `value` made in the new hash node.
-
+
If a matching value already exists, ZIX_STATUS_EXISTS will be returned, and
`inserted` will be pointed to the existing value.