static int lua_curdir(lua_State *L) { int argc = lua_gettop(L); if(argc == 0) return lua_getCurrentDirectory(L); if(argc == 1) return lua_setCurrentDirectory(L); return luaL_error(L, "System.currentDirectory([file]) takes zero or one argument"); }
static int lua_curdir(lua_State *l) { int argc = lua_gettop(l); if(argc == 0) return lua_getCurrentDirectory(l); if(argc == 1) return lua_setCurrentDirectory(l); return luaL_error(l, "Argument error: System.currentDirectory([file]) takes zero or one argument."); }