|
|
| version 1.4, 2004/06/20 11:19:46 | version 1.5, 2005/02/12 12:14:00 |
|---|---|
| Line 1 | Line 1 |
| #include "compiler.h" | #include "compiler.h" |
| #include <stdarg.h> | #include <stdarg.h> |
| #include "strres.h" | #include "strres.h" |
| #if defined(UNICODE) && defined(OSLANG_UTF8) | |
| #include "codecnv.h" | |
| #endif | |
| #include "dosio.h" | #include "dosio.h" |
| #include "ini.h" | #include "ini.h" |
| Line 47 enum { | Line 50 enum { |
| IDM_TRACECL | IDM_TRACECL |
| }; | }; |
| static const TCHAR ProgTitle[] = STRLITERAL("console"); | static const TCHAR ProgTitle[] = _T("console"); |
| static const TCHAR ClassName[] = STRLITERAL("TRACE-console"); | static const TCHAR ClassName[] = _T("TRACE-console"); |
| static const TCHAR ClassEdit[] = STRLITERAL("EDIT"); | static const TCHAR ClassEdit[] = _T("EDIT"); |
| static const TCHAR viewfont[] = STRLITERAL(VIEW_TEXT); | static const TCHAR viewfont[] = _T(VIEW_TEXT); |
| static const TCHAR trace1[] = STRLITERAL("TRACE"); | static const TCHAR trace1[] = _T("TRACE"); |
| static const TCHAR trace2[] = STRLITERAL("VERBOSE"); | static const TCHAR trace2[] = _T("VERBOSE"); |
| static const TCHAR traceen[] = STRLITERAL("Enable"); | static const TCHAR traceen[] = _T("Enable"); |
| static const TCHAR tracefh[] = STRLITERAL("File out"); | static const TCHAR tracefh[] = _T("File out"); |
| static const TCHAR tracecl[] = STRLITERAL("Clear"); | static const TCHAR tracecl[] = _T("Clear"); |
| static const char crlf[] = "\r\n"; | static const char crlf[] = "\r\n"; |
| static TRACEWIN tracewin; | static TRACEWIN tracewin; |
| Line 98 static void View_AddString(const char *l | Line 101 static void View_AddString(const char *l |
| #if defined(UNICODE) && defined(OSLANG_SJIS) | #if defined(UNICODE) && defined(OSLANG_SJIS) |
| len = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, lpszString, -1, | len = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, lpszString, -1, |
| NULL, 0) - 1; | NULL, 0) - 1; |
| #elif defined(OSLANG_UTF8) | #elif defined(UNICODE) && defined(OSLANG_UTF8) |
| len = ucscnv_utf8toucs2(NULL, 0, lpszString, (UINT8)-1) - 1; | len = codecnv_utf8toucs2(NULL, 0, lpszString, (UINT8)-1) - 1; |
| #else | #else |
| len = strlen(lpszString); | len = strlen(lpszString); |
| #endif | #endif |
| Line 124 static void View_AddString(const char *l | Line 127 static void View_AddString(const char *l |
| p = szView + vlen; | p = szView + vlen; |
| #if defined(UNICODE) && defined(OSLANG_SJIS) | #if defined(UNICODE) && defined(OSLANG_SJIS) |
| MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, lpszString, -1, p, len + 1); | MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, lpszString, -1, p, len + 1); |
| #elif defined(OSLANG_UTF8) | #elif defined(UNICODE) && defined(OSLANG_UTF8) |
| ucscnv_utf8toucs2(p, len + 1, lpszString, (UINT8)-1); | codecnv_utf8toucs2(p, len + 1, lpszString, (UINT8)-1); |
| #else | #else |
| CopyMemory(p, lpszString, len); | CopyMemory(p, lpszString, len); |
| #endif | #endif |