[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
patches to netcdf-2_4_3/cxx to build with netcdf-3
- Subject: patches to netcdf-2_4_3/cxx to build with netcdf-3
- Date: Tue, 8 Apr 1997 17:31:08 -0600 (MDT)
Index: ncvalues.hh
===================================================================
RCS file: /upc/share/CVS/netcdf/cxx/ncvalues.hh,v
retrieving revision 1.23
diff -c -r1.23 ncvalues.hh
*** ncvalues.hh 1996/02/27 21:53:39 1.23
--- ncvalues.hh 1997/04/08 23:18:49
***************
*** 23,28 ****
--- 23,30 ----
typedef unsigned char ncbyte;
+ #define NC_UNSPECIFIED ((nc_type)0)
+
enum NcType
{
ncNoType = NC_UNSPECIFIED,
***************
*** 166,171 ****
--- 168,175 ----
return (short) the_values[n]; \
}
+ #define NCLONG_MIN INT_MIN
+ #define NCLONG_MAX INT_MAX
#define as_nclong_implement(TYPE) \
nclong NcVal(TYPE)::as_nclong( long n ) const \
{ \
Index: netcdf.cc
===================================================================
RCS file: /upc/share/CVS/netcdf/cxx/netcdf.cc,v
retrieving revision 1.70
diff -c -r1.70 netcdf.cc
*** netcdf.cc 1996/07/02 16:03:15 1.70
--- netcdf.cc 1997/04/08 23:14:49
***************
*** 294,310 ****
return the_id;
}
! NcFile::NcFile( const char * path, FileMode mode )
{
NcError err(NcError::silent_nonfatal); // constructor must not fail
! switch (mode) {
! case ReadOnly:
case Write:
the_id = ncopen(path, mode);
in_define_mode = 0;
break;
case New:
case Replace:
the_id = nccreate(path, mode);
in_define_mode = 1;
--- 294,316 ----
return the_id;
}
! NcFile::NcFile( const char * path, FileMode fmode )
{
NcError err(NcError::silent_nonfatal); // constructor must not fail
! int mode = NC_NOWRITE;
!
! switch (fmode) {
case Write:
+ mode = NC_WRITE;
+ /*FALLTHRU*/
+ case ReadOnly:
the_id = ncopen(path, mode);
in_define_mode = 0;
break;
case New:
+ mode = NC_NOCLOBBER;
+ /*FALLTHRU*/
case Replace:
the_id = nccreate(path, mode);
in_define_mode = 1;
Index: netcdf.hh
===================================================================
RCS file: /upc/share/CVS/netcdf/cxx/netcdf.hh,v
retrieving revision 1.56
diff -c -r1.56 netcdf.hh
*** netcdf.hh 1996/02/21 16:26:57 1.56
--- netcdf.hh 1997/04/08 23:10:50
***************
*** 35,44 ****
virtual ~NcFile( void );
enum FileMode {
! ReadOnly = NC_NOWRITE, // file exists, open read-only
! Write = NC_WRITE, // file exists, open for writing
! Replace = NC_CLOBBER, // create new file, even if already exists
! New = NC_NOCLOBBER // create new file, fail if already exists
};
NcFile( const char * path, FileMode = ReadOnly );
--- 35,44 ----
virtual ~NcFile( void );
enum FileMode {
! ReadOnly, // file exists, open read-only
! Write, // file exists, open for writing
! Replace, // create new file, even if already exists
! New // create new file, fail if already exists
};
NcFile( const char * path, FileMode = ReadOnly );