Re-add /*** Pi-hole modification ***/ comments

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2022-11-26 18:13:33 +01:00
parent 7023feaccc
commit 4fdf3d9ab4
5 changed files with 35 additions and 7 deletions
+8
View File
@@ -20,7 +20,9 @@
#include "lauxlib.h"
#include "lualib.h"
/** Pi-hole modification **/
#include "ftl_lua.h"
/**************************/
#if !defined(LUA_PROGNAME)
@@ -212,7 +214,9 @@ static int dostring (lua_State *L, const char *s, const char *name) {
/*
** Receives 'globname[=modname]' and runs 'globname = require(modname)'.
*/
/************** Pi-hole modification ***************/
int dolibrary (lua_State *L, char *globname) {
/***************************************************/
int status;
char *modname = strchr(globname, '=');
if (modname == NULL) /* no explicit name? */
@@ -631,8 +635,10 @@ static int pmain (lua_State *L) {
return 0; /* error running LUA_INIT */
}
/************** Pi-hole modification ***************/
// Load and enable libraries bundled with Pi-hole
ftl_lua_init(L);
/***************************************************/
if (!runargs(L, argv, script)) /* execute arguments -e and -l */
return 0; /* something failed */
@@ -653,7 +659,9 @@ static int pmain (lua_State *L) {
}
/******* Pi-hole modification ********/
int lua_main (int argc, char **argv) {
/*************************************/
int status, result;
lua_State *L = luaL_newstate(); /* create state */
if (L == NULL) {