diff --git a/cf b/cf index 4d4d55d26..5c4a2ccd1 100644 --- a/cf +++ b/cf @@ -8,7 +8,7 @@ fi HDF5=1 DAP=1 -#PNETCDF=1 +PNETCDF=1 #HDF4=1 #RPC=1 #PGI=1 diff --git a/libdap2/dceconstraints.c b/libdap2/dceconstraints.c index 0f12befcd..0b47142ad 100644 --- a/libdap2/dceconstraints.c +++ b/libdap2/dceconstraints.c @@ -245,7 +245,7 @@ dcemergeprojections(DCEprojection* merged, DCEprojection* addition) that can be used with the url */ -static char* +char* buildprojectionstring(NClist* projections) { char* pstring; @@ -256,7 +256,7 @@ buildprojectionstring(NClist* projections) return pstring; } -static char* +char* buildselectionstring(NClist* selections) { NCbytes* buf = ncbytesnew(); @@ -267,7 +267,7 @@ buildselectionstring(NClist* selections) return sstring; } -static char* +char* buildconstraintstring(DCEconstraint* constraints) { NCbytes* buf = ncbytesnew(); diff --git a/libdap2/dceconstraints.h b/libdap2/dceconstraints.h index 64783a41c..1fb4982e0 100644 --- a/libdap2/dceconstraints.h +++ b/libdap2/dceconstraints.h @@ -136,6 +136,14 @@ extern size_t dcesafeindex(DCEsegment* seg, size_t start, size_t stop); /* Compute segment size for start upto stop */ extern size_t dcesegmentsize(DCEsegment*, size_t start, size_t stop); +/* Convert a DCE projection/selection/constraint instance into a string + that can be used with a url. Caller must free returned string. +*/ + +extern char* buildprojectionstring(NClist* projections); +extern char* buildselectionstring(NClist* selections); +extern char* buildconstraintstring(DCEconstraint* constraints); + extern int dceverbose; #endif /*DCECONSTRAINTS_H*/ diff --git a/libdap2/getvara3.c b/libdap2/getvara3.c index e23089947..fd4b7cf6b 100644 --- a/libdap2/getvara3.c +++ b/libdap2/getvara3.c @@ -695,7 +695,8 @@ findfield(CDFnode* node, CDFnode* field) } -static int +#ifdef EXTERN_UNUSED +int nc3d_getvarmx(int ncid, int varid, const size_t *start, const size_t *edges, @@ -879,6 +880,7 @@ fprintf(stderr,"old: %lu -> %lu %f\n", done: return ncstat; } +#endif /*EXTERN_UNUSED*/ static int conversionrequired(nc_type t1, nc_type t2) diff --git a/libsrc4/nc4internal.c b/libsrc4/nc4internal.c index 1f7cca7f1..6c48147ab 100644 --- a/libsrc4/nc4internal.c +++ b/libsrc4/nc4internal.c @@ -668,7 +668,8 @@ nc4_dim_list_add(NC_DIM_INFO_T **list) } /* Add to the beginning of a dim list. */ -static int +#ifdef EXTERN_UNUSED +int nc4_dim_list_add2(NC_DIM_INFO_T **list, NC_DIM_INFO_T **new_dim) { NC_DIM_INFO_T *dim; @@ -684,6 +685,7 @@ nc4_dim_list_add2(NC_DIM_INFO_T **list, NC_DIM_INFO_T **new_dim) *new_dim = dim; return NC_NOERR; } +#endif /* Add to the end of an att list. */ int diff --git a/nc_test/tst_atts3.c b/nc_test/tst_atts3.c index e3fc49a34..25c66d4e8 100644 --- a/nc_test/tst_atts3.c +++ b/nc_test/tst_atts3.c @@ -120,8 +120,6 @@ tst_att_ordering(int cmode) int main(int argc, char **argv) { - (void) signal(SIGFPE, SIG_IGN); - signed char schar_in[ATT_LEN], schar_out[ATT_LEN] = {NC_MIN_BYTE, 1, NC_MAX_BYTE}; unsigned char uchar_in[ATT_LEN]; short short_in[ATT_LEN], short_out[ATT_LEN] = {NC_MIN_SHORT, -128, NC_MAX_SHORT}; @@ -136,6 +134,8 @@ main(int argc, char **argv) unsigned long long ulonglong_in[ATT_LEN] = {NC_MAX_UINT64, NC_MAX_UINT64, NC_MAX_UINT64}; unsigned long long ulonglong_out[ATT_LEN] = {0LL, 128LL, 3123456789LL}; + (void) signal(SIGFPE, SIG_IGN); + printf("\n*** Testing netcdf-3 attribute functions.\n"); printf("*** testing really simple global atts..."); #define NUM_SIMPLE_ATTS 9 diff --git a/oc2/oc.c b/oc2/oc.c index 55b560fd1..c8f5f5758 100644 --- a/oc2/oc.c +++ b/oc2/oc.c @@ -963,14 +963,10 @@ OCerror oc_data_fieldbyname(OCobject link, OCobject datanode, const char* name, OCobject* fieldp) { OCerror err = OC_NOERR; - OCstate* state; - OCdata* data; size_t count,i; OCobject ddsnode; OCVERIFY(OC_State,link); - OCDEREF(OCstate*,state,link); OCVERIFY(OC_Data,datanode); - OCDEREF(OCdata*,data,datanode); /* Get the dds node for this datanode */ err = oc_data_ddsnode(link,datanode,&ddsnode); diff --git a/oc2/ocutil.c b/oc2/ocutil.c index 932ae8408..21699a7af 100644 --- a/oc2/ocutil.c +++ b/oc2/ocutil.c @@ -46,7 +46,8 @@ ocstrncmp(const char* s1, const char* s2, size_t len) } -static void +#ifdef EXTERN_UNUSEd +void makedimlist(OClist* path, OClist* dims) { unsigned int i,j; @@ -59,6 +60,7 @@ makedimlist(OClist* path, OClist* dims) } } } +#endif void ocfreeprojectionclause(OCprojectionclause* clause) @@ -76,7 +78,8 @@ ocfreeprojectionclause(OCprojectionclause* clause) free(clause); } -static void +#ifdef EXTERN_UNUSED +void freeAttributes(OClist* attset) { unsigned int i,j; @@ -93,8 +96,10 @@ freeAttributes(OClist* attset) } } } +#endif -static void +#ifdef EXTERN_UNUSED +void freeOCnode(OCnode* cdf, int deep) { unsigned int i; @@ -113,6 +118,7 @@ freeOCnode(OCnode* cdf, int deep) } free(cdf); } +#endif int ocfindbod(OCbytes* buffer, size_t* bodp, size_t* ddslenp)