Back to index

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

Go to the source code of this file.

Functions

wctype_t __wctype (const char *property)

Function Documentation

wctype_t __wctype ( const char *  property)

Definition at line 26 of file wctype.c.

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

  names = _NL_CURRENT (LC_CTYPE, _NL_CTYPE_CLASS_NAMES);
  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 = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_CLASS_OFFSET) + result;
  return (wctype_t) _NL_CURRENT_DATA (LC_CTYPE)->values[i].string;
}

Here is the call graph for this function: