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>2012-10-27 05:46:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-27 05:46:47 +0400
commite903701450fd1ffe4d793a60e3c174ee47fe66dd (patch)
treeb3a0f48966c9ada8bbcfc5a524c9bddaae1a7072 /source/blender/blenlib
parentbf4be941fc412e0af3825a2aa0c420017af4dc9f (diff)
style cleanup
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_string_utf8.h1
-rw-r--r--source/blender/blenlib/intern/string_utf8.c7
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/BLI_string_utf8.h b/source/blender/blenlib/BLI_string_utf8.h
index efb9ac552df..20b56f85b53 100644
--- a/source/blender/blenlib/BLI_string_utf8.h
+++ b/source/blender/blenlib/BLI_string_utf8.h
@@ -49,7 +49,6 @@ char *BLI_str_prev_char_utf8(const char *p);
/* wchar_t functions, copied from blenders own font.c originally */
size_t BLI_wstrlen_utf8(const wchar_t *src);
-size_t BLI_strlen_utf8_char(const char *strc);
size_t BLI_strlen_utf8(const char *strc);
size_t BLI_strlen_range_utf8(const char *start, const char *end);
size_t BLI_strncpy_wchar_as_utf8(char *__restrict dst, const wchar_t *__restrict src, const size_t maxcpy);
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
index 9c7829dbcb6..7f6057dfdc4 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -231,8 +231,9 @@ size_t BLI_wstrlen_utf8(const wchar_t *src)
return len;
}
+/* this is very close to 'BLI_str_utf8_size' functionality, perhaps we should de-duplicate */
/* size of UTF-8 character in bytes */
-size_t BLI_strlen_utf8_char(const char *strc)
+static size_t strlen_utf8_char(const char *strc)
{
if ((*strc & 0xe0) == 0xc0) {
if ((strc[1] & 0x80) && (strc[1] & 0x40) == 0x00)
@@ -255,7 +256,7 @@ size_t BLI_strlen_utf8(const char *strc)
int len;
for (len = 0; *strc; len++)
- strc += BLI_strlen_utf8_char(strc);
+ strc += strlen_utf8_char(strc);
return len;
}
@@ -266,7 +267,7 @@ size_t BLI_strlen_range_utf8(const char *start, const char *end)
int len;
for (len = 0; strc < end; len++)
- strc += BLI_strlen_utf8_char(strc);
+ strc += strlen_utf8_char(strc);
return len;
}