removed base_pe functions from dispatch table

This commit is contained in:
edwardhartnett 2019-08-15 06:51:06 -06:00
parent 7b6091b1ba
commit 2077729abc
9 changed files with 11 additions and 32 deletions

View File

@ -35,8 +35,8 @@ struct NC_Dispatch
int (*abort)(int);
int (*close)(int, void *);
int (*set_fill)(int, int, int *);
int (*inq_base_pe)(int, int *);
int (*set_base_pe)(int, int);
/* int (*inq_base_pe)(int, int *); */
/* int (*set_base_pe)(int, int); */
int (*inq_format)(int, int*);
int (*inq_format_extended)(int, int *, int *);

View File

@ -101,8 +101,6 @@ NCD2_sync,
NCD2_abort,
NCD2_close,
NCD2_set_fill,
NCD2_inq_base_pe,
NCD2_set_base_pe,
NCD2_inq_format,
NCD2_inq_format_extended, /*inq_format_extended*/

View File

@ -117,12 +117,6 @@ NCD4_set_fill(int ncid, int fillmode, int* old_modep)
return (NC_EPERM);
}
static int
NCD4_set_base_pe(int ncid, int pe)
{
return (NC_EPERM);
}
static int
NCD4_def_dim(int ncid, const char* name, size_t len, int* idp)
{
@ -806,8 +800,6 @@ NCD4_sync,
NCD4_abort,
NCD4_close,
NCD4_set_fill,
NCD4_inq_base_pe,
NCD4_set_base_pe,
NCD4_inq_format,
NCD4_inq_format_extended, /*inq_format_extended*/

View File

@ -1454,8 +1454,8 @@ nc_set_fill(int ncid, int fillmode, int *old_modep)
* @internal Learn base PE.
*
* @deprecated This function was used in the old days with the Cray at
* NCAR. The Cray is long gone, and this call is supported only for
* backward compatibility.
* NCAR. The Cray is long gone, and this call is now meaningless. The
* value returned for pe is always 0.
*
* @param ncid File and group ID.
* @param pe Pointer for base PE.
@ -1470,7 +1470,9 @@ nc_inq_base_pe(int ncid, int *pe)
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->inq_base_pe(ncid,pe);
/* return ncp->dispatch->inq_base_pe(ncid,pe); */
if (pe) *pe = 0;
return NC_NOERR;
}
/**
@ -1493,7 +1495,8 @@ nc_set_base_pe(int ncid, int pe)
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
return ncp->dispatch->set_base_pe(ncid,pe);
/* return ncp->dispatch->set_base_pe(ncid,pe); */
return NC_NOERR;
}
/** \ingroup datasets

View File

@ -28,8 +28,6 @@ static const NC_Dispatch HDF4_dispatcher = {
NC_HDF4_abort,
NC_HDF4_close,
NC_RO_set_fill,
NC_NOTNC3_inq_base_pe,
NC_NOTNC3_set_base_pe,
NC_HDF4_inq_format,
NC_HDF4_inq_format_extended,

View File

@ -28,8 +28,6 @@ static const NC_Dispatch HDF5_dispatcher = {
NC4_abort,
NC4_close,
NC4_set_fill,
NC_NOTNC3_inq_base_pe,
NC_NOTNC3_set_base_pe,
NC4_inq_format,
NC4_inq_format_extended,

View File

@ -91,8 +91,6 @@ NC3_sync,
NC3_abort,
NC3_close,
NC3_set_fill,
NC3_inq_base_pe,
NC3_set_base_pe,
NC3_inq_format,
NC3_inq_format_extended,

View File

@ -87,14 +87,8 @@ check_inq_format(int ncid, int expected_format, int expected_extended_format, in
/* Nothing to do with inq_format, but let's check the base_pe
* functions. */
if (expected_format == NC_FORMAT_CLASSIC || expected_format == NC_FORMAT_64BIT_OFFSET ||
expected_format == NC_FORMAT_CDF5) {
if (nc_set_base_pe(ncid, 0)) ERR;
if (nc_inq_base_pe(ncid, NULL)) ERR;
} else {
if (nc_set_base_pe(ncid, 0) != NC_ENOTNC3) ERR;
if (nc_inq_base_pe(ncid, NULL) != NC_ENOTNC3) ERR;
}
if (nc_set_base_pe(ncid, 0)) ERR;
if (nc_inq_base_pe(ncid, NULL)) ERR;
return 0;
}

View File

@ -77,8 +77,6 @@ NC_RO_sync,
tst_abort,
tst_close,
NC_RO_set_fill,
NC_NOTNC3_inq_base_pe,
NC_NOTNC3_set_base_pe,
tst_inq_format,
tst_inq_format_extended,