[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203

Stephane Popinet s.popinet at niwa.co.nz
Fri May 15 02:52:54 UTC 2009


The following commit has been merged in the upstream branch:
commit e1ab58302dd023e920e92e7a6c819a52c7b4bb21
Author: Stephane Popinet <s.popinet at niwa.co.nz>
Date:   Wed Oct 12 09:14:34 2005 +1000

    GfsFunction aborts on user declaration of reserved variable names
    
    darcs-hash:20051011231434-fbd8f-e94d44ab72de6af52622b4b275e8a1ac720dd4cd.gz

diff --git a/src/utils.c b/src/utils.c
index 3921a48..bf8baf7 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -458,8 +458,14 @@ static void function_read (GtsObject ** o, GtsFile * fp)
 
     if (isexpr)
       fprintf (fin, "return %s;\n}\n", f->expr->str);
-    else
-      fprintf (fin, "%s\n}\n", f->expr->str);
+    else {
+      gchar * s = f->expr->str;
+      guint len = strlen (s);
+      g_assert (s[0] == '{' && s[len-1] == '}');
+      s[len-1] = '\0';
+      fprintf (fin, "%s\n}\n", &s[1]);
+      s[len-1] = '}';
+    }
     fclose (fin);
     close (find);
 

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list