[Bf-blender-cvs] [05b7591c62] master: BLI_path_util: Add string versions of SEP, ALTSEP
Campbell Barton
noreply at git.blender.org
Thu Mar 23 19:23:56 CET 2017
Commit: 05b7591c6240a3af1b71420ac3386787f1f384da
Author: Campbell Barton
Date: Fri Mar 24 05:23:03 2017 +1100
Branches: master
https://developer.blender.org/rB05b7591c6240a3af1b71420ac3386787f1f384da
BLI_path_util: Add string versions of SEP, ALTSEP
This allows for adding separators in string literals.
===================================================================
M source/blender/blenlib/BLI_path_util.h
===================================================================
diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h
index 1c1725923a..a4f5c3c7a0 100644
--- a/source/blender/blenlib/BLI_path_util.h
+++ b/source/blender/blenlib/BLI_path_util.h
@@ -39,14 +39,6 @@ extern "C" {
struct ListBase;
-#ifdef WIN32
-#define SEP '\\'
-#define ALTSEP '/'
-#else
-#define SEP '/'
-#define ALTSEP '\\'
-#endif
-
void BLI_setenv(const char *env, const char *val) ATTR_NONNULL(1);
void BLI_setenv_if_new(const char *env, const char *val) ATTR_NONNULL(1);
@@ -145,6 +137,18 @@ bool BLI_path_suffix(char *string, size_t maxlen, const char *suffix, const char
# define FILE_MAX 1024
#endif
+#ifdef WIN32
+# define SEP '\\'
+# define ALTSEP '/'
+# define SEP_STR "\\"
+# define ALTSEP_STR "/"
+#else
+# define SEP '/'
+# define ALTSEP '\\'
+# define SEP_STR "/"
+# define ALTSEP_STR "\\"
+#endif
+
/* Parent and current dir helpers. */
#define FILENAME_PARENT ".."
#define FILENAME_CURRENT "."
More information about the Bf-blender-cvs
mailing list