[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44215] branches/bmesh/blender/source: 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 .

Campbell Barton ideasman42 at gmail.com
Fri Feb 17 22:22:20 CET 2012


Revision: 44215
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44215
Author:   campbellbarton
Date:     2012-02-17 21:22:18 +0000 (Fri, 17 Feb 2012)
Log Message:
-----------
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.

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/blenkernel/intern/blender.c
    branches/bmesh/blender/source/blender/blenkernel/intern/bmesh_private.h
    branches/bmesh/blender/source/blender/blenkernel/intern/particle_system.c
    branches/bmesh/blender/source/blender/blenkernel/intern/smoke.c
    branches/bmesh/blender/source/creator/creator.c

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/blender.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/blender.c	2012-02-17 21:07:18 UTC (rev 44214)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/blender.c	2012-02-17 21:22:18 UTC (rev 44215)
@@ -57,7 +57,6 @@
 #include "BLI_blenlib.h"
 #include "BLI_bpath.h"
 #include "BLI_dynstr.h"
-#include "BLI_path_util.h"
 #include "BLI_utildefines.h"
 #include "BLI_callbacks.h"
 
@@ -700,18 +699,10 @@
 	/* saves quit.blend */
 void BKE_undo_save_quit(void)
 {
-	char str[FILE_MAXDIR+FILE_MAXFILE];
-
-	BLI_make_file_string("/", str, BLI_temporary_dir(), "quit.blend");
-
-	BKE_undo_save(str);
-}
-
-void BKE_undo_save(char *fname)
-{
 	UndoElem *uel;
 	MemFileChunk *chunk;
 	int file;
+	char str[FILE_MAX];
 	
 	if( (U.uiflag & USER_GLOBALUNDO)==0) return;
 	
@@ -724,7 +715,9 @@
 	/* no undo state to save */
 	if(undobase.first==undobase.last) return;
 		
-	file = open(fname, O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
+	BLI_make_file_string("/", str, BLI_temporary_dir(), "quit.blend");
+
+	file = open(str,O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
 	if(file == -1) {
 		//XXX error("Unable to save %s, check you have permissions", str);
 		return;
@@ -738,8 +731,8 @@
 	
 	close(file);
 	
-	if(chunk) ; //XXX error("Unable to save %s, internal error", fname);
-	else printf("Saved session recovery to %s\n", fname);
+	if(chunk) ; //XXX error("Unable to save %s, internal error", str);
+	else printf("Saved session recovery to %s\n", str);
 }
 
 /* sets curscene */

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/bmesh_private.h
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/bmesh_private.h	2012-02-17 21:07:18 UTC (rev 44214)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/bmesh_private.h	2012-02-17 21:22:18 UTC (rev 44215)
@@ -30,12 +30,15 @@
  * ***** END GPL LICENSE BLOCK *****
  */
 
+/** \file blender/blenkernel/intern/bmesh_private.h
+ *  \ingroup bke
+ */
+
+
 #ifndef __BMESH_PRIVATE_H__
 #define __BMESH_PRIVATE_H__
 
-/** \file blender/bmesh/bmesh_private.h
- *  \ingroup bmesh
- */
+#include "BKE_bmesh.h"
 
 /*ALLOCATION/DEALLOCATION*/
 struct BME_Vert *BME_addvertlist(struct BME_Mesh *bm, struct BME_Vert *example);

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/particle_system.c	2012-02-17 21:07:18 UTC (rev 44214)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/particle_system.c	2012-02-17 21:22:18 UTC (rev 44215)
@@ -61,6 +61,7 @@
 #include "DNA_ipo_types.h" // XXX old animation system stuff... to be removed!
 #include "DNA_listBase.h"
 
+#include "BLI_edgehash.h"
 #include "BLI_rand.h"
 #include "BLI_jitter.h"
 #include "BLI_math.h"
@@ -70,7 +71,6 @@
 #include "BLI_threads.h"
 #include "BLI_utildefines.h"
 #include "BLI_linklist.h"
-#include "BLI_edgehash.h"
 
 #include "BKE_main.h"
 #include "BKE_animsys.h"

Modified: branches/bmesh/blender/source/blender/blenkernel/intern/smoke.c
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/intern/smoke.c	2012-02-17 21:07:18 UTC (rev 44214)
+++ branches/bmesh/blender/source/blender/blenkernel/intern/smoke.c	2012-02-17 21:22:18 UTC (rev 44215)
@@ -41,7 +41,6 @@
 #include <stdio.h>
 #include <string.h> /* memset */
 
-#include "BLI_utildefines.h"
 #include "BLI_linklist.h"
 #include "BLI_rand.h"
 #include "BLI_jitter.h"
@@ -50,6 +49,7 @@
 #include "BLI_edgehash.h"
 #include "BLI_kdtree.h"
 #include "BLI_kdopbvh.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_bvhutils.h"
 #include "BKE_cdderivedmesh.h"

Modified: branches/bmesh/blender/source/creator/creator.c
===================================================================
--- branches/bmesh/blender/source/creator/creator.c	2012-02-17 21:07:18 UTC (rev 44214)
+++ branches/bmesh/blender/source/creator/creator.c	2012-02-17 21:22:18 UTC (rev 44215)
@@ -43,9 +43,7 @@
 #include <stdlib.h>
 #include <stddef.h>
 #include <string.h>
-#include <signal.h>
 
-
 /* This little block needed for linking to Blender... */
 
 #include "MEM_guardedalloc.h"
@@ -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 @@
 
 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 @@
 	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 @@
 	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 @@
 
 	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




More information about the Bf-blender-cvs mailing list