|
|
| version 1.14, 2005/02/14 06:25:31 | version 1.17, 2011/01/15 18:04:43 |
|---|---|
| Line 21 static const UINT8 dospathchr[] = { | Line 21 static const UINT8 dospathchr[] = { |
| 0x01, 0x00, // gfedcba` onmlkjih | 0x01, 0x00, // gfedcba` onmlkjih |
| 0x00, 0x40}; // wvutsrqp ~}|{zyx | 0x00, 0x40}; // wvutsrqp ~}|{zyx |
| static void rcnvfcb(char *dst, UINT dlen, char *src, UINT slen) { | |
| static void rcnvfcb(char *dst, UINT dlen, const char *src) { | |
| REG8 c; | REG8 c; |
| while((slen) && (dlen)) { | while(dlen) { |
| slen--; | |
| c = (UINT8)*src++; | c = (UINT8)*src++; |
| if (c == 0) { | if (c == 0) { |
| break; | break; |
| } | } |
| #if defined(OSLANG_SJIS) || defined(OSLANG_EUC) || defined(OSLANG_UTF8) || defined(OSLANG_UCS2) | #if defined(OSLANG_SJIS) || defined(OSLANG_EUC) || defined(OSLANG_UTF8) || defined(OSLANG_UCS2) |
| if ((((c ^ 0x20) - 0xa1) & 0xff) < 0x3c) { | if ((((c ^ 0x20) - 0xa1) & 0xff) < 0x3c) { |
| if ((!slen) || (src[0] == '\0')) { | if (src[0] == '\0') { |
| break; | break; |
| } | } |
| if (dlen < 2) { | if (dlen < 2) { |
| Line 75 static void rcnvfcb(char *dst, UINT dlen | Line 75 static void rcnvfcb(char *dst, UINT dlen |
| } | } |
| } | } |
| static BOOL realname2fcb(char *fcbname, FLINFO *fli) { | static BRESULT realname2fcb(char *fcbname, const FLINFO *fli) { |
| OEMCHAR *ext; | |
| #if defined(OSLANG_EUC) || defined(OSLANG_UTF8) || defined(OSLANG_UCS2) | #if defined(OSLANG_EUC) || defined(OSLANG_UTF8) || defined(OSLANG_UCS2) |
| char sjis[MAX_PATH]; | char sjis[MAX_PATH]; |
| #endif | #endif |
| char *realname; | OEMCHAR filename[MAX_PATH]; |
| char *ext; | |
| FillMemory(fcbname, 11, ' '); | |
| ext = file_getext(fli->path); | |
| #if defined(OSLANG_EUC) || defined(OSLANG_UTF8) || defined(OSLANG_UCS2) | #if defined(OSLANG_EUC) || defined(OSLANG_UTF8) || defined(OSLANG_UCS2) |
| oemtext_oemtosjis(sjis, sizeof(sjis), fli->path, NELEMENTS(fli->path)); | oemtext_oemtosjis(sjis, sizeof(sjis), ext, (UINT)-1); |
| realname = sjis; | rcnvfcb(fcbname+8, 3, sjis); |
| #else | #else |
| realname = fli->path; | rcnvfcb(fcbname+8, 3, ext); |
| #endif | |
| file_cpyname(filename, fli->path, NELEMENTS(filename)); | |
| file_cutext(filename); | |
| #if defined(OSLANG_EUC) || defined(OSLANG_UTF8) || defined(OSLANG_UCS2) | |
| oemtext_oemtosjis(sjis, sizeof(sjis), filename, (UINT)-1); | |
| rcnvfcb(fcbname+0, 8, sjis); | |
| #else | |
| rcnvfcb(fcbname+0, 8, filename); | |
| #endif | #endif |
| FillMemory(fcbname, 11, ' '); | |
| // ToDo: SJISに変換済みなのに OEM依存してる | |
| ext = file_getext(realname); | |
| rcnvfcb(fcbname+0, 8, realname, ext - realname); | |
| rcnvfcb(fcbname+8, 3, ext, (UINT)-1); | |
| return(SUCCESS); | return(SUCCESS); |
| } | } |
| Line 114 static BOOL hddseadir(void *vpItem, void | Line 121 static BOOL hddseadir(void *vpItem, void |
| return(FALSE); | return(FALSE); |
| } | } |
| LISTARRAY hostdrvs_getpathlist(const OEMCHAR *realpath) { | LISTARRAY hostdrvs_getpathlist(const OEMCHAR *path) { |
| FLISTH flh; | FLISTH flh; |
| FLINFO fli; | FLINFO fli; |
| Line 122 LISTARRAY hostdrvs_getpathlist(const OEM | Line 129 LISTARRAY hostdrvs_getpathlist(const OEM |
| char fcbname[11]; | char fcbname[11]; |
| HDRVLST hdd; | HDRVLST hdd; |
| flh = file_list1st(realpath, &fli); | flh = file_list1st(path, &fli); |
| if (flh == FLISTH_INVALID) { | if (flh == FLISTH_INVALID) { |
| goto hdgpl_err1; | goto hdgpl_err1; |
| } | } |