diff options
author | Erwan Velu <erwanaliasr1@gmail.com> | 2011-02-07 21:57:20 +0100 |
---|---|---|
committer | Erwan Velu <erwanaliasr1@gmail.com> | 2011-02-07 21:57:20 +0100 |
commit | bfcd7b7305c5465eb33acca86109ca96cb37403a (patch) | |
tree | 082568fb50331c3ed6e83714f12084d3bae4d525 /com32/lua/src/liolib.c | |
parent | 04053040997dfb22e104cb4c1ff3048d87994ad4 (diff) | |
download | syslinux-bfcd7b7305c5465eb33acca86109ca96cb37403a.tar.gz |
lua: Updating to 5.1.4
Updating base code to 5.1.4
Adding -DSYSLINUX build flag
Moving #if 0 to ifndef SYSLINUX
Diffstat (limited to 'com32/lua/src/liolib.c')
-rw-r--r-- | com32/lua/src/liolib.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/com32/lua/src/liolib.c b/com32/lua/src/liolib.c index d979f45f..9efa75f4 100644 --- a/com32/lua/src/liolib.c +++ b/com32/lua/src/liolib.c @@ -180,7 +180,7 @@ static int io_popen (lua_State *L) { } -#if 0 +#ifndef SYSLINUX static int io_tmpfile (lua_State *L) { FILE **pf = newfile(L); *pf = tmpfile(); @@ -271,7 +271,7 @@ static int io_lines (lua_State *L) { ** ======================================================= */ -#if 0 +#ifndef SYSLINUX static int read_number (lua_State *L, FILE *f) { lua_Number d; if (fscanf(f, LUA_NUMBER_SCAN, &d) == 1) { @@ -312,7 +312,7 @@ static int read_line (lua_State *L, FILE *f) { } } -#if 0 /* Not used */ +#ifndef SYSLINUX /* Not used */ static int read_chars (lua_State *L, FILE *f, size_t n) { size_t rlen; /* how much to read */ size_t nr; /* number of chars actually read */ @@ -329,9 +329,7 @@ static int read_chars (lua_State *L, FILE *f, size_t n) { luaL_pushresult(&b); /* close buffer */ return (n == 0 || lua_objlen(L, -1) > 0); } -#endif -#if 0 static int g_read (lua_State *L, FILE *f, int first) { int nargs = lua_gettop(L) - 1; int success; @@ -440,7 +438,7 @@ static int f_write (lua_State *L) { return g_write(L, tofile(L), 2); } -#if 0 +#ifndef SYSLINUX static int f_seek (lua_State *L) { static const int mode[] = {SEEK_SET, SEEK_CUR, SEEK_END}; static const char *const modenames[] = {"set", "cur", "end", NULL}; @@ -455,10 +453,8 @@ static int f_seek (lua_State *L) { return 1; } } -#endif -#if 0 static int f_setvbuf (lua_State *L) { static const int mode[] = {_IONBF, _IOFBF, _IOLBF}; static const char *const modenames[] = {"no", "full", "line", NULL}; @@ -489,8 +485,10 @@ static const luaL_Reg iolib[] = { {"open", io_open}, {"output", io_output}, {"popen", io_popen}, -/* {"read", io_read}, */ -/* {"tmpfile", io_tmpfile}, */ +#ifndef SYSLINUX + {"read", io_read}, + {"tmpfile", io_tmpfile}, +#endif {"type", io_type}, {"write", io_write}, {NULL, NULL} @@ -501,9 +499,11 @@ static const luaL_Reg flib[] = { {"close", io_close}, {"flush", f_flush}, {"lines", f_lines}, -/* {"read", f_read}, */ -/* {"seek", f_seek}, */ -/* {"setvbuf", f_setvbuf}, */ +#ifndef SYSLINUX + {"read", f_read}, + {"seek", f_seek}, + {"setvbuf", f_setvbuf}, +#endif {"write", f_write}, {"__gc", io_gc}, {"__tostring", io_tostring}, |