aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjshalf <jshalf@bfcf8e34-485d-4d46-a995-1fd6fa6fb178>2000-10-30 04:32:03 +0000
committerjshalf <jshalf@bfcf8e34-485d-4d46-a995-1fd6fa6fb178>2000-10-30 04:32:03 +0000
commitdfeb8ad4f45d8374f6eb653f0bbd9d532a5b4142 (patch)
treead3801f792873d45ec5809bf3b093f9d081e7cc1
parente6d057402882838b675d5b2afbe56ea02ffbba60 (diff)
A few more fixes to the parser for backward compability.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IsoSurfacer/trunk@16 bfcf8e34-485d-4d46-a995-1fd6fa6fb178
-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 */