#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 nprofile, pit, profilesize;
int k;
int ret=-1;
if (fid < 0) {
goto ERROR;
}
MESSAGE(
"ERROR : file mounting ...");
goto ERROR;
}
MESSAGE(
"ERROR : file mounting ...");
goto ERROR;
}
MESSAGE(
"ERROR : read number of struct element models ...");
goto ERROR;
}
for (it=0; it<nmodels; it++) {
supportmeshname, &entitype, &nnode, &ncell,
&geocelltype, &nconstatt, &anyprofile, nvaratt+it) < 0) {
MESSAGE(
"ERROR : struct element models information ...");
free(nvaratt);
goto ERROR;
}
}
free(nvaratt);
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++) {
MESSAGE(
"ERROR : Computing step info ...");
goto ERROR;
}
for (it=0; it<nmodels; it++) {
geotype = *(geotypes+it);
profilename, localizationname)) < 0) {
MESSAGE(
"ERROR : read number of profile ");
goto ERROR;
}
for (pit=0; pit<nprofile; pit++) {
localizationname, &nintegrationpoint)) < 0) {
MESSAGE(
"ERROR : read number of values with a profile ...");
goto ERROR;
}
if (nvalues) {
if ((values = (
med_float *) malloc(
sizeof(
med_float)*nvalues*ncomponent*nintegrationpoint)) == NULL) {
MESSAGE(
"ERROR : memory allocation ...");
goto ERROR;
}
(unsigned char*) values) < 0) {
MESSAGE(
"ERROR : read fields values for cells ...");
goto ERROR;
free(values);
}
free(values);
}
}
}
}
}
ret=0;
ERROR :
free(geotypes);
MESSAGE(
"ERROR : file unmounting ...");
ret=-1;
}
MESSAGE(
"ERROR : file unmounting ...");
ret= -1;
}
ret= -1;
}
return ret;
}