Back to index

glibc  2.9
Defines | Typedefs | Variables
cp1255.c File Reference
#include <dlfcn.h>
#include <stdint.h>
#include <assert.h>
#include <iconv/loop.c>
#include <iconv/skeleton.c>

Go to the source code of this file.

Defines

#define NELEMS(arr)   (sizeof (arr) / sizeof (arr[0]))
#define CHARSET_NAME   "CP1255//"
#define FROM_LOOP   from_cp1255
#define TO_LOOP   to_cp1255
#define DEFINE_INIT   1
#define DEFINE_FINI   1
#define FROM_LOOP_MIN_NEEDED_FROM   1
#define FROM_LOOP_MAX_NEEDED_FROM   1
#define FROM_LOOP_MIN_NEEDED_TO   4
#define FROM_LOOP_MAX_NEEDED_TO   4
#define TO_LOOP_MIN_NEEDED_FROM   4
#define TO_LOOP_MAX_NEEDED_FROM   4
#define TO_LOOP_MIN_NEEDED_TO   1
#define TO_LOOP_MAX_NEEDED_TO   3
#define PREPARE_LOOP
#define EXTRA_LOOP_ARGS   , statep
#define SAVE_RESET_STATE(Save)
#define EMIT_SHIFT_TO_INIT
#define COMP_TABLE_IDX_05B4   0
#define COMP_TABLE_LEN_05B4   1
#define COMP_TABLE_IDX_05B7   (COMP_TABLE_IDX_05B4 + COMP_TABLE_LEN_05B4)
#define COMP_TABLE_LEN_05B7   2
#define COMP_TABLE_IDX_05B8   (COMP_TABLE_IDX_05B7 + COMP_TABLE_LEN_05B7)
#define COMP_TABLE_LEN_05B8   1
#define COMP_TABLE_IDX_05B9   (COMP_TABLE_IDX_05B8 + COMP_TABLE_LEN_05B8)
#define COMP_TABLE_LEN_05B9   1
#define COMP_TABLE_IDX_05BC   (COMP_TABLE_IDX_05B9 + COMP_TABLE_LEN_05B9)
#define COMP_TABLE_LEN_05BC   24
#define COMP_TABLE_IDX_05BF   (COMP_TABLE_IDX_05BC + COMP_TABLE_LEN_05BC)
#define COMP_TABLE_LEN_05BF   3
#define COMP_TABLE_IDX_05C1   (COMP_TABLE_IDX_05BF + COMP_TABLE_LEN_05BF)
#define COMP_TABLE_LEN_05C1   2
#define COMP_TABLE_IDX_05C2   (COMP_TABLE_IDX_05C1 + COMP_TABLE_LEN_05C1)
#define COMP_TABLE_LEN_05C2   2
#define COMP_TABLE_IDX_END   (COMP_TABLE_IDX_05C2 + COMP_TABLE_LEN_05C2)
#define MIN_NEEDED_INPUT   FROM_LOOP_MIN_NEEDED_FROM
#define MAX_NEEDED_INPUT   FROM_LOOP_MAX_NEEDED_FROM
#define MIN_NEEDED_OUTPUT   FROM_LOOP_MIN_NEEDED_TO
#define MAX_NEEDED_OUTPUT   FROM_LOOP_MAX_NEEDED_TO
#define LOOPFCT   FROM_LOOP
#define BODY
#define LOOP_NEED_FLAGS
#define EXTRA_LOOP_DECLS   , int *statep
#define ONEBYTE_BODY
#define FROM_IDX_00   0
#define FROM_IDX_02   (FROM_IDX_00 + 88)
#define FROM_IDX_05   (FROM_IDX_02 + 23)
#define FROM_IDX_20   (FROM_IDX_05 + 69)
#define FROM_IDX_FF   (FROM_IDX_20 + 45)
#define MIN_NEEDED_INPUT   TO_LOOP_MIN_NEEDED_FROM
#define MAX_NEEDED_INPUT   TO_LOOP_MAX_NEEDED_FROM
#define MIN_NEEDED_OUTPUT   TO_LOOP_MIN_NEEDED_TO
#define MAX_NEEDED_OUTPUT   TO_LOOP_MAX_NEEDED_TO
#define LOOPFCT   TO_LOOP
#define BODY
#define LOOP_NEED_FLAGS
#define EXTRA_LOOP_DECLS   , int *statep

Typedefs

typedef int verify1 [(NELEMS(comp_table_data)==COMP_TABLE_IDX_END)-1]
typedef int verify2 [(NELEMS(from_ucs4)==FROM_IDX_FF)-1]

Variables

