aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-10-08 15:57:16 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-10-08 15:57:16 -0300
commitaae16127470f266e1852dad7ad99d72e0671addc (patch)
tree42b3f8a5d504ab0b4de7efa2fd5145a2660145cf
parent8050e75f9d11362dbb2a77cfb0384870471042b6 (diff)
downloadlua-aae16127470f266e1852dad7ad99d72e0671addc.tar.gz
lua-aae16127470f266e1852dad7ad99d72e0671addc.tar.bz2
lua-aae16127470f266e1852dad7ad99d72e0671addc.zip
avoid name chash in `all.c'
-rw-r--r--loslib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/loslib.c b/loslib.c
index e52beb28..ff313def 100644
--- a/loslib.c
+++ b/loslib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: loslib.c,v 1.1 2004/07/09 15:47:48 roberto Exp roberto $ 2** $Id: loslib.c,v 1.2 2004/08/05 19:30:37 roberto Exp roberto $
3** Standard Operating System library 3** Standard Operating System library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -20,7 +20,7 @@
20#include "lualib.h" 20#include "lualib.h"
21 21
22 22
23static int pushresult (lua_State *L, int i, const char *filename) { 23static int os_pushresult (lua_State *L, int i, const char *filename) {
24 if (i) { 24 if (i) {
25 lua_pushboolean(L, 1); 25 lua_pushboolean(L, 1);
26 return 1; 26 return 1;
@@ -45,14 +45,14 @@ static int io_execute (lua_State *L) {
45 45
46static int io_remove (lua_State *L) { 46static int io_remove (lua_State *L) {
47 const char *filename = luaL_checkstring(L, 1); 47 const char *filename = luaL_checkstring(L, 1);
48 return pushresult(L, remove(filename) == 0, filename); 48 return os_pushresult(L, remove(filename) == 0, filename);
49} 49}
50 50
51 51
52static int io_rename (lua_State *L) { 52static int io_rename (lua_State *L) {
53 const char *fromname = luaL_checkstring(L, 1); 53 const char *fromname = luaL_checkstring(L, 1);
54 const char *toname = luaL_checkstring(L, 2); 54 const char *toname = luaL_checkstring(L, 2);
55 return pushresult(L, rename(fromname, toname) == 0, fromname); 55 return os_pushresult(L, rename(fromname, toname) == 0, fromname);
56} 56}
57 57
58 58