[Libreoffice-commits] core.git: 4 commits - sal/osl

Chris Sherlock chris.sherlock79 at gmail.com
Sat Jul 22 09:57:35 UTC 2017


 sal/osl/w32/module.cxx      |   43 +++++--------------------------------------
 sal/osl/w32/mutex.cxx       |   19 -------------------
 sal/osl/w32/nlsupport.cxx   |   12 ------------
 sal/osl/w32/path_helper.cxx |   20 --------------------
 4 files changed, 5 insertions(+), 89 deletions(-)

New commits:
commit 91d37dfd5186e1cd4a9a06a88078ed9ca24bbba8
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sat Jul 22 19:56:34 2017 +1000

    osl: get rid of comment cruft in w32 path_helper.cxx
    
    Change-Id: I111c8b4e39fc9f1dd894979ff6fb5e98659182d1

diff --git a/sal/osl/w32/path_helper.cxx b/sal/osl/w32/path_helper.cxx
index a15d8bb346ed..c9fb14b00a94 100644
--- a/sal/osl/w32/path_helper.cxx
+++ b/sal/osl/w32/path_helper.cxx
@@ -17,10 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-/*******************************************************************
- Includes
- ******************************************************************/
-
 #include "path_helper.hxx"
 #include <osl/diagnose.h>
 #include <rtl/ustring.hxx>
@@ -28,17 +24,9 @@
 #include <algorithm>
 #include <wchar.h>
 
-/*******************************************************************
- Constants
- ******************************************************************/
-
 const rtl::OUString BACKSLASH ("\\");
 const rtl::OUString SLASH     ("/");
 
-/*******************************************************************
- osl_systemPathEnsureSeparator
- ******************************************************************/
-
 void osl_systemPathEnsureSeparator(/*inout*/ rtl_uString** ppustrPath)
 {
     OSL_PRECOND(ppustrPath && (nullptr != *ppustrPath),
@@ -58,10 +46,6 @@ void osl_systemPathEnsureSeparator(/*inout*/ rtl_uString** ppustrPath)
                  "osl_systemPathEnsureSeparator: Post condition failed");
 }
 
-/*******************************************************************
- osl_systemPathRemoveSeparator
- ******************************************************************/
-
 void SAL_CALL osl_systemPathRemoveSeparator(/*inout*/ rtl_uString** ppustrPath)
 {
     rtl::OUString path(*ppustrPath);
@@ -78,10 +62,6 @@ void SAL_CALL osl_systemPathRemoveSeparator(/*inout*/ rtl_uString** ppustrPath)
     }
 }
 
-/*******************************************************************
- osl_is_logical_drive_pattern
- ******************************************************************/
-
 // is [A-Za-z]:[/|\]\0
 const sal_Char* const LDP                = ":";
 const sal_Char* const LDP_WITH_BACKSLASH = ":\\";
commit 606b682a2ca5636b21bb934d74046eb90b79aa0f
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sat Jul 22 19:55:18 2017 +1000

    osl: get rid of comment cruft in w32 nlsupport.cxx
    
    Change-Id: I530537cb897c21ad4c219a3125d97b97429584a8

diff --git a/sal/osl/w32/nlsupport.cxx b/sal/osl/w32/nlsupport.cxx
index d1cd73800963..1ca7f6b31d1c 100644
--- a/sal/osl/w32/nlsupport.cxx
+++ b/sal/osl/w32/nlsupport.cxx
@@ -129,10 +129,6 @@ BOOL CALLBACK EnumLocalesProcA( LPSTR lpLocaleStringA )
     return TRUE;
 }
 
-/*****************************************************************************
- * GetTextEncodingFromLCID
- *****************************************************************************/
-
 rtl_TextEncoding GetTextEncodingFromLCID( LCID localeId )
 {
     rtl_TextEncoding Encoding = RTL_TEXTENCODING_DONTKNOW;
@@ -160,10 +156,6 @@ rtl_TextEncoding GetTextEncodingFromLCID( LCID localeId )
     return Encoding;
 }
 
-/*****************************************************************************
- * osl_getTextEncodingFromLocale
- *****************************************************************************/
-
 rtl_TextEncoding SAL_CALL osl_getTextEncodingFromLocale( rtl_Locale * pLocale )
 {
     struct EnumLocalesParams params = { L"", L"", 0 };
@@ -207,10 +199,6 @@ rtl_TextEncoding SAL_CALL osl_getTextEncodingFromLocale( rtl_Locale * pLocale )
     return RTL_TEXTENCODING_DONTKNOW;
 }
 
