ReactOS  0.4.14-dev-98-gb0d4763
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>
Include dependency graph for nls_euc-jp.c:

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))
 
#define MAP_ELEMENT_OF(map)   (sizeof(map) / sizeof(map[0]))
 

Functions

static int sjisibm2euc (unsigned char *euc, const unsigned char sjis_hi, const unsigned char sjis_lo)
 
static int euc2sjisibm_jisx0212 (unsigned char *sjis, const unsigned char euc_hi, const unsigned char euc_lo)
 
static int euc2sjisibm_g3upper (unsigned char *sjis, const unsigned char euc_hi, const unsigned char euc_lo)
 
static int euc2sjisibm (unsigned char *sjis, const unsigned char euc_hi, const unsigned char euc_lo)
 
static int sjisnec2sjisibm (unsigned char *sjisibm, const unsigned char sjisnec_hi, const unsigned char sjisnec_lo)
 
static int uni2char (const wchar_t uni, unsigned char *out, int boundlen)
 
static int char2uni (const unsigned char *rawstring, int boundlen, wchar_t *uni)
 
static int __init init_nls_euc_jp (void)
 
static void __exit exit_nls_euc_jp (void)
 

Variables

static struct nls_tablep_nls
 
static unsigned char sjisibm2euc_map [][2]
 
struct {
   unsigned short   euc
 
