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>2014-01-30 20:09:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-30 20:30:05 +0400
commit3c86a1932f848f694ba3a88bb1af35325f3f89a2 (patch)
tree2b2fa7c9ea70436f5e650673c12300290dfd0f34 /source/blender/blenloader
parent0cb49286ce45f1b2ce16db0e174170ef2a671dba (diff)
Code cleanup: add BLI_testextensie_n, replacing multuple calls to BLI_testextensie
also use attributes for BLI path functions
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/BLO_readfile.h7
-rw-r--r--source/blender/blenloader/intern/readfile.c9
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index 58d0cf6d264..b39f247ccd3 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -194,12 +194,13 @@ BLO_blendhandle_close(BlendHandle *bh);
#define GROUP_MAX 32
-int BLO_has_bfile_extension(const char *str);
+bool BLO_has_bfile_extension(const char *str);
-/* return ok when a blenderfile, in dir is the filename,
+/**
+ * return ok when a blenderfile, in dir is the filename,
* in group the type of libdata
*/
-int BLO_is_a_library(const char *path, char *dir, char *group);
+bool BLO_is_a_library(const char *path, char *dir, char *group);
/**
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 29de575e8b8..2a1ca226d31 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -1151,14 +1151,13 @@ void blo_freefiledata(FileData *fd)
/* ************ DIV ****************** */
-int BLO_has_bfile_extension(const char *str)
+bool BLO_has_bfile_extension(const char *str)
{
- return (BLI_testextensie(str, ".ble") ||
- BLI_testextensie(str, ".blend") ||
- BLI_testextensie(str, ".blend.gz"));
+ const char *ext_test[4] = {".blend", ".ble", ".blend.gz", NULL};
+ return BLI_testextensie_array(str, ext_test);
}
-int BLO_is_a_library(const char *path, char *dir, char *group)
+bool BLO_is_a_library(const char *path, char *dir, char *group)
{
/* return ok when a blenderfile, in dir is the filename,
* in group the type of libdata