[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59317] branches/soc-2013-depsgraph_mt: Merging r59315 through r59316 from trunk into soc-2013-depsgraph_mt

Sergey Sharybin sergey.vfx at gmail.com
Tue Aug 20 10:35:49 CEST 2013


Revision: 59317
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59317
Author:   nazgul
Date:     2013-08-20 08:35:49 +0000 (Tue, 20 Aug 2013)
Log Message:
-----------
Merging r59315 through r59316 from trunk into soc-2013-depsgraph_mt

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59315
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59316

Modified Paths:
--------------
    branches/soc-2013-depsgraph_mt/intern/ghost/intern/GHOST_SystemPathsX11.cpp
    branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_fileops.h
    branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_winstuff.h
    branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/storage.c

Property Changed:
----------------
    branches/soc-2013-depsgraph_mt/
    branches/soc-2013-depsgraph_mt/source/blender/editors/interface/interface.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/space_outliner/


Property changes on: branches/soc-2013-depsgraph_mt
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_dev:58091-58422
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573,58822,58989
/branches/soc-2013-dingto:57424,57487,57507,57525,57599,57670,57918-57919,57981,58091,58245,58253,58587,58772,58774-58775,58828,58835,59032
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57395-59314
   + /branches/ge_dev:58091-58422
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573,58822,58989
/branches/soc-2013-dingto:57424,57487,57507,57525,57599,57670,57918-57919,57981,58091,58245,58253,58587,58772,58774-58775,58828,58835,59032
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57395-59316

Modified: branches/soc-2013-depsgraph_mt/intern/ghost/intern/GHOST_SystemPathsX11.cpp
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/ghost/intern/GHOST_SystemPathsX11.cpp	2013-08-20 08:33:04 UTC (rev 59316)
+++ branches/soc-2013-depsgraph_mt/intern/ghost/intern/GHOST_SystemPathsX11.cpp	2013-08-20 08:35:49 UTC (rev 59317)
@@ -42,8 +42,10 @@
 #include <cstdlib>   /* for exit */
 
 #include <pwd.h>     /* for get home without use getenv() */
-#include <limits.h>  /* for PATH_MAX */
+#include <string>
 
+using std::string;
+
 #ifdef PREFIX
 static const char *static_path = PREFIX "/share";
 #else
