summaryrefslogtreecommitdiff
path: root/apps/tagdb/config.h
diff options
context:
space:
mode:
authorNiels Laukens <niobos@rockbox.org>2005-07-06 11:03:20 +0000
committerNiels Laukens <niobos@rockbox.org>2005-07-06 11:03:20 +0000
commitd1c294c17de95615b7af428da938b686830b42df (patch)
tree950080f5b6c9503c090df6e4f0929f13eae8891e /apps/tagdb/config.h
parent5e9f52f6d1f3356bc6df75a675e1a2d5cdbf9d77 (diff)
downloadrockbox-d1c294c17de95615b7af428da938b686830b42df.tar.gz
rockbox-d1c294c17de95615b7af428da938b686830b42df.zip
Initial import of tagdb
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7039 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tagdb/config.h')
-rw-r--r--apps/tagdb/config.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/apps/tagdb/config.h b/apps/tagdb/config.h
new file mode 100644
index 0000000000..86461349e3
--- /dev/null
+++ b/apps/tagdb/config.h
@@ -0,0 +1,39 @@
1#ifndef __CONFIG_H // Include me only once
2#define __CONFIG_H
3
4// DEBUGF will print in debug mode:
5#ifdef DEBUG
6#define DEBUGF(...) fprintf (stderr, __VA_ARGS__)
7#define DEBUGT(...) fprintf (stdout, __VA_ARGS__)
8#else //DEBUG
9#define DEBUGF(...)
10#endif //DEBUG
11
12
13#define OS_LINUX // architecture: LINUX, ROCKBOX, WINDOWS
14#define ROCKBOX_LITTLE_ENDIAN // we are intel... little-endian
15
16
17#ifdef ROCKBOX_LITTLE_ENDIAN
18#define BE32(_x_) ((( (_x_) & 0xff000000) >> 24) | \
19 (( (_x_) & 0x00ff0000) >> 8) | \
20 (( (_x_) & 0x0000ff00) << 8) | \
21 (( (_x_) & 0x000000ff) << 24))
22#define BE16(_x_) ( (( (_x_) & 0xff00) >> 8) | (( (_x_) & 0x00ff) << 8))
23#else
24#define BE32(_x_) _x_
25#define BE16(_x_) _x_
26#endif
27
28#include <stdint.h>
29
30#define ERR_NONE 0 // no error
31#define ERR_NOTFOUND -1 // entry not found
32#define ERR_MALLOC 1 // memory allocation failed
33#define ERR_FILE 2 // file operation failed
34#define ERR_INVALID 3 // something is invalid
35#define ERR_NO_INPLACE_UPDATE 4 // can't update in this place
36
37#include <assert.h>
38
39#endif