mirror of
https://github.com/xcat2/xNBA.git
synced 2024-11-26 03:09:12 +00:00
[libc] Add missing wchar.h header
Commit 58ed3b1
("[libc] Add support for "%lc" and "%ls" format
specifiers") was missing a file.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
d32aac88ef
commit
23b70323c7
27
src/include/wchar.h
Normal file
27
src/include/wchar.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef WCHAR_H
|
||||
#define WCHAR_H
|
||||
|
||||
FILE_LICENCE ( GPL2_ONLY );
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
typedef void mbstate_t;
|
||||
|
||||
/**
|
||||
* Convert wide character to multibyte sequence
|
||||
*
|
||||
* @v buf Buffer
|
||||
* @v wc Wide character
|
||||
* @v ps Shift state
|
||||
* @ret len Number of characters written
|
||||
*
|
||||
* This is a stub implementation, sufficient to handle basic ASCII
|
||||
* characters.
|
||||
*/
|
||||
static inline __attribute__ (( always_inline ))
|
||||
size_t wcrtomb ( char *buf, wchar_t wc, mbstate_t *ps __unused ) {
|
||||
*buf = wc;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif /* WCHAR_H */
|
Loading…
Reference in New Issue
Block a user