summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/rocklibc.h
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-05-21 19:01:41 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-05-21 19:01:41 +0000
commitcf87597226f5d6b269f1f2c4d6f402aa1eccb852 (patch)
tree4ba1f3ae53b3bd9cae0e2c6c4dd57836b43a5ece /apps/plugins/lua/rocklibc.h
parentc483efadc63eaed35b5fb5e4e02c2282daf32470 (diff)
downloadrockbox-cf87597226f5d6b269f1f2c4d6f402aa1eccb852.tar.gz
rockbox-cf87597226f5d6b269f1f2c4d6f402aa1eccb852.zip
Commit FS#9174: Lua scripting language by Dan Everton
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21020 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/lua/rocklibc.h')
-rw-r--r--apps/plugins/lua/rocklibc.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/apps/plugins/lua/rocklibc.h b/apps/plugins/lua/rocklibc.h
new file mode 100644
index 0000000000..78b83a6c18
--- /dev/null
+++ b/apps/plugins/lua/rocklibc.h
@@ -0,0 +1,45 @@
1
2/***************************************************************************
3 * __________ __ ___.
4 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
5 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
6 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
7 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
8 * \/ \/ \/ \/ \/
9 * $Id$
10 *
11 * Copyright (C) 2008 Dan Everton (safetydan)
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 ****************************************************************************/
22
23#ifndef _ROCKLIBC_H_
24#define _ROCKLIBC_H_
25
26#include <ctype.h>
27#include "plugin.h"
28
29#ifdef SIMULATOR
30#include <errno.h>
31#else
32extern int errno;
33#define EINVAL 22 /* Invalid argument */
34#define ERANGE 34 /* Math result not representable */
35#endif
36
37#define __likely LIKELY
38#define __unlikely UNLIKELY
39
40/* Simple substitutions */
41#define memcmp rb->memcmp
42#define strlen rb->strlen
43
44#endif /* _ROCKLIBC_H_ */
45