Thread: [KoCo-CVS] [Commit] cjkcodecs/src/maps alg_jisx0201.h
Brought to you by:
perky
From: Hye-Shik C. <pe...@us...> - 2003-05-20 11:44:33
|
perky 03/05/20 04:33:33 Added: src/maps alg_jisx0201.h Log: Add JIS X 0201 Algorithmic(really? :) encoder/decoder Revision Changes Path 1.1 cjkcodecs/src/maps/alg_jisx0201.h Index: alg_jisx0201.h =================================================================== /* $Id: alg_jisx0201.h,v 1.1 2003/05/20 11:33:32 perky Exp $ */ #define JISX0201_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) \ (assi) = (c) - 0xfec0; #define JISX0201_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) >= 0xa1 && (c) <= 0xdf) \ (assi) = 0xfec0 + (c); |
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) |
From: Hye-Shik C. <pe...@us...> - 2003-06-05 10:18:12
|
perky 03/06/05 03:18:11 Modified: src/maps alg_jisx0201.h Log: Fix a dumb typo. Found by: holy unittests :) Revision Changes Path 1.3 +4 -4 cjkcodecs/src/maps/alg_jisx0201.h Index: alg_jisx0201.h =================================================================== RCS file: /cvsroot/koco/cjkcodecs/src/maps/alg_jisx0201.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- alg_jisx0201.h 2 Jun 2003 09:25:17 -0000 1.2 +++ alg_jisx0201.h 5 Jun 2003 10:18:10 -0000 1.3 @@ -1,4 +1,4 @@ -/* $Id: alg_jisx0201.h,v 1.2 2003/06/02 09:25:17 perky Exp $ */ +/* $Id: alg_jisx0201.h,v 1.3 2003/06/05 10:18:10 perky Exp $ */ #define JISX0201_R_ENCODE(c, assi) \ if ((c) < 0x5c) (assi) = (c); \ @@ -19,8 +19,8 @@ else if ((c) < 0x7e) (assi) = (c); \ else if ((c) == 0x7e) (assi) = 0x203e; #define JISX0201_K_DECODE(c, assi) \ - else if ((c) >= 0xa1 && (c) <= 0xdf) \ + if ((c) >= 0xa1 && (c) <= 0xdf) \ (assi) = 0xfec0 + (c); #define JISX0201_DECODE(c, assi) \ - JISX0201_R_ENCODE(c, assi) \ - else JISX0201_K_ENCODE(c, assi) + JISX0201_R_DECODE(c, assi) \ + else JISX0201_K_DECODE(c, assi) |
From: Hye-Shik C. <pe...@us...> - 2003-06-05 10:20:27
|
perky 03/06/05 03:20:26 Modified: src/maps alg_jisx0201.h Log: Untab to spaces. Revision Changes Path 1.4 +2 -2 cjkcodecs/src/maps/alg_jisx0201.h Index: alg_jisx0201.h =================================================================== RCS file: /cvsroot/koco/cjkcodecs/src/maps/alg_jisx0201.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- alg_jisx0201.h 5 Jun 2003 10:18:10 -0000 1.3 +++ alg_jisx0201.h 5 Jun 2003 10:20:25 -0000 1.4 @@ -1,4 +1,4 @@ -/* $Id: alg_jisx0201.h,v 1.3 2003/06/05 10:18:10 perky Exp $ */ +/* $Id: alg_jisx0201.h,v 1.4 2003/06/05 10:20:25 perky Exp $ */ #define JISX0201_R_ENCODE(c, assi) \ if ((c) < 0x5c) (assi) = (c); \ @@ -19,7 +19,7 @@ else if ((c) < 0x7e) (assi) = (c); \ else if ((c) == 0x7e) (assi) = 0x203e; #define JISX0201_K_DECODE(c, assi) \ - if ((c) >= 0xa1 && (c) <= 0xdf) \ + if ((c) >= 0xa1 && (c) <= 0xdf) \ (assi) = 0xfec0 + (c); #define JISX0201_DECODE(c, assi) \ JISX0201_R_DECODE(c, assi) \ |
From: Hye-Shik C. <pe...@us...> - 2003-06-19 19:13:00
|
perky 03/06/19 12:12:59 Modified: src/maps alg_jisx0201.h Log: Fix a bug that JIS X 0201 routine doesn't encode and decode 0x7f. Revision Changes Path 1.5 +4 -3 cjkcodecs/src/maps/alg_jisx0201.h Index: alg_jisx0201.h =================================================================== RCS file: /cvsroot/koco/cjkcodecs/src/maps/alg_jisx0201.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- alg_jisx0201.h 5 Jun 2003 10:20:25 -0000 1.4 +++ alg_jisx0201.h 19 Jun 2003 19:12:59 -0000 1.5 @@ -1,7 +1,7 @@ -/* $Id: alg_jisx0201.h,v 1.4 2003/06/05 10:20:25 perky Exp $ */ +/* $Id: alg_jisx0201.h,v 1.5 2003/06/19 19:12:59 perky Exp $ */ #define JISX0201_R_ENCODE(c, assi) \ - if ((c) < 0x5c) (assi) = (c); \ + if ((c) < 0x5c || (c) == 0x7f) (assi) = (c);\ else if ((c) > 0x5c && (c) < 0x7e) \ (assi) = (c); \ else if ((c) == 0x00a5) (assi) = 0x5c; \ @@ -17,7 +17,8 @@ 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; \ + else if ((c) == 0x7f) (assi) = 0x7f; #define JISX0201_K_DECODE(c, assi) \ if ((c) >= 0xa1 && (c) <= 0xdf) \ (assi) = 0xfec0 + (c); |