Tera TermにCD-ROM取り出し機能を追加します。
Revision | 21761bf4317d0e67191f4b0cc56f5a804a9db508 (tree) |
---|---|
Zeit | 2022-07-19 04:09:54 |
Autor | IWAMOTO Kouichi <sue@iwmt...> |
Commiter | IWAMOTO Kouichi |
Tera Term 5のソースに対応
@@ -42,7 +42,16 @@ | ||
42 | 42 | #include <winsock.h> |
43 | 43 | #endif /* NO_INET6 */ |
44 | 44 | |
45 | -#include "compat_w95.h" | |
45 | +#if TT_VERSION_MAJOR < 5 | |
46 | + #include "compat_w95.h" | |
47 | + #define GetPrivateProfileIntAFileW GetPrivateProfileInt | |
48 | + typedef char *TTXIniFile; | |
49 | +#else | |
50 | + #include "compat_win.h" | |
51 | + #include "inifile_com.h" | |
52 | + #pragma comment(lib, "common_static.lib") | |
53 | + typedef const wchar_t *TTXIniFile; | |
54 | +#endif | |
46 | 55 | |
47 | 56 | #define INISECTION "TTXEject" |
48 | 57 |
@@ -106,9 +115,9 @@ static void PASCAL TTXInit(PTTSet ts, PComVar cv) { | ||
106 | 115 | pvar->origPWriteFile = NULL; |
107 | 116 | } |
108 | 117 | |
109 | -static void PASCAL TTXReadIniFile(PCHAR fn, PTTSet ts) { | |
118 | +static void PASCAL TTXReadIniFile(TTXIniFile fn, PTTSet ts) { | |
110 | 119 | (pvar->origReadIniFile)(fn, ts); |
111 | - pvar->Pin = GetPrivateProfileInt(INISECTION, "Pin", 0, fn); | |
120 | + pvar->Pin = GetPrivateProfileIntAFileW(INISECTION, "Pin", 0, fn); | |
112 | 121 | } |
113 | 122 | |
114 | 123 | static void PASCAL TTXGetSetupHooks(TTXSetupHooks *hooks) { |
@@ -314,7 +323,9 @@ BOOL WINAPI DllMain(HANDLE hInstance, | ||
314 | 323 | break; |
315 | 324 | case DLL_PROCESS_ATTACH: |
316 | 325 | /* do process initialization */ |
326 | +#if TT_VERSION_MAJOR < 5 | |
317 | 327 | DoCover_IsDebuggerPresent(); |
328 | +#endif | |
318 | 329 | hInst = hInstance; |
319 | 330 | pvar = &InstVar; |
320 | 331 | break; |