|
|
| version 1.1, 2004/08/01 05:31:29 | version 1.5, 2008/06/02 20:07:30 |
|---|---|
| Line 1 | Line 1 |
| #include "compiler.h" | #include "compiler.h" |
| // ---- ANK / UCS2 / UCS4 | /* ANK / UCS2 / UCS4 */ |
| #if defined(SUPPORT_ANK) | #if defined(SUPPORT_ANK) |
| int STRCALL milank_charsize(const OEMCHAR *str) { | int STRCALL milank_charsize(const OEMCHAR *str) { |
| Line 101 OEMCHAR * STRCALL milank_chr(const OEMCH | Line 101 OEMCHAR * STRCALL milank_chr(const OEMCH |
| #endif | #endif |
| // ---- Shift-JIS | /* Shift-JIS */ |
| #if defined(SUPPORT_SJIS) | #if defined(SUPPORT_SJIS) |
| int STRCALL milsjis_charsize(const char *str) { | int STRCALL milsjis_charsize(const char *str) { |
| Line 264 char * STRCALL milsjis_chr(const char *s | Line 264 char * STRCALL milsjis_chr(const char *s |
| #endif | #endif |
| // ---- EUC | /* EUC */ |
| #if defined(SUPPORT_EUC) // あれ 半角カナ忘れてるぞ? | #if defined(SUPPORT_EUC) /* あれ 半角カナ忘れてるぞ? */ |
| int STRCALL mileuc_charsize(const char *str) { | int STRCALL mileuc_charsize(const char *str) { |
| int pos; | int pos; |
| Line 328 int STRCALL mileuc_memcmp(const char *st | Line 328 int STRCALL mileuc_memcmp(const char *st |
| if (((c - 'a') & 0xff) < 26) { | if (((c - 'a') & 0xff) < 26) { |
| c -= 0x20; | c -= 0x20; |
| } | } |
| s = (BYTE)*str++; | s = (UINT8)*str++; |
| if (((s - 'a') & 0xff) < 26) { | if (((s - 'a') & 0xff) < 26) { |
| s -= 0x20; | s -= 0x20; |
| } | } |
| Line 426 char * STRCALL mileuc_chr(const char *st | Line 426 char * STRCALL mileuc_chr(const char *st |
| #endif | #endif |
| // ---- UTF8 | /* UTF8 */ |
| #if defined(SUPPORT_UTF8) | #if defined(SUPPORT_UTF8) |
| int STRCALL milutf8_charsize(const char *str) { | int STRCALL milutf8_charsize(const char *str) { |
| Line 461 int STRCALL milutf8_cmp(const char *str, | Line 461 int STRCALL milutf8_cmp(const char *str, |
| if (((s - 'a') & 0xff) < 26) { | if (((s - 'a') & 0xff) < 26) { |
| s -= 0x20; | s -= 0x20; |
| } | } |
| c = (BYTE)*cmp++; | c = (UINT8)*cmp++; |
| if (((c - 'a') & 0xff) < 26) { | if (((c - 'a') & 0xff) < 26) { |
| c -= 0x20; | c -= 0x20; |
| } | } |
| Line 567 char * STRCALL milutf8_chr(const char *s | Line 567 char * STRCALL milutf8_chr(const char *s |
| #endif | #endif |
| // ---- other | /* other */ |
| int STRCALL milstr_extendcmp(const char *str, const char *cmp) { | int STRCALL milstr_extendcmp(const OEMCHAR *str, const OEMCHAR *cmp) { |
| int c; | int c; |
| int s; | int s; |
| do { | do { |
| while(1) { | while(1) { |
| c = (BYTE)*cmp++; | c = (UINT8)*cmp++; |
| if (!c) { | if (!c) { |
| return(0); | return(0); |
| } | } |
| Line 619 int STRCALL milstr_getarg(OEMCHAR *str, | Line 619 int STRCALL milstr_getarg(OEMCHAR *str, |
| int ret = 0; | int ret = 0; |
| OEMCHAR *p; | OEMCHAR *p; |
| BOOL quot; | BRESULT quot; |
| while(maxarg--) { | while(maxarg--) { |
| quot = FALSE; | quot = FALSE; |
| Line 653 long STRCALL milstr_solveHEX(const OEMCH | Line 653 long STRCALL milstr_solveHEX(const OEMCH |
| long ret; | long ret; |
| int i; | int i; |
| char c; | OEMCHAR c; |
| ret = 0; | ret = 0; |
| for (i=0; i<8; i++) { | for (i=0; i<8; i++) { |