]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
sys: Rename Sys_UnloadLibrary to Sys_FreeLibrary for consistency
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 6 Mar 2021 12:03:21 +0000 (12:03 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 6 Mar 2021 12:03:21 +0000 (12:03 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@13095 d7cf8633-e32d-0410-b094-e92efae38249

14 files changed:
av_backend_libav.c
cap_ogg.c
cl_video_libavw.c
crypto.c
fs.c
ft2.c
image_png.c
jpeg.c
libcurl.c
snd_ogg.c
snd_xmp.c
sys.h
sys_shared.c
world.c

index 36bfbdf433b0b70e0b32185c29055ec24d854402..db9f5609d1bf9bdca51f5a3d01c19da46cabb825 100644 (file)
@@ -294,7 +294,7 @@ qbool LibAV_LoadLibrary(void)
                if(Sys_LoadLibrary(dllnames_libavformat, &libavformat_dll, libavformatfuncs))
                        return true;
                Con_Printf(CON_ERROR "Failed to load the libavformat library. Cannot use libavcodec without it\n");
-               Sys_UnloadLibrary(&libavcodec_dll);
+               Sys_FreeLibrary(&libavcodec_dll);
        }
 
        return false;
index 16802dc92e2590566ef0a125355fde1c43e10c23..0a0c1634338e017384a9f46c9b2aa74995495bbf 100644 (file)
--- a/cap_ogg.c
+++ b/cap_ogg.c
@@ -596,10 +596,10 @@ qbool SCR_CaptureVideo_Ogg_Available(void)
 
 void SCR_CaptureVideo_Ogg_CloseDLL(void)
 {
-       Sys_UnloadLibrary (&ve_dll);
-       Sys_UnloadLibrary (&vo_dll);
-       Sys_UnloadLibrary (&th_dll);
-       Sys_UnloadLibrary (&og_dll);
+       Sys_FreeLibrary (&ve_dll);
+       Sys_FreeLibrary (&vo_dll);
+       Sys_FreeLibrary (&th_dll);
+       Sys_FreeLibrary (&og_dll);
 }
 
 // this struct should not be needed
index 10e4756246aaa7387388081bd1463dbda59a6859..f85148a8eda53870f798f0803037a16884d9708f 100644 (file)
@@ -372,7 +372,7 @@ qbool LibAvW_OpenLibrary(void)
        if ((errorcode = qLibAvW_Init(&libavw_message)))
        {
                Con_Printf(CON_ERROR "LibAvW failed to initialize: %s\n", qLibAvW_ErrorString(errorcode));
-               Sys_UnloadLibrary(&libavw_dll);
+               Sys_FreeLibrary(&libavw_dll);
        }
 
        Cvar_RegisterVariable(&cl_video_libavw_minwidth);
@@ -384,5 +384,5 @@ qbool LibAvW_OpenLibrary(void)
 
 void LibAvW_CloseLibrary(void)
 {
-       Sys_UnloadLibrary(&libavw_dll);
+       Sys_FreeLibrary(&libavw_dll);
 }
index cb241efd0c897debcf37c4d13f0a103ef6278948..af34b385c819fa6269e9e2c157e442b612d3eb05 100644 (file)
--- a/crypto.c
+++ b/crypto.c
@@ -284,7 +284,7 @@ static qbool Crypto_OpenLibrary (void)
 
 static void Crypto_CloseLibrary (void)
 {
-       Sys_UnloadLibrary (&d0_blind_id_dll);
+       Sys_FreeLibrary (&d0_blind_id_dll);
 }
 
 #endif
@@ -353,7 +353,7 @@ static qbool Crypto_Rijndael_OpenLibrary (void)
 
 static void Crypto_Rijndael_CloseLibrary (void)
 {
-       Sys_UnloadLibrary (&d0_rijndael_dll);
+       Sys_FreeLibrary (&d0_rijndael_dll);
 }
 
 #endif
diff --git a/fs.c b/fs.c
index 269490744ab7aacb7fdc3e6a250701f2546de8bb..58e9de4ba2828ebd21d5868778db6375682e86f4 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -495,7 +495,7 @@ Unload the Zlib DLL
 static void PK3_CloseLibrary (void)
 {
 #ifndef LINK_TO_ZLIB
-       Sys_UnloadLibrary (&zlib_dll);
+       Sys_FreeLibrary (&zlib_dll);
 #endif
 }
 
@@ -2218,9 +2218,9 @@ void FS_Shutdown (void)
        PK3_CloseLibrary ();
 
 #ifdef WIN32
-       Sys_UnloadLibrary (&shfolder_dll);
-       Sys_UnloadLibrary (&shell32_dll);
-       Sys_UnloadLibrary (&ole32_dll);
+       Sys_FreeLibrary (&shfolder_dll);
+       Sys_FreeLibrary (&shell32_dll);
+       Sys_FreeLibrary (&ole32_dll);
 #endif
 
        if (fs_mutex)
diff --git a/ft2.c b/ft2.c
index 0b738108edce2055dcc64fdebf4ed9506ab0f95c..2df99bcb3700d803ff834671eb5658a712b96ae5 100644 (file)
--- a/ft2.c
+++ b/ft2.c
@@ -327,7 +327,7 @@ void Font_CloseLibrary (void)
                font_ft2lib = NULL;
        }
 #ifndef DP_FREETYPE_STATIC
