[smsc75xx] Expose functionality shared with LAN78xx devices
[ipxe.git] / src / include / wchar.h
1 #ifndef WCHAR_H
2 #define WCHAR_H
3
4 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
5
6 #include <stddef.h>
7
8 typedef void mbstate_t;
9
10 /**
11 * Convert wide character to multibyte sequence
12 *
13 * @v buf Buffer
14 * @v wc Wide character
15 * @v ps Shift state
16 * @ret len Number of characters written
17 *
18 * This is a stub implementation, sufficient to handle basic ASCII
19 * characters.
20 */
21 static inline __attribute__ (( always_inline ))
22 size_t wcrtomb ( char *buf, wchar_t wc, mbstate_t *ps __unused ) {
23 *buf = wc;
24 return 1;
25 }
26
27 extern size_t wcslen ( const wchar_t *string );
28
29 #endif /* WCHAR_H */