OSDN Git Service

アプリケーションからの文字列をUTF-8として扱うよう変更。
authorsirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Sun, 18 Oct 2009 07:39:16 +0000 (07:39 +0000)
committersirakaba <sirakaba@9df91469-1e22-0410-86e7-ea8537beb833>
Sun, 18 Oct 2009 07:39:16 +0000 (07:39 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/tpi/tpi@64 9df91469-1e22-0410-86e7-ea8537beb833

src/plugin/calLibrary/calLibrary.cpp
src/plugin/cuiWrapper/cuiWrapper.cpp
src/plugin/spiLibrary/spiLibrary.cpp

index ba0d7dd..1d6a8d1 100644 (file)
@@ -518,7 +518,7 @@ int __stdcall CheckArchive
 \r
        if (! (g_LibInfo.fUnicode\r
                ? ((BOOL (__stdcall *)(const wchar_t *, const int)) fpProc)(_szArcName.wchar_str(), 0)\r
-               : ((BOOL (__stdcall *)(const char    *, const int)) fpProc)(g_fExistUnicodeMode ? _szArcName.ToUTF8() : _szArcName.char_str(),  0)\r
+               : ((BOOL (__stdcall *)(const char    *, const int)) fpProc)(_szArcName.ToUTF8(),    0)\r
        ))\r
        {\r
                return TPI_ERROR_D_UNSUPPORTED;\r
@@ -534,7 +534,7 @@ int __stdcall CheckArchive
 \r
                * _nFileCount = g_LibInfo.fUnicode\r
                        ? ((int (__stdcall *)(const wchar_t *)) fpProc)(_szArcName.wchar_str())\r
-                       : ((int (__stdcall *)(const char *)) fpProc)(g_fExistUnicodeMode ? _szArcName.ToUTF8() : _szArcName.char_str());\r
+                       : ((int (__stdcall *)(const char *)) fpProc)(_szArcName.ToUTF8());\r
                if (* _nFileCount == -1)\r
                {\r
                        return TPI_ERROR_ARC_UNSUPPORTED;\r
@@ -558,7 +558,7 @@ int __stdcall OpenArchive
 \r
        * _hArchive = g_LibInfo.fUnicode\r
                ? ((void * (__stdcall *)(const HWND, const wchar_t *, const DWORD)) fpProc)(NULL, _szArcName.wchar_str(), 0)\r
-               : ((void * (__stdcall *)(const HWND, const char    *, const DWORD)) fpProc)(NULL, g_fExistUnicodeMode ? _szArcName.ToUTF8() : _szArcName.char_str(),  0);\r
+               : ((void * (__stdcall *)(const HWND, const char    *, const DWORD)) fpProc)(NULL, _szArcName.ToUTF8(),  0);\r
        return _hArchive == NULL ? TPI_ERROR_UNDEFINED : TPI_ERROR_SUCCESS;\r
 }\r
 \r
@@ -846,7 +846,7 @@ int __stdcall Command
        else\r
        {\r
                char szTmpOut[2049];\r
-               nErrorCode = ((int (__stdcall *)(const HWND, const char *, char *, DWORD)) fpProc)(NULL, g_fExistUnicodeMode ? szCommandLineSend.ToUTF8() : szCommandLineSend.char_str(), szTmpOut, 2048);\r
+               nErrorCode = ((int (__stdcall *)(const HWND, const char *, char *, DWORD)) fpProc)(NULL, szCommandLineSend.ToUTF8(), szTmpOut, 2048);\r
                szOutput = UTF82String(szTmpOut);\r
        }\r
 \r
index f11a2a8..e628602 100644 (file)
@@ -68,7 +68,7 @@ DWORD myExecute(wxString szCommandLine, wxString * szOutput, wxString szCwd, boo
 #ifdef __LINUX__\r
        wxString sz = ::wxGetCwd();\r
        ::wxSetWorkingDirectory(szCwd);\r
-       FILE * fp = popen(szCommandLine.char_str(), "r");\r
+       FILE * fp = popen(szCommandLine.ToUTF8(), "r");\r
        ::wxSetWorkingDirectory(sz);\r
        if (fp == NULL)\r
        {\r
index 90cd098..250b6f3 100644 (file)
@@ -161,7 +161,7 @@ int __stdcall LoadPlugin
        {\r
                // SPI\82ð\83\8d\81[\83h\81B\r
                wxString szLibName = szSPIPath + szSPIName;\r
-               g_hLib = ::LoadLibraryA(szLibName.char_str());\r
+               g_hLib = ::LoadLibraryA(szLibName.ToUTF8());\r
                if (g_hLib == NULL)\r
                {\r
                        b = fs.GetNext(& szSPIName);\r
@@ -227,7 +227,7 @@ int __stdcall CheckArchive
                return TPI_ERROR_IO_ARC_READ;\r
        }\r
 \r
-       if (! ((BOOL (PASCAL *)(const char *, unsigned long)) fpProc)(_szArcName.char_str(), (unsigned long) buffer))\r
+       if (! ((BOOL (PASCAL *)(const char *, unsigned long)) fpProc)(_szArcName.ToUTF8(), (unsigned long) buffer))\r
        {\r
                hFile.Close();\r
                return TPI_ERROR_D_UNSUPPORTED;\r
@@ -241,7 +241,7 @@ int __stdcall CheckArchive
        }\r
 \r
        HLOCAL hMemory;\r
-       int nReturnCode = SpiErrorCodeConvert(((int (PASCAL *)(const char *, long, unsigned int, HLOCAL *)) fpProc)(_szArcName.char_str(), 0, 0, & hMemory));\r
+       int nReturnCode = SpiErrorCodeConvert(((int (PASCAL *)(const char *, long, unsigned int, HLOCAL *)) fpProc)(_szArcName.ToUTF8(), 0, 0, & hMemory));\r
        if (nReturnCode == TPI_ERROR_SUCCESS)\r
        {\r
                if (_nFileCount != NULL)\r
@@ -266,7 +266,7 @@ int __stdcall OpenArchive
                return TPI_ERROR_U_USE_LIBRARY;\r
        }\r
 \r
-       int nReturnCode = SpiErrorCodeConvert(((int (PASCAL *)(const char *, long, unsigned int, HLOCAL *)) fpProc)(_szArcName.char_str(), 0, 0, _hArchive));\r
+       int nReturnCode = SpiErrorCodeConvert(((int (PASCAL *)(const char *, long, unsigned int, HLOCAL *)) fpProc)(_szArcName.ToUTF8(), 0, 0, _hArchive));\r
        if (nReturnCode != TPI_ERROR_SUCCESS)\r
        {\r
                return nReturnCode;\r
@@ -439,7 +439,7 @@ int __stdcall Command
 \r
                        // \83t\83@\83C\83\8b\8fo\97Í\82É\82Í\91Î\89\9e\82µ\82Ä\82È\82¢\82Ì\82Å\83\81\83\82\83\8a\8fo\97Í\82Å\91ã\8ds\81B\r
                        HLOCAL hMemory = NULL;\r
-                       nResult = SpiErrorCodeConvert(((int (PASCAL *)(char *, long, char *, unsigned int, FARPROC, long)) fpProc)(_szArcName.char_str(), (long) fiInfo.pCustomInfo, (char *) & hMemory, 0x0100, (FARPROC) CallbackProc, (long) & fiInfo.fnFileName));\r
+                       nResult = SpiErrorCodeConvert(((int (PASCAL *)(char *, long, char *, unsigned int, FARPROC, long)) fpProc)(_szArcName.ToUTF8(), (long) fiInfo.pCustomInfo, (char *) & hMemory, 0x0100, (FARPROC) CallbackProc, (long) & fiInfo.fnFileName));\r
                        if (nResult == TPI_ERROR_SUCCESS && hMemory == NULL)\r
                        {\r
                                nResult = TPI_ERROR_UNDEFINED;\r