Back to index

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

Go to the source code of this file.

Functions

wctrans_t __wctrans (const char *property)

Function Documentation

wctrans_t __wctrans ( const char *  property)

Definition at line 26 of file wctrans.c.

{
  const char *names;
  size_t cnt;
  size_t i;

  names = _NL_CURRENT (LC_CTYPE, _NL_CTYPE_MAP_NAMES);
  cnt = 0;
  while (names[0] != '\0')
    {
      if (strcmp (property, names) == 0)
       break;

      names = strchr (names, '\0') + 1;
      ++cnt;
    }

  if (names[0] == '\0')
    return 0;

  i = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_OFFSET) + cnt;
  return (wctrans_t) _NL_CURRENT_DATA (LC_CTYPE)->values[i].string;
}

Here is the caller graph for this function: