diff --git a/cf b/cf index 3f489f8f9..5f6a01718 100644 --- a/cf +++ b/cf @@ -4,7 +4,7 @@ DB=1 #X=-x #FAST=1 -#HDF5=1 +HDF5=1 DAP=1 #HDF4=1 #PNETCDF=1 diff --git a/ncgen/CMakeLists.txt b/ncgen/CMakeLists.txt index 1e1556031..76801dea3 100644 --- a/ncgen/CMakeLists.txt +++ b/ncgen/CMakeLists.txt @@ -70,5 +70,5 @@ ADD_CUSTOM_TARGET(makeparser DEPENDS ncgentab.h) ## Specify files to be distributed by 'make dist' FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.c ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/*.sh) -SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} ncgen.y ncgenl.c ncgen.l internals.html c0.cdl c0_4.cdl ref_camrun.cdl ncf199.cdl CMakeLists.txt Makefile.am ncgen.1) +SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} ncgen.y ncgenl.c ncgen.l internals.html c0.cdl c0_4.cdl ref_camrun.cdl ncf199.cdl tst_gattenum.cdl CMakeLists.txt Makefile.am ncgen.1) ADD_EXTRA_DIST("${CUR_EXTRA_DIST}") diff --git a/ncgen/Makefile.am b/ncgen/Makefile.am index 214575219..4439509fe 100644 --- a/ncgen/Makefile.am +++ b/ncgen/Makefile.am @@ -24,7 +24,7 @@ man_MANS = ncgen.1 EXTRA_DIST = ncgen.y ncgen.l ncgenl.c $(man_MANS) internals.html \ run_tests.sh run_nc4_tests.sh c0.cdl c0_4.cdl ref_camrun.cdl \ ncf199.cdl CMakeLists.txt XGetopt.c c5.cdl \ -compound_datasize_test.cdl compound_datasize_test2.cdl +compound_datasize_test.cdl compound_datasize_test2.cdl tst_gattenum.cdl # This shell script causes ncgen to build a classic and a 64-bit # offset file from a cdl file shipped with the distribution. @@ -38,6 +38,7 @@ endif # USE_NETCDF4 CLEANFILES = c0.nc c0_64.nc c0_4.nc c0_4c.nc ref_camrun.c \ ncf199.nc c5.nc compound_datasize_test.nc compound_datasize_test2.nc \ tst_compound_datasize_test.cdl tst_compound_datasize_test2.cdl tst_ncf199.cdl \ + tst_tst_gattenum.cdl tst_gattenum.nc \ tst_c0.cdl tst_c0_4.cdl tst_c0_4c.cdl tst_c0_64.cdl # These rules are used if someone wants to rebuild ncgenl.c or ncgeny.c diff --git a/ncgen/run_nc4_tests.sh b/ncgen/run_nc4_tests.sh index 0c5b06759..38f493fac 100755 --- a/ncgen/run_nc4_tests.sh +++ b/ncgen/run_nc4_tests.sh @@ -54,5 +54,8 @@ validateNC "compound_datasize_test" "compound_datasize_test" -k nc4 echo "*** github issue 323 test 2" validateNC "compound_datasize_test2" "compound_datasize_test2" -k nc4 +echo "*** Global Attribute with Enum type" +validateNC "tst_gattenum" "tst_gattenum" -k nc4 + echo "*** Test successful!" exit 0 diff --git a/ncgen/semantics.c b/ncgen/semantics.c index c2da4dba3..90403c22f 100644 --- a/ncgen/semantics.c +++ b/ncgen/semantics.c @@ -422,6 +422,11 @@ processeconstrefs(void) { unsigned long i; /* locate all the datalist and walk them recursively */ + for(i=0;idata != NULL && listlength(att->data) > 0) + processeconstrefsR(att->data); + } for(i=0;idata != NULL && listlength(att->data) > 0) diff --git a/ncgen/tst_gattenum.cdl b/ncgen/tst_gattenum.cdl new file mode 100644 index 000000000..47bf651c9 --- /dev/null +++ b/ncgen/tst_gattenum.cdl @@ -0,0 +1,8 @@ +netcdf tst_gattenum { +types: + ubyte enum Bradys {Mike = 0, Carol = 1, Greg = 2, Marsha = 3, Peter = 4, + Jan = 5, Bobby = 6, Whats-her-face = 7, Alice = 8} ; + +// global attributes: + Bradys :brady_attribute = Mike, Marsha, Alice; +}