-/*****************************************************************************
- * imp_getProcessLocale
- *****************************************************************************/
-
 void imp_getProcessLocale( rtl_Locale ** ppLocale )
 {
     WCHAR langCode[ELP_LANGUAGE_FIELD_LENGTH];
commit e0b6a4a2d2dec4e9614f27fc03f84b1c578028ec
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sat Jul 22 19:54:16 2017 +1000

    osl: get rid of comment cruft in w32 mutex.cxx
    
    Change-Id: I8ca5a16d0d7bdedf8a8c5685e088043566bab8eb

diff --git a/sal/osl/w32/mutex.cxx b/sal/osl/w32/mutex.cxx
index b3b46460c97d..95aca0ce5cef 100644
--- a/sal/osl/w32/mutex.cxx
+++ b/sal/osl/w32/mutex.cxx
@@ -31,9 +31,6 @@
     CRITICAL_SECTION structure.
 */
 
-/*****************************************************************************/
-/* osl_createMutex */
-/*****************************************************************************/
 oslMutex SAL_CALL osl_createMutex(void)
 {
     CRITICAL_SECTION *pMutexImpl;
@@ -47,9 +44,6 @@ oslMutex SAL_CALL osl_createMutex(void)
     return reinterpret_cast<oslMutex>(pMutexImpl);
 }
 
-/*****************************************************************************/
-/* osl_destroyMutex */
-/*****************************************************************************/
 void SAL_CALL osl_destroyMutex(oslMutex Mutex)
 {
     CRITICAL_SECTION *pMutexImpl = reinterpret_cast<CRITICAL_SECTION *>(Mutex);
@@ -61,9 +55,6 @@ void SAL_CALL osl_destroyMutex(oslMutex Mutex)
     }
 }
 
-/*****************************************************************************/
-/* osl_acquireMutex */
-/*****************************************************************************/
 sal_Bool SAL_CALL osl_acquireMutex(oslMutex Mutex)
 {
     CRITICAL_SECTION *pMutexImpl = reinterpret_cast<CRITICAL_SECTION *>(Mutex);
@@ -75,9 +66,6 @@ sal_Bool SAL_CALL osl_acquireMutex(oslMutex Mutex)
     return true;
 }
 
-/*****************************************************************************/
-/* osl_tryToAcquireMutex */
-/*****************************************************************************/
 sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex Mutex)
 {
     CRITICAL_SECTION *pMutexImpl = reinterpret_cast<CRITICAL_SECTION *>(Mutex);
@@ -87,9 +75,6 @@ sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutex Mutex)
     return TryEnterCriticalSection(pMutexImpl) != FALSE;
 }
 
-/*****************************************************************************/
-/* osl_releaseMutex */
-/*****************************************************************************/
 sal_Bool SAL_CALL osl_releaseMutex(oslMutex Mutex)
 {
     CRITICAL_SECTION *pMutexImpl = reinterpret_cast<CRITICAL_SECTION *>(Mutex);
@@ -101,10 +86,6 @@ sal_Bool SAL_CALL osl_releaseMutex(oslMutex Mutex)
     return true;
 }
 
-/*****************************************************************************/
-/* osl_getGlobalMutex */
-/*****************************************************************************/
-
 /* initialized in dllentry.c */
 oslMutex g_Mutex;
 
commit 194ba0845ef64272108c771ea37179638317d2ae
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Sat Jul 22 19:53:05 2017 +1000

    osl: get rid of comment cruft in w32 module.cxx
    
    Change-Id: I7cbad67d06942257800403d2d5530e272d33ebb9

diff --git a/sal/osl/w32/module.cxx b/sal/osl/w32/module.cxx
index 317d4820ae05..795a9bf05e8f 100644
--- a/sal/osl/w32/module.cxx
+++ b/sal/osl/w32/module.cxx
@@ -34,9 +34,6 @@
     as a WIN32 HANDLE (which is also a 32-bit value)
 */
 
