mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-24 16:04:40 +08:00
sync lines for generated C files
m4 can emit 'sync lines' which tell the toolchain "hey, this code actually came from this other file over here". Should help prevent anyone accidentally editing a generated file.
This commit is contained in:
parent
54affd88ff
commit
af4eb0fb1d
@ -43,7 +43,7 @@ EXTRA_DIST = attr.m4 ncx.m4 putget.m4 $(man_MANS) CMakeLists.txt XGetopt.c
|
||||
|
||||
# This tells make how to turn .m4 files into .c files.
|
||||
.m4.c:
|
||||
m4 $(AM_M4FLAGS) $(M4FLAGS) $< >$@
|
||||
m4 $(AM_M4FLAGS) $(M4FLAGS) -s $< >$@
|
||||
|
||||
# The C API man page.
|
||||
man_MANS = netcdf.3
|
||||
|
363
libsrc/attr.c
363
libsrc/attr.c
@ -1,4 +1,6 @@
|
||||
#line 5 "../../libsrc/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.
|
||||
@ -113,7 +115,7 @@ new_NC_attr(
|
||||
free(name);
|
||||
if(strp == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
attrp = new_x_NC_attr(strp, type, nelems);
|
||||
if(attrp == NULL)
|
||||
{
|
||||
@ -132,8 +134,7 @@ dup_NC_attr(const NC_attr *rattrp)
|
||||
rattrp->type, rattrp->nelems);
|
||||
if(attrp == NULL)
|
||||
return NULL;
|
||||
if(attrp->xvalue && rattrp->xvalue)
|
||||
(void) memcpy(attrp->xvalue, rattrp->xvalue, rattrp->xsz);
|
||||
(void) memcpy(attrp->xvalue, rattrp->xvalue, rattrp->xsz);
|
||||
return attrp;
|
||||
}
|
||||
|
||||
@ -175,7 +176,7 @@ void
|
||||
free_NC_attrarrayV(NC_attrarray *ncap)
|
||||
{
|
||||
assert(ncap != NULL);
|
||||
|
||||
|
||||
if(ncap->nalloc == 0)
|
||||
return;
|
||||
|
||||
@ -264,7 +265,7 @@ incr_NC_attrarray(NC_attrarray *ncap, NC_attr *newelemp)
|
||||
(ncap->nalloc + NC_ARRAY_GROWBY) * sizeof(NC_attr *));
|
||||
if(vp == NULL)
|
||||
return NC_ENOMEM;
|
||||
|
||||
|
||||
ncap->value = vp;
|
||||
ncap->nalloc += NC_ARRAY_GROWBY;
|
||||
}
|
||||
@ -361,7 +362,7 @@ NC_findattr(const NC_attrarray *ncap, const char *uname)
|
||||
/*
|
||||
* Look up by ncid, varid and name, return NULL if not found
|
||||
*/
|
||||
static int
|
||||
static int
|
||||
NC_lookupattr(int ncid,
|
||||
int varid,
|
||||
const char *name, /* attribute name */
|
||||
@ -423,7 +424,7 @@ NC3_inq_attname(int ncid, int varid, int attnum, char *name)
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
int
|
||||
NC3_inq_attid(int ncid, int varid, const char *name, int *attnump)
|
||||
{
|
||||
int status;
|
||||
@ -440,7 +441,7 @@ NC3_inq_attid(int ncid, int varid, const char *name, int *attnump)
|
||||
ncap = NC_attrarray0(ncp, varid);
|
||||
if(ncap == NULL)
|
||||
return NC_ENOTVAR;
|
||||
|
||||
|
||||
|
||||
attrpp = NC_findattr(ncap, name);
|
||||
if(attrpp == NULL)
|
||||
@ -576,7 +577,7 @@ NC3_del_att(int ncid, int varid, const char *uname)
|
||||
char *name = (char *)utf8proc_NFC((const unsigned char *)uname);
|
||||
if(name == NULL)
|
||||
return NC_ENOMEM;
|
||||
|
||||
|
||||
/* sortof inline NC_findattr() */
|
||||
slen = strlen(name);
|
||||
|
||||
@ -611,367 +612,704 @@ NC3_del_att(int ncid, int varid, const char *uname)
|
||||
return NC_NOERR;
|
||||
}
|
||||
|
||||
#line 673
|
||||
|
||||
static int
|
||||
#line 674
|
||||
ncx_pad_putn_Iuchar(void **xpp, size_t nelems, const uchar *tp, nc_type type)
|
||||
#line 674
|
||||
{
|
||||
#line 674
|
||||
switch(type) {
|
||||
#line 674
|
||||
case NC_CHAR:
|
||||
#line 674
|
||||
return NC_ECHAR;
|
||||
#line 674
|
||||
case NC_BYTE:
|
||||
#line 674
|
||||
return ncx_pad_putn_schar_uchar(xpp, nelems, tp);
|
||||
#line 674
|
||||
case NC_SHORT:
|
||||
#line 674
|
||||
return ncx_pad_putn_short_uchar(xpp, nelems, tp);
|
||||
#line 674
|
||||
case NC_INT:
|
||||
#line 674
|
||||
return ncx_putn_int_uchar(xpp, nelems, tp);
|
||||
#line 674
|
||||
case NC_FLOAT:
|
||||
#line 674
|
||||
return ncx_putn_float_uchar(xpp, nelems, tp);
|
||||
#line 674
|
||||
case NC_DOUBLE:
|
||||
#line 674
|
||||
return ncx_putn_double_uchar(xpp, nelems, tp);
|
||||
#line 674
|
||||
default:
|
||||
#line 674
|
||||
assert("ncx_pad_putn_Iuchar invalid type" == 0);
|
||||
#line 674
|
||||
}
|
||||
#line 674
|
||||
return NC_EBADTYPE;
|
||||
#line 674
|
||||
}
|
||||
#line 674
|
||||
|
||||
static int
|
||||
#line 675
|
||||
ncx_pad_getn_Iuchar(const void **xpp, size_t nelems, 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_getn_schar_uchar(xpp, nelems, tp);
|
||||
#line 675
|
||||
case NC_SHORT:
|
||||
#line 675
|
||||
return ncx_pad_getn_short_uchar(xpp, nelems, tp);
|
||||
#line 675
|
||||
case NC_INT:
|
||||
#line 675
|
||||
return ncx_getn_int_uchar(xpp, nelems, tp);
|
||||
#line 675
|
||||
case NC_FLOAT:
|
||||
#line 675
|
||||
return ncx_getn_float_uchar(xpp, nelems, tp);
|
||||
#line 675
|
||||
case NC_DOUBLE:
|
||||
#line 675
|
||||
return ncx_getn_double_uchar(xpp, nelems, tp);
|
||||
#line 675
|
||||
default:
|
||||
#line 675
|
||||
assert("ncx_pad_getn_Iuchar invalid type" == 0);
|
||||
#line 675
|
||||
}
|
||||
#line 675
|
||||
return NC_EBADTYPE;
|
||||
#line 675
|
||||
}
|
||||
#line 675
|
||||
|
||||
|
||||
static int
|
||||
#line 677
|
||||
ncx_pad_putn_Ischar(void **xpp, size_t nelems, const schar *tp, nc_type type)
|
||||
#line 677
|
||||
{
|
||||
#line 677
|
||||
switch(type) {
|
||||
#line 677
|
||||
case NC_CHAR:
|
||||
#line 677
|
||||
return NC_ECHAR;
|
||||
#line 677
|
||||
case NC_BYTE:
|
||||
#line 677
|
||||
return ncx_pad_putn_schar_schar(xpp, nelems, tp);
|
||||
#line 677
|
||||
case NC_SHORT:
|
||||
#line 677
|
||||
return ncx_pad_putn_short_schar(xpp, nelems, tp);
|
||||
#line 677
|
||||
case NC_INT:
|
||||
#line 677
|
||||
return ncx_putn_int_schar(xpp, nelems, tp);
|
||||
#line 677
|
||||
case NC_FLOAT:
|
||||
#line 677
|
||||
return ncx_putn_float_schar(xpp, nelems, tp);
|
||||
#line 677
|
||||
case NC_DOUBLE:
|
||||
#line 677
|
||||
return ncx_putn_double_schar(xpp, nelems, tp);
|
||||
#line 677
|
||||
default:
|
||||
#line 677
|
||||
assert("ncx_pad_putn_Ischar invalid type" == 0);
|
||||
#line 677
|
||||
}
|
||||
#line 677
|
||||
return NC_EBADTYPE;
|
||||
#line 677
|
||||
}
|
||||
#line 677
|
||||
|
||||
static int
|
||||
#line 678
|
||||
ncx_pad_getn_Ischar(const void **xpp, size_t nelems, 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_getn_schar_schar(xpp, nelems, tp);
|
||||
#line 678
|
||||
case NC_SHORT:
|
||||
#line 678
|
||||
return ncx_pad_getn_short_schar(xpp, nelems, tp);
|
||||
#line 678
|
||||
case NC_INT:
|
||||
#line 678
|
||||
return ncx_getn_int_schar(xpp, nelems, tp);
|
||||
#line 678
|
||||
case NC_FLOAT:
|
||||
#line 678
|
||||
return ncx_getn_float_schar(xpp, nelems, tp);
|
||||
#line 678
|
||||
case NC_DOUBLE:
|
||||
#line 678
|
||||
return ncx_getn_double_schar(xpp, nelems, tp);
|
||||
#line 678
|
||||
default:
|
||||
#line 678
|
||||
assert("ncx_pad_getn_Ischar invalid type" == 0);
|
||||
#line 678
|
||||
}
|
||||
#line 678
|
||||
return NC_EBADTYPE;
|
||||
#line 678
|
||||
}
|
||||
#line 678
|
||||
|
||||
|
||||
static int
|
||||
#line 680
|
||||
ncx_pad_putn_Ishort(void **xpp, size_t nelems, const short *tp, nc_type type)
|
||||
#line 680
|
||||
{
|
||||
#line 680
|
||||
switch(type) {
|
||||
#line 680
|
||||
case NC_CHAR:
|
||||
#line 680
|
||||
return NC_ECHAR;
|
||||
#line 680
|
||||
case NC_BYTE:
|
||||
#line 680
|
||||
return ncx_pad_putn_schar_short(xpp, nelems, tp);
|
||||
#line 680
|
||||
case NC_SHORT:
|
||||
#line 680
|
||||
return ncx_pad_putn_short_short(xpp, nelems, tp);
|
||||
#line 680
|
||||
case NC_INT:
|
||||
#line 680
|
||||
return ncx_putn_int_short(xpp, nelems, tp);
|
||||
#line 680
|
||||
case NC_FLOAT:
|
||||
#line 680
|
||||
return ncx_putn_float_short(xpp, nelems, tp);
|
||||
#line 680
|
||||
case NC_DOUBLE:
|
||||
#line 680
|
||||
return ncx_putn_double_short(xpp, nelems, tp);
|
||||
#line 680
|
||||
default:
|
||||
#line 680
|
||||
assert("ncx_pad_putn_Ishort invalid type" == 0);
|
||||
#line 680
|
||||
}
|
||||
#line 680
|
||||
return NC_EBADTYPE;
|
||||
#line 680
|
||||
}
|
||||
#line 680
|
||||
|
||||
static int
|
||||
#line 681
|
||||
ncx_pad_getn_Ishort(const void **xpp, size_t nelems, 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_getn_schar_short(xpp, nelems, tp);
|
||||
#line 681
|
||||
case NC_SHORT:
|
||||
#line 681
|
||||
return ncx_pad_getn_short_short(xpp, nelems, tp);
|
||||
#line 681
|
||||
case NC_INT:
|
||||
#line 681
|
||||
return ncx_getn_int_short(xpp, nelems, tp);
|
||||
#line 681
|
||||
case NC_FLOAT:
|
||||
#line 681
|
||||
return ncx_getn_float_short(xpp, nelems, tp);
|
||||
#line 681
|
||||
case NC_DOUBLE:
|
||||
#line 681
|
||||
return ncx_getn_double_short(xpp, nelems, tp);
|
||||
#line 681
|
||||
default:
|
||||
#line 681
|
||||
assert("ncx_pad_getn_Ishort invalid type" == 0);
|
||||
#line 681
|
||||
}
|
||||
#line 681
|
||||
return NC_EBADTYPE;
|
||||
#line 681
|
||||
}
|
||||
#line 681
|
||||
|
||||
|
||||
static int
|
||||
#line 683
|
||||
ncx_pad_putn_Iint(void **xpp, size_t nelems, const int *tp, nc_type type)
|
||||
#line 683
|
||||
{
|
||||
#line 683
|
||||
switch(type) {
|
||||
#line 683
|
||||
case NC_CHAR:
|
||||
#line 683
|
||||
return NC_ECHAR;
|
||||
#line 683
|
||||
case NC_BYTE:
|
||||
#line 683
|
||||
return ncx_pad_putn_schar_int(xpp, nelems, tp);
|
||||
#line 683
|
||||
case NC_SHORT:
|
||||
#line 683
|
||||
return ncx_pad_putn_short_int(xpp, nelems, tp);
|
||||
#line 683
|
||||
case NC_INT:
|
||||
#line 683
|
||||
return ncx_putn_int_int(xpp, nelems, tp);
|
||||
#line 683
|
||||
case NC_FLOAT:
|
||||
#line 683
|
||||
return ncx_putn_float_int(xpp, nelems, tp);
|
||||
#line 683
|
||||
case NC_DOUBLE:
|
||||
#line 683
|
||||
return ncx_putn_double_int(xpp, nelems, tp);
|
||||
#line 683
|
||||
default:
|
||||
#line 683
|
||||
assert("ncx_pad_putn_Iint invalid type" == 0);
|
||||
#line 683
|
||||
}
|
||||
#line 683
|
||||
return NC_EBADTYPE;
|
||||
#line 683
|
||||
}
|
||||
#line 683
|
||||
|
||||
static int
|
||||
#line 684
|
||||
ncx_pad_getn_Iint(const void **xpp, size_t nelems, 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_getn_schar_int(xpp, nelems, tp);
|
||||
#line 684
|
||||
case NC_SHORT:
|
||||
#line 684
|
||||
return ncx_pad_getn_short_int(xpp, nelems, tp);
|
||||
#line 684
|
||||
case NC_INT:
|
||||
#line 684
|
||||
return ncx_getn_int_int(xpp, nelems, tp);
|
||||
#line 684
|
||||
case NC_FLOAT:
|
||||
#line 684
|
||||
return ncx_getn_float_int(xpp, nelems, tp);
|
||||
#line 684
|
||||
case NC_DOUBLE:
|
||||
#line 684
|
||||
return ncx_getn_double_int(xpp, nelems, tp);
|
||||
#line 684
|
||||
default:
|
||||
#line 684
|
||||
assert("ncx_pad_getn_Iint invalid type" == 0);
|
||||
#line 684
|
||||
}
|
||||
#line 684
|
||||
return NC_EBADTYPE;
|
||||
#line 684
|
||||
}
|
||||
#line 684
|
||||
|
||||
|
||||
static int
|
||||
#line 686
|
||||
ncx_pad_putn_Ifloat(void **xpp, size_t nelems, const float *tp, nc_type type)
|
||||
#line 686
|
||||
{
|
||||
#line 686
|
||||
switch(type) {
|
||||
#line 686
|
||||
case NC_CHAR:
|
||||
#line 686
|
||||
return NC_ECHAR;
|
||||
#line 686
|
||||
case NC_BYTE:
|
||||
#line 686
|
||||
return ncx_pad_putn_schar_float(xpp, nelems, tp);
|
||||
#line 686
|
||||
case NC_SHORT:
|
||||
#line 686
|
||||
return ncx_pad_putn_short_float(xpp, nelems, tp);
|
||||
#line 686
|
||||
case NC_INT:
|
||||
#line 686
|
||||
return ncx_putn_int_float(xpp, nelems, tp);
|
||||
#line 686
|
||||
case NC_FLOAT:
|
||||
#line 686
|
||||
return ncx_putn_float_float(xpp, nelems, tp);
|
||||
#line 686
|
||||
case NC_DOUBLE:
|
||||
#line 686
|
||||
return ncx_putn_double_float(xpp, nelems, tp);
|
||||
#line 686
|
||||
default:
|
||||
#line 686
|
||||
assert("ncx_pad_putn_Ifloat invalid type" == 0);
|
||||
#line 686
|
||||
}
|
||||
#line 686
|
||||
return NC_EBADTYPE;
|
||||
#line 686
|
||||
}
|
||||
#line 686
|
||||
|
||||
static int
|
||||
#line 687
|
||||
ncx_pad_getn_Ifloat(const void **xpp, size_t nelems, 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_getn_schar_float(xpp, nelems, tp);
|
||||
#line 687
|
||||
case NC_SHORT:
|
||||
#line 687
|
||||
return ncx_pad_getn_short_float(xpp, nelems, tp);
|
||||
#line 687
|
||||
case NC_INT:
|
||||
#line 687
|
||||
return ncx_getn_int_float(xpp, nelems, tp);
|
||||
#line 687
|
||||
case NC_FLOAT:
|
||||
#line 687
|
||||
return ncx_getn_float_float(xpp, nelems, tp);
|
||||
#line 687
|
||||
case NC_DOUBLE:
|
||||
#line 687
|
||||
return ncx_getn_double_float(xpp, nelems, tp);
|
||||
#line 687
|
||||
default:
|
||||
#line 687
|
||||
assert("ncx_pad_getn_Ifloat invalid type" == 0);
|
||||
#line 687
|
||||
}
|
||||
#line 687
|
||||
return NC_EBADTYPE;
|
||||
#line 687
|
||||
}
|
||||
#line 687
|
||||
|
||||
|
||||
static int
|
||||
#line 689
|
||||
ncx_pad_putn_Idouble(void **xpp, size_t nelems, const double *tp, nc_type type)
|
||||
#line 689
|
||||
{
|
||||
#line 689
|
||||
switch(type) {
|
||||
#line 689
|
||||
case NC_CHAR:
|
||||
#line 689
|
||||
return NC_ECHAR;
|
||||
#line 689
|
||||
case NC_BYTE:
|
||||
#line 689
|
||||
return ncx_pad_putn_schar_double(xpp, nelems, tp);
|
||||
#line 689
|
||||
case NC_SHORT:
|
||||
#line 689
|
||||
return ncx_pad_putn_short_double(xpp, nelems, tp);
|
||||
#line 689
|
||||
case NC_INT:
|
||||
#line 689
|
||||
return ncx_putn_int_double(xpp, nelems, tp);
|
||||
#line 689
|
||||
case NC_FLOAT:
|
||||
#line 689
|
||||
return ncx_putn_float_double(xpp, nelems, tp);
|
||||
#line 689
|
||||
case NC_DOUBLE:
|
||||
#line 689
|
||||
return ncx_putn_double_double(xpp, nelems, tp);
|
||||
#line 689
|
||||
default:
|
||||
#line 689
|
||||
assert("ncx_pad_putn_Idouble invalid type" == 0);
|
||||
#line 689
|
||||
}
|
||||
#line 689
|
||||
return NC_EBADTYPE;
|
||||
#line 689
|
||||
}
|
||||
#line 689
|
||||
|
||||
static int
|
||||
#line 690
|
||||
ncx_pad_getn_Idouble(const void **xpp, size_t nelems, 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_getn_schar_double(xpp, nelems, tp);
|
||||
#line 690
|
||||
case NC_SHORT:
|
||||
#line 690
|
||||
return ncx_pad_getn_short_double(xpp, nelems, tp);
|
||||
#line 690
|
||||
case NC_INT:
|
||||
#line 690
|
||||
return ncx_getn_int_double(xpp, nelems, tp);
|
||||
#line 690
|
||||
case NC_FLOAT:
|
||||
#line 690
|
||||
return ncx_getn_float_double(xpp, nelems, tp);
|
||||
#line 690
|
||||
case NC_DOUBLE:
|
||||
#line 690
|
||||
return ncx_getn_double_double(xpp, nelems, tp);
|
||||
#line 690
|
||||
default:
|
||||
#line 690
|
||||
assert("ncx_pad_getn_Idouble invalid type" == 0);
|
||||
#line 690
|
||||
}
|
||||
#line 690
|
||||
return NC_EBADTYPE;
|
||||
#line 690
|
||||
}
|
||||
#line 690
|
||||
|
||||
|
||||
#ifdef IGNORE
|
||||
static int
|
||||
#line 693
|
||||
ncx_pad_putn_Ilong(void **xpp, size_t nelems, const long *tp, nc_type type)
|
||||
#line 693
|
||||
{
|
||||
#line 693
|
||||
switch(type) {
|
||||
#line 693
|
||||
case NC_CHAR:
|
||||
#line 693
|
||||
return NC_ECHAR;
|
||||
#line 693
|
||||
case NC_BYTE:
|
||||
#line 693
|
||||
return ncx_pad_putn_schar_long(xpp, nelems, tp);
|
||||
#line 693
|
||||
case NC_SHORT:
|
||||
#line 693
|
||||
return ncx_pad_putn_short_long(xpp, nelems, tp);
|
||||
#line 693
|
||||
case NC_INT:
|
||||
#line 693
|
||||
return ncx_putn_int_long(xpp, nelems, tp);
|
||||
#line 693
|
||||
case NC_FLOAT:
|
||||
#line 693
|
||||
return ncx_putn_float_long(xpp, nelems, tp);
|
||||
#line 693
|
||||
case NC_DOUBLE:
|
||||
#line 693
|
||||
return ncx_putn_double_long(xpp, nelems, tp);
|
||||
#line 693
|
||||
default:
|
||||
#line 693
|
||||
assert("ncx_pad_putn_Ilong invalid type" == 0);
|
||||
#line 693
|
||||
}
|
||||
#line 693
|
||||
return NC_EBADTYPE;
|
||||
#line 693
|
||||
}
|
||||
#line 693
|
||||
|
||||
static int
|
||||
#line 694
|
||||
ncx_pad_getn_Ilong(const void **xpp, size_t nelems, 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_getn_schar_long(xpp, nelems, tp);
|
||||
#line 694
|
||||
case NC_SHORT:
|
||||
#line 694
|
||||
return ncx_pad_getn_short_long(xpp, nelems, tp);
|
||||
#line 694
|
||||
case NC_INT:
|
||||
#line 694
|
||||
return ncx_getn_int_long(xpp, nelems, tp);
|
||||
#line 694
|
||||
case NC_FLOAT:
|
||||
#line 694
|
||||
return ncx_getn_float_long(xpp, nelems, tp);
|
||||
#line 694
|
||||
case NC_DOUBLE:
|
||||
#line 694
|
||||
return ncx_getn_double_long(xpp, nelems, tp);
|
||||
#line 694
|
||||
default:
|
||||
#line 694
|
||||
assert("ncx_pad_getn_Ilong invalid type" == 0);
|
||||
#line 694
|
||||
}
|
||||
#line 694
|
||||
return NC_EBADTYPE;
|
||||
#line 694
|
||||
}
|
||||
#line 694
|
||||
|
||||
#endif
|
||||
|
||||
static int
|
||||
#line 697
|
||||
ncx_pad_putn_Ilonglong(void **xpp, size_t nelems, const longlong *tp, nc_type type)
|
||||
#line 697
|
||||
{
|
||||
#line 697
|
||||
switch(type) {
|
||||
#line 697
|
||||
case NC_CHAR:
|
||||
#line 697
|
||||
return NC_ECHAR;
|
||||
#line 697
|
||||
case NC_BYTE:
|
||||
#line 697
|
||||
return ncx_pad_putn_schar_longlong(xpp, nelems, tp);
|
||||
#line 697
|
||||
case NC_SHORT:
|
||||
#line 697
|
||||
return ncx_pad_putn_short_longlong(xpp, nelems, tp);
|
||||
#line 697
|
||||
case NC_INT:
|
||||
#line 697
|
||||
return ncx_putn_int_longlong(xpp, nelems, tp);
|
||||
#line 697
|
||||
case NC_FLOAT:
|
||||
#line 697
|
||||
return ncx_putn_float_longlong(xpp, nelems, tp);
|
||||
#line 697
|
||||
case NC_DOUBLE:
|
||||
#line 697
|
||||
return ncx_putn_double_longlong(xpp, nelems, tp);
|
||||
#line 697
|
||||
default:
|
||||
#line 697
|
||||
assert("ncx_pad_putn_Ilonglong invalid type" == 0);
|
||||
#line 697
|
||||
}
|
||||
#line 697
|
||||
return NC_EBADTYPE;
|
||||
#line 697
|
||||
}
|
||||
#line 697
|
||||
|
||||
static int
|
||||
#line 698
|
||||
ncx_pad_getn_Ilonglong(const void **xpp, size_t nelems, 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_getn_schar_longlong(xpp, nelems, tp);
|
||||
#line 698
|
||||
case NC_SHORT:
|
||||
#line 698
|
||||
return ncx_pad_getn_short_longlong(xpp, nelems, tp);
|
||||
#line 698
|
||||
case NC_INT:
|
||||
#line 698
|
||||
return ncx_getn_int_longlong(xpp, nelems, tp);
|
||||
#line 698
|
||||
case NC_FLOAT:
|
||||
#line 698
|
||||
return ncx_getn_float_longlong(xpp, nelems, tp);
|
||||
#line 698
|
||||
case NC_DOUBLE:
|
||||
#line 698
|
||||
return ncx_getn_double_longlong(xpp, nelems, tp);
|
||||
#line 698
|
||||
default:
|
||||
#line 698
|
||||
assert("ncx_pad_getn_Ilonglong invalid type" == 0);
|
||||
#line 698
|
||||
}
|
||||
#line 698
|
||||
return NC_EBADTYPE;
|
||||
#line 698
|
||||
}
|
||||
#line 698
|
||||
|
||||
|
||||
|
||||
@ -1061,10 +1399,10 @@ NC3_put_att(
|
||||
if(!NC_indef(ncp)) {
|
||||
const size_t xsz = ncx_len_NC_attrV(type, nelems);
|
||||
attrp = *attrpp; /* convenience */
|
||||
|
||||
|
||||
if(xsz > attrp->xsz) return NC_ENOTINDEFINE;
|
||||
/* else, we can reuse existing without redef */
|
||||
|
||||
|
||||
attrp->xsz = xsz;
|
||||
attrp->type = type;
|
||||
attrp->nelems = nelems;
|
||||
@ -1073,7 +1411,7 @@ NC3_put_att(
|
||||
void *xp = attrp->xvalue;
|
||||
status = dispatchput(&xp, nelems, (const void*)value, type, memtype);
|
||||
}
|
||||
|
||||
|
||||
set_NC_hdirty(ncp);
|
||||
|
||||
if(NC_doHsync(ncp)) {
|
||||
@ -1174,3 +1512,4 @@ NC3_get_att(
|
||||
status = NC_EBADTYPE;
|
||||
return status;
|
||||
}
|
||||
|
||||
|
6159
libsrc/ncx.c
6159
libsrc/ncx.c
File diff suppressed because it is too large
Load Diff
3959
libsrc/putget.c
3959
libsrc/putget.c
File diff suppressed because it is too large
Load Diff
@ -106,4 +106,4 @@ EXTRA_DIST += ref_tst_diskless2.cdl CMakeLists.txt
|
||||
|
||||
# This rule tells make how to turn our .m4 files into .c files.
|
||||
.m4.c:
|
||||
m4 $(AM_M4FLAGS) $(M4FLAGS) $< >$@
|
||||
m4 $(AM_M4FLAGS) $(M4FLAGS) -s $< >$@
|
||||
|
6233
nc_test/test_get.c
6233
nc_test/test_get.c
File diff suppressed because it is too large
Load Diff
7206
nc_test/test_put.c
7206
nc_test/test_put.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user