changed form of some static data to work with cxx4

This commit is contained in:
Dennis Heimbigner 2012-03-08 22:21:12 +00:00
parent 458612a06e
commit 787d32fffd
4 changed files with 15 additions and 9 deletions

2
cf
View File

@ -14,7 +14,7 @@ DAP=1
cmds=""
#cmds="all"
#cmds="all check"
cmds="all check"
#cmds="all dist"
#cmds="all distcheck"
#cmds="$cmds install"

View File

@ -379,8 +379,8 @@ extern int NC_is_recvar(int ncid, int varid, size_t* nrecs);
#define nullstring(s) (s==NULL?"(null)":s)
extern size_t NC_coord_zero[NC_MAX_VAR_DIMS];
extern size_t NC_coord_one[NC_MAX_VAR_DIMS];
extern size_t* NC_coord_zero;
extern size_t* NC_coord_one;
#endif /* _DISPATCH_H */

View File

@ -3,14 +3,15 @@ TOPDIR="/home/dmh/mach/major"
PARMS=""; ARGS=""; CON="" ; CE=""; OCON=""
PARMS="[log]"
#PARMS="${PARMS}[netcdf3]"
PARMS="${PARMS}[fetch=memory]"
PARMS="${PARMS}[cache]"
#PARMS="${PARMS}[fetch=memory]"
#PARMS="${PARMS}[cache]"
#PARMS="${PARMS}[prefetch]"
#PARMS="${PARMS}[nocache]"
#PARMS="${PARMS}[noprefetch]"
PARMS="${PARMS}[show=fetch]"
#PARMS="${PARMS}[show=fetch]"
F="[cache]file:///machine/dmh/trunk/ncdap_test/testdata3/1998-6-avhrr.dat"
F="http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis.dailyavgs/pressure/air.1948.nc"
VAR=air
PROG="./ncd"
#PROG="../ncdump/ncdump"
@ -23,6 +24,7 @@ fi
#ARGS="-h $ARGS"
#ARGS="-w $ARGS"
#ARGS="-c $ARGS"
VARGS="--leak-check=full"
alias qq="gdb --args $PROG $ARGS '$U'"
alias qv="valgrind $VARGS PROG $ARGS '$U'"

View File

@ -50,13 +50,17 @@ of the interfaces for these operations.
*/
/**@{*/
size_t NC_coord_zero[NC_MAX_VAR_DIMS];
size_t NC_coord_one[NC_MAX_VAR_DIMS];
size_t* NC_coord_zero;
size_t* NC_coord_one;
static void
nc_local_initialize(void)
{
int i;
NC_coord_zero = (size_t*)malloc(sizeof(size_t)*NC_MAX_VAR_DIMS);
if(NC_coord_zero == NULL) abort();
NC_coord_one = (size_t*)malloc(sizeof(size_t)*NC_MAX_VAR_DIMS);
if(NC_coord_one == NULL) abort();
for(i=0;i<NC_MAX_VAR_DIMS;i++) {
NC_coord_one[i] = 1;
NC_coord_zero[i] = 0;