freebsd-dev/lib/libc/locale/nomacros.c
Andrey A. Chernov 2f04ec53cc Make not-so-space-eaten locale version:
split modules to bring only neccessary functions,
eliminate sprintf, make reduced startup_locale version.
1994-09-24 15:59:33 +00:00

42 lines
742 B
C

#include <ctype.h>
#include <rune.h>
#if !defined(_USE_CTYPE_INLINE_) && !defined(_USE_CTYPE_MACROS_)
/*
* See comments in <machine/ansi.h>
*/
int
__istype(c, f)
_BSD_RUNE_T_ c;
unsigned long f;
{
return ((((c & _CRMASK) ? ___runetype(c)
: _CurrentRuneLocale->runetype[c]) & f) ? 1 : 0);
}
int
__isctype(_BSD_RUNE_T_ c, unsigned long f)
_BSD_RUNE_T_ c;
unsigned long f;
{
return ((((c & _CRMASK) ? 0
: _DefaultRuneLocale.runetype[c]) & f) ? 1 : 0);
}
_BSD_RUNE_T_
toupper(c)
_BSD_RUNE_T_ c;
{
return ((c & _CRMASK) ?
___toupper(c) : _CurrentRuneLocale->mapupper[c]);
}
_BSD_RUNE_T_
tolower(c)
_BSD_RUNE_T_ c;
{
return ((c & _CRMASK) ?
___tolower(c) : _CurrentRuneLocale->maplower[c]);
}
#endif