diff options
author | Oliver Lehmann <oliver@FreeBSD.org> | 2004-02-07 13:54:10 +0000 |
---|---|---|
committer | Oliver Lehmann <oliver@FreeBSD.org> | 2004-02-07 13:54:10 +0000 |
commit | 0416e0a44cc846bc76cd2f792dacc651b3eabffd (patch) | |
tree | 278c767bc295d3647245c838ab1fbb90a4f60ef0 /math | |
parent | b41c6d18b6c6591c30e1d2094f84a9b38305f83e (diff) | |
download | ports-0416e0a44cc846bc76cd2f792dacc651b3eabffd.tar.gz ports-0416e0a44cc846bc76cd2f792dacc651b3eabffd.zip |
Notes
Diffstat (limited to 'math')
-rw-r--r-- | math/netcdf/files/patch-nctst.cpp | 7 | ||||
-rw-r--r-- | math/netcdf/files/patch-ncvalues.cpp | 16 | ||||
-rw-r--r-- | math/netcdf/files/patch-ncvalues.h | 44 |
3 files changed, 52 insertions, 15 deletions
diff --git a/math/netcdf/files/patch-nctst.cpp b/math/netcdf/files/patch-nctst.cpp new file mode 100644 index 000000000000..6b98da703c0f --- /dev/null +++ b/math/netcdf/files/patch-nctst.cpp @@ -0,0 +1,7 @@ +--- cxx/nctst.cpp.orig Sat Feb 7 14:04:34 2004 ++++ cxx/nctst.cpp Sat Feb 7 14:04:48 2004 +@@ -1,4 +1,3 @@ +-#include <iostream.h> + #include <string.h> + #include "netcdfcpp.h" + diff --git a/math/netcdf/files/patch-ncvalues.cpp b/math/netcdf/files/patch-ncvalues.cpp index 7dbb0bca2d02..34e6f1f636a4 100644 --- a/math/netcdf/files/patch-ncvalues.cpp +++ b/math/netcdf/files/patch-ncvalues.cpp @@ -1,6 +1,14 @@ ---- cxx/ncvalues.cpp.orig Wed Dec 23 02:21:49 1998 -+++ cxx/ncvalues.cpp Tue Oct 1 10:27:32 2002 -@@ -310,7 +310,11 @@ +--- cxx/ncvalues.cpp.orig Tue Dec 22 19:21:49 1998 ++++ cxx/ncvalues.cpp Sat Feb 7 13:34:17 2004 +@@ -7,7 +7,6 @@ + * $Header: /upc/share/CVS/netcdf-3/cxx/ncvalues.cpp,v 1.3 1998/12/22 18:21:49 russ Exp $ + *********************************************************************/ + +-#include <iostream.h> // for debugging + #include "ncvalues.h" + + NcValues::NcValues( void ) : the_number(0), the_type(ncNoType) +@@ -310,7 +309,11 @@ os << the_values[i] << ", "; if (the_number > 0) os << the_values[the_number-1] ; @@ -12,7 +20,7 @@ return os; } -@@ -322,6 +326,10 @@ +@@ -322,6 +325,10 @@ os << the_values[i] << ", "; if (the_number > 0) os << the_values[the_number-1]; diff --git a/math/netcdf/files/patch-ncvalues.h b/math/netcdf/files/patch-ncvalues.h index 1988e2b8746d..a6d8be1c9428 100644 --- a/math/netcdf/files/patch-ncvalues.h +++ b/math/netcdf/files/patch-ncvalues.h @@ -1,20 +1,42 @@ ---- cxx/ncvalues.h.orig Thu Oct 29 02:10:16 1998 -+++ cxx/ncvalues.h Thu Feb 5 20:51:02 2004 -@@ -14,7 +14,7 @@ - #ifdef STRSTREAM_H_SPEC - # include STRSTREAM_H_SPEC - #else +--- cxx/ncvalues.h.orig Wed Oct 28 18:10:16 1998 ++++ cxx/ncvalues.h Sat Feb 7 14:03:13 2004 +@@ -10,12 +10,9 @@ + #ifndef Ncvalues_def + #define Ncvalues_def + +-#include <iostream.h> +-#ifdef STRSTREAM_H_SPEC +-# include STRSTREAM_H_SPEC +-#else -# include <strstream.h> -+# include <strstream> - #endif +-#endif ++#include <bitset> ++#include <iostream> ++#include <sstream> #include <limits.h> #include <string.h> -@@ -220,7 +220,7 @@ + #include "netcdf.h" +@@ -24,6 +21,8 @@ + + #define NC_UNSPECIFIED ((nc_type)0) + ++using namespace std; ++ + enum NcType + { + ncNoType = NC_UNSPECIFIED, +@@ -219,9 +218,12 @@ + #define as_string_implement(TYPE) \ char* NcVal(TYPE)::as_string( long n ) const \ { \ - char* s = new char[32]; \ +- char* s = new char[32]; \ - ostrstream ostr(s, sizeof(s)); \ -+ std::ostrstream ostr(s, sizeof(s)); \ ++ static char s[32]; \ ++ ostringstream ostr; \ ostr << the_values[n] << ends; \ ++ std::string data( ostr.str() ); \ ++ strncpy( s, data.data(), sizeof(s)-1); \ ++ s[ sizeof(s)-1 ] = 0; \ return s; \ } + |