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

int wctob(wint_t c)
{
	if (c < 128U) return c;
	if (MB_CUR_MAX==1 && IS_CODEUNIT(c)) return (unsigned char)c;
	return EOF;
}


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