ascii.h revision 1ab64890
1/* $XFree86$ */
2
3/*
4 * ASCII
5 */
6
7static int
8ascii_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)
9{
10  unsigned char c = *s;
11  if (c < 0x80) {
12    *pwc = (ucs4_t) c;
13    return 1;
14  }
15  return RET_ILSEQ;
16}
17
18static int
19ascii_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)
20{
21  if (wc < 0x0080) {
22    *r = wc;
23    return 1;
24  }
25  return RET_ILSEQ;
26}
27