2f020a8df3
These files cannot be automatically relicensed by util/relicense.pl since they either contain unusual but trivial contributions (such as the addition of __nonnull function attributes), or contain lines dating back to the initial git revision (and so require manual knowledge of the code's origin). Signed-off-by: Michael Brown <mcb30@ipxe.org>
30 lines
582 B
C
30 lines
582 B
C
#ifndef WCHAR_H
|
|
#define WCHAR_H
|
|
|
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
|
|
|
#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;
|
|
}
|
|
|
|
extern size_t wcslen ( const wchar_t *string );
|
|
|
|
#endif /* WCHAR_H */
|