FFFTPのソースコードです。
修訂 | 3efb66ad5ef6a7e965b9b8b23852e826b7302c5f (tree) |
---|---|
時間 | 2011-09-12 21:49:27 |
作者 | s_kawamoto <s_kawamoto@user...> |
Commiter | s_kawamoto |
This version may be nearly stable.
Fix bugs of UTF-8 to UTF-16 API bridge.
Fix bugs of behavior caused by uninitialized variables.
Disable regular expression (JRE32.DLL does not support UTF-8).
Fix bugs of remote file list view.
Change default settings to discard file list cache.
@@ -45,6 +45,10 @@ | ||
45 | 45 | #include <htmlhelp.h> |
46 | 46 | #include "helpid.h" |
47 | 47 | |
48 | +// UTF-8対応 | |
49 | +#undef __MBSWRAPPER_H__ | |
50 | +#include "mbswrapper.h" | |
51 | + | |
48 | 52 | |
49 | 53 | /*===== プロトタイプ =====*/ |
50 | 54 |
@@ -13,4 +13,6 @@ | ||
13 | 13 | //#define DISABLE_TRANSFER_NETWORK_BUFFERS |
14 | 14 | // コントロール用のネットワークバッファを無効にする(フリーズ対策) |
15 | 15 | #define DISABLE_CONTROL_NETWORK_BUFFERS |
16 | +// JRE32.DLLを無効にする(UTF-8に非対応のため) | |
17 | +#define DISABLE_JRE32DLL | |
16 | 18 |
@@ -45,6 +45,10 @@ | ||
45 | 45 | #include <htmlhelp.h> |
46 | 46 | #include "helpid.h" |
47 | 47 | |
48 | +// UTF-8対応 | |
49 | +#undef __MBSWRAPPER_H__ | |
50 | +#include "mbswrapper.h" | |
51 | + | |
48 | 52 | |
49 | 53 | /*===== プロトタイプ =====*/ |
50 | 54 |
@@ -1227,6 +1231,7 @@ static SOCKET DoConnect(char *Host, char *User, char *Pass, char *Acct, int Port | ||
1227 | 1231 | Flg = 1; |
1228 | 1232 | if(setsockopt(ContSock, SOL_SOCKET, SO_OOBINLINE, (LPSTR)&Flg, sizeof(Flg)) == SOCKET_ERROR) |
1229 | 1233 | ReportWSError("setsockopt", WSAGetLastError()); |
1234 | + // データ転送用ソケットのTCP遅延転送が無効されているので念のため | |
1230 | 1235 | if(setsockopt(ContSock, IPPROTO_TCP, TCP_NODELAY, (LPSTR)&Flg, sizeof(Flg)) == SOCKET_ERROR) |
1231 | 1236 | ReportWSError("setsockopt", WSAGetLastError()); |
1232 | 1237 | #pragma aaa |
@@ -54,6 +54,10 @@ | ||
54 | 54 | #include "OleDragDrop.h" |
55 | 55 | #include "common.h" |
56 | 56 | |
57 | +// UTF-8対応 | |
58 | +#undef __MBSWRAPPER_H__ | |
59 | +#include "mbswrapper.h" | |
60 | + | |
57 | 61 | #define BUF_SIZE 256 |
58 | 62 | #define CF_CNT 2 |
59 | 63 | #define WM_DRAGDROP (WM_APP + 100) |
@@ -603,14 +607,19 @@ static HDROP APIPRIVATE CreateDropFileMem(char **FileName,int cnt,BOOL fWide) | ||
603 | 607 | if(fWide == TRUE){ |
604 | 608 | /* ワイドキャラ */ |
605 | 609 | for(i = 0;i < cnt;i++){ |
606 | - MultiByteToWideChar(CP_ACP,0,FileName[i],-1,wbuf,BUF_SIZE); | |
607 | - flen += (wcslen(wbuf) + 1) * sizeof(wchar_t); | |
610 | + // UTF-8対応 | |
611 | +// MultiByteToWideChar(CP_ACP,0,FileName[i],-1,wbuf,BUF_SIZE); | |
612 | +// flen += (wcslen(wbuf) + 1) * sizeof(wchar_t); | |
613 | + flen += sizeof(wchar_t) * MtoW(NULL, 0, FileName[i], -1); | |
608 | 614 | } |
609 | 615 | flen++; |
610 | 616 | }else{ |
611 | 617 | /* マルチバイト */ |
612 | 618 | for(i = 0;i < cnt;i++){ |
613 | - flen += lstrlen(FileName[i]) + 1; | |
619 | + // UTF-8対応 | |
620 | +// flen += lstrlen(FileName[i]) + 1; | |
621 | + MtoW(wbuf, BUF_SIZE, FileName[i], -1); | |
622 | + flen += sizeof(char) * WtoA(NULL, 0, wbuf, -1); | |
614 | 623 | } |
615 | 624 | } |
616 | 625 |
@@ -633,9 +642,11 @@ static HDROP APIPRIVATE CreateDropFileMem(char **FileName,int cnt,BOOL fWide) | ||
633 | 642 | |
634 | 643 | buf = (wchar_t *)(&lpDropFile[1]); |
635 | 644 | for(i = 0;i < cnt;i++){ |
636 | - MultiByteToWideChar(CP_ACP,0,FileName[i],-1,wbuf,BUF_SIZE); | |
637 | - wcscpy(buf,wbuf); | |
638 | - buf += wcslen(wbuf) + 1; | |
645 | + // UTF-8対応 | |
646 | +// MultiByteToWideChar(CP_ACP,0,FileName[i],-1,wbuf,BUF_SIZE); | |
647 | +// wcscpy(buf,wbuf); | |
648 | +// buf += wcslen(wbuf) + 1; | |
649 | + buf += MtoW(buf, BUF_SIZE, FileName[i], -1); | |
639 | 650 | } |
640 | 651 | }else{ |
641 | 652 | /* マルチバイト */ |
@@ -643,8 +654,11 @@ static HDROP APIPRIVATE CreateDropFileMem(char **FileName,int cnt,BOOL fWide) | ||
643 | 654 | |
644 | 655 | buf = (char *)(&lpDropFile[1]); |
645 | 656 | for(i = 0;i < cnt;i++){ |
646 | - lstrcpy(buf,FileName[i]); | |
647 | - buf += lstrlen(FileName[i]) + 1; | |
657 | + // UTF-8対応 | |
658 | +// lstrcpy(buf,FileName[i]); | |
659 | +// buf += lstrlen(FileName[i]) + 1; | |
660 | + MtoW(wbuf, BUF_SIZE, FileName[i], -1); | |
661 | + buf += WtoA(buf, BUF_SIZE, wbuf, -1); | |
648 | 662 | } |
649 | 663 | } |
650 | 664 |
@@ -829,6 +843,8 @@ static LRESULT FileListCommonWndProc(HWND hWnd, UINT message, WPARAM wParam, LPA | ||
829 | 843 | char LocDir[FMAX_PATH+1]; |
830 | 844 | char *PathDir; |
831 | 845 | |
846 | + // 変数が未初期化のバグ修正 | |
847 | + FileListBaseNoExpand = NULL; | |
832 | 848 | // ローカル側で選ばれているファイルをFileListBaseに登録 |
833 | 849 | if (hWndDragStart == hWndListLocal) { |
834 | 850 | AskLocalCurDir(LocDir, FMAX_PATH); |
@@ -868,6 +884,7 @@ static LRESULT FileListCommonWndProc(HWND hWnd, UINT message, WPARAM wParam, LPA | ||
868 | 884 | } |
869 | 885 | |
870 | 886 | /* ファイル名の配列を作成する */ |
887 | + // TODO: GlobalAllocが返すのはメモリポインタではなくハンドルだが実際は同じ値 | |
871 | 888 | FileNameList = (char **)GlobalAlloc(GPTR,sizeof(char *) * filenum); |
872 | 889 | if(FileNameList == NULL){ |
873 | 890 | abort(); |
@@ -4922,9 +4939,11 @@ static void GetMonth(char *Str, WORD *Month, WORD *Day) | ||
4922 | 4939 | { |
4923 | 4940 | if(!IsDigit(*Pos)) |
4924 | 4941 | { |
4925 | - if((_mbsncmp(Pos, "月", 1) == 0) || | |
4926 | - (memcmp(Pos, "\xB7\xEE", 2) == 0) || /* EUCの「月」 */ | |
4927 | - (memcmp(Pos, "\xD4\xC2", 2) == 0)) /* GBコードの「月」 */ | |
4942 | + // UTF-8対応 | |
4943 | +// if((_mbsncmp(Pos, "月", 1) == 0) || | |
4944 | +// (memcmp(Pos, "\xB7\xEE", 2) == 0) || /* EUCの「月」 */ | |
4945 | +// (memcmp(Pos, "\xD4\xC2", 2) == 0)) /* GBコードの「月」 */ | |
4946 | + if(memcmp(Pos, "\xE6\x9C\x88", 3) == 0 || memcmp(Pos, "\x8C\x8E", 2) == 0 || memcmp(Pos, "\xB7\xEE", 2) == 0 || memcmp(Pos, "\xD4\xC2", 2) == 0) | |
4928 | 4947 | { |
4929 | 4948 | Pos += 2; |
4930 | 4949 | *Month = atoi(Str); |
@@ -5053,8 +5072,10 @@ static int GetHourAndMinute(char *Str, WORD *Hour, WORD *Minute) | ||
5053 | 5072 | { |
5054 | 5073 | if(IsDigit(*Pos) == 0) |
5055 | 5074 | { |
5056 | - if((_mbsncmp(Pos, "時", 1) == 0) || | |
5057 | - (memcmp(Pos, "\xBB\xFE", 2) == 0)) /* EUCの「時」 */ | |
5075 | + // UTF-8対応 | |
5076 | +// if((_mbsncmp(Pos, "時", 1) == 0) || | |
5077 | +// (memcmp(Pos, "\xBB\xFE", 2) == 0)) /* EUCの「時」 */ | |
5078 | + if(memcmp(Pos, "\xE6\x99\x82", 3) == 0 || memcmp(Pos, "\x8E\x9E", 2) == 0 || memcmp(Pos, "\xBB\xFE", 2) == 0) | |
5058 | 5079 | { |
5059 | 5080 | Pos += 2; |
5060 | 5081 | if(*Pos != NUL) |
@@ -42,6 +42,10 @@ | ||
42 | 42 | #include <htmlhelp.h> |
43 | 43 | #include "helpid.h" |
44 | 44 | |
45 | +// UTF-8対応 | |
46 | +#undef __MBSWRAPPER_H__ | |
47 | +#include "mbswrapper.h" | |
48 | + | |
45 | 49 | |
46 | 50 | /*===== プロトタイプ =====*/ |
47 | 51 |
@@ -41,6 +41,10 @@ | ||
41 | 41 | #include <htmlhelp.h> |
42 | 42 | #include "helpid.h" |
43 | 43 | |
44 | +// UTF-8対応 | |
45 | +#undef __MBSWRAPPER_H__ | |
46 | +#include "mbswrapper.h" | |
47 | + | |
44 | 48 | |
45 | 49 | /*===== プロトタイプ =====*/ |
46 | 50 |
@@ -46,6 +46,10 @@ | ||
46 | 46 | #include <htmlhelp.h> |
47 | 47 | #include "helpid.h" |
48 | 48 | |
49 | +// UTF-8対応 | |
50 | +#undef __MBSWRAPPER_H__ | |
51 | +#include "mbswrapper.h" | |
52 | + | |
49 | 53 | |
50 | 54 | #define RESIZE_OFF 0 /* ウインドウの区切り位置変更していない */ |
51 | 55 | #define RESIZE_ON 1 /* ウインドウの区切り位置変更中 */ |
@@ -152,7 +156,9 @@ int RecvMode = TRANS_DLG; | ||
152 | 156 | int SendMode = TRANS_DLG; |
153 | 157 | int MoveMode = MOVE_DLG; |
154 | 158 | int ListType = LVS_REPORT; |
155 | -int CacheEntry = 10; | |
159 | +// LISTのキャッシュを無効にする(リモートのディレクトリの表示が更新されないバグ対策) | |
160 | +//int CacheEntry = 10; | |
161 | +int CacheEntry = -10; | |
156 | 162 | int CacheSave = NO; |
157 | 163 | char DefaultLocalPath[FMAX_PATH+1] = { "" }; |
158 | 164 | int SaveTimeStamp = YES; |
@@ -5,11 +5,13 @@ | ||
5 | 5 | // 全ての制御用の文字はASCIIの範囲であるため、Shift_JISとUTF-8間の変換は不要 |
6 | 6 | |
7 | 7 | #define UNICODE |
8 | +#define _UNICODE | |
8 | 9 | #define _WIN32_WINNT 0x0600 |
9 | 10 | #undef _WIN32_IE |
10 | 11 | #define _WIN32_IE 0x0400 |
11 | 12 | |
12 | 13 | #include <tchar.h> |
14 | +#include <direct.h> | |
13 | 15 | #include <windows.h> |
14 | 16 | #include <commctrl.h> |
15 | 17 | #include <shlobj.h> |
@@ -21,8 +23,8 @@ | ||
21 | 23 | // マルチバイト文字列からワイド文字列へ変換 |
22 | 24 | int MtoW(LPWSTR pDst, int size, LPCSTR pSrc, int count) |
23 | 25 | { |
24 | - if(pSrc < (LPCSTR)0x00010000 || !((char*)pSrc + 1)) | |
25 | - return 0; | |
26 | + if(pSrc < (LPCSTR)0x00010000 || pSrc == (LPCSTR)~0) | |
27 | + return pSrc; | |
26 | 28 | if(pDst) |
27 | 29 | return MultiByteToWideChar(CP_UTF8, 0, pSrc, count, pDst, size); |
28 | 30 | return MultiByteToWideChar(CP_UTF8, 0, pSrc, count, NULL, 0); |
@@ -31,8 +33,8 @@ int MtoW(LPWSTR pDst, int size, LPCSTR pSrc, int count) | ||
31 | 33 | // ワイド文字列からマルチバイト文字列へ変換 |
32 | 34 | int WtoM(LPSTR pDst, int size, LPCWSTR pSrc, int count) |
33 | 35 | { |
34 | - if(pSrc < (LPCWSTR)0x00010000 || !((char*)pSrc + 1)) | |
35 | - return 0; | |
36 | + if(pSrc < (LPCWSTR)0x00010000 || pSrc == (LPCWSTR)~0) | |
37 | + return pSrc; | |
36 | 38 | if(pDst) |
37 | 39 | return WideCharToMultiByte(CP_UTF8, 0, pSrc, count, pDst, size, NULL, NULL); |
38 | 40 | return WideCharToMultiByte(CP_UTF8, 0, pSrc, count, NULL, 0, NULL, NULL); |
@@ -41,8 +43,8 @@ int WtoM(LPSTR pDst, int size, LPCWSTR pSrc, int count) | ||
41 | 43 | // ワイド文字列からShift_JIS文字列へ変換 |
42 | 44 | int WtoA(LPSTR pDst, int size, LPCWSTR pSrc, int count) |
43 | 45 | { |
44 | - if(pSrc < (LPCWSTR)0x00010000 || !((char*)pSrc + 1)) | |
45 | - return 0; | |
46 | + if(pSrc < (LPCWSTR)0x00010000 || pSrc == (LPCWSTR)~0) | |
47 | + return pSrc; | |
46 | 48 | if(pDst) |
47 | 49 | return WideCharToMultiByte(CP_ACP, 0, pSrc, count, pDst, size, NULL, NULL); |
48 | 50 | return WideCharToMultiByte(CP_ACP, 0, pSrc, count, NULL, 0, NULL, NULL); |
@@ -52,7 +54,7 @@ int WtoA(LPSTR pDst, int size, LPCWSTR pSrc, int count) | ||
52 | 54 | int TerminateStringM(LPSTR lpString, int size) |
53 | 55 | { |
54 | 56 | int i; |
55 | - if(lpString < (LPSTR)0x00010000 || !((char*)lpString + 1)) | |
57 | + if(lpString < (LPSTR)0x00010000 || lpString == (LPSTR)~0) | |
56 | 58 | return 0; |
57 | 59 | for(i = 0; i < size; i++) |
58 | 60 | { |
@@ -68,7 +70,7 @@ int TerminateStringM(LPSTR lpString, int size) | ||
68 | 70 | int TerminateStringW(LPWSTR lpString, int size) |
69 | 71 | { |
70 | 72 | int i; |
71 | - if(lpString < (LPWSTR)0x00010000 || !((char*)lpString + 1)) | |
73 | + if(lpString < (LPWSTR)0x00010000 || lpString == (LPWSTR)~0) | |
72 | 74 | return 0; |
73 | 75 | for(i = 0; i < size; i++) |
74 | 76 | { |
@@ -84,7 +86,7 @@ int TerminateStringW(LPWSTR lpString, int size) | ||
84 | 86 | size_t GetMultiStringLengthM(LPCSTR lpString) |
85 | 87 | { |
86 | 88 | size_t i; |
87 | - if(lpString < (LPCSTR)0x00010000 || !((char*)lpString + 1)) | |
89 | + if(lpString < (LPCSTR)0x00010000 || lpString == (LPCSTR)~0) | |
88 | 90 | return 0; |
89 | 91 | i = 0; |
90 | 92 | while(lpString[i] != '\0' || lpString[i + 1] != '\0') |
@@ -99,7 +101,7 @@ size_t GetMultiStringLengthM(LPCSTR lpString) | ||
99 | 101 | size_t GetMultiStringLengthW(LPCWSTR lpString) |
100 | 102 | { |
101 | 103 | size_t i; |
102 | - if(lpString < (LPCWSTR)0x00010000 || !((char*)lpString + 1)) | |
104 | + if(lpString < (LPCWSTR)0x00010000 || lpString == (LPCWSTR)~0) | |
103 | 105 | return 0; |
104 | 106 | i = 0; |
105 | 107 | while(lpString[i] != L'\0' || lpString[i + 1] != L'\0') |
@@ -114,7 +116,9 @@ size_t GetMultiStringLengthW(LPCWSTR lpString) | ||
114 | 116 | char* AllocateStringM(int size) |
115 | 117 | { |
116 | 118 | char* p; |
117 | - p = (char*)malloc(sizeof(char) * size); | |
119 | + // 0が指定される場合があるため1文字分追加 | |
120 | + p = (char*)malloc(sizeof(char) * (size + 1)); | |
121 | + // 念のため先頭にNULL文字を代入 | |
118 | 122 | if(p) |
119 | 123 | *p = '\0'; |
120 | 124 | return p; |
@@ -124,7 +128,9 @@ char* AllocateStringM(int size) | ||
124 | 128 | wchar_t* AllocateStringW(int size) |
125 | 129 | { |
126 | 130 | wchar_t* p; |
127 | - p = (wchar_t*)malloc(sizeof(wchar_t) * size); | |
131 | + // 0が指定される場合があるため1文字分追加 | |
132 | + p = (wchar_t*)malloc(sizeof(wchar_t) * (size + 1)); | |
133 | + // 念のため先頭にNULL文字を代入 | |
128 | 134 | if(p) |
129 | 135 | *p = L'\0'; |
130 | 136 | return p; |
@@ -134,7 +140,9 @@ wchar_t* AllocateStringW(int size) | ||
134 | 140 | char* AllocateStringA(int size) |
135 | 141 | { |
136 | 142 | char* p; |
137 | - p = (char*)malloc(sizeof(char) * size); | |
143 | + // 0が指定される場合があるため1文字分追加 | |
144 | + p = (char*)malloc(sizeof(char) * (size + 1)); | |
145 | + // 念のため先頭にNULL文字を代入 | |
138 | 146 | if(p) |
139 | 147 | *p = '\0'; |
140 | 148 | return p; |
@@ -145,7 +153,7 @@ wchar_t* DuplicateMtoW(LPCSTR lpString, int c) | ||
145 | 153 | { |
146 | 154 | wchar_t* p; |
147 | 155 | int i; |
148 | - if(lpString < (LPCSTR)0x00010000 || !((char*)lpString + 1)) | |
156 | + if(lpString < (LPCSTR)0x00010000 || lpString == (LPCSTR)~0) | |
149 | 157 | return (wchar_t*)lpString; |
150 | 158 | if(c < 0) |
151 | 159 | c = strlen(lpString); |
@@ -163,7 +171,7 @@ wchar_t* DuplicateMtoWBuffer(LPCSTR lpString, int c, int size) | ||
163 | 171 | { |
164 | 172 | wchar_t* p; |
165 | 173 | int i; |
166 | - if(lpString < (LPCSTR)0x00010000 || !((char*)lpString + 1)) | |
174 | + if(lpString < (LPCSTR)0x00010000 || lpString == (LPCSTR)~0) | |
167 | 175 | return (wchar_t*)lpString; |
168 | 176 | if(c < 0) |
169 | 177 | c = strlen(lpString); |
@@ -181,7 +189,7 @@ wchar_t* DuplicateMtoWMultiString(LPCSTR lpString) | ||
181 | 189 | { |
182 | 190 | int count; |
183 | 191 | wchar_t* p; |
184 | - if(lpString < (LPCSTR)0x00010000 || !((char*)lpString + 1)) | |
192 | + if(lpString < (LPCSTR)0x00010000 || lpString == (LPCSTR)~0) | |
185 | 193 | return (wchar_t*)lpString; |
186 | 194 | count = GetMultiStringLengthM(lpString) + 1; |
187 | 195 | p = AllocateStringW(count); |
@@ -195,7 +203,7 @@ wchar_t* DuplicateMtoWMultiStringBuffer(LPCSTR lpString, int size) | ||
195 | 203 | { |
196 | 204 | int count; |
197 | 205 | wchar_t* p; |
198 | - if(lpString < (LPCSTR)0x00010000 || !((char*)lpString + 1)) | |
206 | + if(lpString < (LPCSTR)0x00010000 || lpString == (LPCSTR)~0) | |
199 | 207 | return (wchar_t*)lpString; |
200 | 208 | count = GetMultiStringLengthM(lpString) + 1; |
201 | 209 | p = AllocateStringW(size); |
@@ -213,7 +221,7 @@ char* DuplicateWtoM(LPCWSTR lpString, int c) | ||
213 | 221 | { |
214 | 222 | char* p; |
215 | 223 | int i; |
216 | - if(lpString < (LPCWSTR)0x00010000 || !((char*)lpString + 1)) | |
224 | + if(lpString < (LPCWSTR)0x00010000 || lpString == (LPCWSTR)~0) | |
217 | 225 | return (char*)lpString; |
218 | 226 | if(c < 0) |
219 | 227 | c = wcslen(lpString); |
@@ -231,7 +239,7 @@ char* DuplicateWtoA(LPCWSTR lpString, int c) | ||
231 | 239 | { |
232 | 240 | char* p; |
233 | 241 | int i; |
234 | - if(lpString < (LPCWSTR)0x00010000 || !((char*)lpString + 1)) | |
242 | + if(lpString < (LPCWSTR)0x00010000 || lpString == (LPCWSTR)~0) | |
235 | 243 | return (char*)lpString; |
236 | 244 | if(c < 0) |
237 | 245 | c = wcslen(lpString); |
@@ -247,7 +255,7 @@ char* DuplicateWtoA(LPCWSTR lpString, int c) | ||
247 | 255 | // 文字列用に確保したメモリを開放 |
248 | 256 | void FreeDuplicatedString(void* p) |
249 | 257 | { |
250 | - if(p < (void*)0x00010000 || !((char*)p + 1)) | |
258 | + if(p < (void*)0x00010000 || p == (void*)~0) | |
251 | 259 | return; |
252 | 260 | free(p); |
253 | 261 | } |
@@ -340,8 +348,26 @@ END_ROUTINE | ||
340 | 348 | |
341 | 349 | DWORD GetLogicalDriveStringsM(DWORD nBufferLength, LPSTR lpBuffer) |
342 | 350 | { |
343 | - // TODO: 本来は変換が必要だが半角英数のみと思われるので省略 | |
344 | - return GetLogicalDriveStringsA(nBufferLength, lpBuffer); | |
351 | + DWORD r = 0; | |
352 | + wchar_t* pw0 = NULL; | |
353 | +START_ROUTINE | |
354 | + pw0 = AllocateStringW(nBufferLength * 4); | |
355 | + GetLogicalDriveStringsW(nBufferLength * 4, pw0); | |
356 | + WtoM(lpBuffer, nBufferLength, pw0, -1); | |
357 | + r = TerminateStringM(lpBuffer, nBufferLength); | |
358 | +END_ROUTINE | |
359 | + FreeDuplicatedString(pw0); | |
360 | + return r; | |
361 | +} | |
362 | + | |
363 | +ATOM RegisterClassExM(CONST WNDCLASSEXA * v0) | |
364 | +{ | |
365 | + LRESULT r = 0; | |
366 | +START_ROUTINE | |
367 | + // WNDPROCがShift_JIS用であるため | |
368 | + r = RegisterClassExA(v0); | |
369 | +END_ROUTINE | |
370 | + return r; | |
345 | 371 | } |
346 | 372 | |
347 | 373 | HWND CreateWindowExM(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam) |
@@ -359,6 +385,58 @@ END_ROUTINE | ||
359 | 385 | return r; |
360 | 386 | } |
361 | 387 | |
388 | +LONG GetWindowLongM(HWND hWnd, int nIndex) | |
389 | +{ | |
390 | + LRESULT r = 0; | |
391 | +START_ROUTINE | |
392 | + // WNDPROCがShift_JIS用であるため | |
393 | + if(IsWindowUnicode(hWnd)) | |
394 | + r = GetWindowLongW(hWnd, nIndex); | |
395 | + else | |
396 | + r = GetWindowLongA(hWnd, nIndex); | |
397 | +END_ROUTINE | |
398 | + return r; | |
399 | +} | |
400 | + | |
401 | +LONG SetWindowLongM(HWND hWnd, int nIndex, LONG dwNewLong) | |
402 | +{ | |
403 | + LRESULT r = 0; | |
404 | +START_ROUTINE | |
405 | + // WNDPROCがShift_JIS用であるため | |
406 | + if(IsWindowUnicode(hWnd)) | |
407 | + r = SetWindowLongW(hWnd, nIndex, dwNewLong); | |
408 | + else | |
409 | + r = SetWindowLongA(hWnd, nIndex, dwNewLong); | |
410 | +END_ROUTINE | |
411 | + return r; | |
412 | +} | |
413 | + | |
414 | +LRESULT DefWindowProcM(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) | |
415 | +{ | |
416 | + LRESULT r = 0; | |
417 | +START_ROUTINE | |
418 | + // WNDPROCがShift_JIS用であるため | |
419 | + if(IsWindowUnicode(hWnd)) | |
420 | + r = DefWindowProcW(hWnd, Msg, wParam, lParam); | |
421 | + else | |
422 | + r = DefWindowProcA(hWnd, Msg, wParam, lParam); | |
423 | +END_ROUTINE | |
424 | + return r; | |
425 | +} | |
426 | + | |
427 | +LRESULT CallWindowProcM(WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) | |
428 | +{ | |
429 | + LRESULT r = 0; | |
430 | +START_ROUTINE | |
431 | + // WNDPROCがShift_JIS用であるため | |
432 | + if(IsWindowUnicode(hWnd)) | |
433 | + r = CallWindowProcW(lpPrevWndFunc, hWnd, Msg, wParam, lParam); | |
434 | + else | |
435 | + r = CallWindowProcA(lpPrevWndFunc, hWnd, Msg, wParam, lParam); | |
436 | +END_ROUTINE | |
437 | + return r; | |
438 | +} | |
439 | + | |
362 | 440 | LRESULT SendMessageM(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) |
363 | 441 | { |
364 | 442 | LRESULT r = 0; |
@@ -544,6 +622,28 @@ START_ROUTINE | ||
544 | 622 | wLVFindInfo.vkDirection = pmLVFindInfo->vkDirection; |
545 | 623 | r = SendMessageW(hWnd, LVM_FINDITEMW, wParam, (LPARAM)&wLVItem); |
546 | 624 | break; |
625 | + case LVM_GETCOLUMNA: | |
626 | + pmLVColumn = (LVCOLUMNA*)lParam; | |
627 | + wLVColumn.mask = pmLVColumn->mask; | |
628 | + wLVColumn.fmt = pmLVColumn->fmt; | |
629 | + wLVColumn.cx = pmLVColumn->cx; | |
630 | + Size = pmLVColumn->cchTextMax * 4; | |
631 | + pw0 = AllocateStringW(Size); | |
632 | + wLVColumn.pszText = pw0; | |
633 | + wLVColumn.cchTextMax = Size; | |
634 | + wLVColumn.iSubItem = pmLVColumn->iSubItem; | |
635 | + wLVColumn.iImage = pmLVColumn->iImage; | |
636 | + wLVColumn.iOrder = pmLVColumn->iOrder; | |
637 | + r = SendMessageW(hWnd, LVM_GETCOLUMNW, wParam, (LPARAM)&wLVColumn); | |
638 | + pmLVColumn->mask = wLVColumn.mask; | |
639 | + pmLVColumn->fmt = wLVColumn.fmt; | |
640 | + pmLVColumn->cx = wLVColumn.cx; | |
641 | + WtoM(pmLVColumn->pszText, pmLVColumn->cchTextMax, wLVColumn.pszText, -1); | |
642 | + TerminateStringM(pmLVColumn->pszText, pmLVColumn->cchTextMax); | |
643 | + pmLVColumn->iSubItem = wLVColumn.iSubItem; | |
644 | + pmLVColumn->iImage = wLVColumn.iImage; | |
645 | + pmLVColumn->iOrder = wLVColumn.iOrder; | |
646 | + break; | |
547 | 647 | case LVM_INSERTCOLUMNA: |
548 | 648 | pmLVColumn = (LVCOLUMNA*)lParam; |
549 | 649 | wLVColumn.mask = pmLVColumn->mask; |
@@ -551,6 +651,7 @@ START_ROUTINE | ||
551 | 651 | wLVColumn.cx = pmLVColumn->cx; |
552 | 652 | pw0 = DuplicateMtoW(pmLVColumn->pszText, -1); |
553 | 653 | wLVColumn.pszText = pw0; |
654 | + // TODO: cchTextMaxの確認 | |
554 | 655 | wLVColumn.cchTextMax = pmLVColumn->cchTextMax; |
555 | 656 | wLVColumn.iSubItem = pmLVColumn->iSubItem; |
556 | 657 | wLVColumn.iImage = pmLVColumn->iImage; |
@@ -611,6 +712,19 @@ END_ROUTINE | ||
611 | 712 | return r; |
612 | 713 | } |
613 | 714 | |
715 | +LRESULT DefDlgProcM(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) | |
716 | +{ | |
717 | + LRESULT r = 0; | |
718 | +START_ROUTINE | |
719 | + // WNDPROCがShift_JIS用であるため | |
720 | + if(IsWindowUnicode(hWnd)) | |
721 | + r = DefDlgProcW(hWnd, Msg, wParam, lParam); | |
722 | + else | |
723 | + r = DefDlgProcA(hWnd, Msg, wParam, lParam); | |
724 | +END_ROUTINE | |
725 | + return r; | |
726 | +} | |
727 | + | |
614 | 728 | LRESULT SendDlgItemMessageM(HWND hDlg, int nIDDlgItem, UINT Msg, WPARAM wParam, LPARAM lParam) |
615 | 729 | { |
616 | 730 | LRESULT r = 0; |
@@ -637,10 +751,15 @@ UINT DragQueryFileM(HDROP hDrop, UINT iFile, LPSTR lpszFile, UINT cch) | ||
637 | 751 | UINT r = 0; |
638 | 752 | wchar_t* pw0 = NULL; |
639 | 753 | START_ROUTINE |
640 | - pw0 = AllocateStringW(cch * 4); | |
641 | - DragQueryFileW(hDrop, iFile, pw0, cch * 4); | |
642 | - WtoM(lpszFile, cch, pw0, -1); | |
643 | - r = TerminateStringM(lpszFile, cch); | |
754 | + if(iFile == (UINT)-1) | |
755 | + r = DragQueryFileW(hDrop, iFile, lpszFile, cch); | |
756 | + else | |
757 | + { | |
758 | + pw0 = AllocateStringW(cch * 4); | |
759 | + DragQueryFileW(hDrop, iFile, pw0, cch * 4); | |
760 | + WtoM(lpszFile, cch, pw0, -1); | |
761 | + r = TerminateStringM(lpszFile, cch); | |
762 | + } | |
644 | 763 | END_ROUTINE |
645 | 764 | FreeDuplicatedString(pw0); |
646 | 765 | return r; |
@@ -684,6 +803,20 @@ END_ROUTINE | ||
684 | 803 | return r; |
685 | 804 | } |
686 | 805 | |
806 | +DWORD GetTempPathM(DWORD nBufferLength, LPSTR lpBuffer) | |
807 | +{ | |
808 | + DWORD r = 0; | |
809 | + wchar_t* pw0 = NULL; | |
810 | +START_ROUTINE | |
811 | + pw0 = AllocateStringW(nBufferLength * 4); | |
812 | + GetTempPathW(nBufferLength * 4, pw0); | |
813 | + WtoM(lpBuffer, nBufferLength, pw0, -1); | |
814 | + r = TerminateStringM(lpBuffer, nBufferLength); | |
815 | +END_ROUTINE | |
816 | + FreeDuplicatedString(pw0); | |
817 | + return r; | |
818 | +} | |
819 | + | |
687 | 820 | DWORD GetFileAttributesM(LPCSTR lpFileName) |
688 | 821 | { |
689 | 822 | DWORD r = FALSE; |
@@ -1363,3 +1496,226 @@ END_ROUTINE | ||
1363 | 1496 | return r; |
1364 | 1497 | } |
1365 | 1498 | |
1499 | +HWND CreateDialogParamM(HINSTANCE hInstance, LPCSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam) | |
1500 | +{ | |
1501 | + HWND r = NULL; | |
1502 | + wchar_t* pw0 = NULL; | |
1503 | +START_ROUTINE | |
1504 | + pw0 = DuplicateMtoW(lpTemplateName, -1); | |
1505 | + r = CreateDialogParamW(hInstance, pw0, hWndParent, lpDialogFunc, dwInitParam); | |
1506 | +END_ROUTINE | |
1507 | + FreeDuplicatedString(pw0); | |
1508 | + return r; | |
1509 | +} | |
1510 | + | |
1511 | +int mkdirM(const char * _Path) | |
1512 | +{ | |
1513 | + int r = 0; | |
1514 | + wchar_t* pw0 = NULL; | |
1515 | +START_ROUTINE | |
1516 | + pw0 = DuplicateMtoW(_Path, -1); | |
1517 | + r = _wmkdir(pw0); | |
1518 | +END_ROUTINE | |
1519 | + FreeDuplicatedString(pw0); | |
1520 | + return r; | |
1521 | +} | |
1522 | + | |
1523 | +int _mkdirM(const char * _Path) | |
1524 | +{ | |
1525 | + int r = 0; | |
1526 | + wchar_t* pw0 = NULL; | |
1527 | +START_ROUTINE | |
1528 | + pw0 = DuplicateMtoW(_Path, -1); | |
1529 | + r = _wmkdir(pw0); | |
1530 | +END_ROUTINE | |
1531 | + FreeDuplicatedString(pw0); | |
1532 | + return r; | |
1533 | +} | |
1534 | + | |
1535 | +int rmdirM(const char * _Path) | |
1536 | +{ | |
1537 | + int r = 0; | |
1538 | + wchar_t* pw0 = NULL; | |
1539 | +START_ROUTINE | |
1540 | + pw0 = DuplicateMtoW(_Path, -1); | |
1541 | + r = _wrmdir(pw0); | |
1542 | +END_ROUTINE | |
1543 | + FreeDuplicatedString(pw0); | |
1544 | + return r; | |
1545 | +} | |
1546 | + | |
1547 | +int _rmdirM(const char * _Path) | |
1548 | +{ | |
1549 | + int r = 0; | |
1550 | + wchar_t* pw0 = NULL; | |
1551 | +START_ROUTINE | |
1552 | + pw0 = DuplicateMtoW(_Path, -1); | |
1553 | + r = _wrmdir(pw0); | |
1554 | +END_ROUTINE | |
1555 | + FreeDuplicatedString(pw0); | |
1556 | + return r; | |
1557 | +} | |
1558 | + | |
1559 | +size_t _mbslenM(const unsigned char * _Str) | |
1560 | +{ | |
1561 | + size_t r = 0; | |
1562 | + wchar_t* pw0 = NULL; | |
1563 | + wchar_t* wr; | |
1564 | +START_ROUTINE | |
1565 | + pw0 = DuplicateMtoW(_Str, -1); | |
1566 | + r = wcslen(pw0); | |
1567 | +END_ROUTINE | |
1568 | + FreeDuplicatedString(pw0); | |
1569 | + return r; | |
1570 | +} | |
1571 | + | |
1572 | +unsigned char * _mbschrM(const unsigned char * _Str, unsigned int _Ch) | |
1573 | +{ | |
1574 | + unsigned char* r = NULL; | |
1575 | + wchar_t* pw0 = NULL; | |
1576 | + wchar_t* wr; | |
1577 | +START_ROUTINE | |
1578 | + pw0 = DuplicateMtoW(_Str, -1); | |
1579 | + // TODO: 非ASCII文字の対応 | |
1580 | + wr = wcschr(pw0, _Ch); | |
1581 | + if(wr) | |
1582 | + { | |
1583 | + *wr = L'\0'; | |
1584 | + r = _Str + WtoM(NULL, 0, pw0, -1) - 1; | |
1585 | + } | |
1586 | +END_ROUTINE | |
1587 | + FreeDuplicatedString(pw0); | |
1588 | + return r; | |
1589 | +} | |
1590 | + | |
1591 | +unsigned char * _mbsrchrM(const unsigned char * _Str, unsigned int _Ch) | |
1592 | +{ | |
1593 | + unsigned char* r = NULL; | |
1594 | + wchar_t* pw0 = NULL; | |
1595 | + wchar_t* wr; | |
1596 | +START_ROUTINE | |
1597 | + pw0 = DuplicateMtoW(_Str, -1); | |
1598 | + // TODO: 非ASCII文字の対応 | |
1599 | + wr = wcsrchr(pw0, _Ch); | |
1600 | + if(wr) | |
1601 | + { | |
1602 | + *wr = L'\0'; | |
1603 | + r = _Str + WtoM(NULL, 0, pw0, -1) - 1; | |
1604 | + } | |
1605 | +END_ROUTINE | |
1606 | + FreeDuplicatedString(pw0); | |
1607 | + return r; | |
1608 | +} | |
1609 | + | |
1610 | +unsigned char * _mbsstrM(const unsigned char * _Str, const unsigned char * _Substr) | |
1611 | +{ | |
1612 | + unsigned char* r = NULL; | |
1613 | + wchar_t* pw0 = NULL; | |
1614 | + wchar_t* pw1 = NULL; | |
1615 | + wchar_t* wr; | |
1616 | +START_ROUTINE | |
1617 | + pw0 = DuplicateMtoW(_Str, -1); | |
1618 | + pw1 = DuplicateMtoW(_Substr, -1); | |
1619 | + wr = wcsstr(pw0, pw1); | |
1620 | + if(wr) | |
1621 | + { | |
1622 | + *wr = L'\0'; | |
1623 | + r = _Str + WtoM(NULL, 0, pw0, -1) - 1; | |
1624 | + } | |
1625 | +END_ROUTINE | |
1626 | + FreeDuplicatedString(pw0); | |
1627 | + FreeDuplicatedString(pw1); | |
1628 | + return r; | |
1629 | +} | |
1630 | + | |
1631 | +int _mbscmpM(const unsigned char * _Str1, const unsigned char * _Str2) | |
1632 | +{ | |
1633 | + int r = 0; | |
1634 | + wchar_t* pw0 = NULL; | |
1635 | + wchar_t* pw1 = NULL; | |
1636 | +START_ROUTINE | |
1637 | + pw0 = DuplicateMtoW(_Str1, -1); | |
1638 | + pw1 = DuplicateMtoW(_Str2, -1); | |
1639 | + r = wcscmp(pw0, pw1); | |
1640 | +END_ROUTINE | |
1641 | + FreeDuplicatedString(pw0); | |
1642 | + FreeDuplicatedString(pw1); | |
1643 | + return r; | |
1644 | +} | |
1645 | + | |
1646 | +int _mbsicmpM(const unsigned char * _Str1, const unsigned char * _Str2) | |
1647 | +{ | |
1648 | + int r = 0; | |
1649 | + wchar_t* pw0 = NULL; | |
1650 | + wchar_t* pw1 = NULL; | |
1651 | +START_ROUTINE | |
1652 | + pw0 = DuplicateMtoW(_Str1, -1); | |
1653 | + pw1 = DuplicateMtoW(_Str2, -1); | |
1654 | + r = _wcsicmp(pw0, pw1); | |
1655 | +END_ROUTINE | |
1656 | + FreeDuplicatedString(pw0); | |
1657 | + FreeDuplicatedString(pw1); | |
1658 | + return r; | |
1659 | +} | |
1660 | + | |
1661 | +int _mbsncmpM(const unsigned char * _Str1, const unsigned char * _Str2, size_t _MaxCount) | |
1662 | +{ | |
1663 | + int r = 0; | |
1664 | + wchar_t* pw0 = NULL; | |
1665 | + wchar_t* pw1 = NULL; | |
1666 | +START_ROUTINE | |
1667 | + pw0 = DuplicateMtoW(_Str1, -1); | |
1668 | + pw1 = DuplicateMtoW(_Str2, -1); | |
1669 | + r = wcsncmp(pw0, pw1, _MaxCount); | |
1670 | +END_ROUTINE | |
1671 | + FreeDuplicatedString(pw0); | |
1672 | + FreeDuplicatedString(pw1); | |
1673 | + return r; | |
1674 | +} | |
1675 | + | |
1676 | +unsigned char * _mbslwrM(unsigned char * _String) | |
1677 | +{ | |
1678 | + unsigned char* r = NULL; | |
1679 | + wchar_t* pw0 = NULL; | |
1680 | +START_ROUTINE | |
1681 | + pw0 = DuplicateMtoW(_String, -1); | |
1682 | + _wcslwr(pw0); | |
1683 | + r = _String; | |
1684 | + WtoM(_String, strlen(_String) + 1, pw0, -1); | |
1685 | +END_ROUTINE | |
1686 | + FreeDuplicatedString(pw0); | |
1687 | + return r; | |
1688 | +} | |
1689 | + | |
1690 | +unsigned char * _mbsuprM(unsigned char * _String) | |
1691 | +{ | |
1692 | + unsigned char* r = NULL; | |
1693 | + wchar_t* pw0 = NULL; | |
1694 | +START_ROUTINE | |
1695 | + pw0 = DuplicateMtoW(_String, -1); | |
1696 | + _wcsupr(pw0); | |
1697 | + r = _String; | |
1698 | + WtoM(_String, strlen(_String) + 1, pw0, -1); | |
1699 | +END_ROUTINE | |
1700 | + FreeDuplicatedString(pw0); | |
1701 | + return r; | |
1702 | +} | |
1703 | + | |
1704 | +unsigned char * _mbsnincM(const unsigned char * _Str, size_t _Count) | |
1705 | +{ | |
1706 | + unsigned char* r = NULL; | |
1707 | + wchar_t* pw0 = NULL; | |
1708 | + wchar_t* wr; | |
1709 | +START_ROUTINE | |
1710 | + pw0 = DuplicateMtoW(_Str, -1); | |
1711 | + wr = _wcsninc(pw0, _Count); | |
1712 | + if(wr) | |
1713 | + { | |
1714 | + *wr = L'\0'; | |
1715 | + r = _Str + WtoM(NULL, 0, pw0, -1) - 1; | |
1716 | + } | |
1717 | +END_ROUTINE | |
1718 | + FreeDuplicatedString(pw0); | |
1719 | + return r; | |
1720 | +} | |
1721 | + |
@@ -17,8 +17,18 @@ | ||
17 | 17 | #define FindNextFile FindNextFileM |
18 | 18 | #undef GetLogicalDriveStrings |
19 | 19 | #define GetLogicalDriveStrings GetLogicalDriveStringsM |
20 | +#undef RegisterClassEx | |
21 | +#define RegisterClassEx RegisterClassExM | |
20 | 22 | #undef CreateWindowEx |
21 | 23 | #define CreateWindowEx CreateWindowExM |
24 | +#undef GetWindowLong | |
25 | +#define GetWindowLong GetWindowLongM | |
26 | +#undef SetWindowLong | |
27 | +#define SetWindowLong SetWindowLongM | |
28 | +#undef DefWindowProc | |
29 | +#define DefWindowProc DefWindowProcM | |
30 | +#undef CallWindowProc | |
31 | +#define CallWindowProc CallWindowProcM | |
22 | 32 | #undef SendMessage |
23 | 33 | #define SendMessage SendMessageM |
24 | 34 | #undef SendDlgItemMessage |
@@ -33,6 +43,8 @@ | ||
33 | 43 | #define SetCurrentDirectory SetCurrentDirectoryM |
34 | 44 | #undef SetDllDirectory |
35 | 45 | #define SetDllDirectory SetDllDirectoryM |
46 | +#undef GetTempPath | |
47 | +#define GetTempPath GetTempPathM | |
36 | 48 | #undef GetFileAttributes |
37 | 49 | #define GetFileAttributes GetFileAttributesM |
38 | 50 | #undef GetModuleFileName |
@@ -81,9 +93,41 @@ | ||
81 | 93 | #define ChooseFont ChooseFontM |
82 | 94 | #undef DialogBoxParam |
83 | 95 | #define DialogBoxParam DialogBoxParamM |
96 | +#undef CreateDialogParam | |
97 | +#define CreateDialogParam CreateDialogParamM | |
98 | +#undef mkdir | |
99 | +#define mkdir _mkdirM | |
100 | +#undef _mkdir | |
101 | +#define _mkdir _mkdirM | |
102 | +#undef rmdir | |
103 | +#define rmdir rmdirM | |
104 | +#undef _rmdir | |
105 | +#define _rmdir _rmdirM | |
106 | +#undef _mbslen | |
107 | +#define _mbslen _mbslenM | |
108 | +#undef _mbschr | |
109 | +#define _mbschr _mbschrM | |
110 | +#undef _mbsrchr | |
111 | +#define _mbsrchr _mbsrchrM | |
112 | +#undef _mbsstr | |
113 | +#define _mbsstr _mbsstrM | |
114 | +#undef _mbscmp | |
115 | +#define _mbscmp _mbscmpM | |
116 | +#undef _mbsicmp | |
117 | +#define _mbsicmp _mbsicmpM | |
118 | +#undef _mbsncmp | |
119 | +#define _mbsncmp _mbsncmpM | |
120 | +#undef _mbslwr | |
121 | +#define _mbslwr _mbslwrM | |
122 | +#undef _mbsupr | |
123 | +#define _mbsupr _mbsuprM | |
124 | +#undef _mbsninc | |
125 | +#define _mbsninc _mbsnincM | |
84 | 126 | |
85 | 127 | #undef CreateWindow |
86 | 128 | #define CreateWindow(lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam) CreateWindowEx(0L, lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam) |
129 | +#undef DialogBox | |
130 | +#define DialogBox(hInstance, lpTemplate, hWndParent, lpDialogFunc) DialogBoxParam(hInstance, lpTemplate, hWndParent, lpDialogFunc, 0L) | |
87 | 131 | |
88 | 132 | #endif |
89 | 133 |
@@ -45,6 +45,10 @@ | ||
45 | 45 | #include <htmlhelp.h> |
46 | 46 | #include "helpid.h" |
47 | 47 | |
48 | +// UTF-8対応 | |
49 | +#undef __MBSWRAPPER_H__ | |
50 | +#include "mbswrapper.h" | |
51 | + | |
48 | 52 | |
49 | 53 | |
50 | 54 | /*===== 入力ダイアログデータのストラクチャ =====*/ |
@@ -41,6 +41,10 @@ | ||
41 | 41 | #include <htmlhelp.h> |
42 | 42 | #include "helpid.h" |
43 | 43 | |
44 | +// UTF-8対応 | |
45 | +#undef __MBSWRAPPER_H__ | |
46 | +#include "mbswrapper.h" | |
47 | + | |
44 | 48 | |
45 | 49 | /*===== プロトタイプ =====*/ |
46 | 50 |
@@ -64,6 +64,11 @@ int LoadJre(void) | ||
64 | 64 | { |
65 | 65 | int Sts; |
66 | 66 | |
67 | + // UTF-8対応 | |
68 | + // JRE32.DLLはUTF-8に非対応 | |
69 | +#ifdef DISABLE_JRE32DLL | |
70 | + return FALSE; | |
71 | +#endif | |
67 | 72 | Sts = FALSE; |
68 | 73 | if((m_hDll = LoadLibrary("jre32.dll")) != NULL) |
69 | 74 | { |
@@ -74,6 +74,7 @@ typedef struct { | ||
74 | 74 | |
75 | 75 | |
76 | 76 | // スレッド衝突のバグ修正 |
77 | +// 念のためテーブルを増量 | |
77 | 78 | //#define MAX_SIGNAL_ENTRY 10 |
78 | 79 | //#define MAX_SIGNAL_ENTRY_DBASE 5 |
79 | 80 | #define MAX_SIGNAL_ENTRY 100 |
@@ -41,6 +41,10 @@ | ||
41 | 41 | #include <htmlhelp.h> |
42 | 42 | #include "helpid.h" |
43 | 43 | |
44 | +// UTF-8対応 | |
45 | +#undef __MBSWRAPPER_H__ | |
46 | +#include "mbswrapper.h" | |
47 | + | |
44 | 48 | |
45 | 49 | /*===== プロトタイプ =====*/ |
46 | 50 |