diff options
author | David Robillard <d@drobilla.net> | 2022-10-20 21:34:22 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-10-21 12:45:39 -0400 |
commit | 2ff624eae24742faf17889f858dbdaa6d4a064ea (patch) | |
tree | 63fff58c10051292e82bb0b031f41d8769e56629 /include/zix/common.h | |
parent | d072adfbe40e15715e2065f1900f8d5a76491c5f (diff) | |
download | zix-2ff624eae24742faf17889f858dbdaa6d4a064ea.tar.gz zix-2ff624eae24742faf17889f858dbdaa6d4a064ea.tar.bz2 zix-2ff624eae24742faf17889f858dbdaa6d4a064ea.zip |
Split up common header
Diffstat (limited to 'include/zix/common.h')
-rw-r--r-- | include/zix/common.h | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/include/zix/common.h b/include/zix/common.h deleted file mode 100644 index 788fdaa..0000000 --- a/include/zix/common.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2016-2022 David Robillard <d@drobilla.net> -// SPDX-License-Identifier: ISC - -#ifndef ZIX_COMMON_H -#define ZIX_COMMON_H - -#include "zix/attributes.h" - -#include <stdbool.h> - -/** - @defgroup zix Zix C API - @{ -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -/// A status code returned by functions -typedef enum { - ZIX_STATUS_SUCCESS, ///< Success - ZIX_STATUS_ERROR, ///< Unknown error - ZIX_STATUS_NO_MEM, ///< Out of memory - ZIX_STATUS_NOT_FOUND, ///< Not found - ZIX_STATUS_EXISTS, ///< Exists - ZIX_STATUS_BAD_ARG, ///< Bad argument - ZIX_STATUS_BAD_PERMS, ///< Bad permissions - ZIX_STATUS_REACHED_END, ///< Reached end - ZIX_STATUS_TIMEOUT, ///< Timeout - ZIX_STATUS_OVERFLOW, ///< Overflow - ZIX_STATUS_NOT_SUPPORTED, ///< Not supported - ZIX_STATUS_UNAVAILABLE, ///< Resource unavailable -} ZixStatus; - -/// Return a string describing a status code -ZIX_CONST_API -const char* -zix_strerror(ZixStatus status); - -/// Function for comparing two elements -typedef int (*ZixComparator)(const void* a, - const void* b, - const void* user_data); - -/// Function to destroy an element -typedef void (*ZixDestroyFunc)(void* ptr, const void* user_data); - -/** - @} -*/ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* ZIX_COMMON_H */ |