Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
nls_euc-jp.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/nls.h>
#include <linux/errno.h>

Go to the source code of this file.

Macros

#define IS_SJIS_LOW_BYTE(l)   ((0x40 <= (l)) && ((l) <= 0xFC) && ((l) != 0x7F))
 
#define IS_SJIS_JISX0208(h, l)
 
#define IS_SJIS_JISX0201KANA(c)   ((0xA1 <= (c)) && ((c) <= 0xDF))
 
#define IS_SJIS_UDC_LOW(h, l)
 
#define IS_SJIS_UDC_HI(h, l)
 
#define IS_SJIS_IBM(h, l)
 
#define IS_SJIS_NECIBM(h, l)
 
#define MAP_SJIS2EUC(sjis_hi, sjis_lo, sjis_p, euc_hi, euc_lo, euc_p)
 
#define SS2   (0x8E) /* Single Shift 2 */
 
#define SS3   (0x8F) /* Single Shift 3 */
 
#define IS_EUC_BYTE(c)   ((0xA1 <= (c)) && ((c) <= 0xFE))
 
#define IS_EUC_JISX0208(h, l)   (IS_EUC_BYTE(h) && IS_EUC_BYTE(l))
 
#define IS_EUC_JISX0201KANA(h, l)   (((h) == SS2) && (0xA1 <= (l) && (l) <= 0xDF))
 
#define IS_EUC_UDC_LOW(h, l)
 
#define IS_EUC_UDC_HI(h, l)   IS_EUC_UDC_LOW(h, l) /* G3 block */
 
#define MAP_EUC2SJIS(euc_hi, euc_lo, euc_p, sjis_hi, sjis_lo, sjis_p)
 
#define IS_EUC_IBM2JISX0208(h, l)   (((h) == 0xA2 && (l) == 0xCC) || ((h) == 0xA2 && (l) == 0xE8))
 

Macro Definition Documentation

#define IS_EUC_BYTE (   c)    ((0xA1 <= (c)) && ((c) <= 0xFE))

Definition at line 43 of file nls_euc-jp.c.

#define IS_EUC_IBM2JISX0208 (   h,
  l 
)    (((h) == 0xA2 && (l) == 0xCC) || ((h) == 0xA2 && (l) == 0xE8))

Definition at line 141 of file nls_euc-jp.c.

#define IS_EUC_JISX0201KANA (   h,
  l 
)    (((h) == SS2) && (0xA1 <= (l) && (l) <= 0xDF))

Definition at line 45 of file nls_euc-jp.c.

#define IS_EUC_JISX0208 (   h,
  l 
)    (IS_EUC_BYTE(h) && IS_EUC_BYTE(l))

Definition at line 44 of file nls_euc-jp.c.

#define IS_EUC_UDC_HI (   h,
  l 
)    IS_EUC_UDC_LOW(h, l) /* G3 block */

Definition at line 48 of file nls_euc-jp.c.

#define IS_EUC_UDC_LOW (   h,
  l 
)
Value:
(((0xF5 <= (h)) && ((h) <= 0xFE)) \

Definition at line 46 of file nls_euc-jp.c.

#define IS_SJIS_IBM (   h,
  l 
)
Value:
(((0xFA <= (h)) && ((h) <= 0xFC)) \

Definition at line 27 of file nls_euc-jp.c.

#define IS_SJIS_JISX0201KANA (   c)    ((0xA1 <= (c)) && ((c) <= 0xDF))

Definition at line 22 of file nls_euc-jp.c.

#define IS_SJIS_JISX0208 (   h,
  l 
)
Value:
((((0x81 <= (h)) && ((h) <= 0x9F)) \
|| ((0xE0 <= (h)) && ((h) <= 0xEA))) \

Definition at line 19 of file nls_euc-jp.c.

#define IS_SJIS_LOW_BYTE (   l)    ((0x40 <= (l)) && ((l) <= 0xFC) && ((l) != 0x7F))

Definition at line 17 of file nls_euc-jp.c.

#define IS_SJIS_NECIBM (   h,
  l 
)
Value:
(((0xED <= (h)) && ((h) <= 0xEE)) \

Definition at line 29 of file nls_euc-jp.c.

#define IS_SJIS_UDC_HI (   h,
  l 
)
Value:
(((0xF5 <= (h)) && ((h) <= 0xF9)) \

Definition at line 25 of file nls_euc-jp.c.

#define IS_SJIS_UDC_LOW (   h,
  l 
)
Value:
(((0xF0 <= (h)) && ((h) <= 0xF4)) \

Definition at line 23 of file nls_euc-jp.c.

#define MAP_EUC2SJIS (   euc_hi,
  euc_lo,
  euc_p,
  sjis_hi,
  sjis_lo,
  sjis_p 
)
Value:
{ \
if ((euc_hi) & 1) { \
(sjis_hi) = (euc_hi) / 2 + ((sjis_p) - (euc_p) / 2); \
(sjis_lo) = (euc_lo) - ((euc_lo) >= 0xE0 ? 0x60 : 0x61); \
} else { \
(sjis_hi) = (euc_hi) / 2 + (((sjis_p) - (euc_p) / 2) - 1); \
(sjis_lo) = (euc_lo) - 2; \
} \
} while(0)

Definition at line 49 of file nls_euc-jp.c.

#define MAP_SJIS2EUC (   sjis_hi,
  sjis_lo,
  sjis_p,
  euc_hi,
  euc_lo,
  euc_p 
)
Value:
{ \
if ((sjis_lo) >= 0x9F) { \
(euc_hi) = (sjis_hi) * 2 - (((sjis_p) * 2 - (euc_p)) - 1); \
(euc_lo) = (sjis_lo) + 2; \
} else { \
(euc_hi) = (sjis_hi) * 2 - ((sjis_p) * 2 - (euc_p)); \
(euc_lo) = (sjis_lo) + ((sjis_lo) >= 0x7F ? 0x60 : 0x61); \
} \
} while(0)

Definition at line 31 of file nls_euc-jp.c.

#define SS2   (0x8E) /* Single Shift 2 */

Definition at line 41 of file nls_euc-jp.c.

#define SS3   (0x8F) /* Single Shift 3 */

Definition at line 42 of file nls_euc-jp.c.

Variable Documentation

unsigned short euc

Definition at line 146 of file nls_euc-jp.c.

unsigned char sjis[2]

Definition at line 147 of file nls_euc-jp.c.