summaryrefslogtreecommitdiff
path: root/apps/plugins/imageviewer/gif/rb_glue.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/imageviewer/gif/rb_glue.h')
-rw-r--r--apps/plugins/imageviewer/gif/rb_glue.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/apps/plugins/imageviewer/gif/rb_glue.h b/apps/plugins/imageviewer/gif/rb_glue.h
new file mode 100644
index 0000000000..6cd46b0e56
--- /dev/null
+++ b/apps/plugins/imageviewer/gif/rb_glue.h
@@ -0,0 +1,44 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (c) 2012 Marcin Bukat
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
15 *
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
18 *
19 ****************************************************************************/
20
21#include "plugin.h"
22#include <tlsf.h>
23
24#undef memset
25#define memset(a,b,c) rb->memset((a),(b),(c))
26#undef memmove
27#define memmove(a,b,c) rb->memmove((a),(b),(c))
28#undef memcmp
29#define memcmp(a,b,c) rb->memcmp((a),(b),(c))
30#undef strncmp
31#define strncmp(a,b,c) rb->strncmp((a),(b),(c))
32
33#define fread(ptr, size, nmemb, stream) rb->read(stream, ptr, size*nmemb)
34#define fclose(stream) rb->close(stream)
35#define fdopen(a,b) ((a))
36
37#define malloc(a) tlsf_malloc((a))
38#define free(a) tlsf_free((a))
39#define realloc(a, b) tlsf_realloc((a),(b))
40#define calloc(a,b) tlsf_calloc((a),(b))
41
42#ifndef SIZE_MAX
43#define SIZE_MAX INT_MAX
44#endif