|
|
| version 1.4, 2004/01/15 06:20:42 | version 1.5, 2005/02/11 21:17:21 |
|---|---|
| Line 14 void codecnv_sjis2euc(char *euc, UINT ec | Line 14 void codecnv_sjis2euc(char *euc, UINT ec |
| } | } |
| ecnt--; | ecnt--; |
| while(1) { | while(1) { |
| s = (BYTE)*sjis++; | s = (UINT8)*sjis++; |
| if (s < 0x80) { // ascii | if (s < 0x80) { // ascii |
| if (!s) { | if (!s) { |
| break; | break; |
| Line 26 void codecnv_sjis2euc(char *euc, UINT ec | Line 26 void codecnv_sjis2euc(char *euc, UINT ec |
| *euc++ = (char)s; | *euc++ = (char)s; |
| } | } |
| else if ((((s ^ 0x20) - 0xa1) & 0xff) < 0x2f) { | else if ((((s ^ 0x20) - 0xa1) & 0xff) < 0x2f) { |
| c = (BYTE)*sjis++; | c = (UINT8)*sjis++; |
| if (!c) { | if (!c) { |
| break; | break; |
| } | } |
| Line 66 void codecnv_euc2sjis(char *sjis, UINT s | Line 66 void codecnv_euc2sjis(char *sjis, UINT s |
| } | } |
| scnt--; | scnt--; |
| while(scnt) { | while(scnt) { |
| h = (BYTE)*euc++; | h = (UINT8)*euc++; |
| if (h < 0x80) { // ascii | if (h < 0x80) { // ascii |
| if (!h) { | if (!h) { |
| break; | break; |
| Line 75 void codecnv_euc2sjis(char *sjis, UINT s | Line 75 void codecnv_euc2sjis(char *sjis, UINT s |
| *sjis++ = (char)h; | *sjis++ = (char)h; |
| } | } |
| else if (h == 0x8e) { | else if (h == 0x8e) { |
| l = (BYTE)*euc++; | l = (UINT8)*euc++; |
| if (!l) { | if (!l) { |
| break; | break; |
| } | } |
| Line 83 void codecnv_euc2sjis(char *sjis, UINT s | Line 83 void codecnv_euc2sjis(char *sjis, UINT s |
| *sjis++ = (char)h; | *sjis++ = (char)h; |
| } | } |
| else { | else { |
| l = (BYTE)*euc++; | l = (UINT8)*euc++; |
| if ((!l) || (scnt < 2)) { | if ((!l) || (scnt < 2)) { |
| break; | break; |
| } | } |
| Line 1260 void codecnv_sjis2utf(UINT16 *utf, UINT | Line 1260 void codecnv_sjis2utf(UINT16 *utf, UINT |
| } | } |
| ucnt--; | ucnt--; |
| while(ucnt) { | while(ucnt) { |
| s = (BYTE)*sjis++; | s = (UINT8)*sjis++; |
| if (s == 0) { | if (s == 0) { |
| break; | break; |
| } | } |
| r = utftbl[s]; | r = utftbl[s]; |
| if (r & 0xffff0000) { | if (r & 0xffff0000) { |
| s = (BYTE)*sjis++; | s = (UINT8)*sjis++; |
| if (s == 0) { | if (s == 0) { |
| break; | break; |
| } | } |