-/*****************************************************************************/
-/* osl_loadModule */
-/*****************************************************************************/
 oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 /*nRtldMode*/ )
 {
     HMODULE h;
@@ -61,11 +58,11 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 /*nRtldM
         h = LoadLibraryExW(reinterpret_cast<LPCWSTR>(Module->buffer), nullptr,
                                   LOAD_WITH_ALTERED_SEARCH_PATH);
 
-    //In case of long path names (\\?\c:\...) try to shorten the filename.
-    //LoadLibrary cannot handle file names which exceed 260 letters.
-    //In case the path is to long, the function will fail. However, the error
-    //code can be different. For example, it returned  ERROR_FILENAME_EXCED_RANGE
-    //on Windows XP and ERROR_INSUFFICIENT_BUFFER on Windows 7 (64bit)
+    // In case of long path names (\\?\c:\...) try to shorten the filename.
+    // LoadLibrary cannot handle file names which exceed 260 letters.
+    // In case the path is to long, the function will fail. However, the error
+    // code can be different. For example, it returned  ERROR_FILENAME_EXCED_RANGE
+    // on Windows XP and ERROR_INSUFFICIENT_BUFFER on Windows 7 (64bit)
     if (h == nullptr && Module->length > 260)
     {
         std::vector<WCHAR> vec(Module->length + 1);
@@ -90,9 +87,6 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 /*nRtldM
     return ret;
 }
 
-/*****************************************************************************/
-/* osl_loadModuleAscii */
-/*****************************************************************************/
 oslModule SAL_CALL osl_loadModuleAscii(const sal_Char *pModuleName, sal_Int32 )
 {
     HMODULE h;
@@ -119,10 +113,6 @@ oslModule osl_loadModuleRelativeAscii(
     return osl_loadModuleAscii(relativePath, mode); //TODO: FIXME
 }
 
-/*****************************************************************************/
-/* osl_getModuleHandle */
-/*****************************************************************************/
-
 sal_Bool SAL_CALL
 osl_getModuleHandle(rtl_uString *pModuleName, oslModule *pResult)
 {
@@ -137,17 +127,11 @@ osl_getModuleHandle(rtl_uString *pModuleName, oslModule *pResult)
     return false;
 }
 
-/*****************************************************************************/
-/* osl_unloadModule */
-/*****************************************************************************/
 void SAL_CALL osl_unloadModule(oslModule Module)
 {
     FreeLibrary(static_cast<HMODULE>(Module));
 }
 
-/*****************************************************************************/
-/* osl_getSymbol */
-/*****************************************************************************/
 void* SAL_CALL osl_getSymbol(oslModule Module, rtl_uString *strSymbolName)
 {
     /* casting from a function pointer to a data pointer is invalid
@@ -164,9 +148,6 @@ void* SAL_CALL osl_getSymbol(oslModule Module, rtl_uString *strSymbolName)
 #endif
 }
 
-/*****************************************************************************/
-/* osl_getFunctionSymbol */
-/*****************************************************************************/
 oslGenericFunction SAL_CALL osl_getFunctionSymbol( oslModule Module, rtl_uString *strSymbolName )
 {
     rtl_String *symbolName = nullptr;
@@ -189,9 +170,6 @@ oslGenericFunction SAL_CALL osl_getFunctionSymbol( oslModule Module, rtl_uString
     return address;
 }
 
-/*****************************************************************************/
-/* osl_getAsciiFunctionSymbol */
-/*****************************************************************************/
 oslGenericFunction SAL_CALL
 osl_getAsciiFunctionSymbol( oslModule Module, const sal_Char *pSymbol )
 {
@@ -204,10 +182,6 @@ osl_getAsciiFunctionSymbol( oslModule Module, const sal_Char *pSymbol )
 }
 
 /*****************************************************************************/
-/* osl_addressGetModuleURL */
-/*****************************************************************************/
-
-/*****************************************************************************/
 /* Implementation for Windows 95, 98 and Me */
 /*****************************************************************************/
 
@@ -410,19 +384,12 @@ static bool SAL_CALL osl_addressGetModuleURL_NT_( void *pv, rtl_uString **pustrU
     return bSuccess;
 }
 
-/*****************************************************************************/
-/* Dispatcher for osl_osl_addressGetModuleURL */
-/*****************************************************************************/
-
 sal_Bool SAL_CALL osl_getModuleURLFromAddress( void *pv, rtl_uString **pustrURL )
 {
     /* Use ..._NT first because ..._NT4 is much slower */
     return osl_addressGetModuleURL_NT_( pv, pustrURL ) || osl_addressGetModuleURL_NT4_( pv, pustrURL );
 }
 
-/*****************************************************************************/
-/* osl_getModuleURLFromFunctionAddress */
-/*****************************************************************************/
 sal_Bool SAL_CALL osl_getModuleURLFromFunctionAddress( oslGenericFunction addr, rtl_uString ** ppLibraryUrl )
 {
     /* casting a function pointer to a data pointer (void*) is


More information about the Libreoffice-commits mailing list