summaryrefslogtreecommitdiff
path: root/src/wchar/wctob.c
blob: 32cf1ab64ccb69c03d43be8176f532b5d2f65326 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <wchar.h>
#include <locale.h>
#include <string.h>
#include <stdio.h>

int wctob(wint_t c)
{
	char *l = setlocale(LC_CTYPE, NULL);

	if (!strcmp(l, "C") || !strcmp(l, "POSIX")) {
		if (c <= 127) {
			return c;
		}
	}

	/* conversion */
	return EOF;
}

/*
STDC(199409)
*/