From 59a5d4b884db6cd9b5b98f8aaeb0b153bdc6405a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 11 Jul 2016 16:17:36 +0000 Subject: Clean up headers git-svn-id: http://svn.drobilla.net/zix/trunk@105 df6676b4-ccc9-40e5-b5d6-7c4628a128e3 --- zix/btree.h | 3 ++- zix/common.h | 23 ++++++++--------------- zix/hash.h | 2 +- 3 files changed, 11 insertions(+), 17 deletions(-) (limited to 'zix') 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 #include #include "zix/common.h" #ifdef __cplusplus extern "C" { +#else +# include #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. -- cgit v1.2.1