[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26585] trunk/blender/source/creator/ creator.c: -fpe command line argument.
Martin Poirier
theeth at yahoo.com
Wed Feb 3 18:48:39 CET 2010
Revision: 26585
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26585
Author: theeth
Date: 2010-02-03 18:48:39 +0100 (Wed, 03 Feb 2010)
Log Message:
-----------
-fpe command line argument. Tying it to -d is just hell.
Modified Paths:
--------------
trunk/blender/source/creator/creator.c
Modified: trunk/blender/source/creator/creator.c
===================================================================
--- trunk/blender/source/creator/creator.c 2010-02-03 15:50:08 UTC (rev 26584)
+++ trunk/blender/source/creator/creator.c 2010-02-03 17:48:39 UTC (rev 26585)
@@ -343,6 +343,20 @@
return 0;
}
+static int set_fpe(int argc, char **argv, void *data)
+{
+#if defined(__sgi) || defined(__linux__)
+ /* zealous but makes float issues a heck of a lot easier to find!
+ * set breakpoints on fpe_handler */
+ signal(SIGFPE, fpe_handler);
+
+#ifdef __linux__
+ feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
+#endif
+#endif
+ return 0;
+}
+
static int playback_mode(int argc, char **argv, void *data)
{
/* not if -b was given first */
@@ -835,6 +849,8 @@
BLI_argsAdd(ba, "-Y", 1, forked_tongue, NULL);
BLI_argsAdd(ba, "-y", 1, disable_python, NULL);
+ BLI_argsAdd(ba, "-fpe", 1, set_fpe, NULL);
+
BLI_argsAdd(ba, "-B", 1, background_mode, NULL);
BLI_argsAdd(ba, "-b", 1, background_mode, NULL);
BLI_argsAdd(ba, "-a", 1, playback_mode, NULL);
@@ -940,18 +956,7 @@
setuid(getuid()); /* end superuser */
#endif
-#if defined(__sgi) || defined(__linux__)
- if(G.f & G_DEBUG) {
- /* zealous but makes float issues a heck of a lot easier to find!
- * set breakpoints on fpe_handler */
- signal(SIGFPE, fpe_handler);
-#ifdef __linux__
- feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
-#endif
- }
-#endif
-
/* for all platforms, even windos has it! */
if(G.background) signal(SIGINT, blender_esc); /* ctrl c out bg render */
More information about the Bf-blender-cvs
mailing list