Commit e0adf48b authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Replaced cdiGridInqKeyStr() by cdiInqKeyString() for CDI_KEY_LONGNAME.

parent feb064a8
gridDefXname(gridID, xname) -> cdiGridDefKeyStr(gridID, CDI_KEY_XNAME, CDI_MAX_NAME, xname)
gridDefXlongname(gridID, xlongname) -> cdiGridDefKeyStr(gridID, CDI_KEY_XLONGNAME, CDI_MAX_NAME, xlongname)
gridDefXunits(gridID, xunits) -> cdiGridDefKeyStr(gridID, CDI_KEY_XUNITS, CDI_MAX_NAME, xunits)
gridDefYname(gridID, yname) -> cdiGridDefKeyStr(gridID, CDI_KEY_YNAME, CDI_MAX_NAME, yname)
gridDefYlongname(gridID, ylongname) -> cdiGridDefKeyStr(gridID, CDI_KEY_YLONGNAME, CDI_MAX_NAME, ylongname)
gridDefYunits(gridID, yunits) -> cdiGridDefKeyStr(gridID, CDI_KEY_YUNITS, CDI_MAX_NAME, yunits)
gridInqXname(gridID, xname) -> cdiGridInqKeyStr(gridID, CDI_KEY_XNAME, CDI_MAX_NAME, xname)
gridInqXlongname(gridID, xlongname) -> cdiGridInqKeyStr(gridID, CDI_KEY_XLONGNAME, CDI_MAX_NAME, xlongname)
gridInqXunits(gridID, xunits) -> cdiGridInqKeyStr(gridID, CDI_KEY_XUNITS, CDI_MAX_NAME, xunits)
gridInqYname(gridID, yname) -> cdiGridInqKeyStr(gridID, CDI_KEY_YNAME, CDI_MAX_NAME, yname)
gridInqYlongname(gridID, ylongname) -> cdiGridInqKeyStr(gridID, CDI_KEY_YLONGNAME, CDI_MAX_NAME, ylongname)
gridInqYunits(gridID, yunits) -> cdiGridInqKeyStr(gridID, CDI_KEY_YUNITS, CDI_MAX_NAME, yunits)
gridDefXname(gridID, xname) -> cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_NAME, xname)
gridDefXlongname(gridID, xlongname) -> cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_LONGNAME, xlongname)
gridDefXunits(gridID, xunits) -> cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_UNITS, xunits)
gridDefYname(gridID, yname) -> cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_NAME, yname)
gridDefYlongname(gridID, ylongname) -> cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_LONGNAME, ylongname)
gridDefYunits(gridID, yunits) -> cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, yunits)
gridInqXname(gridID, xname) -> cdiInqKeyString(gridID, CDI_XAXIS, CDI_KEY_NAME, xname, &length)
gridInqXlongname(gridID, xlongname) -> cdiInqKeyString(gridID, CDI_XAXIS, CDI_KEY_LONGNAME, xlongname, &length)
gridInqXunits(gridID, xunits) -> cdiInqKeyString(gridID, CDI_XAXIS, CDI_KEY_UNITS, xunits, &length)
gridInqYname(gridID, yname) -> cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_NAME, yname, &length)
gridInqYlongname(gridID, ylongname) -> cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_LONGNAME, ylongname, &length)
gridInqYunits(gridID, yunits) -> cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_UNITS, yunits, &length)
......@@ -832,9 +832,7 @@ int cdiInqKeyLen(int cdiID, int varID, int key, int *length);
int cdiCopyKeys(int cdiID1, int varID1, int cdiID2, int varID2);
// CDI grid keys
#define CDI_KEY_XLONGNAME 903 // X-axis longname
#define CDI_KEY_XUNITS 904 // X-axis units
#define CDI_KEY_YLONGNAME 913 // Y-axis longname
#define CDI_KEY_YUNITS 914 // Y-axis units
#define CDI_KEY_VDIMNAME 920 // Vertex dimension name
#define CDI_KEY_GRIDMAP_VARTYPE 921 // Grid mapping var datatype
......@@ -844,7 +842,7 @@ int cdiCopyKeys(int cdiID1, int varID1, int cdiID2, int varID2);
// CDI zaxis keys
#define CDI_KEY_NAME 941 // Variable name
#define CDI_KEY_DIMNAME 942 // Dimension name
#define CDI_KEY_LONGNAME 943 // Z-axis longname
#define CDI_KEY_LONGNAME 943 // Long name of the variable
#define CDI_KEY_UNITS 944 // Z-axis units
#define CDI_KEY_PSNAME 950 // Z-axis surface pressure name
#define CDI_KEY_P0NAME 951 // Z-axis reference pressure name
......
......@@ -1656,12 +1656,8 @@
!
! CDI grid keys
!
INTEGER CDI_KEY_XLONGNAME
PARAMETER (CDI_KEY_XLONGNAME = 903)
INTEGER CDI_KEY_XUNITS
PARAMETER (CDI_KEY_XUNITS = 904)
INTEGER CDI_KEY_YLONGNAME
PARAMETER (CDI_KEY_YLONGNAME = 913)
INTEGER CDI_KEY_YUNITS
PARAMETER (CDI_KEY_YUNITS = 914)
INTEGER CDI_KEY_VDIMNAME
......
#include "cdi.h"
#include "cdi_int.h"
#include "zaxis.h"
#include "grid.h"
#include "vlist.h"
#include "resource_unpack.h"
......@@ -8,40 +9,28 @@
static
cdi_keys_t *vlist_get_keysp(vlist_t *vlistptr, int varID)
{
cdi_keys_t *keysp = NULL;
if (varID == CDI_GLOBAL)
{
keysp = &vlistptr->keys;
}
else
{
if ( varID >= 0 && varID < vlistptr->nvars )
keysp = &(vlistptr->vars[varID].keys);
}
if (varID == CDI_GLOBAL) return &vlistptr->keys;
else if (varID >= 0 && varID < vlistptr->nvars) return &(vlistptr->vars[varID].keys);
return keysp;
return NULL;
}
static
cdi_keys_t *grid_get_keysp(grid_t *gridptr, int varID)
{
cdi_keys_t *keysp = NULL;
if (varID == CDI_GLOBAL) return &gridptr->keys;
else if (varID == CDI_XAXIS) return &gridptr->x.keys;
else if (varID == CDI_YAXIS) return &gridptr->y.keys;
if (varID == CDI_GLOBAL)
{
keysp = &gridptr->keys;
}
else if (varID == CDI_XAXIS)
{
keysp = &gridptr->x.keys;
}
else if (varID == CDI_YAXIS)
{
keysp = &gridptr->y.keys;
}
return NULL;
}
return keysp;
static
cdi_keys_t *zaxis_get_keysp(zaxis_t *zaxisptr, int varID)
{
if (varID == CDI_GLOBAL) return &zaxisptr->keys;
return NULL;
}
static
......@@ -89,15 +78,12 @@ cdi_keys_t *cdi_get_keysp(int objID, int varID)
grid_t *gridptr = grid_to_pointer(objID);
keysp = grid_get_keysp(gridptr, varID);
}
/*
else if ( varID == CDI_GLOBAL && reshGetTxCode(objID) == ZAXIS )
else if ( reshGetTxCode(objID) == ZAXIS )
{
zaxis_t *zaxisptr = zaxis_to_pointer(objID);
keysp = &zaxisptr->keys;
keysp = zaxis_get_keysp(zaxisptr, varID);
}
else
*/
if ( reshGetTxCode(objID) == VLIST )
else if ( reshGetTxCode(objID) == VLIST )
{
vlist_t *vlistptr = vlist_to_pointer(objID);
keysp = vlist_get_keysp(vlistptr, varID);
......@@ -111,18 +97,14 @@ int vlist_key_compare(vlist_t *a, int varIDA, vlist_t *b, int varIDB, int keynum
{
cdi_keys_t *keyspa = vlist_get_keysp(a, varIDA),
*keyspb = vlist_get_keysp(b, varIDB);
if (keyspa == NULL && keyspb == NULL)
return 0;
xassert(keynum >= 0 && keynum < (int)keyspa->nelems
&& keynum < (int)keyspb->nelems);
if (keyspa == NULL && keyspb == NULL) return 0;
xassert(keynum >= 0 && keynum < (int)keyspa->nelems && keynum < (int)keyspb->nelems);
cdi_key_t *keypa = keyspa->value + keynum,
*keypb = keyspb->value + keynum;
if ( keypa->key != keypb->key )
return 1;
if ( keypa->key != keypb->key ) return 1;
if ( keypa->v.i != keypb->v.i )
return 1;
if ( keypa->v.i != keypb->v.i ) return 1;
return 0;
}
......
......@@ -126,7 +126,6 @@ void grid_axis_init(struct gridaxis_t *axisptr)
axisptr->clength = 0;
axisptr->cvals = NULL;
#endif
axisptr->longname[0] = 0;
axisptr->units[0] = 0;
axisptr->stdname = NULL;
axisptr->keys.nalloc = MAX_KEYS;
......@@ -334,8 +333,8 @@ void cdiGridTypeInit(grid_t *gridptr, int gridtype, size_t size)
gridaxisSetKey(&gridptr->y, CDI_KEY_NAME, "lat");
}
if ( !gridptr->x.longname[0] ) gridSetName(gridptr->x.longname, "longitude");
if ( !gridptr->y.longname[0] ) gridSetName(gridptr->y.longname, "latitude");
gridaxisSetKey(&gridptr->x, CDI_KEY_LONGNAME, "longitude");
gridaxisSetKey(&gridptr->y, CDI_KEY_LONGNAME, "latitude");
if ( !gridptr->x.units[0] ) gridSetName(gridptr->x.units, "degrees_east");
if ( !gridptr->y.units[0] ) gridSetName(gridptr->y.units, "degrees_north");
......@@ -637,9 +636,7 @@ void *grid_key_to_ptr(grid_t *gridptr, int key)
switch (key)
{
case CDI_KEY_XLONGNAME: keyptr = (void*)gridptr->x.longname; break;
case CDI_KEY_XUNITS: keyptr = (void*)gridptr->x.units; break;
case CDI_KEY_YLONGNAME: keyptr = (void*)gridptr->y.longname; break;
case CDI_KEY_YUNITS: keyptr = (void*)gridptr->y.units; break;
}
......@@ -737,9 +734,9 @@ The function @func{gridDefXname} defines the name of a X-axis.
@EndFunction
*/
void gridDefXname(int gridID, const char *xname)
void gridDefXname(int gridID, const char *name)
{
(void)cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_NAME, xname);
(void)cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_NAME, name);
}
/*
......@@ -756,9 +753,9 @@ The function @func{gridDefXlongname} defines the longname of a X-axis.
@EndFunction
*/
void gridDefXlongname(int gridID, const char *xlongname)
void gridDefXlongname(int gridID, const char *longname)
{
(void)cdiGridDefKeyStr(gridID, CDI_KEY_XLONGNAME, CDI_MAX_NAME, xlongname);
(void)cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_LONGNAME, longname);
}
/*
......@@ -794,9 +791,9 @@ The function @func{gridDefYname} defines the name of a Y-axis.
@EndFunction
*/
void gridDefYname(int gridID, const char *yname)
void gridDefYname(int gridID, const char *name)
{
(void)cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_NAME, yname);
(void)cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_NAME, name);
}
/*
......@@ -813,9 +810,9 @@ The function @func{gridDefYlongname} defines the longname of a Y-axis.
@EndFunction
*/
void gridDefYlongname(int gridID, const char *ylongname)
void gridDefYlongname(int gridID, const char *longname)
{
(void)cdiGridDefKeyStr(gridID, CDI_KEY_YLONGNAME, CDI_MAX_NAME, ylongname);
(void)cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_LONGNAME, longname);
}
/*
......@@ -881,9 +878,10 @@ The function @func{gridInqXlongname} returns the longname of a X-axis.
@EndFunction
*/
void gridInqXlongname(int gridID, char *xlongname)
void gridInqXlongname(int gridID, char *longname)
{
(void)cdiGridInqKeyStr(gridID, CDI_KEY_XLONGNAME, CDI_MAX_NAME, xlongname);
int length = CDI_MAX_NAME;
(void)cdiInqKeyString(gridID, CDI_XAXIS, CDI_KEY_LONGNAME, longname, &length);
}
/*
......@@ -965,9 +963,10 @@ The function @func{gridInqYlongname} returns the longname of a Y-axis.
@EndFunction
*/
void gridInqYlongname(int gridID, char *ylongname)
void gridInqYlongname(int gridID, char *longname)
{
(void)cdiGridInqKeyStr(gridID, CDI_KEY_YLONGNAME, CDI_MAX_NAME, ylongname);
int length = CDI_MAX_NAME;
(void)cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_LONGNAME, longname, &length);
}
/*
......@@ -2626,8 +2625,8 @@ int gridCompareP(void *gridptr1, void *gridptr2)
if (strcmp(gridInqKeyStringPtr(&g1->x.keys, CDI_KEY_NAME), gridInqKeyStringPtr(&g2->x.keys, CDI_KEY_NAME))) return differ;
if (strcmp(gridInqKeyStringPtr(&g1->y.keys, CDI_KEY_NAME), gridInqKeyStringPtr(&g2->y.keys, CDI_KEY_NAME))) return differ;
if (strcmp(g1->x.longname, g2->x.longname)) return differ;
if (strcmp(g1->y.longname, g2->y.longname)) return differ;
if (strcmp(gridInqKeyStringPtr(&g1->x.keys, CDI_KEY_LONGNAME), gridInqKeyStringPtr(&g2->x.keys, CDI_KEY_LONGNAME))) return differ;
if (strcmp(gridInqKeyStringPtr(&g1->y.keys, CDI_KEY_LONGNAME), gridInqKeyStringPtr(&g2->y.keys, CDI_KEY_LONGNAME))) return differ;
if (g1->x.stdname != g2->x.stdname) return differ;
if (g1->y.stdname != g2->y.stdname) return differ;
if (strcmp(g1->x.units, g2->x.units)) return differ;
......@@ -2714,8 +2713,10 @@ void gridComplete(grid_t *grid)
if ( name[0] == 0 || name[0] == 'x' ) cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_NAME, "rlon");
name = gridInqKeyStringPtr(&grid->y.keys, CDI_KEY_NAME);
if ( name[0] == 0 || name[0] == 'y' ) cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_NAME, "rlat");
if ( grid->x.longname[0] == 0 ) strcpy(grid->x.longname, "longitude in rotated pole grid");
if ( grid->y.longname[0] == 0 ) strcpy(grid->y.longname, "latitude in rotated pole grid");
name = gridInqKeyStringPtr(&grid->x.keys, CDI_KEY_LONGNAME);
if ( name[0] == 0 ) cdiDefKeyString(gridID, CDI_XAXIS, CDI_KEY_LONGNAME, "longitude in rotated pole grid");
name = gridInqKeyStringPtr(&grid->y.keys, CDI_KEY_LONGNAME);
if ( name[0] == 0 ) cdiDefKeyString(gridID, CDI_YAXIS, CDI_KEY_LONGNAME, "latitude in rotated pole grid");
grid->x.stdname = xystdname_tab[grid_xystdname_grid_latlon][0];
grid->y.stdname = xystdname_tab[grid_xystdname_grid_latlon][1];
if ( grid->x.units[0] == 0 ) strcpy(grid->x.units, "degrees");
......@@ -2796,9 +2797,7 @@ void gridComplete(grid_t *grid)
}
}
grid->x.longname[CDI_MAX_NAME - 1] = 0;
grid->x.units[CDI_MAX_NAME - 1] = 0;
grid->y.longname[CDI_MAX_NAME - 1] = 0;
grid->y.units[CDI_MAX_NAME - 1] = 0;
}
......@@ -3470,7 +3469,8 @@ void gridPrintKernel(int gridID, int opt, FILE *fp)
length = CDI_MAX_NAME;
cdiInqKeyString(gridID, CDI_XAXIS, CDI_KEY_DIMNAME, attstr2, &length);
if ( attstr2[0] && strcmp(attstr, attstr2) ) fprintf(fp, "xdimname = %s\n", attstr2);
attstr[0] = 0; cdiGridInqKeyStr(gridID, CDI_KEY_XLONGNAME, CDI_MAX_NAME, attstr);
length = CDI_MAX_NAME;
cdiInqKeyString(gridID, CDI_XAXIS, CDI_KEY_LONGNAME, attstr, &length);
if ( attstr[0] ) fprintf(fp, "xlongname = %s\n", attstr);
attstr[0] = 0; cdiGridInqKeyStr(gridID, CDI_KEY_XUNITS, CDI_MAX_NAME, attstr);
if ( attstr[0] ) fprintf(fp, "xunits = %s\n", attstr);
......@@ -3484,7 +3484,8 @@ void gridPrintKernel(int gridID, int opt, FILE *fp)
length = CDI_MAX_NAME;
cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_DIMNAME, attstr2, &length);
if ( attstr2[0] && strcmp(attstr, attstr2) ) fprintf(fp, "ydimname = %s\n", attstr2);
attstr[0] = 0; cdiGridInqKeyStr(gridID, CDI_KEY_YLONGNAME, CDI_MAX_NAME, attstr);
length = CDI_MAX_NAME;
cdiInqKeyString(gridID, CDI_YAXIS, CDI_KEY_LONGNAME, attstr, &length);
if ( attstr[0] ) fprintf(fp, "ylongname = %s\n", attstr);
attstr[0] = 0; cdiGridInqKeyStr(gridID, CDI_KEY_YUNITS, CDI_MAX_NAME, attstr);
if ( attstr[0] ) fprintf(fp, "yunits = %s\n", attstr);
......@@ -4349,8 +4350,7 @@ static int gridGetComponentFlags(const grid_t * gridP)
return flags;
}
#define GRID_STR_SERIALIZE(gridP) { gridP->x.longname, gridP->y.longname, \
gridP->x.units, gridP->y.units }
#define GRID_STR_SERIALIZE(gridP) { gridP->x.units, gridP->y.units }
static int
gridGetPackSize(void * voidP, void *context)
......
......@@ -62,7 +62,6 @@ struct gridVirtTable
};
struct gridaxis_t {
char longname[CDI_MAX_NAME];
char units[CDI_MAX_NAME];
const char *stdname;
size_t size; // number of values
......
......@@ -489,9 +489,7 @@ module mo_cdi
public :: cdiInqKeyString
public :: cdiInqKeyLen
public :: cdiCopyKeys
integer(c_int), public, parameter :: CDI_KEY_XLONGNAME = 903
integer(c_int), public, parameter :: CDI_KEY_XUNITS = 904
integer(c_int), public, parameter :: CDI_KEY_YLONGNAME = 913
integer(c_int), public, parameter :: CDI_KEY_YUNITS = 914
integer(c_int), public, parameter :: CDI_KEY_VDIMNAME = 920
integer(c_int), public, parameter :: CDI_KEY_GRIDMAP_VARTYPE = 921
......
......@@ -2071,7 +2071,7 @@ void cdf_copy_axis_attr(ncvar_t *ncvar, struct gridaxis_t *gridaxis)
{
//strcpy(gridaxis->name, ncvar->name);
cdiDefVarKeyBytes(&gridaxis->keys, CDI_KEY_NAME, (const unsigned char*)ncvar->name, (int)sizeof(ncvar->name)+1);
strcpy(gridaxis->longname, ncvar->longname);
cdiDefVarKeyBytes(&gridaxis->keys, CDI_KEY_LONGNAME, (const unsigned char*)ncvar->longname, (int)sizeof(ncvar->longname)+1);
strcpy(gridaxis->units, ncvar->units);
#ifndef USE_MPI
if ( gridaxis->cvals )
......
......@@ -226,7 +226,7 @@ static const struct cdfDefGridAxisInqs {
size_t (*axisSize)(int gridID);
int (*axisDimname)(int cdiID, int varID, int key, char *string, int *length);
int (*axisName)(int cdiID, int varID, int key, char *string, int *length);
int (*axisLongname)(int cdiID, int key, int size, char *mesg);
int (*axisLongname)(int cdiID, int varID, int key, char *string, int *length);
int (*axisUnits)(int cdiID, int key, int size, char *mesg);
void (*axisStdname)(int cdiID, char *dimstdname);
double (*axisVal)(int gridID, size_t index);
......@@ -236,7 +236,7 @@ static const struct cdfDefGridAxisInqs {
.axisSize = gridInqXsize,
.axisDimname = cdiInqKeyString,
.axisName = cdiInqKeyString,
.axisLongname = cdiGridInqKeyStr,
.axisLongname = cdiInqKeyString,
.axisUnits = cdiGridInqKeyStr,
.axisStdname = gridInqXstdname,
.axisVal = gridInqXval,
......@@ -246,14 +246,14 @@ static const struct cdfDefGridAxisInqs {
.axisSize = gridInqYsize,
.axisDimname = cdiInqKeyString,
.axisName = cdiInqKeyString,
.axisLongname = cdiGridInqKeyStr,
.axisLongname = cdiInqKeyString,
.axisUnits = cdiGridInqKeyStr,
.axisStdname = gridInqYstdname,
.axisVal = gridInqYval,
.axisValsPtr = gridInqYvalsPtr,
.axisBoundsPtr = gridInqYboundsPtr,
}, gridInqsZ = {
.axisLongname = cdiZaxisInqKeyStr,
.axisLongname = cdiInqKeyString,
.axisUnits = cdiZaxisInqKeyStr,
.axisStdname = zaxisInqStdname,
};
......@@ -268,14 +268,15 @@ void cdfPutGridStdAtts(int fileID, int ncvarid, int gridID, int dimtype, const s
if ( (len = strlen(stdname)) )
cdf_put_att_text(fileID, ncvarid, "standard_name", len, stdname);
char longname[CDI_MAX_NAME]; longname[0] = 0;
int keyname = (dimtype == 'Z') ? CDI_KEY_LONGNAME : (dimtype == 'X') ? CDI_KEY_XLONGNAME : CDI_KEY_YLONGNAME;
inqs->axisLongname(gridID, keyname, CDI_MAX_NAME, longname);
char longname[CDI_MAX_NAME];
int length = CDI_MAX_NAME;
int axisKey = (dimtype == 'Z') ? CDI_GLOBAL : ((dimtype == 'X') ? CDI_XAXIS : CDI_YAXIS);
inqs->axisLongname(gridID, axisKey, CDI_KEY_LONGNAME, longname, &length);
if ( longname[0] && (len = strlen(longname)) )
cdf_put_att_text(fileID, ncvarid, "long_name", len, longname);
char units[CDI_MAX_NAME]; units[0] = 0;
keyname = (dimtype == 'Z') ? CDI_KEY_UNITS : (dimtype == 'X') ? CDI_KEY_XUNITS : CDI_KEY_YUNITS;
int keyname = (dimtype == 'Z') ? CDI_KEY_UNITS : (dimtype == 'X') ? CDI_KEY_XUNITS : CDI_KEY_YUNITS;
inqs->axisUnits(gridID, keyname, CDI_MAX_NAME, units);
if ( units[0] && (len = strlen(units)) )
cdf_put_att_text(fileID, ncvarid, "units", len, units);
......
......@@ -143,8 +143,12 @@ void zaxis_init(zaxis_t *zaxisptr)
zaxisptr->number = 0;
zaxisptr->nhlev = 0;
memset(zaxisptr->uuid, 0, CDI_UUID_SIZE);
zaxisptr->atts.nalloc = MAX_ATTRIBUTES;
zaxisptr->atts.nelems = 0;
zaxisptr->keys.nalloc = MAX_KEYS;
zaxisptr->keys.nelems = 0;
for ( int i = 0; i < MAX_KEYS; ++i )
zaxisptr->keys.value[i].length = 0;
zaxisptr->atts.nalloc = MAX_ATTRIBUTES;
zaxisptr->atts.nelems = 0;
}
static
......
......@@ -5,6 +5,7 @@
#include "config.h"
#endif
#include "cdi_key.h"
#include "cdi_att.h"
typedef struct {
......@@ -45,6 +46,7 @@ typedef struct {
int number; /* Reference number to a generalized Z-axis */
int nhlev;
unsigned char uuid[CDI_UUID_SIZE];
cdi_keys_t keys;
cdi_atts_t atts;
}
zaxis_t;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment