This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
2012-07-19 18:19:26 +02:00
|
|
|
#ifndef WCHAR_H
|
|
|
|
#define WCHAR_H
|
|
|
|
|
2015-03-02 14:29:46 +01:00
|
|
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
2012-07-19 18:19:26 +02:00
|
|
|
|
|
|
|
#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;
|
|
|
|
}
|
|
|
|
|
2012-10-15 01:36:48 +02:00
|
|
|
extern size_t wcslen ( const wchar_t *string );
|
|
|
|
|
2012-07-19 18:19:26 +02:00
|
|
|
#endif /* WCHAR_H */
|