X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/27b2dd53f629a78266c51d1b0b5db918401dcd4f..4f433feff9251ded00bba26b633f93e660cd44c4:/src/msw/utils.cpp diff --git a/src/msw/utils.cpp b/src/msw/utils.cpp index ff93865781..d0a591dab4 100644 --- a/src/msw/utils.cpp +++ b/src/msw/utils.cpp @@ -40,6 +40,12 @@ #include "wx/msw/private.h" // includes #include "wx/msw/missing.h" // CHARSET_HANGUL +#if defined(__CYGWIN__) + //CYGWIN gives annoying warning about runtime stuff if we don't do this +# define USE_SYS_TYPES_FD_SET +# include +#endif + // Doesn't work with Cygwin at present #if wxUSE_SOCKETS && (defined(__GNUWIN32_OLD__) || defined(__WXWINCE__) || defined(__CYGWIN32__)) // apparently we need to include winsock.h to get WSADATA and other stuff @@ -390,7 +396,7 @@ const wxChar* wxGetHomeDir(wxString *pstr) strDir = windowsPath; #endif #elif defined(__WXWINCE__) - // Nothing + strDir = wxT("\\"); #else strDir.clear(); @@ -723,7 +729,7 @@ int wxKill(long pid, wxSignal sig, wxKillError *krc, int flags) params.pid = (DWORD)pid; // EnumWindows() has nice semantics: it returns 0 if it found - // something or if an error occured and non zero if it + // something or if an error occurred and non zero if it // enumerated all the window if ( !::EnumWindows(wxEnumFindByPidProc, (LPARAM)¶ms) ) { @@ -732,7 +738,7 @@ int wxKill(long pid, wxSignal sig, wxKillError *krc, int flags) { // tell the app to close // - // NB: this is the harshest way, the app won't have + // NB: this is the harshest way, the app won't have an // opportunity to save any files, for example, but // this is probably what we want here. If not we // can also use SendMesageTimeout(WM_CLOSE) @@ -1039,9 +1045,9 @@ wxMemorySize wxGetFreeMemory() { #if defined(__WIN64__) MEMORYSTATUSEX memStatex; - statex.dwLength = sizeof (statex); - ::GlobalMemoryStatusEx (&statex); - return (wxMemorySize)memStatus.ullAvailPhys; + memStatex.dwLength = sizeof (memStatex); + ::GlobalMemoryStatusEx (&memStatex); + return (wxMemorySize)memStatex.ullAvailPhys; #else /* if defined(__WIN32__) */ MEMORYSTATUS memStatus; memStatus.dwLength = sizeof(MEMORYSTATUS); @@ -1280,8 +1286,10 @@ extern WXDLLIMPEXP_BASE long wxEncodingToCharset(wxFontEncoding encoding) case wxFONTENCODING_CP936: return GB2312_CHARSET; +#ifndef __WXWINCE__ case wxFONTENCODING_CP949: return HANGUL_CHARSET; +#endif case wxFONTENCODING_CP950: return CHINESEBIG5_CHARSET; @@ -1374,7 +1382,7 @@ extern WXDLLIMPEXP_BASE long wxEncodingToCodepage(wxFontEncoding encoding) case wxFONTENCODING_CP1255: ret = 1255; break; case wxFONTENCODING_CP1256: ret = 1256; break; case wxFONTENCODING_CP1257: ret = 1257; break; - case wxFONTENCODING_EUC_JP: ret = 51932; break; + case wxFONTENCODING_EUC_JP: ret = 20932; break; case wxFONTENCODING_MACROMAN: ret = 10000; break; case wxFONTENCODING_MACJAPANESE: ret = 10001; break; case wxFONTENCODING_MACCHINESETRAD: ret = 10002; break; @@ -1410,7 +1418,7 @@ extern long wxCharsetToCodepage(const wxChar *name) if ( !name ) return -1; - wxFontEncoding enc = wxFontMapper::Get()->CharsetToEncoding(name, false); + wxFontEncoding enc = wxFontMapperBase::Get()->CharsetToEncoding(name, false); if ( enc == wxFONTENCODING_SYSTEM ) return -1; @@ -1470,7 +1478,7 @@ extern long wxCharsetToCodepage(const wxChar *name) Windows class unregistration). pclassname is a pointer to a caller stored classname, which must initially be - NULL. classname is the desired wndclass classname. If function succesfully + NULL. classname is the desired wndclass classname. If function successfully registers the class, pclassname will be set to classname. */ extern "C" WXDLLIMPEXP_BASE HWND