summaryrefslogblamecommitdiff
path: root/src/multibyte/btowc.c
blob: 8acd0a2cf1002ccda866949f0c528bd3bdd6fa50 (plain) (tree)
1
2
3
4
5
6
7
8
9

                  

                     


                   

                                                                           
 
#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;
}