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>2011-10-29 12:18:42 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-29 12:18:42 +0400
commit1e4be0a4bf9b16aa74ced29fcac8aef56195bbe8 (patch)
treee40f9909ce8893f7b94b006f1e7199615f2048a4 /source/blender/blenlib/intern
parented77c356fc1c323cef306fef2e7af03fd67a6871 (diff)
replace BLI_strtok_r from r41337 with lighter method that doesnt alloc for template_list
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r--source/blender/blenlib/intern/bpath.c3
-rw-r--r--source/blender/blenlib/intern/string.c29
2 files changed, 1 insertions, 31 deletions
diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c
index e42e02fb24f..b7fe7ef5efd 100644
--- a/source/blender/blenlib/intern/bpath.c
+++ b/source/blender/blenlib/intern/bpath.c
@@ -325,8 +325,7 @@ static int rewrite_path_fixed_dirfile(char path_dir[FILE_MAXDIR], char path_file
}
if (visit_cb(userdata, path_dst, (const char *)path_src)) {
- BLI_split_dirfile(path_dst, path_dir, path_file,
- sizeof(path_dir), sizeof(path_file));
+ BLI_split_dirfile(path_dst, path_dir, path_file, FILE_MAXDIR, FILE_MAXFILE);
return TRUE;
}
else {
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index 3ec84e0b593..3a66425a5de 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -375,35 +375,6 @@ int BLI_natstrcmp(const char *s1, const char *s2)
return 0;
}
-/* As unfortunately strtok_r is not available everywhere... */
-char *BLI_strtok_r(char *str, const char *delimiter, char **ctx)
-{
- char *cut = NULL, *ret = NULL;
- char *split = str ? str : *ctx;
-
- if(!split) {
- return ret;
- }
-
- cut = strchr(split, *delimiter);
- if(cut) {
- size_t len_ret = cut - split;
- size_t len_ctx = strlen(split) - len_ret - 1;
- ret = BLI_strdupn(split, len_ret);
- if(len_ctx > 0) {
- *ctx = split+len_ret+1;
- }
- else {
- *ctx = NULL;
- }
- }
- else {
- ret = BLI_strdup(split);
- *ctx = NULL;
- }
- return ret;
-}
-
void BLI_timestr(double _time, char *str)
{
/* format 00:00:00.00 (hr:min:sec) string has to be 12 long */