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-21 04:48:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-21 04:48:02 +0400
commit2d8189cec0dab3d4c9db95c03ebb4eb2de6738c4 (patch)
tree71dcdc794d4446f7243d5c47ecd0290ed568566f /source/blender/blenfont/intern/blf_util.c
parent2e549e0241164baff7ba2d73aa05f4d865e20153 (diff)
- minor edits to font drawing/utf8, was needlessly casting int/unsigned int.
- also ifdef'd out more smoke function when the modifiers disabled.
Diffstat (limited to 'source/blender/blenfont/intern/blf_util.c')
-rw-r--r--source/blender/blenfont/intern/blf_util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenfont/intern/blf_util.c b/source/blender/blenfont/intern/blf_util.c
index cfe77887674..aef97b6f1cc 100644
--- a/source/blender/blenfont/intern/blf_util.c
+++ b/source/blender/blenfont/intern/blf_util.c
@@ -37,6 +37,8 @@
#include "blf_internal.h"
+#include "BLI_string_utf8.h"
+
unsigned int blf_next_p2(unsigned int x)
{
x -= 1;
@@ -72,7 +74,7 @@ unsigned int blf_hash(unsigned int val)
* The original name: imlib_font_utf8_get_next
* more info here: http://docs.enlightenment.org/api/imlib2/html/
*/
-int blf_utf8_next(unsigned char *buf, unsigned int *iindex)
+unsigned int blf_utf8_next(const char *buf, size_t *iindex)
{
/* Reads UTF8 bytes from 'buf', starting at 'index' and
* returns the code point of the next valid code point.
@@ -85,7 +87,7 @@ int blf_utf8_next(unsigned char *buf, unsigned int *iindex)
d= buf[index++];
if (!d)
- return 0;
+ return BLI_UTF8_ERR;
while (buf[index] && ((buf[index] & 0xc0) == 0x80))
index++;