src/glinject/glinject.c
/*
 * Loads and executes a Lua file.
 */
Loads and executes a Lua file.
Loads and executes a Lua file .
void glinject_run_file(const char* path) {
	int status = luaL_loadfile(L, path);
	if (status) {
		fprintf(stderr, "Couldn't load file: %s\n", lua_tostring(L, -1));
		exit(EXIT_FAILURE);
	}
	int ret = lua_pcall(L, 0, 0, 0);
	if (ret != 0) {
		fprintf(stderr, "Lua error: %s\n", lua_tostring(L, -1));
		exit(EXIT_FAILURE);
	}
}
void glinject_run_file ( const char * path ) { int status = luaL_loadfile ( L , path ) ; if ( status ) { fprintf ( stderr , " \n " , lua_tostring ( L , -1 ) ) ; exit ( EXIT_FAILURE ) ; } int ret = lua_pcall ( L , 0 , 0 , 0 ) ; if ( ret != 0 ) { fprintf ( stderr , " \n " , lua_tostring ( L , -1 ) ) ; exit ( EXIT_FAILURE ) ; } }
Loads and executes a Lua file.
Loads and executes a Lua file .