aboutsummaryrefslogtreecommitdiffstats
path: root/src/gdisp/mcufont/mf_encoding.h
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-07-29 16:25:20 +1000
committerinmarket <andrewh@inmarket.com.au>2013-07-29 16:25:20 +1000
commit12085b8014234b10739d5cf22ed6c6d055ce8741 (patch)
tree97cdf7ab1afe7ab6c8db761154618e779761fdb9 /src/gdisp/mcufont/mf_encoding.h
parent3ac4e9e789b7f0d5a9d18f9073a09d4e7a4fd3f0 (diff)
downloaduGFX-12085b8014234b10739d5cf22ed6c6d055ce8741.tar.gz
uGFX-12085b8014234b10739d5cf22ed6c6d055ce8741.tar.bz2
uGFX-12085b8014234b10739d5cf22ed6c6d055ce8741.zip
Fix compiler warnings, operating system dependancies, and non-portable code.
Diffstat (limited to 'src/gdisp/mcufont/mf_encoding.h')
-rw-r--r--src/gdisp/mcufont/mf_encoding.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/gdisp/mcufont/mf_encoding.h b/src/gdisp/mcufont/mf_encoding.h
index d2673d16..d8b7b70e 100644
--- a/src/gdisp/mcufont/mf_encoding.h
+++ b/src/gdisp/mcufont/mf_encoding.h
@@ -13,7 +13,9 @@
#define _MF_ENCODING_H_
#include "mf_config.h"
+#ifndef MF_NO_STDINT_H
#include <stdint.h>
+#endif
/* Type used to represent characters internally. */
#if MF_ENCODING == MF_ENCODING_ASCII
@@ -42,19 +44,11 @@ typedef const wchar_t * mf_str;
*
* Returns: The next character, as unicode codepoint.
*/
-#if MF_ENCODING == MF_ENCODING_UTF8
MF_EXTERN mf_char mf_getchar(mf_str *str);
-#else
-static mf_char mf_getchar(mf_str *str) { return *(*str)++; }
-#endif
/* Moves back the pointer to the beginning of the previous character.
* Be careful not to go beyond the start of the string.
*/
-#if MF_ENCODING == MF_ENCODING_UTF8
MF_EXTERN void mf_rewind(mf_str *str);
-#else
-static void mf_rewind(mf_str *str) { (*str)--; }
-#endif
#endif