Removed a stray debugging message.

This commit is contained in:
Ward Fisher 2015-06-18 14:37:31 -06:00
parent 66dc490e8a
commit 39c9d10ede
3 changed files with 7 additions and 341 deletions

View File

@ -1067,7 +1067,6 @@ ENDIF()
MACRO(GEN_m4 filename)
# IF(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${filename}.c)
IF(HAVE_M4)
MESSAGE(STATUS "Test: NC_M4: ${NC_M4}")
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${filename}.c
COMMAND ${NC_M4}

View File

@ -1,6 +1,4 @@
#line 5 "attr.m4"
/* Do not edit this file. It is produced from the corresponding .m4 source */
#line 7
/*
* Copyright 1996, University Corporation for Atmospheric Research
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
@ -613,704 +611,367 @@ NC3_del_att(int ncid, int varid, const char *uname)
return NC_NOERR;
}
#line 674
static int
#line 675
ncx_pad_putn_Iuchar(void **xpp, size_t nelems, const uchar *tp, nc_type type)
#line 675
{
#line 675
switch(type) {
#line 675
case NC_CHAR:
#line 675
return NC_ECHAR;
#line 675
case NC_BYTE:
#line 675
return ncx_pad_putn_schar_uchar(xpp, nelems, tp);
#line 675
case NC_SHORT:
#line 675
return ncx_pad_putn_short_uchar(xpp, nelems, tp);
#line 675
case NC_INT:
#line 675
return ncx_putn_int_uchar(xpp, nelems, tp);
#line 675
case NC_FLOAT:
#line 675
return ncx_putn_float_uchar(xpp, nelems, tp);
#line 675
case NC_DOUBLE:
#line 675
return ncx_putn_double_uchar(xpp, nelems, tp);
#line 675
default:
#line 675
assert("ncx_pad_putn_Iuchar invalid type" == 0);
#line 675
}
#line 675
return NC_EBADTYPE;
#line 675
}
#line 675
static int
#line 676
ncx_pad_getn_Iuchar(const void **xpp, size_t nelems, uchar *tp, nc_type type)
#line 676
{
#line 676
switch(type) {
#line 676
case NC_CHAR:
#line 676
return NC_ECHAR;
#line 676
case NC_BYTE:
#line 676
return ncx_pad_getn_schar_uchar(xpp, nelems, tp);
#line 676
case NC_SHORT:
#line 676
return ncx_pad_getn_short_uchar(xpp, nelems, tp);
#line 676
case NC_INT:
#line 676
return ncx_getn_int_uchar(xpp, nelems, tp);
#line 676
case NC_FLOAT:
#line 676
return ncx_getn_float_uchar(xpp, nelems, tp);
#line 676
case NC_DOUBLE:
#line 676
return ncx_getn_double_uchar(xpp, nelems, tp);
#line 676
default:
#line 676
assert("ncx_pad_getn_Iuchar invalid type" == 0);
#line 676
}
#line 676
return NC_EBADTYPE;
#line 676
}
#line 676
static int
#line 678
ncx_pad_putn_Ischar(void **xpp, size_t nelems, const schar *tp, nc_type type)
#line 678
{
#line 678
switch(type) {
#line 678
case NC_CHAR:
#line 678
return NC_ECHAR;
#line 678
case NC_BYTE:
#line 678
return ncx_pad_putn_schar_schar(xpp, nelems, tp);
#line 678
case NC_SHORT:
#line 678
return ncx_pad_putn_short_schar(xpp, nelems, tp);
#line 678
case NC_INT:
#line 678
return ncx_putn_int_schar(xpp, nelems, tp);
#line 678
case NC_FLOAT:
#line 678
return ncx_putn_float_schar(xpp, nelems, tp);
#line 678
case NC_DOUBLE:
#line 678
return ncx_putn_double_schar(xpp, nelems, tp);
#line 678
default:
#line 678
assert("ncx_pad_putn_Ischar invalid type" == 0);
#line 678
}
#line 678
return NC_EBADTYPE;
#line 678
}
#line 678
static int
#line 679
ncx_pad_getn_Ischar(const void **xpp, size_t nelems, schar *tp, nc_type type)
#line 679
{
#line 679
switch(type) {
#line 679
case NC_CHAR:
#line 679
return NC_ECHAR;
#line 679
case NC_BYTE:
#line 679
return ncx_pad_getn_schar_schar(xpp, nelems, tp);
#line 679
case NC_SHORT:
#line 679
return ncx_pad_getn_short_schar(xpp, nelems, tp);
#line 679
case NC_INT:
#line 679
return ncx_getn_int_schar(xpp, nelems, tp);
#line 679
case NC_FLOAT:
#line 679
return ncx_getn_float_schar(xpp, nelems, tp);
#line 679
case NC_DOUBLE:
#line 679
return ncx_getn_double_schar(xpp, nelems, tp);
#line 679
default:
#line 679
assert("ncx_pad_getn_Ischar invalid type" == 0);
#line 679
}
#line 679
return NC_EBADTYPE;
#line 679
}
#line 679
static int
#line 681
ncx_pad_putn_Ishort(void **xpp, size_t nelems, const short *tp, nc_type type)
#line 681
{
#line 681
switch(type) {
#line 681
case NC_CHAR:
#line 681
return NC_ECHAR;
#line 681
case NC_BYTE:
#line 681
return ncx_pad_putn_schar_short(xpp, nelems, tp);
#line 681
case NC_SHORT:
#line 681
return ncx_pad_putn_short_short(xpp, nelems, tp);
#line 681
case NC_INT:
#line 681
return ncx_putn_int_short(xpp, nelems, tp);
#line 681
case NC_FLOAT:
#line 681
return ncx_putn_float_short(xpp, nelems, tp);
#line 681
case NC_DOUBLE:
#line 681
return ncx_putn_double_short(xpp, nelems, tp);
#line 681
default:
#line 681
assert("ncx_pad_putn_Ishort invalid type" == 0);
#line 681
}
#line 681
return NC_EBADTYPE;
#line 681
}
#line 681
static int
#line 682
ncx_pad_getn_Ishort(const void **xpp, size_t nelems, short *tp, nc_type type)
#line 682
{
#line 682
switch(type) {
#line 682
case NC_CHAR:
#line 682
return NC_ECHAR;
#line 682
case NC_BYTE:
#line 682
return ncx_pad_getn_schar_short(xpp, nelems, tp);
#line 682
case NC_SHORT:
#line 682
return ncx_pad_getn_short_short(xpp, nelems, tp);
#line 682
case NC_INT:
#line 682
return ncx_getn_int_short(xpp, nelems, tp);
#line 682
case NC_FLOAT:
#line 682
return ncx_getn_float_short(xpp, nelems, tp);
#line 682
case NC_DOUBLE:
#line 682
return ncx_getn_double_short(xpp, nelems, tp);
#line 682
default:
#line 682
assert("ncx_pad_getn_Ishort invalid type" == 0);
#line 682
}
#line 682
return NC_EBADTYPE;
#line 682
}
#line 682
static int
#line 684
ncx_pad_putn_Iint(void **xpp, size_t nelems, const int *tp, nc_type type)
#line 684
{
#line 684
switch(type) {
#line 684
case NC_CHAR:
#line 684
return NC_ECHAR;
#line 684
case NC_BYTE:
#line 684
return ncx_pad_putn_schar_int(xpp, nelems, tp);
#line 684
case NC_SHORT:
#line 684
return ncx_pad_putn_short_int(xpp, nelems, tp);
#line 684
case NC_INT:
#line 684
return ncx_putn_int_int(xpp, nelems, tp);
#line 684
case NC_FLOAT:
#line 684
return ncx_putn_float_int(xpp, nelems, tp);
#line 684
case NC_DOUBLE:
#line 684
return ncx_putn_double_int(xpp, nelems, tp);
#line 684
default:
#line 684
assert("ncx_pad_putn_Iint invalid type" == 0);
#line 684
}
#line 684
return NC_EBADTYPE;
#line 684
}
#line 684
static int
#line 685
ncx_pad_getn_Iint(const void **xpp, size_t nelems, int *tp, nc_type type)
#line 685
{
#line 685
switch(type) {
#line 685
case NC_CHAR:
#line 685
return NC_ECHAR;
#line 685
case NC_BYTE:
#line 685
return ncx_pad_getn_schar_int(xpp, nelems, tp);
#line 685
case NC_SHORT:
#line 685
return ncx_pad_getn_short_int(xpp, nelems, tp);
#line 685
case NC_INT:
#line 685
return ncx_getn_int_int(xpp, nelems, tp);
#line 685
case NC_FLOAT:
#line 685
return ncx_getn_float_int(xpp, nelems, tp);
#line 685
case NC_DOUBLE:
#line 685
return ncx_getn_double_int(xpp, nelems, tp);
#line 685
default:
#line 685
assert("ncx_pad_getn_Iint invalid type" == 0);
#line 685
}
#line 685
return NC_EBADTYPE;
#line 685
}
#line 685
static int
#line 687
ncx_pad_putn_Ifloat(void **xpp, size_t nelems, const float *tp, nc_type type)
#line 687
{
#line 687
switch(type) {
#line 687
case NC_CHAR:
#line 687
return NC_ECHAR;
#line 687
case NC_BYTE:
#line 687
return ncx_pad_putn_schar_float(xpp, nelems, tp);
#line 687
case NC_SHORT:
#line 687
return ncx_pad_putn_short_float(xpp, nelems, tp);
#line 687
case NC_INT:
#line 687
return ncx_putn_int_float(xpp, nelems, tp);
#line 687
case NC_FLOAT:
#line 687
return ncx_putn_float_float(xpp, nelems, tp);
#line 687
case NC_DOUBLE:
#line 687
return ncx_putn_double_float(xpp, nelems, tp);
#line 687
default:
#line 687
assert("ncx_pad_putn_Ifloat invalid type" == 0);
#line 687
}
#line 687
return NC_EBADTYPE;
#line 687
}
#line 687
static int
#line 688
ncx_pad_getn_Ifloat(const void **xpp, size_t nelems, float *tp, nc_type type)
#line 688
{
#line 688
switch(type) {
#line 688
case NC_CHAR:
#line 688
return NC_ECHAR;
#line 688
case NC_BYTE:
#line 688
return ncx_pad_getn_schar_float(xpp, nelems, tp);
#line 688
case NC_SHORT:
#line 688
return ncx_pad_getn_short_float(xpp, nelems, tp);
#line 688
case NC_INT:
#line 688
return ncx_getn_int_float(xpp, nelems, tp);
#line 688
case NC_FLOAT:
#line 688
return ncx_getn_float_float(xpp, nelems, tp);
#line 688
case NC_DOUBLE:
#line 688
return ncx_getn_double_float(xpp, nelems, tp);
#line 688
default:
#line 688
assert("ncx_pad_getn_Ifloat invalid type" == 0);
#line 688
}
#line 688
return NC_EBADTYPE;
#line 688
}
#line 688
static int
#line 690
ncx_pad_putn_Idouble(void **xpp, size_t nelems, const double *tp, nc_type type)
#line 690
{
#line 690
switch(type) {
#line 690
case NC_CHAR:
#line 690
return NC_ECHAR;
#line 690
case NC_BYTE:
#line 690
return ncx_pad_putn_schar_double(xpp, nelems, tp);
#line 690
case NC_SHORT:
#line 690
return ncx_pad_putn_short_double(xpp, nelems, tp);
#line 690
case NC_INT:
#line 690
return ncx_putn_int_double(xpp, nelems, tp);
#line 690
case NC_FLOAT:
#line 690
return ncx_putn_float_double(xpp, nelems, tp);
#line 690
case NC_DOUBLE:
#line 690
return ncx_putn_double_double(xpp, nelems, tp);
#line 690
default:
#line 690
assert("ncx_pad_putn_Idouble invalid type" == 0);
#line 690
}
#line 690
return NC_EBADTYPE;
#line 690
}
#line 690
static int
#line 691
ncx_pad_getn_Idouble(const void **xpp, size_t nelems, double *tp, nc_type type)
#line 691
{
#line 691
switch(type) {
#line 691
case NC_CHAR:
#line 691
return NC_ECHAR;
#line 691
case NC_BYTE:
#line 691
return ncx_pad_getn_schar_double(xpp, nelems, tp);
#line 691
case NC_SHORT:
#line 691
return ncx_pad_getn_short_double(xpp, nelems, tp);
#line 691
case NC_INT:
#line 691
return ncx_getn_int_double(xpp, nelems, tp);
#line 691
case NC_FLOAT:
#line 691
return ncx_getn_float_double(xpp, nelems, tp);
#line 691
case NC_DOUBLE:
#line 691
return ncx_getn_double_double(xpp, nelems, tp);
#line 691
default:
#line 691
assert("ncx_pad_getn_Idouble invalid type" == 0);
#line 691
}
#line 691
return NC_EBADTYPE;
#line 691
}
#line 691
#ifdef IGNORE
static int
#line 694
ncx_pad_putn_Ilong(void **xpp, size_t nelems, const long *tp, nc_type type)
#line 694
{
#line 694
switch(type) {
#line 694
case NC_CHAR:
#line 694
return NC_ECHAR;
#line 694
case NC_BYTE:
#line 694
return ncx_pad_putn_schar_long(xpp, nelems, tp);
#line 694
case NC_SHORT:
#line 694
return ncx_pad_putn_short_long(xpp, nelems, tp);
#line 694
case NC_INT:
#line 694
return ncx_putn_int_long(xpp, nelems, tp);
#line 694
case NC_FLOAT:
#line 694
return ncx_putn_float_long(xpp, nelems, tp);
#line 694
case NC_DOUBLE:
#line 694
return ncx_putn_double_long(xpp, nelems, tp);
#line 694
default:
#line 694
assert("ncx_pad_putn_Ilong invalid type" == 0);
#line 694
}
#line 694
return NC_EBADTYPE;
#line 694
}
#line 694
static int
#line 695
ncx_pad_getn_Ilong(const void **xpp, size_t nelems, long *tp, nc_type type)
#line 695
{
#line 695
switch(type) {
#line 695
case NC_CHAR:
#line 695
return NC_ECHAR;
#line 695
case NC_BYTE:
#line 695
return ncx_pad_getn_schar_long(xpp, nelems, tp);
#line 695
case NC_SHORT:
#line 695
return ncx_pad_getn_short_long(xpp, nelems, tp);
#line 695
case NC_INT:
#line 695
return ncx_getn_int_long(xpp, nelems, tp);
#line 695
case NC_FLOAT:
#line 695
return ncx_getn_float_long(xpp, nelems, tp);
#line 695
case NC_DOUBLE:
#line 695
return ncx_getn_double_long(xpp, nelems, tp);
#line 695
default:
#line 695
assert("ncx_pad_getn_Ilong invalid type" == 0);
#line 695
}
#line 695
return NC_EBADTYPE;
#line 695
}
#line 695
#endif
static int
#line 698
ncx_pad_putn_Ilonglong(void **xpp, size_t nelems, const longlong *tp, nc_type type)
#line 698
{
#line 698
switch(type) {
#line 698
case NC_CHAR:
#line 698
return NC_ECHAR;
#line 698
case NC_BYTE:
#line 698
return ncx_pad_putn_schar_longlong(xpp, nelems, tp);
#line 698
case NC_SHORT:
#line 698
return ncx_pad_putn_short_longlong(xpp, nelems, tp);
#line 698
case NC_INT:
#line 698
return ncx_putn_int_longlong(xpp, nelems, tp);
#line 698
case NC_FLOAT:
#line 698
return ncx_putn_float_longlong(xpp, nelems, tp);
#line 698
case NC_DOUBLE:
#line 698
return ncx_putn_double_longlong(xpp, nelems, tp);
#line 698
default:
#line 698
assert("ncx_pad_putn_Ilonglong invalid type" == 0);
#line 698
}
#line 698
return NC_EBADTYPE;
#line 698
}
#line 698
static int
#line 699
ncx_pad_getn_Ilonglong(const void **xpp, size_t nelems, longlong *tp, nc_type type)
#line 699
{
#line 699
switch(type) {
#line 699
case NC_CHAR:
#line 699
return NC_ECHAR;
#line 699
case NC_BYTE:
#line 699
return ncx_pad_getn_schar_longlong(xpp, nelems, tp);
#line 699
case NC_SHORT:
#line 699
return ncx_pad_getn_short_longlong(xpp, nelems, tp);
#line 699
case NC_INT:
#line 699
return ncx_getn_int_longlong(xpp, nelems, tp);
#line 699
case NC_FLOAT:
#line 699
return ncx_getn_float_longlong(xpp, nelems, tp);
#line 699
case NC_DOUBLE:
#line 699
return ncx_getn_double_longlong(xpp, nelems, tp);
#line 699
default:
#line 699
assert("ncx_pad_getn_Ilonglong invalid type" == 0);
#line 699
}
#line 699
return NC_EBADTYPE;
#line 699
}
#line 699

View File

@ -311,14 +311,20 @@ generate_basetype(Symbol* tsym, NCConstant* con, Bytebuffer* codebuf, Datalist*
semerror(0,"Compound data fill value not enclosed in {..}, con is NULL.");
}
}
if(!con) { /* fail on null compound. */
semerror(constline(con),"NULL compound data.");
}
if(!islistconst(con)) {/* fail on no compound*/
semerror(constline(con),"Compound data must be enclosed in {..}");
}
data = con->value.compoundv;
nfields = listlength(tsym->subnodes);
dllen = datalistlen(data);
if(dllen > nfields) {
semerror(con->lineno,"Datalist longer than the number of compound fields");
semerror(con->lineno,"Datalist longer than the number of compound fields");
break;
}
generator->listbegin(generator,LISTCOMPOUND,listlength(tsym->subnodes),codebuf,&uid);