diff options
Diffstat (limited to 'src/ParseGeometry.c')
-rw-r--r-- | src/ParseGeometry.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/ParseGeometry.c b/src/ParseGeometry.c index 8db56f8..d8f3373 100644 --- a/src/ParseGeometry.c +++ b/src/ParseGeometry.c @@ -13,7 +13,7 @@ /* CCTK_NO_AUTOUSE_MACRO */ -/*#define DEBUG*/ +#define HEAVYDEBUG int GeometryParser(const char *before, char **outname, StreamGeo_t *geo) @@ -24,7 +24,8 @@ int GeometryParser(const char *before, char **outname, StreamGeo_t *geo) int matched,ierr=0,retval=0, verb=0, deb=0; const char *argument; - char *varname=NULL, *geo_s=NULL, *token=NULL; + char *varname=NULL, *geo_s=NULL; + const char *token=NULL; char *dim_s=NULL, *ori_s=NULL, *dir_s=NULL; char *len_s=NULL, *down_s=NULL; @@ -47,13 +48,16 @@ int GeometryParser(const char *before, char **outname, StreamGeo_t *geo) sprintf(info,"\n\nGeometryParser \nargument: >%s<\n",before); if((matched = CCTK_RegexMatch(before, - "(\\w*:?:?\\w*)\\[?(.*)?\\]?", 3, pmatch)) != 0) { + "\\=(.*)\\=\\[?(.*)?\\]?", 3, pmatch)) != 0) { + +/* Regex broken on origin: \\w not matched */ +/* "(\\w*::\\w*)\\[?(.*)?\\]?", 3, pmatch)) != 0) {*/ #ifdef HEAVYDEBUG printf("matched %d rm_so/rm_eo: %d %d; %d %d\n", matched, - pmatch[1].rm_so,pmatch[1].rm_eo, - pmatch[2].rm_so,pmatch[2].rm_eo); + (int)pmatch[1].rm_so,(int)pmatch[1].rm_eo, + (int)pmatch[2].rm_so,(int)pmatch[2].rm_eo); #endif if(pmatch[1].rm_so != -1 && @@ -74,7 +78,7 @@ int GeometryParser(const char *before, char **outname, StreamGeo_t *geo) } else { - sprintf(info,"%sOUTNAME : no appropriate gridfunction found. \n", + sprintf(info,"%sOUTNAME : no appropriate gridfunction found:>%s< \n", info,*outname); geo->vdim = -1; geo->sdim = -1; @@ -343,5 +347,7 @@ void SetDefaultGeo(StreamGeo_t *geo) { geo->length[idim] =-1; geo->downs[idim] = 1; } + + USE_CCTK_PARAMETERS } |