Master merge to remove conflicts

This commit is contained in:
Dennis Heimbigner 2017-03-29 14:40:08 -06:00
commit 7d9a1107c9
6 changed files with 20 additions and 6 deletions

View File

@ -19,5 +19,5 @@ data:
i64 = 9223372036854775807LL, 9223372036854775807ll, 9223372036854775807 ;
ui64 = 18446744073709551615ULL, 18446744073709551615ull, 18446744073709551615u ;
ui64 = 18446744073709551615ULL, 18446744073709551615ull, 18446744073709551615uLL;
}

View File

@ -24,7 +24,8 @@ 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 tst_gattenum.cdl
compound_datasize_test.cdl compound_datasize_test2.cdl \
tst_gattenum.cdl tst_usuffix.cdl
# This shell script causes ncgen to build a classic and a 64-bit
# offset file from a cdl file shipped with the distribution.
@ -39,6 +40,7 @@ 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_tst_usuffix.cdl tst_usuffix.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

View File

@ -839,7 +839,7 @@ collecttag(char* text, char** stagp)
stag[MAXTAGLEN] = '\0';
if(stag[0] == 'U' || stag[0] == 'u') {
hasU = 1;
memmove(stag,stag+1,MAXTAGLEN);
memmove(stag,stag+1,MAXTAGLEN);
staglen--;
} else if(stag[staglen-1] == 'U' || stag[staglen-1] == 'u') {
hasU = 1;
@ -847,7 +847,7 @@ collecttag(char* text, char** stagp)
stag[staglen] = '\0';
}
if(strlen(stag) == 0 && hasU) {
tag = NC_UINT64;
tag = NC_UINT;
} else if(strlen(stag) == 1) {
switch (stag[0]) {
case 'B': case 'b': tag = (hasU ? NC_UBYTE : NC_BYTE); break;

View File

@ -3391,7 +3391,7 @@ collecttag(char* text, char** stagp)
stag[MAXTAGLEN] = '\0';
if(stag[0] == 'U' || stag[0] == 'u') {
hasU = 1;
memmove(stag,stag+1,MAXTAGLEN);
memmove(stag,stag+1,MAXTAGLEN);
staglen--;
} else if(stag[staglen-1] == 'U' || stag[staglen-1] == 'u') {
hasU = 1;
@ -3399,7 +3399,7 @@ collecttag(char* text, char** stagp)
stag[staglen] = '\0';
}
if(strlen(stag) == 0 && hasU) {
tag = NC_UINT64;
tag = NC_UINT;
} else if(strlen(stag) == 1) {
switch (stag[0]) {
case 'B': case 'b': tag = (hasU ? NC_UBYTE : NC_BYTE); break;

View File

@ -57,5 +57,8 @@ validateNC "compound_datasize_test2" "compound_datasize_test2" -k nc4
echo "*** Global Attribute with Enum type"
validateNC "tst_gattenum" "tst_gattenum" -k nc4
echo "*** Integer constant with just 'u' suffix"
validateNC "tst_usuffix" "tst_usuffix" -k nc4
echo "*** Test successful!"
exit 0

9
ncgen/tst_usuffix.cdl Normal file
View File

@ -0,0 +1,9 @@
netcdf tst_usuffix {
variables:
float att_var ;
att_var:uint_att = 73U ;
att_var:uint_att2 = 73U ;
data:
att_var = 10 ;
}