   unsigned char   sjis [2]
 
euc2sjisibm_jisx0212_map []
 
static unsigned char euc2sjisibm_g3upper_map [][2]
 
static struct nls_table table
 

Macro Definition Documentation

◆ IS_EUC_BYTE

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

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

◆ IS_EUC_IBM2JISX0208

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

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

◆ IS_EUC_JISX0201KANA

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

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

◆ IS_EUC_JISX0208

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

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

◆ IS_EUC_UDC_HI

#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.

◆ IS_EUC_UDC_LOW

#define IS_EUC_UDC_LOW (   h,
  l 
)
Value:
(((0xF5 <= (h)) && ((h) <= 0xFE)) \
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
r l[0]
Definition: byte_order.h:167
#define IS_EUC_BYTE(c)
Definition: nls_euc-jp.c:43

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

◆ IS_SJIS_IBM

#define IS_SJIS_IBM (   h,
  l 
)
Value:
(((0xFA <= (h)) && ((h) <= 0xFC)) \
#define IS_SJIS_LOW_BYTE(l)
Definition: nls_euc-jp.c:17
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
r l[0]
Definition: byte_order.h:167

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

◆ IS_SJIS_JISX0201KANA

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

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

◆ IS_SJIS_JISX0208

#define IS_SJIS_JISX0208 (   h,
  l 
)
Value:
((((0x81 <= (h)) && ((h) <= 0x9F)) \
|| ((0xE0 <= (h)) && ((h) <= 0xEA))) \
#define IS_SJIS_LOW_BYTE(l)
Definition: nls_euc-jp.c:17
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
r l[0]
Definition: byte_order.h:167

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

◆ IS_SJIS_LOW_BYTE

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

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

◆ IS_SJIS_NECIBM

#define IS_SJIS_NECIBM (   h,
  l 
)
Value:
(((0xED <= (h)) && ((h) <= 0xEE)) \
#define IS_SJIS_LOW_BYTE(l)
Definition: nls_euc-jp.c:17
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
r l[0]
Definition: byte_order.h:167

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

◆ IS_SJIS_UDC_HI

#define IS_SJIS_UDC_HI (   h,
  l 
)
Value:
(((0xF5 <= (h)) && ((h) <= 0xF9)) \
#define IS_SJIS_LOW_BYTE(l)
Definition: nls_euc-jp.c:17
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
r l[0]
Definition: byte_order.h:167

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

◆ IS_SJIS_UDC_LOW

#define IS_SJIS_UDC_LOW (   h,
  l 
)
Value:
(((0xF0 <= (h)) && ((h) <= 0xF4)) \
#define IS_SJIS_LOW_BYTE(l)
Definition: nls_euc-jp.c:17
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
r l[0]
Definition: byte_order.h:167

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

◆ MAP_ELEMENT_OF

#define MAP_ELEMENT_OF (   map)    (sizeof(map) / sizeof(map[0]))

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

◆ MAP_EUC2SJIS

#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.

◆ MAP_SJIS2EUC

#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.

◆ SS2

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

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

◆ SS3

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

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

Function Documentation

◆ char2uni()

static int char2uni ( const unsigned char rawstring,
int  boundlen,
wchar_t uni 
)
static

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

483 {
484  unsigned char sjis_temp[2];
485  int euc_offset, n;
486 
487  if ( !p_nls )
488  return -EINVAL;
489  if (boundlen <= 0)
490  return -ENAMETOOLONG;
491 
492  /* translate EUC-JP into SJIS */
493  if (rawstring[0] > 0x7F) {
494  if (rawstring[0] == SS3) {
495  if (boundlen < 3)
496  return -EINVAL;
497  euc_offset = 3;
498 
499  if (IS_EUC_UDC_HI(rawstring[1], rawstring[2])) {
500  /* User defined characters half high */
501  MAP_EUC2SJIS(rawstring[1], rawstring[2], 0xF5,
502  sjis_temp[0], sjis_temp[1], 0xF5);
503  } else if (euc2sjisibm(sjis_temp,rawstring[1],rawstring[2])) {
504  /* IBM extended characters */
505  } else {
506  /* JIS X 0212 and Invalid characters*/
507  return -EINVAL;
508 
509  /* 'GETA' with SJIS coding */
510  /* sjis_temp[0] = 0x81; */
511  /* sjis_temp[1] = 0xAC; */
512  }
513  } else {
514  if (boundlen < 2)
515  return -EINVAL;
516  euc_offset = 2;
517 
518  if (IS_EUC_JISX0201KANA(rawstring[0], rawstring[1])) {
519  /* JIS X 0201 KANA */
520  sjis_temp[0] = rawstring[1];
521  sjis_temp[1] = 0x00;
522  } else if (IS_EUC_UDC_LOW(rawstring[0], rawstring[1])) {
523  /* User defined characters half low */
524  MAP_EUC2SJIS(rawstring[0], rawstring[1], 0xF5,
525  sjis_temp[0], sjis_temp[1], 0xF0);
526  } else if (IS_EUC_JISX0208(rawstring[0], rawstring[1])) {
527  /* JIS X 0208 (include NEC spesial characters) */
528  sjis_temp[0] = ((rawstring[0]-0x5f)/2) ^ 0xA0;
529  if (!(rawstring[0] & 1))
530  sjis_temp[1] = rawstring[1] - 0x02;
531  else if (rawstring[1] < 0xE0)
532  sjis_temp[1] = rawstring[1] - 0x61;
533  else
534  sjis_temp[1] = rawstring[1] - 0x60;
535  } else {
536  /* Invalid characters */
537  return -EINVAL;
538  }
539  }
540  } else {
541  euc_offset = 1;
542 
543  /* JIS X 0201 ROMAJI */
544  sjis_temp[0] = rawstring[0];
545  sjis_temp[1] = 0x00;
546  }
547 
548  if ( (n = p_nls->char2uni(sjis_temp, sizeof(sjis_temp), uni)) < 0)
549  return n;
550 
551  return euc_offset;
552 }
Definition: arc.h:39
static int euc2sjisibm(unsigned char *sjis, const unsigned char euc_hi, const unsigned char euc_lo)
Definition: nls_euc-jp.c:352
GLdouble n
Definition: glext.h:7729
#define IS_EUC_UDC_LOW(h, l)
Definition: nls_euc-jp.c:46
static struct nls_table * p_nls
Definition: nls_euc-jp.c:15
#define IS_EUC_UDC_HI(h, l)
Definition: nls_euc-jp.c:48
#define IS_EUC_JISX0208(h, l)
Definition: nls_euc-jp.c:44
#define IS_EUC_JISX0201KANA(h, l)
Definition: nls_euc-jp.c:45
#define SS3
Definition: nls_euc-jp.c:42
#define MAP_EUC2SJIS(euc_hi, euc_lo, euc_p, sjis_hi, sjis_lo, sjis_p)
Definition: nls_euc-jp.c:49

◆ euc2sjisibm()

static int euc2sjisibm ( unsigned char sjis,
const unsigned char  euc_hi,
const unsigned char  euc_lo 
)
inlinestatic

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

354 {
355  int n;
356 
357 #if 0
358  if ((euc_hi == 0xA2) && (euc_lo == 0xCC)) {
359  sjis[0] = 0xFA;
360  sjis[1] = 0x54;
361  return 2;
362  } else if ((euc_hi == 0xA2) && (euc_lo == 0xE8)) {
363  sjis[0] = 0xFA;
364  sjis[1] = 0x5B;
365  return 2;
366  }
367 #endif
368  if ((n = euc2sjisibm_g3upper(sjis, euc_hi, euc_lo))) {
369  return n;
370  } else if ((n = euc2sjisibm_jisx0212(sjis, euc_hi, euc_lo))) {
371  return n;
372  }
373 
374  return 0;
375 }
GLdouble n
Definition: glext.h:7729
static int euc2sjisibm_jisx0212(unsigned char *sjis, const unsigned char euc_hi, const unsigned char euc_lo)
Definition: nls_euc-jp.c:306
unsigned char sjis[2]
Definition: nls_euc-jp.c:147
static int euc2sjisibm_g3upper(unsigned char *sjis, const unsigned char euc_hi, const unsigned char euc_lo)
Definition: nls_euc-jp.c:332

Referenced by char2uni().

◆ euc2sjisibm_g3upper()

static int euc2sjisibm_g3upper ( unsigned char sjis,
const unsigned char  euc_hi,
const unsigned char  euc_lo 
)
inlinestatic

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

334 {
335  int index;
336 
337  if (euc_hi == 0xF3)
338  index = ((euc_hi << 8) | euc_lo) - 0xF3F3;
339  else
340  index = ((euc_hi << 8) | euc_lo) - 0xF4A1 + 12;
341 
343  return 0;
344 
347 
348  return 3;
349 }
static unsigned char euc2sjisibm_g3upper_map[][2]
Definition: nls_euc-jp.c:246
#define MAP_ELEMENT_OF(map)
Definition: nls_euc-jp.c:271
GLuint index
Definition: glext.h:6031
unsigned char sjis[2]
Definition: nls_euc-jp.c:147
#define index(s, c)
Definition: various.h:29

Referenced by euc2sjisibm().

◆ euc2sjisibm_jisx0212()

static int euc2sjisibm_jisx0212 ( unsigned char sjis,
const unsigned char  euc_hi,
const unsigned char  euc_lo 
)
inlinestatic

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

308 {
309  int index, min_index, max_index;
310  unsigned short euc;
311 
312  min_index = 0;
313  max_index = MAP_ELEMENT_OF(euc2sjisibm_jisx0212_map) - 1;
314  euc = (euc_hi << 8) | euc_lo;
315 
316  while (min_index <= max_index) {
317  index = (min_index + max_index) / 2;
319  max_index = index - 1;
320  else
321  min_index = index + 1;
323  sjis[0] = euc2sjisibm_jisx0212_map[index].sjis[0];
324  sjis[1] = euc2sjisibm_jisx0212_map[index].sjis[1];
325  return 3;
326  }
327  }
328  return 0;
329 }
#define MAP_ELEMENT_OF(map)
Definition: nls_euc-jp.c:271
GLuint index
Definition: glext.h:6031
unsigned char sjis[2]
Definition: nls_euc-jp.c:147
#define index(s, c)
Definition: various.h:29
static struct @764 euc2sjisibm_jisx0212_map[]
unsigned short euc
Definition: nls_euc-jp.c:146

