Merging from master in preparation for merging branch back into main development branch.

This commit is contained in:
Ward Fisher 2015-12-30 13:00:12 -07:00
commit 09ab3fc554
8 changed files with 47 additions and 10 deletions

View File

@ -7,8 +7,11 @@ This file contains a high-level description of this package's evolution. Release
## 4.4.0 Released TBD
* Addressed an issue on platforms where `char` is `unsigned` by default (such as `ARM`), as well as an issue describing regarding undefined behavior, again on `ARM`. See [GitHub issue #159](https://github.com/Unidata/netcdf-c/issues/159) for detailed information.
* Fixed an ambiguity in the grammar for cdl files. See [GitHub #178](https://github.com/Unidata/netcdf-c/issues/178) for more information.
* Modified ncgen to properly handle the L and UL suffixes for integer constants
to keep backward compatibility. Now it is the case the single L suffix
(e.g. 111L) is treated as a 32 bit integer. This makes it consistent with

7
cf
View File

@ -2,9 +2,6 @@
#NB=1
DB=1
#X=-x
FAST=1
#CYGWIN=1
FAST=1
HDF5=1
@ -132,10 +129,6 @@ if test "x$PAR4" != x1 ; then
FLAGS="$FLAGS --disable-parallel4"
fi
if test "x$CYGWIN" = x1 ; then
FLAGS="$FLAGS --enable-workaround"
fi
if test "x${DB}" = x1 ; then
FLAGS="$FLAGS --disable-shared"
else

View File

@ -24,7 +24,7 @@ ref_tst_opaque_data.cdl \
ref_tst_vlen_data.cdl ref_tst_vlen_data2.cdl \
ref_niltest.cdl ref_tst_h_scalar.cdl ref_tst_econst.cdl \
ref_tst_nul3.cdl ref_tst_nul4.cdl ref_tst_names.cdl \
ref_tst_long_charconst.cdl tst_chararray.cdl \
ref_tst_long_charconst.cdl tst_chararray.cdl ref_keyword.cdl \
CMakeLists.txt

View File

@ -0,0 +1,9 @@
netcdf file {
variables:
int data;
data : _FillValue = 0;
data:
data = 177;
}

View File

@ -20,7 +20,7 @@ ref_solar.dmp unlimtest1.dmp unlimtest2.dmp \
ref_tst_vlen_data.dmp ref_tst_vlen_data2.dmp \
ref_niltest.dmp ref_tst_h_scalar.dmp ref_tst_econst.dmp \
ref_tst_nul3.dmp ref_tst_nul4.dmp ref_tst_names.dmp \
ref_tst_long_charconst.dmp tst_chararray.dmp \
ref_tst_long_charconst.dmp tst_chararray.dmp ref_keyword.dmp \
CMakeLists.txt
# These do not exist because they are not run as usual tests

View File

@ -0,0 +1,8 @@
netcdf ref_keyword {
variables:
int data ;
data :_FillValue = 0 ;
data:
data = 177 ;
}

View File

@ -53,6 +53,27 @@ typedef int ssize_t;
#define int64_t long long
#define uint64_t unsigned long long
/* If we have a variable named one of these:
we need to be careful about printing their attributes.
*/
static const char* keywords[] = {
"variable",
"dimension",
"data",
"group",
"types",
NULL
};
static int iskeyword(const char* kw)
{
const char** p;
for(p=keywords;*p;p++) {
if(strcmp(kw,*p)==0) return 1;
}
return 0;
}
/* globals */
char *progname;
fspec_t formatting_specs = /* defaults, overridden by command-line options */
@ -751,6 +772,8 @@ pr_att(
}
/* printf ("\t\t%s:%s = ", varname, att.name); */
print_name(varname);
if(iskeyword(varname)) /* see discussion about escapes in ncgen man page*/
printf(" ");
printf(":");
print_name(att.name);
printf(" = ");

View File

@ -47,7 +47,8 @@ ref_tst_chardata \
ref_tst_nul3 \
ref_tst_long_charconst \
tst_chararray \
unlimtest1"
unlimtest1 \
ref_keyword"
NONCLASSIC3="\
test0 \