summaryrefslogtreecommitdiffstats
path: root/include/wchar.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2014-07-04 09:04:50 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-07-14 08:01:06 +0200
commit2e82822d080950d9f2cc2bfadafd31ec9809b871 (patch)
tree8ebec3665e92e6bb95cd1268f4b85c5083192b03 /include/wchar.h
parent9b09369a0a118282eff1b953f82de66e220ee22a (diff)
downloadbarebox-2e82822d080950d9f2cc2bfadafd31ec9809b871.tar.gz
barebox-2e82822d080950d9f2cc2bfadafd31ec9809b871.tar.xz
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 <s.hauer@pengutronix.de>
Diffstat (limited to 'include/wchar.h')
-rw-r--r--include/wchar.h18
1 files changed, 18 insertions, 0 deletions
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 <linux/types.h>
+
+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 */