Containers
This library provides various containers. Each container has utility functions to manipulate the data it holds. This is an abstraction as to not have to manually manage and reallocate memory.
_bk_defines.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2020 Bailey Thompson
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20  * SOFTWARE.
21  */
22 
23 #ifndef BKTHOMPS_CONTAINERS_BK_DEFINES_H
24 #define BKTHOMPS_CONTAINERS_BK_DEFINES_H
25 
26 #include <stdlib.h>
27 
28 /*
29  * Cannot use <errno.h> because the C89 standard does not guarantee all
30  * of these. These are the same values as the regular linux error codes.
31  */
32 #define BK_OK 0
33 #define BK_ENOMEM 12
34 #define BK_EINVAL 22
35 #define BK_ERANGE 34
36 
37 /* Cannot use <stdbool.h> because it is C99 not C89. */
38 #define BK_FALSE 0
39 #define BK_TRUE (!BK_FALSE)
40 
41 typedef int bk_err;
42 typedef int bk_bool;
43 
44 #endif /* BKTHOMPS_CONTAINERS_BK_DEFINES_H */
int bk_err
Definition: _bk_defines.h:41
int bk_bool
Definition: _bk_defines.h:42