summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-03-18 12:53:28 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-03-18 12:53:28 +0000
commit179fc2e2e25d3e9bc7c198b1e9ea6651fc6de84a (patch)
tree592c774d3adf8e1d95c90a0a9f9cd680b829b867
parent61218185e73408bfa2bc6b88337f18bfd52d4364 (diff)
MWS_SRX644: migrate branch mws_srx644 -> HEAD
-rw-r--r--cosv/source/fullcpp.mk4
-rw-r--r--cosv/source/storage/persist.cxx38
-rw-r--r--cosv/source/storage/ploc_dir.cxx30
-rw-r--r--cosv/source/strings/streamstr.cxx28
-rw-r--r--udm/source/mkinc/fullcpp.mk6
5 files changed, 78 insertions, 28 deletions
diff --git a/cosv/source/fullcpp.mk b/cosv/source/fullcpp.mk
index 1c0af373f6c5..b9142752367f 100644
--- a/cosv/source/fullcpp.mk
+++ b/cosv/source/fullcpp.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: fullcpp.mk,v $
#
-# $Revision: 1.4 $
+# $Revision: 1.5 $
#
-# last change: $Author: hjs $ $Date: 2002-09-03 13:07:07 $
+# last change: $Author: hr $ $Date: 2003-03-18 13:48:51 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
diff --git a/cosv/source/storage/persist.cxx b/cosv/source/storage/persist.cxx
index 9087c88b5c12..3af42b6c2de9 100644
--- a/cosv/source/storage/persist.cxx
+++ b/cosv/source/storage/persist.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: persist.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: np $ $Date: 2002-03-08 14:25:40 $
+ * last change: $Author: hr $ $Date: 2003-03-18 13:48:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,23 +67,41 @@
#include <cosv/ploc.hxx>
+#ifdef WNT
+#include <io.h>
+
namespace csv
{
namespace ploc
{
-#ifdef WNT
-#include <io.h>
-
bool
Persistent::Exists() const
{
return access( StrPath(), 00) == 0;
}
+} // namespace ploc
+} // namespace csv
+
+
#elif defined(UNX)
#include <unistd.h>
+/*
+#ifndef __SUNPRO_CC
+#include <unistd.h>
+#else
+#define F_OK 0 // Test for existence of File
+extern int access(const char *, int);
+#endif
+*/
+
+namespace csv
+{
+namespace ploc
+{
+
bool
Persistent::Exists() const
{
@@ -91,10 +109,18 @@ Persistent::Exists() const
}
+} // namespace ploc
+} // namespace csv
+
#else
#error For using csv::ploc there has to be defined: WNT or UNX.
#endif
+namespace csv
+{
+namespace ploc
+{
+
const char *
Persistent::StrPath() const
{
@@ -113,9 +139,9 @@ Persistent::StrPath() const
return sPath.c_str();
}
-
} // namespace ploc
} // namespace csv
+
diff --git a/cosv/source/storage/ploc_dir.cxx b/cosv/source/storage/ploc_dir.cxx
index cf41a2746243..37d0ba8b63a2 100644
--- a/cosv/source/storage/ploc_dir.cxx
+++ b/cosv/source/storage/ploc_dir.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ploc_dir.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: np $ $Date: 2002-11-01 12:18:53 $
+ * last change: $Author: hr $ $Date: 2003-03-18 13:48:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -164,12 +164,19 @@ Directory::Check_Parent() const
return ret;
}
+} // namespace ploc
+} // namespace csv
#ifdef WNT
#include <direct.h>
#include <io.h>
+namespace csv
+{
+namespace ploc
+{
+
bool
Directory::PhysicalCreate_Dir( const char * i_sStr ) const
{
@@ -252,11 +259,19 @@ Directory::GetContainedFiles( StringVector & o_rResult,
}
}
+} // namespace ploc
+} // namespace csv
+
+
#elif defined(UNX)
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
-#include <unistd.h>
+
+namespace csv
+{
+namespace ploc
+{
bool
Directory::PhysicalCreate_Dir( const char * i_sStr ) const
@@ -354,11 +369,20 @@ Directory::GetContainedFiles( StringVector & o_rResult,
}
}
+} // namespace ploc
+} // namespace csv
+
+
#else
#error For using csv::ploc there has to be defined: WNT or UNX.
#endif
+namespace csv
+{
+namespace ploc
+{
+
const Path &
Directory::inq_MyPath() const
{
diff --git a/cosv/source/strings/streamstr.cxx b/cosv/source/strings/streamstr.cxx
index b3c4e2ca64c0..1eb29bc19845 100644
--- a/cosv/source/strings/streamstr.cxx
+++ b/cosv/source/strings/streamstr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: streamstr.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: np $ $Date: 2002-11-01 12:18:53 $
+ * last change: $Author: hr $ $Date: 2003-03-18 13:48:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -108,7 +108,7 @@ StreamStr::StreamStr( const char * i_sInitStr,
size_type nLength = strlen(i_sInitStr);
nCapacity1 = csv::max(nLength, i_nCapacity) + 1;
dpData = new char [nCapacity1];
- strcpy(dpData, i_sInitStr);
+ strcpy(dpData, i_sInitStr); // SAFE STRCPY (#100211# - checked)
pCur = dpData + nLength;
pEnd = pCur;
}
@@ -150,7 +150,7 @@ StreamStr::StreamStr( const self & i_rOther )
pCur( dpData + i_rOther.tellp() ),
eMode(i_rOther.eMode)
{
- strcpy( dpData, i_rOther.dpData );
+ strcpy( dpData, i_rOther.dpData ); // SAFE STRCPY (#100211# - checked)
}
StreamStr::~StreamStr()
@@ -167,7 +167,7 @@ StreamStr::operator=( const self & i_rOther )
nCapacity1 = i_rOther.nCapacity1;
dpData = new char [i_rOther.nCapacity1];
pEnd = dpData + strlen(i_rOther.dpData);
- strcpy( dpData, i_rOther.dpData );
+ strcpy( dpData, i_rOther.dpData ); // SAFE STRCPY (#100211# - checked)
pCur = dpData + i_rOther.tellp();
eMode = i_rOther.eMode;
@@ -224,7 +224,7 @@ StreamStr &
StreamStr::operator<<( short i_n )
{
char buf[C_short_max_size] = "";
- sprintf( buf, "%hi", i_n );
+ sprintf( buf, "%hi", i_n ); // SAFE SPRINTF (#100211# - checked)
size_type nLength = strlen(buf);
ProvideAddingSize( nLength );
@@ -238,7 +238,7 @@ StreamStr &
StreamStr::operator<<( unsigned short i_n )
{
char buf[C_short_max_size] = "";
- sprintf( buf, "%hu", i_n );
+ sprintf( buf, "%hu", i_n ); // SAFE SPRINTF (#100211# - checked)
size_type nLength = strlen(buf);
ProvideAddingSize( nLength );
@@ -252,7 +252,7 @@ StreamStr &
StreamStr::operator<<( int i_n )
{
char buf[C_int_max_size] = "";
- sprintf( buf, "%i", i_n );
+ sprintf( buf, "%i", i_n ); // SAFE SPRINTF (#100211# - checked)
size_type nLength = strlen(buf);
ProvideAddingSize( nLength );
@@ -266,7 +266,7 @@ StreamStr &
StreamStr::operator<<( unsigned int i_n )
{
char buf[C_int_max_size] = "";
- sprintf( buf, "%u", i_n );
+ sprintf( buf, "%u", i_n ); // SAFE SPRINTF (#100211# - checked)
size_type nLength = strlen(buf);
ProvideAddingSize( nLength );
@@ -280,7 +280,7 @@ StreamStr &
StreamStr::operator<<( long i_n )
{
char buf[C_long_max_size] = "";
- sprintf( buf, "%li", i_n );
+ sprintf( buf, "%li", i_n ); // SAFE SPRINTF (#100211# - checked)
size_type nLength = strlen(buf);
ProvideAddingSize( nLength );
@@ -294,7 +294,7 @@ StreamStr &
StreamStr::operator<<( unsigned long i_n )
{
char buf[C_long_max_size] = "";
- sprintf( buf, "%lu", i_n );
+ sprintf( buf, "%lu", i_n ); // SAFE SPRINTF (#100211# - checked)
size_type nLength = strlen(buf);
ProvideAddingSize( nLength );
@@ -309,7 +309,7 @@ StreamStr::operator<<( float i_n )
{
const int C_float_max_size = 20;
char buf[C_float_max_size] = "";
- sprintf( buf, "%.*g", C_float_max_size-8, i_n );
+ sprintf( buf, "%.*g", C_float_max_size-8, i_n ); // SAFE SPRINTF (#100211# - checked)
size_type nLength = strlen(buf);
ProvideAddingSize( nLength );
@@ -324,7 +324,7 @@ StreamStr::operator<<( double i_n )
{
const int C_double_max_size = 30;
char buf[C_double_max_size] = "";
- sprintf( buf, "%.*lg", C_double_max_size-8, i_n );
+ sprintf( buf, "%.*lg", C_double_max_size-8, i_n ); // SAFE SPRINTF (#100211# - checked)
size_type nLength = strlen(buf);
ProvideAddingSize( nLength );
@@ -809,7 +809,7 @@ StreamStr::Resize( size_type i_nMinimumCapacity )
nCapacity1 = csv::max( nNewSize, size_type(i_nMinimumCapacity + 1) );
char * pNew = new char[nCapacity1];
- strcpy ( pNew, dpData );
+ strcpy ( pNew, dpData ); // SAFE STRCPY (#100211# - checked)
pEnd = pNew + (pEnd - dpData);
pCur = pNew + (pCur - dpData);
diff --git a/udm/source/mkinc/fullcpp.mk b/udm/source/mkinc/fullcpp.mk
index d297d22a8d95..f67d9c817bfa 100644
--- a/udm/source/mkinc/fullcpp.mk
+++ b/udm/source/mkinc/fullcpp.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: fullcpp.mk,v $
#
-# $Revision: 1.2 $
+# $Revision: 1.3 $
#
-# last change: $Author: np $ $Date: 2002-05-31 16:35:02 $
+# last change: $Author: hr $ $Date: 2003-03-18 13:53:28 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -72,7 +72,7 @@
.IF "$(GUI)"=="WNT"
# RTTI
-CFLAGS+= /GR
+CFLAGS+= -GR
.IF "$(NP_LOCALBUILD)"!=""