Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Poirier <theeth@yahoo.com>2010-02-03 20:48:39 +0300
committerMartin Poirier <theeth@yahoo.com>2010-02-03 20:48:39 +0300
commit6bdfa434310b4904725d2811a078e664807dcbd0 (patch)
treed1967310b944a8c826fe7a63e8057e4504681b68 /source/creator
parent61457571af4f67aeecfbc44def23fd3994784df1 (diff)
-fpe command line argument. Tying it to -d is just hell.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 93255dba8de..ed851e8af20 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -343,6 +343,20 @@ static int debug_mode(int argc, char **argv, void *data)
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 @@ void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
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,17 +956,6 @@ int main(int argc, char **argv)
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 */