[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
s.popinet at niwa.co.nz
Fri May 15 02:52:10 UTC 2009
The following commit has been merged in the upstream branch:
commit 8a52fe3acd7a1410e7a2be7c1150f16727f44c0b
Author: Stephane Popinet <s.popinet at niwa.co.nz>
Date: Tue Jul 5 08:30:09 2005 +1000
GfsFunction identifier-finding routine was too naive
darcs-hash:20050704223009-fbd8f-090af2a454a07aa584c6c0a29ac2b7bbaf84e8bd.gz
diff --git a/src/utils.c b/src/utils.c
index 34eb1c5..09b8662 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -286,10 +286,14 @@ static gchar * find_identifier (const gchar * s, const gchar * i)
gchar * f = strstr (s, i);
static gchar allowed[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_1234567890";
- if (!f || gfs_char_in_string (f[strlen(i)], allowed) ||
- (f > s && gfs_char_in_string (f[-1], allowed)))
- return NULL;
- return f;
+ while (f) {
+ if (gfs_char_in_string (f[strlen(i)], allowed) ||
+ (f > s && gfs_char_in_string (f[-1], allowed)))
+ f = strstr (++f, i);
+ else
+ return f;
+ }
+ return NULL;
}
static void function_read (GtsObject ** o, GtsFile * fp)
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list