[Libreoffice-commits] .: rsc/source svtools/source toolkit/source tools/workben

Lubos Lunak llunak at kemper.freedesktop.org
Thu May 26 06:05:28 PDT 2011


 rsc/source/parser/rsckey.cxx       |   13 +++----------
 svtools/source/edit/textdoc.cxx    |   16 +++-------------
 svtools/source/svrtf/rtfkeywd.cxx  |    6 +-----
 toolkit/source/awt/vclxtoolkit.cxx |    6 +-----
 tools/workben/inetmimetest.cxx     |    6 +-----
 tools/workben/solar.c              |   12 ++----------
 tools/workben/urltest.cxx          |    6 +-----
 7 files changed, 12 insertions(+), 53 deletions(-)

New commits:
commit e4dd8a07ddd2d712f771e047acf2c7f67b050995
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date:   Thu May 26 15:02:42 2011 +0200

    remove __cdecl and use SAL_CALL instead

diff --git a/rsc/source/parser/rsckey.cxx b/rsc/source/parser/rsckey.cxx
index e9c4ad6..4e8e57a 100644
--- a/rsc/source/parser/rsckey.cxx
+++ b/rsc/source/parser/rsckey.cxx
@@ -45,18 +45,11 @@
 /****************** C o d e **********************************************/
 /****************** keyword sort function ********************************/
 extern "C" {
-#if defined( WNT ) && !defined (ICC)
-    int _cdecl KeyCompare( const void * pFirst, const void * pSecond );
-#else
-    int KeyCompare( const void * pFirst, const void * pSecond );
-#endif
+    int SAL_CALL KeyCompare( const void * pFirst, const void * pSecond );
 }
 
-#if defined( WNT ) && !defined(ICC)
-int _cdecl KeyCompare( const void * pFirst, const void * pSecond ){
-#else
-int KeyCompare( const void * pFirst, const void * pSecond ){
-#endif
+int SAL_CALL KeyCompare( const void * pFirst, const void * pSecond )
+{
     if( ((KEY_STRUCT *)pFirst)->nName > ((KEY_STRUCT *)pSecond)->nName )
         return( 1 );
     else if( ((KEY_STRUCT *)pFirst)->nName < ((KEY_STRUCT *)pSecond)->nName )
diff --git a/svtools/source/edit/textdoc.cxx b/svtools/source/edit/textdoc.cxx
index cc5e1c2..da7f616 100644
--- a/svtools/source/edit/textdoc.cxx
+++ b/svtools/source/edit/textdoc.cxx
@@ -38,18 +38,8 @@ SV_IMPL_PTRARR( TextCharAttribs, TextCharAttribPtr );
 
 // Vergleichmethode wird von QuickSort gerufen...
 
-EXTERN_C
-#ifdef WNT
-#if _MSC_VER >= 1200
-int __cdecl
-#else
-int _cdecl
-#endif
-#else
-int
-#endif
-
-CompareStart( const void* pFirst, const void* pSecond )
+extern "C" {
+int SAL_CALL CompareStart( const void* pFirst, const void* pSecond )
 {
     if ( (*((TextCharAttrib**)pFirst))->GetStart() < (*((TextCharAttrib**)pSecond))->GetStart() )
         return (-1);
@@ -57,7 +47,7 @@ CompareStart( const void* pFirst, const void* pSecond )
         return (1);
     return 0;
 }
-
+}
 
 // -------------------------------------------------------------------------
 // (+) class TextCharAttrib
diff --git a/svtools/source/svrtf/rtfkeywd.cxx b/svtools/source/svrtf/rtfkeywd.cxx
index d365b48..b5a5a4d 100644
--- a/svtools/source/svrtf/rtfkeywd.cxx
+++ b/svtools/source/svrtf/rtfkeywd.cxx
@@ -1187,11 +1187,7 @@ static RTF_TokenEntry aRTFTokenTab[] = {
 
 
 extern "C" {
-static int
-#if defined( WNT )
- __cdecl
-#endif
-    RTFKeyCompare( const void *pFirst, const void *pSecond)
+static int SAL_CALL RTFKeyCompare( const void *pFirst, const void *pSecond)
 {
     int nRet = 0;
     if( -1 == ((RTF_TokenEntry*)pFirst)->nToken )
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 1b8f2c6..2269bd2 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -340,11 +340,7 @@ static ComponentInfo aComponentInfos [] =
 
 extern "C"
 {
-static int
-#if defined( WNT )
- __cdecl
-#endif
-     ComponentInfoCompare( const void* pFirst, const void* pSecond)
+static int SAL_CALL ComponentInfoCompare( const void* pFirst, const void* pSecond)
 {
     return( strcmp( ((ComponentInfo*)pFirst)->pName,
                     ((ComponentInfo*)pSecond)->pName ) );
diff --git a/tools/workben/inetmimetest.cxx b/tools/workben/inetmimetest.cxx
index 27f62a6..6f9a688 100644
--- a/tools/workben/inetmimetest.cxx
+++ b/tools/workben/inetmimetest.cxx
@@ -55,11 +55,7 @@ bool testDecode(char const * input, char const * expected) {
 
 }
 
-int
-#if defined WNT
-__cdecl
-#endif
-main() {
+int SAL_CALL main() {
     bool success = true;
     success &= testDecode("=?iso-8859-1?B?QQ==?=", "A");
     success &= testDecode("=?iso-8859-1?B?QUI=?=", "AB");
diff --git a/tools/workben/solar.c b/tools/workben/solar.c
index 8a3a19b..9dfa12c 100644
--- a/tools/workben/solar.c
+++ b/tools/workben/solar.c
@@ -154,11 +154,7 @@ va_dcl
 #ifndef USE_FORK_TO_CHECK
 static jmp_buf check_env;
 static int bSignal;
-#if defined (UNX)
-void SignalHandler( int sig )
-#else
-void __cdecl SignalHandler( int sig )
-#endif
+void SAL_CALL SignalHandler( int sig )
 {
   bSignal = 1;
   /*
@@ -354,11 +350,7 @@ void Description_Print( struct Description* pThis, char* name )
   fclose(f);
 }
 
-int
-#ifdef WNT
-__cdecl
-#endif
-main( int argc, char* argv[] )
+int SAL_CALL main( int argc, char* argv[] )
 {
   printTypeSign( char, "char" );
   printTypeSign( short, "short" );
diff --git a/tools/workben/urltest.cxx b/tools/workben/urltest.cxx
index b274ea4..9ec19e4 100644
--- a/tools/workben/urltest.cxx
+++ b/tools/workben/urltest.cxx
@@ -290,11 +290,7 @@ bool test_removeSegment(
 
 }
 
-int
-#if defined WNT
-__cdecl
-#endif // WNT
-main()
+int SAL_CALL main()
 {
     bool bSuccess = true;
 


More information about the Libreoffice-commits mailing list