// Paint the background
         PaintBackground(dc);
 
-        wxRegion dirtyRegion = GetUpdateRegion();
-
         wxRect drawingArea(GetLogicalPoint(wxPoint(0, 0)), GetClientSize());
         wxRect availableSpace(GetClientSize());
         if (GetBuffer().GetDirty())
 
 
         *p++ = enc64[ (a >> 2) & 0x3f ];
 
-        if( in_len-- <= 0 )
+        if( in_len-- == 0 )
         {
             *p++ = enc64[ (a << 4 ) & 0x30 ];
             *p++ = '=';
 
         *p++ = enc64[(( a << 4 ) | ((b >> 4) &0xf )) & 0x3f];
 
-        if( in_len-- <= 0 )
+        if( in_len-- == 0 )
         {
             *p++ = enc64[ (b << 2) & 0x3f ];
             *p++ = '=';
 
 #pragma hdrstop
 #endif
 
+#if wxUSE_RICHTEXT
+
+#include "wx/richtext/richtextsymboldlg.h"
+
 #ifndef WX_PRECOMP
 #include "wx/wx.h"
 #endif
 #include "wx/dcbuffer.h"
 #include "wx/settings.h"
 
-#include "../../include/wx/richtext/richtextsymboldlg.h"
-
 ////@begin XPM images
 ////@end XPM images
 
 
     if (m_fontCtrl->GetCount() == 0)
     {
-        wxFontEnumerator enumerator;
-        enumerator.EnumerateFacenames();
-        wxArrayString faceNames = enumerator.GetFacenames();
+        wxArrayString faceNames = wxFontEnumerator::GetFacenames();
         faceNames.Sort();
 
         faceNames.Insert(_("(Normal text)"), 0);
         {
             // it is, indeed, only partly visible, so scroll it into view to
             // make it entirely visible
-            while ( (size_t)lineNo == GetLastVisibleLine() &&
-                    ScrollToLine(GetVisibleBegin()+1) ) ;
+            while ( unsigned(lineNo) == GetLastVisibleLine() &&
+                    ScrollToLine(GetVisibleBegin()+1) )
+                ;
 
             // but in any case refresh it as even if it was only partly visible
             // before we need to redraw it entirely as its background changed
 
     if (symbol >= m_minSymbolValue && symbol <= m_maxSymbolValue)
         return symbol;
-    else
+
     return -1;
 }
 
     return wxListBox::GetClassDefaultAttributes(variant);
 }
 
-
+#endif // wxUSE_RICHTEXT
 
             }
             last = i + 1;
         }
-        else if ((unsigned long)c > 127)
+        else if (wxUChar(c) > 127)
         {
             OutputString(stream, str.Mid(last, i - last), convMem, convFile);