aboutsummaryrefslogtreecommitdiff
path: root/src/multibyte/btowc.c
blob: a1fecf4f6933422d61c9bf50f79631f98b8f4eb9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
#include <wchar.h>
#include <stdlib.h>
#include "internal.h"

wint_t btowc(int c)
{
	int b = (unsigned char)c;
	return b<128U ? b : (MB_CUR_MAX==1 && c!=EOF) ? CODEUNIT(c) : WEOF;
}


#ifdef TEST
int
main(void) {
	return 0;
}
#endif