Referenced by euc2sjisibm().

◆ exit_nls_euc_jp()

static void __exit exit_nls_euc_jp ( void  )
static

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

577 {
579  unload_nls(p_nls);
580 }
int unregister_nls(struct nls_table *)
Definition: nls_base.c:185
static struct nls_table * p_nls
Definition: nls_euc-jp.c:15
void unload_nls(struct nls_table *)
Definition: nls_base.c:240

◆ init_nls_euc_jp()

static int __init init_nls_euc_jp ( void  )
static

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

564 {
565  p_nls = load_nls("cp932");
566 
567  if (p_nls) {
568  table.charset2upper = p_nls->charset2upper;
569  table.charset2lower = p_nls->charset2lower;
570  return register_nls(&table);
571  }
572 
573  return -EINVAL;
574 }
Definition: arc.h:39
static struct nls_table * p_nls
Definition: nls_euc-jp.c:15
int register_nls(struct nls_table *)
Definition: nls_base.c:162
struct nls_table * load_nls(char *)
Definition: nls_base.c:218

◆ sjisibm2euc()

static int sjisibm2euc ( unsigned char euc,
const unsigned char  sjis_hi,
const unsigned char  sjis_lo 
)
inlinestatic

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

288 {
289  int index;
290 
291  index = ((sjis_hi - 0xFA) * (0xFD - 0x40)) + (sjis_lo - 0x40);
293  sjisibm2euc_map[index][1])) {
294  euc[0] = sjisibm2euc_map[index][0];
295  euc[1] = sjisibm2euc_map[index][1];
296  return 2;
297  } else {
298  euc[0] = SS3;
299  euc[1] = sjisibm2euc_map[index][0];
300  euc[2] = sjisibm2euc_map[index][1];
301  return 3;
302  }
303 }
#define IS_EUC_IBM2JISX0208(h, l)
Definition: nls_euc-jp.c:141
static unsigned char sjisibm2euc_map[][2]
Definition: nls_euc-jp.c:60
GLuint index
Definition: glext.h:6031
#define index(s, c)
Definition: various.h:29
#define SS3
Definition: nls_euc-jp.c:42
unsigned short euc
Definition: nls_euc-jp.c:146

