forked from bartvdbraak/blender
BLI_path_util: Add string versions of SEP, ALTSEP
This allows for adding separators in string literals.
This commit is contained in:
parent
9af6f40e4d
commit
05b7591c62
@ -39,14 +39,6 @@ extern "C" {
|
|||||||
|
|
||||||
struct ListBase;
|
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(const char *env, const char *val) ATTR_NONNULL(1);
|
||||||
void BLI_setenv_if_new(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
|
# define FILE_MAX 1024
|
||||||
#endif
|
#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. */
|
/* Parent and current dir helpers. */
|
||||||
#define FILENAME_PARENT ".."
|
#define FILENAME_PARENT ".."
|
||||||
#define FILENAME_CURRENT "."
|
#define FILENAME_CURRENT "."
|
||||||
|
Loading…
Reference in New Issue
Block a user