-       Sys_UnloadLibrary (&ft2_dll);
+       Sys_FreeLibrary (&ft2_dll);
 #endif
        pp.buf = NULL;
 }
index 5562cedaf7f275194db882857224c611971c5329..f7db48aad8bb8db9e37214584d7c247aa1e5b421 100644 (file)
@@ -177,7 +177,7 @@ qbool PNG_OpenLibrary (void)
        if(qpng_access_version_number() / 100 >= 104)
                if(!Sys_LoadLibrary (dllnames, &png14_dll, png14funcs))
                {
-                       Sys_UnloadLibrary (&png_dll);
+                       Sys_FreeLibrary (&png_dll);
                        return false;
                }
        return true;
@@ -193,8 +193,8 @@ Unload the PNG DLL
 */
 void PNG_CloseLibrary (void)
 {
-       Sys_UnloadLibrary (&png14_dll);
-       Sys_UnloadLibrary (&png_dll);
+       Sys_FreeLibrary (&png14_dll);
+       Sys_FreeLibrary (&png_dll);
 }
 
 /*
diff --git a/jpeg.c b/jpeg.c
index 8d6ceec2376cb21fa50d5257e18b31266b8023b0..1e247a66b7a0451f405328bc5c65691ac4144fbd 100644 (file)
--- a/jpeg.c
+++ b/jpeg.c
@@ -538,7 +538,7 @@ Unload the JPEG DLL
 void JPEG_CloseLibrary (void)
 {
 #ifndef LINK_TO_LIBJPEG
-       Sys_UnloadLibrary (&jpeg_dll);
+       Sys_FreeLibrary (&jpeg_dll);
        jpeg_tried_loading = false; // allow retry
 #endif
 }
index 9373d21a2c7a5980b221dbad961ce7cb864e64bd..cd6d8279ddd7a14de3cbfc318c56ce2cf602b988 100644 (file)
--- a/libcurl.c
+++ b/libcurl.c
@@ -390,7 +390,7 @@ Unload the cURL DLL
 */
 static void CURL_CloseLibrary (void)
 {
-       Sys_UnloadLibrary (&curl_dll);
+       Sys_FreeLibrary (&curl_dll);
 }
 
 
index 540966d4c9fd716baea0a2f4123f322c12df4502..39c09b5b2158ff732f4c1e2d1094a872dae417fb 100644 (file)
--- a/snd_ogg.c
+++ b/snd_ogg.c
@@ -319,8 +319,8 @@ Unload the VorbisFile DLL
 */
 void OGG_CloseLibrary (void)
 {
-       Sys_UnloadLibrary (&vf_dll);
-       Sys_UnloadLibrary (&vo_dll);
+       Sys_FreeLibrary (&vf_dll);
+       Sys_FreeLibrary (&vo_dll);
 }
 
 #endif