Referenced by uni2char().

◆ sjisnec2sjisibm()

static int sjisnec2sjisibm ( unsigned char sjisibm,
const unsigned char  sjisnec_hi,
const unsigned char  sjisnec_lo 
)
inlinestatic

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

381 {
382  int count;
383 
384  if (! IS_SJIS_NECIBM(sjisnec_hi, sjisnec_lo))
385  return 0;
386 
387  if ((sjisnec_hi == 0xEE) && (sjisnec_lo == 0xF9)) {
388  sjisibm[0] = 0x81;
389  sjisibm[1] = 0xCA;
390  return 2;
391  }
392 
393  if ((sjisnec_hi == 0xEE) && (sjisnec_lo >= 0xEF)) {
394  count = (sjisnec_hi << 8 | sjisnec_lo)
395  - (sjisnec_lo <= 0xF9 ? 0xEEEF : (0xEEEF - 10));
396  } else {
397  count = (sjisnec_hi - 0xED) * (0xFC - 0x40)
398  + (sjisnec_lo - 0x40) + (0x5C - 0x40);
399  if (sjisnec_lo >= 0x7F)
400  count--;
401  }
402 
403  sjisibm[0] = 0xFA + (count / (0xFC - 0x40));
404  sjisibm[1] = 0x40 + (count % (0xFC - 0x40));
405  if (sjisibm[1] >= 0x7F)
406  sjisibm[1]++;
407 
408  return 2;
409 }
#define IS_SJIS_NECIBM(h, l)
Definition: nls_euc-jp.c:29
GLuint GLuint GLsizei count
Definition: gl.h:1545

Referenced by uni2char().

◆ uni2char()

static int uni2char ( const wchar_t  uni,
unsigned char out,
int  boundlen 
)
static

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

