Back to index

glibc  2.9
Classes | Defines | Functions | Variables
gconv_builtin.c File Reference
#include <endian.h>
#include <limits.h>
#include <stdint.h>
#include <string.h>
#include <gconv_int.h>
#include <assert.h>
#include <gconv_builtin.h>

Go to the source code of this file.

Classes

struct  builtin_map

Defines

#define BUILTIN_TRANSFORMATION(From, To, Cost, Name, Fct, BtowcFct, MinF, MaxF, MinT, MaxT)
#define BUILTIN_ALIAS(From, To)

Functions

void internal_function __gconv_get_builtin_trans (const char *name, struct __gconv_step *step)

Variables

static struct builtin_map map []

Class Documentation

struct builtin_map

Definition at line 31 of file gconv_builtin.c.

Collaboration diagram for builtin_map:
Class Members
__gconv_btowc_fct btowc_fct
__gconv_fct fct
int8_t max_needed_from
int8_t max_needed_to
int8_t min_needed_from
int8_t min_needed_to
const char * name

Define Documentation

#define BUILTIN_ALIAS (   From,
  To 
)
#define BUILTIN_TRANSFORMATION (   From,
  To,
  Cost,
  Name,
  Fct,
  BtowcFct,
  MinF,
  MaxF,
  MinT,
  MaxT 
)
Value:
{                                                                    \
    .name = Name,                                                    \
    .fct = Fct,                                                             \
    .btowc_fct = BtowcFct,                                           \
                                                                     \
    .min_needed_from = MinF,                                                \
    .max_needed_from = MaxF,                                                \
    .min_needed_to = MinT,                                           \
    .max_needed_to = MaxT                                            \
  },

Function Documentation

void internal_function __gconv_get_builtin_trans ( const char *  name,
struct __gconv_step step 
)

Definition at line 64 of file gconv_builtin.c.

{
  size_t cnt;

  for (cnt = 0; cnt < sizeof (map) / sizeof (map[0]); ++cnt)
    if (strcmp (name, map[cnt].name) == 0)
      break;

  assert (cnt < sizeof (map) / sizeof (map[0]));

  step->__fct = map[cnt].fct;
  step->__btowc_fct = map[cnt].btowc_fct;
  step->__init_fct = NULL;
  step->__end_fct = NULL;
  step->__shlib_handle = NULL;
  step->__modname = NULL;

  step->__min_needed_from = map[cnt].min_needed_from;
  step->__max_needed_from = map[cnt].max_needed_from;
  step->__min_needed_to = map[cnt].min_needed_to;
  step->__max_needed_to = map[cnt].max_needed_to;

  /* None of the builtin converters handles stateful encoding.  */
  step->__stateful = 0;
}

Here is the caller graph for this function:


Variable Documentation

struct builtin_map map[] [static]