X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad8dd67e0248959b813797894c4b928f7cd73b84..7198c3368055d88249a338eb33b21f051f674806:/src/os2/fontutil.cpp diff --git a/src/os2/fontutil.cpp b/src/os2/fontutil.cpp index e6d9b45d7f..088d4424f1 100644 --- a/src/os2/fontutil.cpp +++ b/src/os2/fontutil.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: msw/fontutil.cpp +// Name: src/msw/fontutil.cpp // Purpose: font-related helper functions for wxMSW // Author: Modified by David Webster for OS/2 // Modified by: @@ -55,7 +55,7 @@ bool wxNativeEncodingInfo::FromString( const wxString& rsStr ) { - wxStringTokenizer vTokenizer(rsStr, _T(";")); + wxStringTokenizer vTokenizer(rsStr, wxT(";")); wxString sEncid = vTokenizer.GetNextToken(); long lEnc; @@ -74,7 +74,7 @@ bool wxNativeEncodingInfo::FromString( const wxString& rsStr ) } else { - if ( wxSscanf(sTmp, _T("%u"), &charset) != 1 ) + if ( wxSscanf(sTmp, wxT("%u"), &charset) != 1 ) { // should be a number! return FALSE; @@ -87,11 +87,11 @@ wxString wxNativeEncodingInfo::ToString() const { wxString sStr; - sStr << (long)encoding << _T(';') << facename; + sStr << (long)encoding << wxT(';') << facename; if (charset != 850) { - sStr << _T(';') << charset; + sStr << wxT(';') << charset; } return sStr; } // end of wxNativeEncodingInfo::ToString @@ -103,7 +103,7 @@ wxString wxNativeEncodingInfo::ToString() const bool wxGetNativeFontEncoding( wxFontEncoding vEncoding, wxNativeEncodingInfo* pInfo ) { - wxCHECK_MSG(pInfo, FALSE, _T("bad pointer in wxGetNativeFontEncoding") ); + wxCHECK_MSG(pInfo, FALSE, wxT("bad pointer in wxGetNativeFontEncoding") ); if (vEncoding == wxFONTENCODING_DEFAULT) { vEncoding = wxFont::GetDefaultEncoding(); @@ -233,7 +233,7 @@ bool wxTestFontEncoding( const wxNativeEncodingInfo& rInfo ) vLogFont.fsFontUse = FATTR_FONTUSE_OUTLINE | // only outline fonts allowed FATTR_FONTUSE_TRANSFORMABLE; // may be transformed - wxStrncpy((wxChar*)vLogFont.szFacename, rInfo.facename.c_str(), WXSIZEOF(vLogFont.szFacename)); + wxStrlcpy((wxChar*)vLogFont.szFacename, rInfo.facename.c_str(), WXSIZEOF(vLogFont.szFacename)); if (!::GpiCreateLogFont( hPS ,NULL @@ -509,7 +509,7 @@ void wxOS2SelectMatchingFontByName( switch (pFont->GetWeight()) { default: - wxFAIL_MSG(_T("unknown font weight")); + wxFAIL_MSG(wxT("unknown font weight")); // fall through usWeightClass = FWEIGHT_DONT_CARE; break; @@ -549,7 +549,7 @@ void wxOS2SelectMatchingFontByName( break; } - wxStrncpy(zFontFaceName, sFaceName.c_str(), WXSIZEOF(zFontFaceName)); + wxStrlcpy(zFontFaceName, sFaceName.c_str(), WXSIZEOF(zFontFaceName)); nPointSize = pFont->GetPointSize(); //