Commit 9537ac0b authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Removed tableInqParUnits().

parent ef5fef92
......@@ -1221,7 +1221,6 @@ int tableInqModel(int tableID);
void tableInqEntry(int tableID, int id, int ltype, char *name, char *longname, char *units);
int tableInqParCode(int tableID, char *name, int *code);
int tableInqParUnits(int tableID, int code, char *units);
/* History routines */
......
......@@ -825,32 +825,6 @@ int tableInqParCode(int tableID, char *varname, int *code)
}
int tableInqParUnits(int tableID, int code, char *units)
{
if ( ((tableID >= 0) & (tableID < MAX_TABLE)) | (tableID == CDI_UNDEFID) ) { } else
Error("Invalid table ID %d", tableID);
int err = 1;
if ( tableID != CDI_UNDEFID )
{
int npars = parTable[tableID].npars;
for ( int item = 0; item < npars; item++ )
{
if ( parTable[tableID].pars[item].id == code )
{
if ( parTable[tableID].pars[item].units )
strcpy(units, parTable[tableID].pars[item].units);
err = 0;
break;
}
}
}
return err;
}
int tableInqNumber(void)
{
if ( ! ParTableInit ) parTableInit();
......
......@@ -583,7 +583,6 @@ void vlistInqVarLongname(int vlistID, int varID, char *longname)
{
int code = pnum;
int tableID = vlistptr->vars[varID].tableID;
name[0] = 0;
tableInqEntry(tableID, code, -1, NULL, longname, NULL);
}
}
......@@ -668,8 +667,7 @@ void vlistInqVarUnits(int vlistID, int varID, char *units)
{
int code = pnum;
int tableID = vlistptr->vars[varID].tableID;
if ( tableInqParUnits(tableID, code, units) != 0 )
units[0] = '\0';
tableInqEntry(tableID, code, -1, NULL, NULL, units);
}
}
else
......
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