[Libreoffice-commits] core.git: 2 commits - basic/source

Tor Lillqvist tml at collabora.com
Sat Oct 12 00:09:47 PDT 2013


 basic/source/comp/parser.cxx     |    6 +++---
 basic/source/runtime/methods.cxx |   19 ++++++-------------
 basic/source/sbx/sbxscan.cxx     |    2 --
 3 files changed, 9 insertions(+), 18 deletions(-)

New commits:
commit ff7ba8c81c3b00722e58ed01a1ab361094aeb609
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Oct 12 10:08:08 2013 +0300

    Nothing Unix-specific about <stdlib.h>
    
    Although unsure whether this source file actually uses anything declared in
    <stdlib.h>...
    
    Change-Id: Ibb5dfe5d0de1576a37a5f2c9cffcd9b850602b14

diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 4c919d5..724c5fa 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -23,9 +23,7 @@
 
 #include "unotools/syslocale.hxx"
 
-#if defined ( UNX )
 #include <stdlib.h>
-#endif
 
 #include <vcl/svapp.hxx>
 #include <math.h>
commit b680e352546dc614f3b30bbe212e6b415a6a6bf4
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Oct 12 09:55:48 2013 +0300

    Test WNT instead of the vague UNX
    
    Change-Id: Icacdae592f05bcdcf50223d607976d687e182c96

diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index 8ac380f..6c31a12 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -856,10 +856,10 @@ void SbiParser::AddConstants( void )
     addStringConst( aPublics, "vbCrLf", "\x0D\x0A" );
     addStringConst( aPublics, "vbFormFeed", "\x0C" );
     addStringConst( aPublics, "vbLf", "\x0A" );
-#if defined(UNX)
-    addStringConst( aPublics, "vbNewLine", "\x0A" );
-#else
+#ifndef WNT
     addStringConst( aPublics, "vbNewLine", "\x0D\x0A" );
+#else
+    addStringConst( aPublics, "vbNewLine", "\x0A" );
 #endif
     addStringConst( aPublics, "vbNullString", "" );
     addStringConst( aPublics, "vbTab", "\x09" );
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 4167152..549c561 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -79,6 +79,7 @@ using namespace com::sun::star::uno;
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
+#include <errno.h>
 
 SbxVariable* getDefaultProp( SbxVariable* pRef );
 
@@ -86,11 +87,6 @@ SbxVariable* getDefaultProp( SbxVariable* pRef );
 #include <direct.h>   // _getdcwd get current work directory, _chdrive
 #endif
 
-#ifdef UNX
-#include <errno.h>
-#include <unistd.h>
-#endif
-
 #include <basic/sbobjmod.hxx>
 
 #ifdef WNT
@@ -399,11 +395,6 @@ RTLFUNC(ChrW)
     implChr( rPar, bChrW );
 }
 
-
-#ifdef UNX
-#define _PATH_INCR 250
-#endif
-
 RTLFUNC(CurDir)
 {
     (void)pBasic;
@@ -449,9 +440,11 @@ RTLFUNC(CurDir)
     }
     delete [] pBuffer;
 
-#elif defined( UNX )
+#else
+
+    const int PATH_INCR = 250;
 
-    int nSize = _PATH_INCR;
+    int nSize = PATH_INCR;
     char* pMem;
     while( true )
       {
@@ -474,7 +467,7 @@ RTLFUNC(CurDir)
             return;
           }
         delete [] pMem;
-        nSize += _PATH_INCR;
+        nSize += PATH_INCR;
       };
 
 #endif


More information about the Libreoffice-commits mailing list