index 85a58ef8d06eea71df0281eaaad1312d02f6b27d..6be0bfe566067f16b669faa3246a8acfbc2673e1 100644 (file)
--- a/snd_xmp.c
+++ b/snd_xmp.c
@@ -376,7 +376,7 @@ qbool XMP_OpenLibrary (void)
                if (*qxmp_vercode < 0x040200)
                {
                        Con_Printf("Found incompatible XMP library version %s, not loading. (4.2.0 or higher required)\n", *qxmp_version);
-                       Sys_UnloadLibrary (&xmp_dll);
+                       Sys_FreeLibrary (&xmp_dll);
                        return false;
                }
                if (developer_loading.integer >= 1)
@@ -397,7 +397,7 @@ Unload the libxmp DLL
 */
 void XMP_CloseLibrary (void)
 {
-       Sys_UnloadLibrary (&xmp_dll);
+       Sys_FreeLibrary (&xmp_dll);
 }
 
 #endif
diff --git a/sys.h b/sys.h
index df7e81ae25c288e723027ae64b05dff9f9d462c8..b606315d70e241c4cb638ed9623eb4be1e5002b3 100644 (file)
--- a/sys.h
+++ b/sys.h
@@ -179,7 +179,7 @@ qbool Sys_LoadSelf(dllhandle_t *handle);
  * \param fcts
  */
 qbool Sys_LoadLibrary (const char** dllnames, dllhandle_t* handle, const dllfunction_t *fcts);
-void Sys_UnloadLibrary (dllhandle_t* handle);
+void Sys_FreeLibrary (dllhandle_t* handle);
 void* Sys_GetProcAddress (dllhandle_t handle, const char* name);
 
 int Sys_CheckParm (const char *parm);
index 2149dff6c71e8c0a3f1f81e1b307f3861c0d6bc4..985af9034138fc7f7b802c8696ad8f5352a20ea9 100644 (file)
@@ -151,7 +151,7 @@ qbool Sys_LoadLibrary (const char** dllnames, dllhandle_t* handle, const dllfunc
                return true;
        }
        else
-               Sys_UnloadLibrary(&dllhandle);
+               Sys_FreeLibrary(&dllhandle);
 notfound:
 #endif
 #endif
@@ -181,7 +181,7 @@ notfound:
                if (Sys_LoadLibraryFunctions(dllhandle, fcts, true, (dllnames[i+1] != NULL) || (strrchr(sys.argv[0], '/'))))
                        break;
                else
-                       Sys_UnloadLibrary (&dllhandle);
+                       Sys_FreeLibrary (&dllhandle);
        }
 
        // see if the names can be loaded relative to the executable path
@@ -205,7 +205,7 @@ notfound:
                        if (Sys_LoadLibraryFunctions(dllhandle, fcts, true, dllnames[i+1] != NULL))
                                break;
                        else
-                               Sys_UnloadLibrary (&dllhandle);
+                               Sys_FreeLibrary (&dllhandle);
                }
        }
 
@@ -226,7 +226,7 @@ notfound:
 #endif
 }
 
-void Sys_UnloadLibrary (dllhandle_t* handle)
+void Sys_FreeLibrary (dllhandle_t* handle)
 {
 #ifdef SUPPORTDLL
        if (handle == NULL || *handle == NULL)
diff --git a/world.c b/world.c
index 42ed670d05665b3c6d4ee13de09e192fbb2e34c4..76ef3a7a2770f22988a23cfc1f0e061d36247cc1 100644 (file)
--- a/world.c
+++ b/world.c
@@ -1539,7 +1539,7 @@ static void World_Physics_Init(void)
 # else
                        Con_Printf("ODE library not compiled for double precision - incompatible!  Not using ODE physics.\n");
 # endif
-                       Sys_UnloadLibrary(&ode_dll);
+                       Sys_FreeLibrary(&ode_dll);
                        ode_dll = NULL;
                }
                else
@@ -1565,7 +1565,7 @@ static void World_Physics_Shutdown(void)
        {
                dCloseODE();
 #ifndef LINK_TO_LIBODE
-               Sys_UnloadLibrary(&ode_dll);
+               Sys_FreeLibrary(&ode_dll);
                ode_dll = NULL;
 #endif
        }