diff options
Diffstat (limited to 'src/crawl/crawl.cpp')
-rwxr-xr-x | src/crawl/crawl.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/crawl/crawl.cpp b/src/crawl/crawl.cpp index 4abd37c..648060c 100755 --- a/src/crawl/crawl.cpp +++ b/src/crawl/crawl.cpp @@ -6,6 +6,7 @@ #include "URLNormalizer.hpp" #include "URLFilter.hpp" #include "TypeDetect.hpp" +#include "libcrawler.hpp" #include "ModuleLoader.hpp" @@ -55,18 +56,14 @@ BOOL WINAPI termHandler( DWORD ctrlType ) #endif -#ifdef WITH_LUA -// TODO: should be in the laoding function of libcrawl -#include "tolua.h" -#include "URLLua.hpp" -#endif - static int counter = 0; int main( int /* argc */, char *argv[] ) { try { LuaVM luaVm; + + initialize_libcrawler( (void *)&luaVm ); //Logger::instance( ).openConsoleLog( logDEBUG ); @@ -107,11 +104,6 @@ int main( int /* argc */, char *argv[] ) #endif ModuleLoader<URLNormalizer> urlNormalizers( normalizerModules, CLOSE_DEFERRED, (void *)&luaVm ); -#ifdef WITH_LUA - // TODO: should be in the laoding function of libcrawl - tolua_URL_open( luaVm.handle( ) ); -#endif - // initialize crawler function luaVm.executeFunction( "init" ); |