[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203
Stephane Popinet
popinet at users.sf.net
Fri May 15 02:55:10 UTC 2009
The following commit has been merged in the upstream branch:
commit cfdc9757d993122522a45aa5230e4b95c62011e7
Author: Stephane Popinet <popinet at users.sf.net>
Date: Tue Apr 1 11:14:15 2008 +1100
GModule can take parameters
darcs-hash:20080401001415-d4795-d4a43b5d8c1485fed4fe6b7adf05e013dac23455.gz
diff --git a/src/simulation.c b/src/simulation.c
index 01a2897..e2bfb33 100644
--- a/src/simulation.c
+++ b/src/simulation.c
@@ -78,7 +78,11 @@ static void simulation_write (GtsObject * object, FILE * fp)
i = sim->modules;
while (i) {
- fprintf (fp, " GModule %s\n", g_module_name (i->data));
+ void (* module_write) (FILE *);
+ fprintf (fp, " GModule %s", g_module_name (i->data));
+ if (g_module_symbol (i->data, "gfs_module_write", (gpointer) &module_write))
+ (* module_write) (fp);
+ fputc ('\n', fp);
i = i->next;
}
@@ -203,8 +207,10 @@ static void simulation_read (GtsObject ** object, GtsFile * fp)
gts_file_error (fp, "expecting a string (filename)");
return;
}
- if (!g_module_supported ())
+ if (!g_module_supported ()) {
g_warning ("modules are not supported on this system");
+ gts_file_next_token (fp);
+ }
else {
GModule * module;
@@ -230,8 +236,15 @@ static void simulation_read (GtsObject ** object, GtsFile * fp)
}
g_module_make_resident (module);
sim->modules = g_slist_prepend (sim->modules, module);
+ gts_file_next_token (fp);
+
+ void (* module_read) (GtsFile *);
+ if (g_module_symbol (module, "gfs_module_read", (gpointer) &module_read)) {
+ (* module_read) (fp);
+ if (fp->type == GTS_ERROR)
+ return;
+ }
}
- gts_file_next_token (fp);
}
/* ------------ GfsTime ------------ */
--
Gerris Flow Solver
More information about the debian-science-commits
mailing list