Commit 2d8cb156 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Renamed cdiCopyVarAtts() to cdiCopyAtts().

parent c09a5510
......@@ -707,6 +707,8 @@ int cdiInqNatts(int cdiID, int varID, int *nattsp);
int cdiInqAtt(int cdiID, int varID, int attrnum, char *name, int *typep, int *lenp);
int cdiDelAtt(int cdiID, int varID, const char *name);
int cdiCopyAtts(int cdiID1, int varID1, int cdiID2, int varID2);
/* cdiDefAttInt: Define an integer attribute */
int cdiDefAttInt(int cdiID, int varID, const char *name, int type, int len, const int ip[]);
/* cdiDefAttFlt: Define a floating point attribute */
......
......@@ -289,17 +289,17 @@ int cdi_inq_att(int indtype, int cdiID, int varID, const char *name, size_t mxsz
}
int cdiCopyVarAtts(int cdiID1, int varID_1, int cdiID2, int varID_2)
int cdiCopyAtts(int cdiID1, int varID1, int cdiID2, int varID2)
{
int status = CDI_NOERR;
cdi_atts_t *attsp1 = cdi_get_attsp(cdiID1, varID_1);
cdi_atts_t *attsp1 = cdi_get_attsp(cdiID1, varID1);
xassert(attsp1 != NULL);
for ( int attid = 0; attid < (int)attsp1->nelems; attid++ )
{
cdi_att_t *attp = &(attsp1->value[attid]);
cdi_def_att(attp->indtype, attp->exdtype, cdiID2, varID_2, attp->name, attp->nelems, attp->xsz, attp->xvalue);
cdi_def_att(attp->indtype, attp->exdtype, cdiID2, varID2, attp->name, attp->nelems, attp->xsz, attp->xvalue);
}
return status;
......
......@@ -344,7 +344,7 @@ void vlistCopy(int vlistID2, int vlistID1)
var_t *vars2 = vlistptr2->vars;
vlist_copy(vlistptr2, vlistptr1);
cdiCopyVarAtts(vlistID1, CDI_GLOBAL, vlistID2, CDI_GLOBAL);
cdiCopyAtts(vlistID1, CDI_GLOBAL, vlistID2, CDI_GLOBAL);
if ( vars1 )
{
......@@ -361,7 +361,7 @@ void vlistCopy(int vlistID2, int vlistID1)
var_copy_entries(&vars2[varID], &vars1[varID]);
vlistptr2->vars[varID].atts.nelems = 0;
cdiCopyVarAtts(vlistID1, varID, vlistID2, varID);
cdiCopyAtts(vlistID1, varID, vlistID2, varID);
if ( vars1[varID].levinfo )
{
......@@ -526,7 +526,7 @@ void vlistCopyFlag(int vlistID2, int vlistID1)
vlist_copy(vlistptr2, vlistptr1);
cdiCopyVarAtts(vlistID1, CDI_GLOBAL, vlistID2, CDI_GLOBAL);
cdiCopyAtts(vlistID1, CDI_GLOBAL, vlistID2, CDI_GLOBAL);
if ( vlistptr1->vars )
{
......@@ -567,7 +567,7 @@ void vlistCopyFlag(int vlistID2, int vlistID1)
var_copy_entries(&vars2[varID2], &vars1[varID]);
vlistptr2->vars[varID2].atts.nelems = 0;
cdiCopyVarAtts(vlistID1, varID, vlistID2, varID2);
cdiCopyAtts(vlistID1, varID, vlistID2, varID2);
int nlevs = zaxisInqSize(vars1[varID].zaxisID);
int nlevs2 = 0;
......@@ -741,7 +741,7 @@ void vlistCat(int vlistID2, int vlistID1)
}
vars2[varID2].atts.nelems = 0;
cdiCopyVarAtts(vlistID1, varID, vlistID2, varID2);
cdiCopyAtts(vlistID1, varID, vlistID2, varID2);
vlistAdd2GridIDs(vlistptr2, vars1[varID].gridID);
vlistAdd2ZaxisIDs(vlistptr2, vars1[varID].zaxisID);
......
......@@ -133,7 +133,6 @@ int vlistInqVarMissvalUsed(int vlistID, int varID);
int vlistHasTime(int vlistID);
int cdiDelAtts(int vlistID, int varID);
int cdiCopyVarAtts(int vlistID1, int varID_1, int vlistID2, int varID_2);
void vlistUnpack(char * buffer, int bufferSize, int * pos,
int originNamespace, void *context, int force_id);
......
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