aboutsummaryrefslogtreecommitdiff
path: root/src/IsoSurfacerInit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/IsoSurfacerInit.c')
-rw-r--r--src/IsoSurfacerInit.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/IsoSurfacerInit.c b/src/IsoSurfacerInit.c
index bac32cc..36f2a0a 100644
--- a/src/IsoSurfacerInit.c
+++ b/src/IsoSurfacerInit.c
@@ -138,20 +138,34 @@ int IsoSurfacer_ParseIsoString(char *isostring,cGH *GH,isosurfacerGH *myGH){
s=snext+1;
snext=strchr(s,')'); /* find next ',' or ')' which would terminate the list */
si=strchr(s,',');
- if(si) *si='\0';
+ if(si && si<snext) *si='\0';
else if(snext) *snext='\0';
else {free(isostring); return 0; } /* parse failure */
myGH->funcName=(char*)malloc(strlen(s)+1);
strcpy(myGH->funcName,s); /* got the varname for the output var */
+ /* printf("****************IsoSurf[%s]\n",myGH->funcName); */
/* OK, now we go find the isoval */
s = strchr(snext+1,'(');
if(s) s++; else return 1;
snext=strchr(s,')'); /* find next ',' or ')' which would terminate the list */
si=strchr(s,',');
- if(si) *si='\0';
+ if(si && si<snext) *si='\0';
else if(snext) *snext='\0';
else return 1; /* parse failure, but we at least have the right varname.*/
myGH->isovalue = atof(s);
+ /* ****************** */
+ s = strchr(snext+1,'(');
+ if(s) s++; else return 1;
+ snext=strchr(s,')'); /* find next ',' or ')' which would terminate the list */
+ if(snext) *snext='\0';
+ else return 1; /* parse failure, but we at least have the right varname.*/
+
+ if(strstr(s,"UCD")) myGH->formats|=UCD;
+ if(strstr(s,"ASCII")) myGH->formats|=ASCII;
+ if(strstr(s,"BIN")) myGH->formats|=BIN;
+ if(strstr(s,"SOCK")) myGH->formats|=SOCK;
+ if(strstr(s,"HDF5")) myGH->formats|=ISOHDF5;
+ if(strstr(s,"VRML")) myGH->formats|=VRML;
/* we are all done now. The rest is ignored because it contains
redundant or obsolete information which doesnt really fit into
the new parser model */