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:
authorCampbell Barton <ideasman42@gmail.com>2012-02-18 01:22:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-18 01:22:18 +0400
commit24f83c7e3ebc783daa954872fd5b7fc5051ddc0e (patch)
tree8a891d0ce7193de5d7dcc5201c331e19a4e286b7 /source/creator
parent379527581b51274d0624b72fddd016679ff2f4a3 (diff)
minor edits to sync up with trunk, remove crash save handler, this can be added later if we need but isnt really apart of bmesh specifically.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator.c39
1 files changed, 2 insertions, 37 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 49325f57a9e..68a7bc415a8 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -43,8 +43,6 @@
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
-#include <signal.h>
-
/* This little block needed for linking to Blender... */
@@ -127,8 +125,6 @@
#include "libmv-capi.h"
#endif
-static int no_handler = 0;
-
// from buildinfo.c
#ifdef BUILD_DATE
extern char build_date[];
@@ -326,32 +322,6 @@ static int print_help(int UNUSED(argc), const char **UNUSED(argv), void *data)
double PIL_check_seconds_timer(void);
-static void segmentation_handler(int UNUSED(sig))
-{
- char fname[256];
-
- if (!G.main->name[0]) {
- BLI_make_file_string("/", fname, BLI_temporary_dir(), "crash.blend");
- }
- else {
- sprintf(fname, "%s.crash.blend", G.main->name);
- }
-
- BKE_undo_save(fname);
-
- /*induce a real crash*/
- signal(SIGSEGV, SIG_DFL);
- *(int*)NULL = 0;
-}
-
-static int nocrashhandler(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
-{
- no_handler = 1;
-
- return 0;
-}
-
-
static int end_arguments(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
{
return -1;
@@ -1106,8 +1076,7 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
BLI_argsAdd(ba, 2, "-con", "--start-console", "\n\tStart with the console window open (ignored if -b is set)", start_with_console, NULL);
BLI_argsAdd(ba, 2, "-R", NULL, "\n\tRegister .blend extension, then exit (Windows only)", register_extension, NULL);
BLI_argsAdd(ba, 2, "-r", NULL, "\n\tSilently register .blend extension, then exit (Windows only)", register_extension, ba);
- BLI_argsAdd(ba, 2, "--no_crash_handler", NULL, "disable crash handler", nocrashhandler, NULL);
-
+
/* third pass: disabling things and forcing settings */
BLI_argsAddCase(ba, 3, "-nojoystick", 1, NULL, 0, "\n\tDisable joystick support", no_joystick, syshandle);
BLI_argsAddCase(ba, 3, "-noglsl", 1, NULL, 0, "\n\tDisable GLSL shading", no_glsl, NULL);
@@ -1132,6 +1101,7 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
BLI_argsAdd(ba, 4, "-F", "--render-format", format_doc, set_image_type, C);
BLI_argsAdd(ba, 4, "-t", "--threads", "<threads>\n\tUse amount of <threads> for rendering in background\n\t[1-" STRINGIFY(BLENDER_MAX_THREADS) "], 0 for systems processor count.", set_threads, NULL);
BLI_argsAdd(ba, 4, "-x", "--use-extension", "<bool>\n\tSet option to add the file extension to the end of the file", set_extension, C);
+
}
#ifdef WITH_PYTHON_MODULE
@@ -1224,11 +1194,6 @@ int main(int argc, const char **argv)
BLI_argsParse(ba, 1, NULL, NULL);
- if (!no_handler) {
- signal(SIGSEGV, segmentation_handler);
- //signal(SIGFPE, segmentation_handler);
- }
-
#if defined(WITH_PYTHON_MODULE) || defined(WITH_HEADLESS)
G.background= 1; /* python module mode ALWAYS runs in background mode (for now) */
#else