From dfeb8ad4f45d8374f6eb653f0bbd9d532a5b4142 Mon Sep 17 00:00:00 2001 From: jshalf Date: Mon, 30 Oct 2000 04:32:03 +0000 Subject: 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 --- src/IsoSurfacerInit.c | 18 ++++++++++++++++-- 1 file 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 && sifuncName=(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 && siisovalue = 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 */ -- cgit v1.2.3