413 {
414  int n;
415 
416  if (!p_nls)
417  return -EINVAL;
418  if ((n = p_nls->uni2char(uni, out, boundlen)) < 0)
419  return n;
420 
421  /* translate SJIS into EUC-JP */
422  if (n == 1) {
423  if (IS_SJIS_JISX0201KANA(out[0])) {
424  /* JIS X 0201 KANA */
425  if (boundlen < 2)
426  return -ENAMETOOLONG;
427 
428  out[1] = out[0];
429  out[0] = SS2;
430  return 2;
431  }
432  } else if (n == 2) {
433  /* NEC/IBM extended characters to IBM extended characters */
434  sjisnec2sjisibm(out, out[0], out[1]);
435 
436  if (IS_SJIS_UDC_LOW(out[0], out[1])) {
437  /* User defined characters half low */
438  MAP_SJIS2EUC(out[0], out[1], 0xF0, out[0], out[1], 0xF5);
439  } else if (IS_SJIS_UDC_HI(out[0], out[1])) {
440  /* User defined characters half high */
441  unsigned char ch, cl;
442 
443  if (boundlen < 3)
444  return -ENAMETOOLONG;
445 
446  n = 3; ch = out[0]; cl = out[1];
447  out[0] = SS3;
448  MAP_SJIS2EUC(ch, cl, 0xF5, out[1], out[2], 0xF5);
449  } else if (IS_SJIS_IBM(out[0], out[1])) {
450  /* IBM extended characters */
451  unsigned char euc[3], i;
452 
453  n = sjisibm2euc(euc, out[0], out[1]);
454  if (boundlen < n)
455  return -ENAMETOOLONG;
456  for (i = 0; i < n; i++)
457  out[i] = euc[i];
458  } else if (IS_SJIS_JISX0208(out[0], out[1])) {
459  /* JIS X 0208 (include NEC special characters) */
460  out[0] = (out[0]^0xA0)*2 + 0x5F;
461  if (out[1] > 0x9E)
462  out[0]++;
463 
464  if (out[1] < 0x7F)
465  out[1] = out[1] + 0x61;
466  else if (out[1] < 0x9F)
467  out[1] = out[1] + 0x60;
468  else
469  out[1] = out[1] + 0x02;
470  } else {
471  /* Invalid characters */
472  return -EINVAL;
473  }
474  }
475  else
476  return -EINVAL;
477 
478  return n;
479 }
Definition: arc.h:39
static int sjisnec2sjisibm(unsigned char *sjisibm, const unsigned char sjisnec_hi, const unsigned char sjisnec_lo)
Definition: nls_euc-jp.c:378
static int sjisibm2euc(unsigned char *euc, const unsigned char sjis_hi, const unsigned char sjis_lo)
Definition: nls_euc-jp.c:286
GLdouble n
Definition: glext.h:7729
static struct nls_table * p_nls
Definition: nls_euc-jp.c:15
#define SS2
Definition: nls_euc-jp.c:41
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static FILE * out
Definition: regtests2xml.c:44
#define IS_SJIS_JISX0208(h, l)
Definition: nls_euc-jp.c:19
#define IS_SJIS_JISX0201KANA(c)
Definition: nls_euc-jp.c:22
#define MAP_SJIS2EUC(sjis_hi, sjis_lo, sjis_p, euc_hi, euc_lo, euc_p)
Definition: nls_euc-jp.c:31
#define SS3
Definition: nls_euc-jp.c:42
unsigned short euc
Definition: nls_euc-jp.c:146
#define IS_SJIS_UDC_HI(h, l)
Definition: nls_euc-jp.c:25
#define IS_SJIS_IBM(h, l)
Definition: nls_euc-jp.c:27
#define IS_SJIS_UDC_LOW(h, l)
Definition: nls_euc-jp.c:23

Variable Documentation

◆ euc

unsigned short euc

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

◆ euc2sjisibm_g3upper_map

