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>2013-03-05 07:17:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-05 07:17:46 +0400
commitf44b54d2a7866033025bd4e99992a72e3a27c428 (patch)
treee8c15aac4a82b206adf2d551fcc626592f23cd64 /source/blender/blenlib/BLI_path_util.h
parent47c1570e6839e3684bfe4b0c78a3404e5bb72184 (diff)
patch [#34103]
from Lawrence D'Oliveiro (ldo) More use of bool type, necessitating adding inclusion of BLI_utildefines.h, or moving it up in the inclusion order if it was already included, in various places - storage.c: make some variables only used in bli_builddir local to that - storage.c: BLI_file_descriptor_size should allow 0 as a valid file descriptor - path_util.c: make pointers to non-reentrant storage returned from folder routines const, necessitating making variables holding these returned pointers const elsewhere as well - path_util.c: BLI_string_to_utf8 closes iconv context in case of conversion error - blf_lang.c: fill_locales routine now has its own "languages" local variable to construct paths (was stealing internal storage belonging to BLI_get_folder before)
Diffstat (limited to 'source/blender/blenlib/BLI_path_util.h')
-rw-r--r--source/blender/blenlib/BLI_path_util.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h
index 50b6e6a1c0b..301e2c02018 100644
--- a/source/blender/blenlib/BLI_path_util.h
+++ b/source/blender/blenlib/BLI_path_util.h
@@ -40,10 +40,10 @@ struct direntry;
const char *BLI_getDefaultDocumentFolder(void);
-char *BLI_get_folder(int folder_id, const char *subfolder);
-char *BLI_get_folder_create(int folder_id, const char *subfolder);
-char *BLI_get_user_folder_notest(int folder_id, const char *subfolder);
-char *BLI_get_folder_version(const int id, const int ver, const bool do_check);
+const char *BLI_get_folder(int folder_id, const char *subfolder);
+const char *BLI_get_folder_create(int folder_id, const char *subfolder);
+const char *BLI_get_user_folder_notest(int folder_id, const char *subfolder);
+const char *BLI_get_folder_version(const int id, const int ver, const bool do_check);
/* folder_id */
@@ -109,8 +109,8 @@ void BLI_getlastdir(const char *dir, char *last, size_t maxlen);
bool BLI_testextensie(const char *str, const char *ext);
bool BLI_testextensie_array(const char *str, const char **ext_array);
bool BLI_testextensie_glob(const char *str, const char *ext_fnmatch);
-int BLI_replace_extension(char *path, size_t maxlen, const char *ext);
-int BLI_ensure_extension(char *path, size_t maxlen, const char *ext);
+bool BLI_replace_extension(char *path, size_t maxlen, const char *ext);
+bool BLI_ensure_extension(char *path, size_t maxlen, const char *ext);
void BLI_uniquename(struct ListBase *list, void *vlink, const char * defname, char delim, short name_offs, short len);
bool BLI_uniquename_cb(bool (*unique_check)(void * arg, const char * name),
void *arg, const char * defname, char delim, char *name, short name_len);
@@ -155,13 +155,14 @@ bool BLI_has_parent(char *path);
* \retval Returns true if the path was relative (started with "//").
*/
bool BLI_path_abs(char *path, const char *basepath);
-int BLI_path_frame(char *path, int frame, int digits);
-int BLI_path_frame_range(char *path, int sta, int end, int digits);
-int BLI_path_cwd(char *path);
+bool BLI_path_frame(char *path, int frame, int digits);
+bool BLI_path_frame_range(char *path, int sta, int end, int digits);
+bool BLI_path_cwd(char *path);
void BLI_path_rel(char *file, const char *relfile);
bool BLI_path_is_rel(const char *path);
+/* path string comparisons: case-insensitive for Windows, case-sensitive otherwise */
#ifdef WIN32
# define BLI_path_cmp BLI_strcasecmp
# define BLI_path_ncmp BLI_strncasecmp