]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/fontenum.cpp
Cast needed to fix compilation on 10.4 --This line, and those below,
[wxWidgets.git] / src / os2 / fontenum.cpp
index fd03159a4786de1321a55847b27fc48f970b9364..fdb1f4af112f65411f7841fa77224c222d66913a 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        msw/fontenum.cpp
+// Name:        src/os2/fontenum.cpp
 // Purpose:     wxFontEnumerator class for Windows
 // Author:      Julian Smart
 // Modified by: David Webster to add support for font encodings
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
-    #pragma implementation "fontenum.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 #if wxUSE_FONTMAP
 
+#include "wx/fontenum.h"
+
 #ifndef WX_PRECOMP
-  #include "wx/font.h"
+    #include "wx/font.h"
 #endif
 
-#include "wx/fontenum.h"
 #include "wx/fontmap.h"
 #include "wx/encinfo.h"
 
@@ -123,7 +120,7 @@ void wxFontEnumeratorHelper::DoEnumerate()
 #ifdef __WIN32__
     LOGFONT lf;
     lf.lfCharSet = m_charset;
-    wxStrncpy(lf.lfFaceName, m_facename, WXSIZEOF(lf.lfFaceName));
+    wxStrlcpy(lf.lfFaceName, m_facename, WXSIZEOF(lf.lfFaceName));
     lf.lfPitchAndFamily = 0;
     ::EnumFontFamiliesEx(hDC, &lf, (wxFONTENUMPROC)wxFontEnumeratorProc,
                          (LPARAM)this, 0) ;