RetroArch
bintree.h
Go to the documentation of this file.
1 /* Copyright (C) 2010-2017 The RetroArch team
2  *
3  * ---------------------------------------------------------------------------------------
4  * The following license statement only applies to this file (bintree.h).
5  * ---------------------------------------------------------------------------------------
6  *
7  * Permission is hereby granted, free of charge,
8  * to any person obtaining a copy of this software and associated documentation files (the "Software"),
9  * to deal in the Software without restriction, including without limitation the rights to
10  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
11  * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
16  * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  */
22 
23 #ifndef __LIBRETRODB_BINTREE_H__
24 #define __LIBRETRODB_BINTREE_H__
25 
26 #include <retro_common_api.h>
27 
29 
30 typedef struct bintree bintree_t;
31 
32 typedef int (*bintree_cmp_func)(const void *a, const void *b, void *ctx);
33 typedef int (*bintree_iter_cb) (void *value, void *ctx);
34 
36 
37 int bintree_insert(bintree_t *t, void *value);
38 
39 int bintree_iterate(const bintree_t *t, bintree_iter_cb cb, void *ctx);
40 
41 void bintree_free(bintree_t *t);
42 
44 
45 #endif
bintree_cmp_func cmp
Definition: bintree.c:42
typedefRETRO_BEGIN_DECLS struct bintree bintree_t
Definition: bintree.h:30
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
int bintree_insert(bintree_t *t, void *value)
Definition: bintree.c:125
GLdouble GLdouble t
Definition: glext.h:6398
GLboolean GLboolean GLboolean b
Definition: glext.h:6844
AVFormatContext * ctx
Definition: record_ffmpeg.c:247
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
int bintree_iterate(const bintree_t *t, bintree_iter_cb cb, void *ctx)
Definition: bintree.c:130
int(* bintree_iter_cb)(void *value, void *ctx)
Definition: bintree.h:33
GLsizei const GLfloat * value
Definition: glext.h:6709
void bintree_free(bintree_t *t)
Definition: bintree.c:150
int(* bintree_cmp_func)(const void *a, const void *b, void *ctx)
Definition: bintree.h:32
bintree_t * bintree_new(bintree_cmp_func cmp, void *ctx)
Definition: bintree.c:136
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6844
Definition: bintree.c:39