static const uint16_t to_ucs4 [128]
struct {
uint16_t base
uint16_t composed
comp_table_data []
struct {
unsigned int idx
unsigned int len
comp_table [8]
static const unsigned char from_ucs4 []
static const unsigned char comb_table [8]
struct {
uint16_t composed
uint16_t base
uint32_t comb1: 8
int32_t comb2: 8
decomp_table []

Define Documentation

#define BODY

Definition at line 431 of file cp1255.c.

#define BODY

Definition at line 431 of file cp1255.c.

#define CHARSET_NAME   "CP1255//"

Definition at line 29 of file cp1255.c.

#define COMP_TABLE_IDX_05B4   0
#define COMP_TABLE_LEN_05B4   1
#define COMP_TABLE_LEN_05B7   2
#define COMP_TABLE_LEN_05B8   1
#define COMP_TABLE_LEN_05B9   1
#define COMP_TABLE_LEN_05BC   24
#define COMP_TABLE_LEN_05BF   3
#define COMP_TABLE_LEN_05C1   2
#define COMP_TABLE_LEN_05C2   2
#define DEFINE_FINI   1

Definition at line 33 of file cp1255.c.

#define DEFINE_INIT   1

Definition at line 32 of file cp1255.c.

Value:
if (data->__statep->__count != 0)                                    \
    {                                                                \
      if (FROM_DIRECTION)                                            \
       {                                                             \
         if (__builtin_expect (outbuf + 4 <= outend, 1))                    \
           {                                                         \
             /* Write out the last character.  */                           \
             *((uint32_t *) outbuf) = data->__statep->__count >> 3;         \
             outbuf += sizeof (uint32_t);                            \
             data->__statep->__count = 0;                            \
           }                                                         \
         else                                                        \
           /* We don't have enough room in the output buffer.  */           \
           status = __GCONV_FULL_OUTPUT;                             \
       }                                                             \
      else                                                           \
       /* We don't use shift states in the TO_DIRECTION.  */                \
       data->__statep->__count = 0;                                         \
    }

Definition at line 64 of file cp1255.c.

#define EXTRA_LOOP_ARGS   , statep

Definition at line 45 of file cp1255.c.

#define EXTRA_LOOP_DECLS   , int *statep

Definition at line 551 of file cp1255.c.

#define EXTRA_LOOP_DECLS   , int *statep

Definition at line 551 of file cp1255.c.

#define FROM_IDX_00   0
#define FROM_IDX_02   (FROM_IDX_00 + 88)
#define FROM_IDX_05   (FROM_IDX_02 + 23)
#define FROM_IDX_20   (FROM_IDX_05 + 69)
#define FROM_IDX_FF   (FROM_IDX_20 + 45)
#define FROM_LOOP   from_cp1255

Definition at line 30 of file cp1255.c.

#define FROM_LOOP_MAX_NEEDED_FROM   1

Definition at line 35 of file cp1255.c.

#define FROM_LOOP_MAX_NEEDED_TO   4

Definition at line 37 of file cp1255.c.

#define FROM_LOOP_MIN_NEEDED_FROM   1

Definition at line 34 of file cp1255.c.

#define FROM_LOOP_MIN_NEEDED_TO   4

Definition at line 36 of file cp1255.c.

#define LOOP_NEED_FLAGS

Definition at line 550 of file cp1255.c.

#define LOOP_NEED_FLAGS

Definition at line 550 of file cp1255.c.

#define LOOPFCT   FROM_LOOP

Definition at line 430 of file cp1255.c.

#define LOOPFCT   TO_LOOP

Definition at line 430 of file cp1255.c.

Definition at line 427 of file cp1255.c.

Definition at line 427 of file cp1255.c.

Definition at line 429 of file cp1255.c.

Definition at line 429 of file cp1255.c.

Definition at line 426 of file cp1255.c.

Definition at line 426 of file cp1255.c.

Definition at line 428 of file cp1255.c.

Definition at line 428 of file cp1255.c.

#define NELEMS (   arr)    (sizeof (arr) / sizeof (arr[0]))

Definition at line 26 of file cp1255.c.

#define ONEBYTE_BODY
Value:
{                                                                    \
    if (c < 0x80)                                                    \
      return c;                                                             \
    uint32_t ch = to_ucs4[c - 0x80];                                        \
    if (ch == L'\0' || (ch >= 0x05d0 && ch <= 0x05f2))                      \
      return WEOF;                                                   \
    return ch;                                                              \
  }

Definition at line 324 of file cp1255.c.

#define PREPARE_LOOP
Value:
int saved_state;                                                     \
  int *statep = &data->__statep->__count;

Definition at line 42 of file cp1255.c.

#define SAVE_RESET_STATE (   Save)
Value:
if (Save)                                                            \
    saved_state = *statep;                                           \
  else                                                               \
    *statep = saved_state

Definition at line 50 of file cp1255.c.

#define TO_LOOP   to_cp1255

Definition at line 31 of file cp1255.c.

#define TO_LOOP_MAX_NEEDED_FROM   4

Definition at line 39 of file cp1255.c.

#define TO_LOOP_MAX_NEEDED_TO   3

Definition at line 41 of file cp1255.c.

#define TO_LOOP_MIN_NEEDED_FROM   4

Definition at line 38 of file cp1255.c.

#define TO_LOOP_MIN_NEEDED_TO   1

Definition at line 40 of file cp1255.c.


Typedef Documentation

Definition at line 178 of file cp1255.c.

Definition at line 377 of file cp1255.c.


Variable Documentation

const unsigned char comb_table[8] [static]
Initial value:
 {
  0xc4, 0xc7, 0xc8, 0xc9, 0xcc, 0xcf, 0xd1, 0xd2,
}

Definition at line 379 of file cp1255.c.

struct { ... } comp_table[8] [static]
struct { ... } comp_table_data[] [static]
struct { ... } decomp_table[] [static]
const unsigned char from_ucs4[] [static]

Definition at line 338 of file cp1255.c.

const uint16_t to_ucs4[128] [static]
Initial value:
 {
  
  0x20AC,      0, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
  0x02C6, 0x2030,      0, 0x2039,      0,      0,      0,      0,
  
       0, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
  0x02DC, 0x2122,      0, 0x203A,      0,      0,      0,      0,
  
  0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x20AA, 0x00A5, 0x00A6, 0x00A7,
  0x00A8, 0x00A9, 0x00D7, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
  
  0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
  0x00B8, 0x00B9, 0x00F7, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
  
  0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7,
  0x05B8, 0x05B9,      0, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
  
  0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05F0, 0x05F1, 0x05F2, 0x05F3,
  0x05F4,      0,      0,      0,      0,      0,      0,      0,
  
  0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
  0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
  
  0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
  0x05E8, 0x05E9, 0x05EA,      0,      0, 0x200E, 0x200F,      0,
}

Definition at line 88 of file cp1255.c.