summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/getc.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua/getc.c')
-rw-r--r--apps/plugins/lua/getc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/plugins/lua/getc.c b/apps/plugins/lua/getc.c
new file mode 100644
index 0000000000..84a280e2c2
--- /dev/null
+++ b/apps/plugins/lua/getc.c
@@ -0,0 +1,10 @@
1#include "rocklibc.h"
2
3int PREFIX(getc)(int fd)
4{
5 unsigned char c;
6 if (rb->read(fd, &c, 1))
7 return c;
8 else
9 return EOF;
10}