mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
24 lines
355 B
C
24 lines
355 B
C
|
#include <stdio.h>
|
||
|
#include <rune.h>
|
||
|
|
||
|
_BSD_RUNE_T_
|
||
|
___tolower(c)
|
||
|
_BSD_RUNE_T_ c;
|
||
|
{
|
||
|
int x;
|
||
|
_RuneRange *rr = &_CurrentRuneLocale->maplower_ext;
|
||
|
_RuneEntry *re = rr->ranges;
|
||
|
|
||
|
if (c == EOF)
|
||
|
return(EOF);
|
||
|
for (x = 0; x < rr->nranges; ++x, ++re) {
|
||
|
if (c < re->min)
|
||
|
return(c);
|
||
|
if (c <= re->max)
|
||
|
return(re->map + c - re->min);
|
||
|
}
|
||
|
return(c);
|
||
|
}
|
||
|
|
||
|
|