Back to index

glibc  2.9
Defines
gbgbk.c File Reference
#include <dlfcn.h>
#include <gconv.h>
#include <stdint.h>
#include <iconv/loop.c>
#include <iconv/skeleton.c>

Go to the source code of this file.

Defines

#define CHARSET_NAME   "GBK//"
#define FROM_LOOP   from_gbk_to_gb
#define TO_LOOP   from_gb_to_gbk
#define DEFINE_INIT   1
#define DEFINE_FINI   1
#define MIN_NEEDED_FROM   1
#define MAX_NEEDED_FROM   2
#define MIN_NEEDED_TO   1
#define MAX_NEEDED_TO   2
#define MIN_NEEDED_INPUT   MIN_NEEDED_FROM
#define MAX_NEEDED_INPUT   MAX_NEEDED_FROM
#define MIN_NEEDED_OUTPUT   MIN_NEEDED_TO
#define MAX_NEEDED_OUTPUT   MAX_NEEDED_TO
#define LOOPFCT   FROM_LOOP
#define BODY
#define LOOP_NEED_FLAGS
#define MIN_NEEDED_INPUT   MIN_NEEDED_TO
#define MAX_NEEDED_INPUT   MAX_NEEDED_TO
#define MIN_NEEDED_OUTPUT   MIN_NEEDED_FROM
#define MAX_NEEDED_OUTPUT   MAX_NEEDED_FROM
#define LOOPFCT   TO_LOOP
#define BODY

Define Documentation

#define BODY

Definition at line 104 of file gbgbk.c.

#define BODY
Value:
{                                                                    \
    /* We don't have to care about characters we cannot map.  The only             \
       problem are the mapping of 0xA1A4 and 0xA1AA but as explained above    \
       we do not do anything special here.  */                              \
    unsigned char ch = *inptr++;                                     \
                                                                     \
    if (ch > 0x7f)                                                   \
      {                                                                     \
       if (__builtin_expect (inptr + 1 >= inend, 0))                        \
         {                                                           \
           /* The second character is not available.  Store                 \
               the intermediate result.  */                                 \
           result = __GCONV_INCOMPLETE_INPUT;                               \
           break;                                                    \
         }                                                           \
                                                                     \
       if (__builtin_expect (outend - outptr < 2, 0))                       \
         {                                                           \
           /* We ran out of space.  */                                      \
           result = __GCONV_FULL_OUTPUT;                             \
           break;                                                    \
         }                                                           \
                                                                     \
       *outptr++ = ch;                                                      \
       ch = *inptr++;                                                       \
      }                                                                     \
    *outptr++ = ch;                                                  \
  }

Definition at line 104 of file gbgbk.c.

#define CHARSET_NAME   "GBK//"

Definition at line 27 of file gbgbk.c.

#define DEFINE_FINI   1

Definition at line 31 of file gbgbk.c.

#define DEFINE_INIT   1

Definition at line 30 of file gbgbk.c.

#define FROM_LOOP   from_gbk_to_gb

Definition at line 28 of file gbgbk.c.

#define LOOP_NEED_FLAGS

Definition at line 94 of file gbgbk.c.

#define LOOPFCT   FROM_LOOP

Definition at line 103 of file gbgbk.c.

#define LOOPFCT   TO_LOOP

Definition at line 103 of file gbgbk.c.

#define MAX_NEEDED_FROM   2

Definition at line 33 of file gbgbk.c.

Definition at line 100 of file gbgbk.c.

Definition at line 100 of file gbgbk.c.

Definition at line 102 of file gbgbk.c.

Definition at line 102 of file gbgbk.c.

#define MAX_NEEDED_TO   2

Definition at line 35 of file gbgbk.c.

#define MIN_NEEDED_FROM   1

Definition at line 32 of file gbgbk.c.

Definition at line 99 of file gbgbk.c.

Definition at line 99 of file gbgbk.c.

Definition at line 101 of file gbgbk.c.

Definition at line 101 of file gbgbk.c.

#define MIN_NEEDED_TO   1

Definition at line 34 of file gbgbk.c.

#define TO_LOOP   from_gb_to_gbk

Definition at line 29 of file gbgbk.c.