#define MESGERR 1
#include <string.h>
#define MESGERR 1
#include <string.h>
int main (
int argc,
char **argv) {
char *componentname = NULL;
char *componentunit = NULL;
med_int csit, numit, numdt, meshnumit, meshnumdt, it;
int k;
int ret=-1;
if (fid < 0) {
goto ERROR;
}
MESSAGE(
"ERROR : How many fields in the file ...");
goto ERROR;
}
for (i=0; i<nfield; i++) {
MESSAGE(
"ERROR : number of field component ...");
goto ERROR;
}
if ((componentname = (
char *) malloc(ncomponent*
MED_SNAME_SIZE+1)) == NULL) {
MESSAGE(
"ERROR : memory allocation ...");
goto ERROR;
}
if ((componentunit = (
char *) malloc(ncomponent*
MED_SNAME_SIZE+1)) == NULL) {
MESSAGE(
"ERROR : memory allocation ...");
goto ERROR;
}
if (
MEDfieldInfo(fid, i+1, fieldname, meshname, &localmesh, &fieldtype,
componentname, componentunit, dtunit, &nstep) < 0) {
free(componentname);
free(componentunit);
goto ERROR;
}
free(componentname);
free(componentunit);
for (csit=0; csit<nstep; csit++) {
&meshnumdt, &meshnumit) < 0) {
MESSAGE(
"ERROR : Computing step info ...");
goto ERROR;
}
geotype = geotypes[it];
MESSAGE(
"ERROR : read number of values ...");
goto ERROR;
}
if (nvalues) {
MESSAGE(
"ERROR : memory allocation ...");
goto ERROR;
}
MESSAGE(
"ERROR : read fields values for cells ...");
free(values);
goto ERROR;
}
free(values);
}
}
}
}
ret=0;
ERROR:
ret=-1;
}
return ret;
}