@@ -62,9 +64,8 @@
 {
 	/* no prefix assumes a portable build which only uses bundled scripts */
 	if (static_path) {
-		static char system_path[PATH_MAX];
-		snprintf(system_path, sizeof(system_path), "%s/blender/%s", static_path, versionstr);
-		return (GHOST_TUns8 *)system_path;
+		static string system_path = string(static_path) + "/blender/" + versionstr;
+		return (GHOST_TUns8 *)system_path.c_str();
 	}
 
 	return NULL;
@@ -72,36 +73,41 @@
 
 const GHOST_TUns8 *GHOST_SystemPathsX11::getUserDir(int version, const char *versionstr) const
 {
-	static char user_path[PATH_MAX];
+	static string user_path = "";
 
 	/* in blender 2.64, we migrate to XDG. to ensure the copy previous settings
 	 * operator works we give a different path depending on the requested version */
 	if (version < 264) {
-		const char *home = getenv("HOME");
+		if (user_path.empty()) {
+			const char *home = getenv("HOME");
 
-		if (home) {
-			snprintf(user_path, sizeof(user_path), "%s/.blender/%s", home, versionstr);
-			return (GHOST_TUns8 *)user_path;
+			if (home) {
+				user_path = string(home) + "/.blender/" + versionstr;
+			}
+			else {
+				return NULL;
+			}
 		}
-
-		return NULL;
+		return (GHOST_TUns8 *)user_path.c_str();
 	}
 	else {
-		const char *home = getenv("XDG_CONFIG_HOME");
+		if (user_path.empty()) {
+			const char *home = getenv("XDG_CONFIG_HOME");
 
-		if (home) {
-			snprintf(user_path, sizeof(user_path), "%s/blender/%s", home, versionstr);
-		}
-		else {
-			home = getenv("HOME");
+			if (home) {
+				user_path = string(home) + "/blender/" + versionstr;
+			}
+			else {
+				home = getenv("HOME");
 
-			if (home == NULL)
-				home = getpwuid(getuid())->pw_dir;
+				if (home == NULL)
+					home = getpwuid(getuid())->pw_dir;
 
-			snprintf(user_path, sizeof(user_path), "%s/.config/blender/%s", home, versionstr);
+				user_path = string(home) + "/.config/blender/" + versionstr;
+			}
 		}
 
-		return (const GHOST_TUns8 *)user_path;
+		return (const GHOST_TUns8 *)user_path.c_str();
 	}
 }
 

Modified: branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_fileops.h
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_fileops.h	2013-08-20 08:33:04 UTC (rev 59316)
+++ branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_fileops.h	2013-08-20 08:35:49 UTC (rev 59317)
@@ -43,6 +43,12 @@
 /* for size_t (needed on windows) */
 #include <stddef.h>
 
+#include <limits.h>  /* for PATH_MAX */
+
+#ifndef PATH_MAX
+#  define PATH_MAX 4096
+#endif
+
 struct gzFile;
 
 /* Common */

Modified: branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_winstuff.h
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_winstuff.h	2013-08-20 08:33:04 UTC (rev 59316)
+++ branches/soc-2013-depsgraph_mt/source/blender/blenlib/BLI_winstuff.h	2013-08-20 08:35:49 UTC (rev 59317)
@@ -100,7 +100,6 @@
 // not accepted by access() on windows
 //#  define	X_OK	1
 #  define	F_OK	0
-#  define	PATH_MAX 4096
 #endif
 
 #ifndef FREE_WINDOWS

Modified: branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/storage.c
===================================================================
--- branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/storage.c	2013-08-20 08:33:04 UTC (rev 59316)
+++ branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/storage.c	2013-08-20 08:35:49 UTC (rev 59317)
@@ -70,7 +70,6 @@
 #ifdef WIN32
 #  include <io.h>
 #  include <direct.h>
-#  include <limits.h>  /* PATH_MAX */
 #  include "BLI_winstuff.h"
 #  include "utfconv.h"
 #else
@@ -255,18 +254,11 @@
 				struct dirlink * dlink = (struct dirlink *) dirbase.first;
 				struct direntry *file = &dir_ctx->files[dir_ctx->nrfiles];
 				while (dlink) {
-#ifdef PATH_MAX
-					char static_fullname[PATH_MAX];
-					char *fullname = static_fullname;
-					size_t fullname_size = PATH_MAX;
-#else
-					size_t fullname_size = strlen(dirname) + strlen(dlink->name) + 2;
-					char *fullname = MEM_mallocN(fullname_size, "bli_builddir fullname");
-#endif
+					char fullname[PATH_MAX];
 					memset(file, 0, sizeof(struct direntry));
 					file->relname = dlink->name;
 					file->path = BLI_strdupcat(dirname, dlink->name);
-					BLI_join_dirfile(fullname, fullname_size, dirname, dlink->name);
+					BLI_join_dirfile(fullname, sizeof(fullname), dirname, dlink->name);
 // use 64 bit file size, only needed for WIN32 and WIN64. 
 // Excluding other than current MSVC compiler until able to test
 #ifdef WIN32
@@ -288,9 +280,6 @@
 					dir_ctx->nrfiles++;
 					file++;
 					dlink = dlink->next;
-#ifndef PATH_MAX
-					MEM_freeN(fullname);
-#endif
 				}
 			}
 			else {


Property changes on: branches/soc-2013-depsgraph_mt/source/blender/editors/interface/interface.c
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato/source/blender/editors/interface/interface.c:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573,58822,58989
/trunk/blender/source/blender/editors/interface/interface.c:57395-59314
   + /branches/ge_candy/source/blender/editors/interface/interface.c:45070-46163
/branches/ge_harmony/source/blender/editors/interface/interface.c:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber/source/blender/editors/interface/interface.c:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato/source/blender/editors/interface/interface.c:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573,58822,58989
/trunk/blender/source/blender/editors/interface/interface.c:57395-59316


Property changes on: branches/soc-2013-depsgraph_mt/source/blender/editors/space_outliner
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber/source/blender/editors/space_outliner:38968,38970,38973,39045,40845
/branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/branches/soc-2011-tomato/source/blender/editors/space_outliner:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573,58822,58989
/trunk/blender/source/blender/editors/space_outliner:57395-59314

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list