luafar/src/exported.c
BOOL CheckReloadDefaultScript (lua_State *L)
{
  // reload default script?
  int reload = 0;
  lua_getglobal(L, "far");
  if (lua_istable(L, -1))
  {
    lua_getfield(L, -1, "ReloadDefaultScript");
    reload = lua_toboolean(L, -1);
    lua_pop(L, 1);
  }
  lua_pop(L, 1);
  return !reload || LF_RunDefaultScript(L);
}
// return FALSE only if error occurred
return FALSE only if error occurred
return FALSE only if error occurred
BOOL CheckReloadDefaultScript (lua_State *L)
{
  int reload = 0;
  lua_getglobal(L, "far");
  if (lua_istable(L, -1))
  {
    lua_getfield(L, -1, "ReloadDefaultScript");
    reload = lua_toboolean(L, -1);
    lua_pop(L, 1);
  }
  lua_pop(L, 1);
  return !reload || LF_RunDefaultScript(L);
}
BOOL CheckReloadDefaultScript ( lua_State * L ) { int reload = 0 ; lua_getglobal ( L , " " ) ; if ( lua_istable ( L , -1 ) ) { lua_getfield ( L , -1 , " " ) ; reload = lua_toboolean ( L , -1 ) ; lua_pop ( L , 1 ) ; } lua_pop ( L , 1 ) ; return ! reload || LF_RunDefaultScript ( L ) ; }
return FALSE only if error occurred
return FALSE only if error occurred
// reload default script?