/* * wswcurl_unloadlib */ static void wswcurl_unloadlib( void ) { #ifdef USE_OPENSSL #ifdef LIBCRYPTO_RUNTIME if( cryptoLibrary ) Com_UnloadLibrary( &cryptoLibrary ); #endif cryptoLibrary = NULL; #endif #ifdef LIBCURL_RUNTIME if( curlLibrary ) Com_UnloadLibrary( &curlLibrary ); #endif curlLibrary = NULL; }
/* * CL_SoundModule_Shutdown */ void CL_SoundModule_Shutdown( qboolean verbose ) { if( se && se->API() == SOUND_API_VERSION ) { se->Shutdown( verbose ); se = NULL; } Com_UnloadLibrary( &sound_library ); Mem_FreePool( &cl_soundmodulepool ); }
/* * CL_SoundModule_Shutdown */ void CL_SoundModule_Shutdown( qboolean verbose ) { if( !se ) return; se->Shutdown( verbose ); Com_UnloadLibrary( &sound_library ); Mem_FreePool( &cl_soundmodulepool ); se = NULL; }
/* * Steam_UnloadLibrary */ void Steam_UnloadLibrary( void ) { if( steamlib_libhandle ) { steamlib_export->Shutdown(); Com_UnloadLibrary( &steamlib_libhandle ); assert( !steamlib_libhandle ); Com_Printf( "Steam module unloaded.\n" ); } steamlib_export = NULL; steamlib_initialized = false; }
/* * CL_SoundModule_Shutdown */ void CL_SoundModule_Shutdown( bool verbose ) { if( !s_loaded ) { return; } s_loaded = false; if( se && se->API() == SOUND_API_VERSION ) { se->Shutdown( verbose ); se = NULL; } Com_UnloadLibrary( &sound_library ); Mem_FreePool( &cl_soundmodulepool ); }
/* * Com_LoadLibraryExt */ void *Com_LoadLibraryExt( const char *name, dllfunc_t *funcs, bool sys ) { void *lib; dllfunc_t *func; const char *fullname; if( !name || !name[0] || !funcs ) return NULL; Com_DPrintf( "LoadLibrary (%s)\n", name ); if( sys ) fullname = name; else fullname = Sys_Library_GetFullName( name ); if( !fullname ) { Com_DPrintf( "LoadLibrary (%s):(Not found)\n", name ); return NULL; } lib = Sys_Library_Open( fullname ); if( !lib ) { if( !sys ) Com_Printf( "LoadLibrary (%s):(%s)\n", fullname, Sys_Library_ErrorString() ); return NULL; } for( func = funcs; func->name; func++ ) { *( func->funcPointer ) = Sys_Library_ProcAddress( lib, func->name ); if( !( *( func->funcPointer ) ) ) { Com_UnloadLibrary( &lib ); if( sys ) return NULL; Com_Error( ERR_FATAL, "%s: Sys_GetProcAddress failed for %s", fullname, func->name ); } } return lib; }
/* * CIN_UnloadLibrary */ void CIN_UnloadLibrary( bool verbose ) { if( cin_export != NULL ) { cin_export->Shutdown( verbose ); cin_export = NULL; } if( !cin_libhandle ) { return; } assert( cin_libhandle != NULL ); Com_UnloadLibrary( &cin_libhandle ); assert( !cin_libhandle ); if( verbose ) { Com_Printf( "CIN module unloaded.\n" ); } }
/* * FTLIB_UnloadLibrary */ void FTLIB_UnloadLibrary( qboolean verbose ) { if( ftlib_export != NULL ) { ftlib_export->Shutdown( verbose ); ftlib_export = NULL; } if( !ftlib_libhandle ) { return; } assert( ftlib_libhandle != NULL ); Com_UnloadLibrary( &ftlib_libhandle ); assert( !ftlib_libhandle ); if( verbose ) { Com_Printf( "Fonts module unloaded.\n" ); } }
static void Irc_UnloadLibrary( void ) { assert( irc_libhandle ); if( irc_initialized ) { dynvar_t *const quit = Dynvar_Lookup( "quit" ); bool *c; if( !irc_connected ) irc_connected = Dynvar_Lookup( "irc_connected" ); Dynvar_GetValue( irc_connected, (void **) &c ); if( *c ) irc_export->Disconnect(); irc_export->Shutdown(); Cmd_RemoveCommand( "irc_unload" ); if( quit ) Dynvar_RemoveListener( quit, Irc_Quit_f ); irc_initialized = false; } Com_UnloadLibrary( &irc_libhandle ); assert( !irc_libhandle ); Com_Printf( "IRC module unloaded.\n" ); }
/* * Com_UnloadScriptLibrary */ static void Com_UnloadScriptLibrary( void ) { Com_UnloadLibrary( &script_library ); }