iPXE
wchar.h
Go to the documentation of this file.
1#ifndef WCHAR_H
2#define WCHAR_H
3
4FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
5FILE_SECBOOT ( PERMITTED );
6
7#include <stddef.h>
8
9typedef 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 */
22static inline __attribute__ (( always_inline ))
23size_t wcrtomb ( char *buf, wchar_t wc, mbstate_t *ps __unused ) {
24 *buf = wc;
25 return 1;
26}
27
28extern size_t wcsnlen ( const wchar_t *string, size_t max );
29extern size_t wcslen ( const wchar_t *string );
30
31#endif /* WCHAR_H */
__SIZE_TYPE__ size_t
Definition stdint.h:6
#define max(x, y)
Definition ath.h:41
#define __unused
Declare a variable or data structure as unused.
Definition compiler.h:573
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define __attribute__(x)
Definition compiler.h:10
void mbstate_t
Definition wchar.h:9
static wchar_t wc
Definition wchar.h:23
size_t wcsnlen(const wchar_t *string, size_t max)
Calculate length of wide-character string.
Definition wchar.c:43
size_t wcslen(const wchar_t *string)
Calculate length of wide-character string.
Definition wchar.c:57