Back to index

glibc  2.9
Defines | Functions
wcfuncs_l.c File Reference
#include <ctype.h>
#include <wctype.h>
#include <stdint.h>
#include <locale.h>
#include <locale/localeinfo.h>
#include "wchar-lookup.h"

Go to the source code of this file.

Defines

#define USE_IN_EXTENDED_LOCALE_MODEL
#define func(name, type)

Functions

 func (alnum_l, __ISwalnum)
 libc_hidden_def (weak_alias(__towlower_l)

Define Documentation

#define func (   name,
  type 
)
Value:
int __isw##name (wint_t wc, __locale_t locale)                       \
  {                                                                  \
    if (isascii (wc))                                                       \
      return is##name ((int) wc, locale);                            \
    size_t i = locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_CLASS_OFFSET)].word + type; \
    const char *desc = locale->__locales[LC_CTYPE]->values[i].string;       \
    return wctype_table_lookup (desc, wc);                                  \
  }                                                                  \
  libc_hidden_def (__isw##name)                                             \
  weak_alias (__isw##name, isw##name)

Definition at line 30 of file wcfuncs_l.c.

Definition at line 25 of file wcfuncs_l.c.


Function Documentation

func ( alnum_l  ,
__ISwalnum   
)

Definition at line 42 of file wcfuncs_l.c.

{
  size_t i = locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_MAP_OFFSET)].word + __TOW_tolower;
  const char *desc = locale->__locales[LC_CTYPE]->values[i].string;
  return wctrans_table_lookup (desc, wc);
}
libc_hidden_def ( weak_alias __towlower_l)

Definition at line 64 of file wcfuncs_l.c.

{
  size_t i = locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_MAP_OFFSET)].word + __TOW_toupper;
  const char *desc = locale->__locales[LC_CTYPE]->values[i].string;
  return wctrans_table_lookup (desc, wc);
}