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
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.
-rw-r--r--source/blender/blenkernel/intern/blender.c19
-rw-r--r--source/blender/blenkernel/intern/bmesh_private.h9
-rw-r--r--source/blender/blenkernel/intern/particle_system.c2
-rw-r--r--source/blender/blenkernel/intern/smoke.c2
-rw-r--r--source/creator/creator.c39
5 files changed, 16 insertions, 55 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 9534dfd9d0b..a8644618945 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -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 @@ char *BKE_undo_menu_string(void)
/* 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 @@ void BKE_undo_save(char *fname)
/* 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 @@ void BKE_undo_save(char *fname)
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 */
diff --git a/source/blender/blenkernel/intern/bmesh_private.h b/source/blender/blenkernel/intern/bmesh_private.h
index 7e152f2f34a..10074813fae 100644
--- a/source/blender/blenkernel/intern/bmesh_private.h
+++ b/source/blender/blenkernel/intern/bmesh_private.h
@@ -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);
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 9b694ccf584..33f20642ca6 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -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"
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index e42f3b9fb01..ae2f72ca7fa 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -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"
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