diff options
Diffstat (limited to 'src/modl.cpp')
| -rw-r--r-- | src/modl.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/modl.cpp b/src/modl.cpp index f3b1e74..aa7630a 100644 --- a/src/modl.cpp +++ b/src/modl.cpp @@ -37,6 +37,10 @@ using namespace std; modl::modl() { +#ifdef NCURSES + print_cached( 0 ); +#endif + if ( wrap::CONF->get_elem( "httpd.modules.preloadcommands" ).compare( "true" ) == 0 ) preload_modules( wrap::CONF->get_elem("httpd.modules.commandsdir") ); @@ -124,6 +128,11 @@ modl::cache_module( string s_name, bool b_print_sys_msg ) // DO NOT CLOSE AS LONG THERE EXIST A POINTER TO THE FUNCTION // dlclose( module ); will be called in modl::~modl()! +#ifdef NCURSES + + print_cached( size() ); +#endif + return mod; } @@ -154,6 +163,11 @@ modl::unload_modules() // then clean the hash map. shashmap<dynmod*>::clear(); +#ifdef NCURSES + + print_cached( size() ); +#endif + } void @@ -166,4 +180,16 @@ modl::reload_modules() preload_modules( wrap::CONF->get_elem("httpd.modules.htmldir") ); } +#ifdef NCURSES +void +modl::print_cached( int i_mods ) +{ + if ( !wrap::NCUR->is_ready() ) + return; + + mvprintw( NCUR_CACHED_MODS_X, NCUR_CACHED_MODS_Y, "Mods: %d ", i_mods); + refresh(); +} +#endif + #endif |
