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 10:26:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-05 10:26:10 +0400
commit384948908afd5567d6c730a8045a368e8c08e436 (patch)
tree5fd9e156242aedd9271a8d54ed02b5dc9149fb44 /source/blender/imbuf/intern/indexer.c
parent34233e7fd661dbd378c4e11a1e0d29ed639fbffa (diff)
patch [#34103] path_util_split_dirstring.patch, path_util_split_dirstring_2.patch, path_util_split_dirstring_3.patch
from Lawrence D'Oliveiro (ldo) Get rid of BLI_splitdirstring, replace with calls to BLI_split_dirfile, BLI_split_dir_part and BLI_split_file_part as appropriate.
Diffstat (limited to 'source/blender/imbuf/intern/indexer.c')
-rw-r--r--source/blender/imbuf/intern/indexer.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index 56e5be7c12a..33b2fb6d386 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -361,17 +361,16 @@ int IMB_timecode_to_array_index(IMB_Timecode_Type tc)
* - rebuild helper functions
* ---------------------------------------------------------------------- */
-static void get_index_dir(struct anim *anim, char *index_dir)
+static void get_index_dir(struct anim *anim, char *index_dir, size_t index_dir_len)
{
if (!anim->index_dir[0]) {
char fname[FILE_MAXFILE];
- BLI_strncpy(index_dir, anim->name, FILE_MAXDIR);
- BLI_splitdirstring(index_dir, fname);
- BLI_join_dirfile(index_dir, FILE_MAXDIR, index_dir, "BL_proxy");
- BLI_join_dirfile(index_dir, FILE_MAXDIR, index_dir, fname);
+ BLI_split_dirfile(anim->name, index_dir, fname, index_dir_len, sizeof(fname));
+ BLI_join_dirfile(index_dir, index_dir_len, index_dir, "BL_proxy");
+ BLI_join_dirfile(index_dir, index_dir_len, index_dir, fname);
}
else {
- BLI_strncpy(index_dir, anim->index_dir, FILE_MAXDIR);
+ BLI_strncpy(index_dir, anim->index_dir, index_dir_len);
}
}
@@ -396,7 +395,7 @@ static void get_proxy_filename(struct anim *anim, IMB_Proxy_Size preview_size,
BLI_snprintf(proxy_temp_name, sizeof(proxy_temp_name), "proxy_%d%s_part.avi",
(int) (proxy_fac[i] * 100), stream_suffix);
- get_index_dir(anim, index_dir);
+ get_index_dir(anim, index_dir, sizeof(index_dir));
BLI_join_dirfile(fname, FILE_MAXFILE + FILE_MAXDIR, index_dir,
temp ? proxy_temp_name : proxy_name);
@@ -425,7 +424,7 @@ static void get_tc_filename(struct anim *anim, IMB_Timecode_Type tc,
BLI_snprintf(index_name, 256, index_names[i], stream_suffix);
- get_index_dir(anim, index_dir);
+ get_index_dir(anim, index_dir, sizeof(index_dir));
BLI_join_dirfile(fname, FILE_MAXFILE + FILE_MAXDIR,
index_dir, index_name);