Commit 39e130f6 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Moved grid xy dimname to struct gridaxis_t.

parent abec007a
......@@ -152,8 +152,8 @@ void grid_init(grid_t *gridptr)
gridptr->angle = 0.0;
gridptr->lcomplex = 0;
gridptr->hasdims = TRUE;
gridptr->xdimname[0] = 0;
gridptr->ydimname[0] = 0;
gridptr->x.dimname[0] = 0;
gridptr->y.dimname[0] = 0;
gridptr->vdimname[0] = 0;
gridptr->x.name[0] = 0;
gridptr->y.name[0] = 0;
......@@ -607,8 +607,8 @@ char *grid_key_to_string(grid_t *gridptr, int key)
switch (key)
{
case CDI_GRID_XDIMNAME: gridstring = gridptr->xdimname; break;
case CDI_GRID_YDIMNAME: gridstring = gridptr->ydimname; break;
case CDI_GRID_XDIMNAME: gridstring = gridptr->x.dimname; break;
case CDI_GRID_YDIMNAME: gridstring = gridptr->y.dimname; break;
case CDI_GRID_VDIMNAME: gridstring = gridptr->vdimname; break;
}
......@@ -2770,7 +2770,7 @@ static void gridComplete(grid_t *grid)
grid->y.units[CDI_MAX_NAME - 1] = 0;
}
#define GRID_STR_SERIALIZE(gridP) { gridP->xdimname, gridP->ydimname, \
#define GRID_STR_SERIALIZE(gridP) { gridP->x.dimname, gridP->y.dimname, \
gridP->vdimname, gridP->x.name, gridP->y.name, \
gridP->x.longname, gridP->y.longname, \
gridP->x.units, gridP->y.units }
......
......@@ -47,6 +47,7 @@ struct gridaxis_t {
char name[CDI_MAX_NAME];
char longname[CDI_MAX_NAME];
char units[CDI_MAX_NAME];
char dimname[CDI_MAX_NAME];
};
struct grid_t {
......@@ -105,8 +106,6 @@ struct grid_t {
short hasdims;
const char *xstdname;
const char *ystdname;
char xdimname[CDI_MAX_NAME];
char ydimname[CDI_MAX_NAME];
char vdimname[CDI_MAX_NAME];
char *name;
struct gridaxis_t x;
......
Supports Markdown
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