[KoCo-CVS] [Commit] cjkcodecs/src/maps alg_jisx0201.h
Brought to you by:
perky
From: Hye-Shik C. <pe...@us...> - 2003-06-02 09:33:31
|
perky 03/06/02 02:25:17 Modified: src/maps alg_jisx0201.h Log: Split Roman half and Katakana halfs. Revision Changes Path 1.2 +14 -6 cjkcodecs/src/maps/alg_jisx0201.h Index: alg_jisx0201.h =================================================================== RCS file: /cvsroot/koco/cjkcodecs/src/maps/alg_jisx0201.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- alg_jisx0201.h 20 May 2003 11:33:32 -0000 1.1 +++ alg_jisx0201.h 2 Jun 2003 09:25:17 -0000 1.2 @@ -1,18 +1,26 @@ -/* $Id: alg_jisx0201.h,v 1.1 2003/05/20 11:33:32 perky Exp $ */ +/* $Id: alg_jisx0201.h,v 1.2 2003/06/02 09:25:17 perky Exp $ */ -#define JISX0201_ENCODE(c, assi) \ +#define JISX0201_R_ENCODE(c, assi) \ if ((c) < 0x5c) (assi) = (c); \ else if ((c) > 0x5c && (c) < 0x7e) \ (assi) = (c); \ else if ((c) == 0x00a5) (assi) = 0x5c; \ - else if ((c) == 0x203e) (assi) = 0x7e; \ - else if ((c) >= 0xff61 && (c) <= 0xff9f) \ + else if ((c) == 0x203e) (assi) = 0x7e; +#define JISX0201_K_ENCODE(c, assi) \ + if ((c) >= 0xff61 && (c) <= 0xff9f) \ (assi) = (c) - 0xfec0; +#define JISX0201_ENCODE(c, assi) \ + JISX0201_R_ENCODE(c, assi) \ + else JISX0201_K_ENCODE(c, assi) -#define JISX0201_DECODE(c, assi) \ +#define JISX0201_R_DECODE(c, assi) \ if ((c) < 0x5c) (assi) = (c); \ else if ((c) == 0x5c) (assi) = 0x00a5; \ else if ((c) < 0x7e) (assi) = (c); \ - else if ((c) == 0x7e) (assi) = 0x203e; \ + else if ((c) == 0x7e) (assi) = 0x203e; +#define JISX0201_K_DECODE(c, assi) \ else if ((c) >= 0xa1 && (c) <= 0xdf) \ (assi) = 0xfec0 + (c); +#define JISX0201_DECODE(c, assi) \ + JISX0201_R_ENCODE(c, assi) \ + else JISX0201_K_ENCODE(c, assi) |