From d1c294c17de95615b7af428da938b686830b42df Mon Sep 17 00:00:00 2001 From: Niels Laukens Date: Wed, 6 Jul 2005 11:03:20 +0000 Subject: Initial import of tagdb git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7039 a1c6a512-1295-4272-9138-f99709370657 --- apps/tagdb/config.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 apps/tagdb/config.h (limited to 'apps/tagdb/config.h') 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 @@ +#ifndef __CONFIG_H // Include me only once +#define __CONFIG_H + +// DEBUGF will print in debug mode: +#ifdef DEBUG +#define DEBUGF(...) fprintf (stderr, __VA_ARGS__) +#define DEBUGT(...) fprintf (stdout, __VA_ARGS__) +#else //DEBUG +#define DEBUGF(...) +#endif //DEBUG + + +#define OS_LINUX // architecture: LINUX, ROCKBOX, WINDOWS +#define ROCKBOX_LITTLE_ENDIAN // we are intel... little-endian + + +#ifdef ROCKBOX_LITTLE_ENDIAN +#define BE32(_x_) ((( (_x_) & 0xff000000) >> 24) | \ + (( (_x_) & 0x00ff0000) >> 8) | \ + (( (_x_) & 0x0000ff00) << 8) | \ + (( (_x_) & 0x000000ff) << 24)) +#define BE16(_x_) ( (( (_x_) & 0xff00) >> 8) | (( (_x_) & 0x00ff) << 8)) +#else +#define BE32(_x_) _x_ +#define BE16(_x_) _x_ +#endif + +#include + +#define ERR_NONE 0 // no error +#define ERR_NOTFOUND -1 // entry not found +#define ERR_MALLOC 1 // memory allocation failed +#define ERR_FILE 2 // file operation failed +#define ERR_INVALID 3 // something is invalid +#define ERR_NO_INPLACE_UPDATE 4 // can't update in this place + +#include + +#endif -- cgit v1.2.3