unsigned char euc2sjisibm_g3upper_map[][2]
static
Initial value:
= {
{0xFA, 0x40}, {0xFA, 0x41}, {0xFA, 0x42}, {0xFA, 0x43}, {0xFA, 0x44},
{0xFA, 0x45}, {0xFA, 0x46}, {0xFA, 0x47}, {0xFA, 0x48}, {0xFA, 0x49},
{0xFA, 0x4A}, {0xFA, 0x4B}, {0xFA, 0x4C}, {0xFA, 0x4D}, {0xFA, 0x4E},
{0xFA, 0x4F}, {0xFA, 0x50}, {0xFA, 0x51}, {0xFA, 0x52}, {0xFA, 0x53},
{0xFA, 0x56}, {0xFA, 0x57}, {0xFA, 0x58}, {0xFA, 0x59}, {0xFA, 0x5A},
{0xFA, 0x62}, {0xFA, 0x6A}, {0xFA, 0x7C}, {0xFA, 0x83}, {0xFA, 0x8A},
{0xFA, 0x8B}, {0xFA, 0x90}, {0xFA, 0x92}, {0xFA, 0x96}, {0xFA, 0x9B},
{0xFA, 0x9C}, {0xFA, 0x9D}, {0xFA, 0xAA}, {0xFA, 0xAE}, {0xFA, 0xB0},
{0xFA, 0xB1}, {0xFA, 0xBA}, {0xFA, 0xBD}, {0xFA, 0xC1}, {0xFA, 0xCD},
{0xFA, 0xD0}, {0xFA, 0xD5}, {0xFA, 0xD8}, {0xFA, 0xE0}, {0xFA, 0xE5},
{0xFA, 0xE8}, {0xFA, 0xEA}, {0xFA, 0xEE}, {0xFA, 0xF2}, {0xFB, 0x43},
{0xFB, 0x44}, {0xFB, 0x50}, {0xFB, 0x58}, {0xFB, 0x5E}, {0xFB, 0x6E},
{0xFB, 0x70}, {0xFB, 0x72}, {0xFB, 0x75}, {0xFB, 0x7C}, {0xFB, 0x7D},
{0xFB, 0x7E}, {0xFB, 0x80}, {0xFB, 0x82}, {0xFB, 0x85}, {0xFB, 0x86},
{0xFB, 0x89}, {0xFB, 0x8D}, {0xFB, 0x8E}, {0xFB, 0x92}, {0xFB, 0x94},
{0xFB, 0x9D}, {0xFB, 0x9E}, {0xFB, 0x9F}, {0xFB, 0xA0}, {0xFB, 0xA1},
{0xFB, 0xA9}, {0xFB, 0xAC}, {0xFB, 0xAE}, {0xFB, 0xB0}, {0xFB, 0xB1},
{0xFB, 0xB3}, {0xFB, 0xB4}, {0xFB, 0xB6}, {0xFB, 0xB7}, {0xFB, 0xB8},
{0xFB, 0xD3}, {0xFB, 0xDA}, {0xFB, 0xE8}, {0xFB, 0xE9}, {0xFB, 0xEA},
{0xFB, 0xEE}, {0xFB, 0xF0}, {0xFB, 0xF2}, {0xFB, 0xF6}, {0xFB, 0xF7},
{0xFB, 0xF9}, {0xFB, 0xFA}, {0xFB, 0xFC}, {0xFC, 0x42}, {0xFC, 0x49},
{0xFC, 0x4B},
}

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

Referenced by euc2sjisibm_g3upper().

◆ euc2sjisibm_jisx0212_map

struct { ... } euc2sjisibm_jisx0212_map[]

Referenced by euc2sjisibm_jisx0212().

◆ p_nls

struct nls_table* p_nls
static

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

Referenced by char2uni(), exit_nls_euc_jp(), init_nls_euc_jp(), and uni2char().

◆ sjis

unsigned char sjis[2]

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

◆ sjisibm2euc_map

unsigned char sjisibm2euc_map[][2]
static

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

Referenced by sjisibm2euc().

◆ table

Initial value:
= {
"euc-jp",
}
#define THIS_MODULE
Definition: module.h:267
static int uni2char(const wchar_t uni, unsigned char *out, int boundlen)
Definition: nls_euc-jp.c:411
smooth NULL
Definition: ftsmooth.c:416
static int char2uni(const unsigned char *rawstring, int boundlen, wchar_t *uni)
Definition: nls_euc-jp.c:481

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