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-07-08 00:06:34 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-07-08 00:06:34 +0400
commitea1f1fe0c20ab41fb9c9d332e7317d04a3bf0baf (patch)
tree4db5fd62e8e8e4bbff7edf64968e4f27f2d03f73 /source/blender/blenlib/intern/string.c
parentaac283966f663af78bb6036d107a63de3da29cd7 (diff)
BLI_string, dont pass unicode to ascii BLI_str_partition functions
Diffstat (limited to 'source/blender/blenlib/intern/string.c')
-rw-r--r--source/blender/blenlib/intern/string.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index 87233d26439..f396abbeb8d 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -690,7 +690,7 @@ int BLI_str_index_in_array(const char *str, const char **str_array)
* \param suf Return value, set to next char after the first delimiter found (or NULL if none found).
* \return The length of the prefix (i.e. *sep - str).
*/
-size_t BLI_str_partition(const char *str, const unsigned int delim[], char **sep, char **suf)
+size_t BLI_str_partition(const char *str, const char delim[], char **sep, char **suf)
{
return BLI_str_partition_ex(str, delim, sep, suf, false);
}
@@ -704,7 +704,7 @@ size_t BLI_str_partition(const char *str, const unsigned int delim[], char **sep
* \param suf Return value, set to next char after the first delimiter found (or NULL if none found).
* \return The length of the prefix (i.e. *sep - str).
*/
-size_t BLI_str_rpartition(const char *str, const unsigned int delim[], char **sep, char **suf)
+size_t BLI_str_rpartition(const char *str, const char delim[], char **sep, char **suf)
{
return BLI_str_partition_ex(str, delim, sep, suf, true);
}
@@ -719,15 +719,15 @@ size_t BLI_str_rpartition(const char *str, const unsigned int delim[], char **se
* \param from_right If %true, search from the right of \a str, else, search from its left.
* \return The length of the prefix (i.e. *sep - str).
*/
-size_t BLI_str_partition_ex(const char *str, const unsigned int delim[], char **sep, char **suf, const bool from_right)
+size_t BLI_str_partition_ex(const char *str, const char delim[], char **sep, char **suf, const bool from_right)
{
- const unsigned int *d;
+ const char *d;
char *(*func)(const char *str, int c) = from_right ? strrchr : strchr;
*sep = *suf = NULL;
for (d = delim; *d != '\0'; ++d) {
- char *tmp = func(str, (int)*d);
+ char *tmp = func(str, *d);
if (tmp && (from_right ? (*sep < tmp) : (!*sep || *sep > tmp))) {
*sep = tmp;