From 2e82822d080950d9f2cc2bfadafd31ec9809b871 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 4 Jul 2014 09:04:50 +0200 Subject: Add beginning wchar support EFI uses 16 bit character strings. Add beginning support for this. Since barebox uses 8 bit strings internally we need conversion functions to convert between 16 bit and 8 bit strings. Signed-off-by: Sascha Hauer --- include/wchar.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 include/wchar.h (limited to 'include/wchar.h') diff --git a/include/wchar.h b/include/wchar.h new file mode 100644 index 0000000000..80dcd81bf4 --- /dev/null +++ b/include/wchar.h @@ -0,0 +1,18 @@ +#ifndef __WCHAR_H +#define __WCHAR_H + +#include + +typedef u16 wchar_t; + +char *strcpy_wchar_to_char(char *dst, const wchar_t *src); + +wchar_t *strcpy_char_to_wchar(wchar_t *dst, const char *src); + +wchar_t *strdup_char_to_wchar(const char *src); + +char *strdup_wchar_to_char(const wchar_t *src); + +size_t wcslen(const wchar_t *s); + +#endif /* __WCHAR_H */ -- cgit v1.2.3