From 24f83c7e3ebc783daa954872fd5b7fc5051ddc0e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Feb 2012 21:22:18 +0000 Subject: 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. --- source/blender/blenkernel/intern/blender.c | 19 ++++++------------- source/blender/blenkernel/intern/bmesh_private.h | 9 ++++++--- source/blender/blenkernel/intern/particle_system.c | 2 +- source/blender/blenkernel/intern/smoke.c | 2 +- 4 files changed, 14 insertions(+), 18 deletions(-) (limited to 'source/blender') 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" @@ -699,19 +698,11 @@ 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 #include /* 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" -- cgit v1.2.3