summaryrefslogtreecommitdiff
path: root/src/wchar/wctob.c
blob: fb110e0bce51ffd91152a3f521edc2a901d7e004 (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)
*/