Back to index

glibc  2.9
Functions
wctype_l.c File Reference
#include <endian.h>
#include <locale.h>
#include <string.h>
#include <wctype.h>
#include <locale/localeinfo.h>

Go to the source code of this file.

Functions

wctype_t __wctype_l (const char *property, __locale_t locale)

Function Documentation

wctype_t __wctype_l ( const char *  property,
__locale_t  locale 
)

Definition at line 27 of file wctype_l.c.

{
  const char *names;
  unsigned int result;
  size_t proplen = strlen (property);
  size_t i;

  names = locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_CLASS_NAMES)].string;
  for (result = 0; ; result++)
    {
      size_t nameslen = strlen (names);

      if (proplen == nameslen && memcmp (property, names, proplen) == 0)
       break;

      names += nameslen + 1;
      if (names[0] == '\0')
       return 0;
    }

  i = locale->__locales[LC_CTYPE]->values[_NL_ITEM_INDEX (_NL_CTYPE_CLASS_OFFSET)].word + result;
  return (wctype_t) locale->__locales[LC_CTYPE]->values[i].string;
}

Here is the call graph for this function: