[KoCo-CVS] [Commit] cjkcodecs/src/maps alg_jisx0201.h
Brought to you by:
perky
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); |