From bf6653505543a50ff2471a2ab7de8e1dd4bc6f00 Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 16 Dec 2018 17:23:20 +0000 Subject: [PATCH] Removed strlenMB. Redundant. --- src/system/text.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/system/text.c b/src/system/text.c index 4696c45..3bfb68a 100644 --- a/src/system/text.c +++ b/src/system/text.c @@ -29,7 +29,6 @@ void useFont(char *name); static void initChars(Font *f); static char *nextCharacter(const char *str, int *i); static Glyph *findGlyph(char *c); -static int strlenMB(char *text); static SDL_Color white = {255, 255, 255, 255}; static char drawTextBuffer[1024]; @@ -365,7 +364,7 @@ int getWrappedTextHeight(char *text, int size) y = 0; h = 0; currentWidth = 0; - len = strlenMB(drawTextBuffer); + len = strlen(drawTextBuffer); memset(word, 0, MAX_WORD_LENGTH); for (i = 0 ; i < len ; i++) @@ -421,23 +420,3 @@ static char *nextCharacter(const char *str, int *i) *i = *i + 1; } } - -static int strlenMB(char *text) -{ - int i, n; - unsigned char bit; - - n = 0; - - for (i = 0 ; i < strlen(text) ; i++) - { - bit = (unsigned char)text[i]; - - if ((bit >= ' ' && bit <= '~') || bit >= 0xC0) - { - n++; - } - } - - return n; -}