mirror of
				https://github.com/chibicitiberiu/rainmeter-studio.git
				synced 2024-02-24 04:33:31 +00:00 
			
		
		
		
	Script: Removed various Lua functions (check LuaModifications.txt)
This commit is contained in:
		@@ -446,23 +446,23 @@ static int luaB_newproxy (lua_State *L) {
 | 
			
		||||
 | 
			
		||||
static const luaL_Reg base_funcs[] = {
 | 
			
		||||
  {"assert", luaB_assert},
 | 
			
		||||
  {"collectgarbage", luaB_collectgarbage},
 | 
			
		||||
//  {"collectgarbage", luaB_collectgarbage},
 | 
			
		||||
  {"dofile", luaB_dofile},
 | 
			
		||||
  {"error", luaB_error},
 | 
			
		||||
  {"gcinfo", luaB_gcinfo},
 | 
			
		||||
  {"getfenv", luaB_getfenv},
 | 
			
		||||
//  {"gcinfo", luaB_gcinfo},
 | 
			
		||||
//  {"getfenv", luaB_getfenv},
 | 
			
		||||
  {"getmetatable", luaB_getmetatable},
 | 
			
		||||
  {"loadfile", luaB_loadfile},
 | 
			
		||||
  {"load", luaB_load},
 | 
			
		||||
  {"loadstring", luaB_loadstring},
 | 
			
		||||
  {"next", luaB_next},
 | 
			
		||||
  {"pcall", luaB_pcall},
 | 
			
		||||
  {"print", luaB_print},
 | 
			
		||||
//  {"print", luaB_print},
 | 
			
		||||
  {"rawequal", luaB_rawequal},
 | 
			
		||||
  {"rawget", luaB_rawget},
 | 
			
		||||
  {"rawset", luaB_rawset},
 | 
			
		||||
  {"select", luaB_select},
 | 
			
		||||
  {"setfenv", luaB_setfenv},
 | 
			
		||||
//  {"setfenv", luaB_setfenv},
 | 
			
		||||
  {"setmetatable", luaB_setmetatable},
 | 
			
		||||
  {"tonumber", luaB_tonumber},
 | 
			
		||||
  {"tostring", luaB_tostring},
 | 
			
		||||
@@ -647,7 +647,7 @@ static void base_open (lua_State *L) {
 | 
			
		||||
 | 
			
		||||
LUALIB_API int luaopen_base (lua_State *L) {
 | 
			
		||||
  base_open(L);
 | 
			
		||||
  luaL_register(L, LUA_COLIBNAME, co_funcs);
 | 
			
		||||
//  luaL_register(L, LUA_COLIBNAME, co_funcs);
 | 
			
		||||
  return 2;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,13 +16,13 @@
 | 
			
		||||
 | 
			
		||||
static const luaL_Reg lualibs[] = {
 | 
			
		||||
  {"", luaopen_base},
 | 
			
		||||
  {LUA_LOADLIBNAME, luaopen_package},
 | 
			
		||||
//  {LUA_LOADLIBNAME, luaopen_package},
 | 
			
		||||
  {LUA_TABLIBNAME, luaopen_table},
 | 
			
		||||
  {LUA_IOLIBNAME, luaopen_io},
 | 
			
		||||
  {LUA_OSLIBNAME, luaopen_os},
 | 
			
		||||
  {LUA_STRLIBNAME, luaopen_string},
 | 
			
		||||
  {LUA_MATHLIBNAME, luaopen_math},
 | 
			
		||||
  {LUA_DBLIBNAME, luaopen_debug},
 | 
			
		||||
//  {LUA_DBLIBNAME, luaopen_debug},
 | 
			
		||||
  {NULL, NULL}
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -484,7 +484,7 @@ static const luaL_Reg iolib[] = {
 | 
			
		||||
  {"lines", io_lines},
 | 
			
		||||
  {"open", io_open},
 | 
			
		||||
  {"output", io_output},
 | 
			
		||||
  {"popen", io_popen},
 | 
			
		||||
//  {"popen", io_popen},
 | 
			
		||||
  {"read", io_read},
 | 
			
		||||
  {"tmpfile", io_tmpfile},
 | 
			
		||||
  {"type", io_type},
 | 
			
		||||
@@ -543,14 +543,14 @@ LUALIB_API int luaopen_io (lua_State *L) {
 | 
			
		||||
  luaL_register(L, LUA_IOLIBNAME, iolib);
 | 
			
		||||
  /* create (and set) default files */
 | 
			
		||||
  newfenv(L, io_noclose);  /* close function for default files */
 | 
			
		||||
  createstdfile(L, stdin, IO_INPUT, "stdin");
 | 
			
		||||
  createstdfile(L, stdout, IO_OUTPUT, "stdout");
 | 
			
		||||
  createstdfile(L, stderr, 0, "stderr");
 | 
			
		||||
//  createstdfile(L, stdin, IO_INPUT, "stdin");
 | 
			
		||||
//  createstdfile(L, stdout, IO_OUTPUT, "stdout");
 | 
			
		||||
//  createstdfile(L, stderr, 0, "stderr");
 | 
			
		||||
  lua_pop(L, 1);  /* pop environment for default files */
 | 
			
		||||
  lua_getfield(L, -1, "popen");
 | 
			
		||||
  newfenv(L, io_pclose);  /* create environment for 'popen' */
 | 
			
		||||
  lua_setfenv(L, -2);  /* set fenv for 'popen' */
 | 
			
		||||
  lua_pop(L, 1);  /* pop 'popen' */
 | 
			
		||||
//  lua_getfield(L, -1, "popen");
 | 
			
		||||
//  newfenv(L, io_pclose);  /* create environment for 'popen' */
 | 
			
		||||
//  lua_setfenv(L, -2);  /* set fenv for 'popen' */
 | 
			
		||||
//  lua_pop(L, 1);  /* pop 'popen' */
 | 
			
		||||
  return 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -202,14 +202,15 @@ static int os_difftime (lua_State *L) {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static int os_setlocale (lua_State *L) {
 | 
			
		||||
  static const int cat[] = {LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY,
 | 
			
		||||
                      LC_NUMERIC, LC_TIME};
 | 
			
		||||
  static const char *const catnames[] = {"all", "collate", "ctype", "monetary",
 | 
			
		||||
     "numeric", "time", NULL};
 | 
			
		||||
  const char *l = luaL_optstring(L, 1, NULL);
 | 
			
		||||
  int op = luaL_checkoption(L, 2, "all", catnames);
 | 
			
		||||
  lua_pushstring(L, setlocale(cat[op], l));
 | 
			
		||||
  return 1;
 | 
			
		||||
//  static const int cat[] = {LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY,
 | 
			
		||||
//                      LC_NUMERIC, LC_TIME};
 | 
			
		||||
//  static const char *const catnames[] = {"all", "collate", "ctype", "monetary",
 | 
			
		||||
//     "numeric", "time", NULL};
 | 
			
		||||
//  const char *l = luaL_optstring(L, 1, NULL);
 | 
			
		||||
//  int op = luaL_checkoption(L, 2, "all", catnames);
 | 
			
		||||
//  lua_pushstring(L, setlocale(cat[op], l));
 | 
			
		||||
//  return 1;
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -222,7 +223,7 @@ static const luaL_Reg syslib[] = {
 | 
			
		||||
  {"date",      os_date},
 | 
			
		||||
  {"difftime",  os_difftime},
 | 
			
		||||
  {"execute",   os_execute},
 | 
			
		||||
  {"exit",      os_exit},
 | 
			
		||||
//  {"exit",      os_exit},
 | 
			
		||||
  {"getenv",    os_getenv},
 | 
			
		||||
  {"remove",    os_remove},
 | 
			
		||||
  {"rename",    os_rename},
 | 
			
		||||
 
 | 
			
		||||
@@ -702,7 +702,7 @@ union luai_Cast { double l_d; long l_l; };
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(LUA_WIN)
 | 
			
		||||
#define LUA_DL_DLL
 | 
			
		||||
//#define LUA_DL_DLL
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user