diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-11-03 09:23:10 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-11-03 09:23:10 +0000 |
commit | f56ab00e21d175ef62608342f185c5e7977be078 (patch) | |
tree | 1bfc0473e7f51b54d1b276af0efb3ebe41238377 /src/util/Misc.c | |
parent | 52b81606de9ddb65dd608424354a28a856a5daef (diff) |
Changing various things pointed to by compiling with -Wall.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1129 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/util/Misc.c')
-rw-r--r-- | src/util/Misc.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/util/Misc.c b/src/util/Misc.c index 8a8d45dc..791fc44f 100644 --- a/src/util/Misc.c +++ b/src/util/Misc.c @@ -28,6 +28,11 @@ #include "cctk_FortranString.h" #include "cctk_WarnLevel.h" +int CCTK_RegexMatch(const char *string, + const char *pattern, + const int nmatch, + regmatch_t *pmatch); + /*@@ @routine Util_SplitString @date Wed Jan 20 10:14:00 1999 @@ -75,7 +80,7 @@ int Util_SplitString(char **before, char **after, const char *string, const char retval = 1; } - if(position && before && after) + if(position && *before && *after) { /* Copy the data */ strncpy(*before, string, (int)(position-string)); @@ -288,9 +293,9 @@ int Util_IntInRange(int inval, const char *range) * 5 - ) or ] */ - if(matched = CCTK_RegexMatch(range, + if((matched = CCTK_RegexMatch(range, "(\\[|\\()?([^]):]*):?([^]):]*)?:?([^]):]*)?(\\]|\\))?", - 6, pmatch)) + 6, pmatch)) != 0) { /* First work out if the range is closed at the lower end. */ if(pmatch[1].rm_so != -1) @@ -414,9 +419,9 @@ int Util_DoubleInRange(double inval, const char *range) * 5 - ) or ] */ - if(matched = CCTK_RegexMatch(range, + if((matched = CCTK_RegexMatch(range, "(\\[|\\()?([^]):]*):?([^]):]*)?:?([^]):]*)?(\\]|\\))?", - 6, pmatch)) + 6, pmatch)) != 0) { /* First work out if the range is closed at the lower end. */ if(pmatch[1].rm_so != -1) |