iPXE
wchar.h
Go to the documentation of this file.
1 #ifndef WCHAR_H
2 #define WCHAR_H
3 
4 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
5 FILE_SECBOOT ( PERMITTED );
6 
7 #include <stddef.h>
8 
9 typedef void mbstate_t;
10 
11 /**
12  * Convert wide character to multibyte sequence
13  *
14  * @v buf Buffer
15  * @v wc Wide character
16  * @v ps Shift state
17  * @ret len Number of characters written
18  *
19  * This is a stub implementation, sufficient to handle basic ASCII
20  * characters.
21  */
22 static inline __attribute__ (( always_inline ))
23 size_t wcrtomb ( char *buf, wchar_t wc, mbstate_t *ps __unused ) {
24  *buf = wc;
25  return 1;
26 }
27 
28 extern size_t wcsnlen ( const wchar_t *string, size_t max );
29 extern size_t wcslen ( const wchar_t *string );
30 
31 #endif /* WCHAR_H */
static wchar_t wc
Definition: wchar.h:23
#define max(x, y)
Definition: ath.h:41
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
__SIZE_TYPE__ size_t
Definition: stdint.h:6
size_t wcsnlen(const wchar_t *string, size_t max)
Calculate length of wide-character string.
Definition: wchar.c:43
static __attribute__((always_inline)) size_t wcrtomb(char *buf
Convert wide character to multibyte sequence.
size_t wcslen(const wchar_t *string)
Calculate length of wide-character string.
Definition: wchar.c:57
void mbstate_t
Definition: wchar.h:9
static wchar_t mbstate_t *ps __unused
Definition: wchar.h:23
FILE_SECBOOT(PERMITTED)