toupper.c revision 3050
1#include <stdio.h>
2#include <rune.h>
3
4_BSD_RUNE_T_
5___toupper(c)
6	_BSD_RUNE_T_ c;
7{
8	int x;
9	_RuneRange *rr = &_CurrentRuneLocale->mapupper_ext;
10	_RuneEntry *re = rr->ranges;
11
12	if (c == EOF)
13		return(EOF);
14	for (x = 0; x < rr->nranges; ++x, ++re) {
15		if (c < re->min)
16			return(c);
17		if (c <= re->max)
18			return(re->map + c - re->min);
19	}
20	return(c);
21}
22
23