/////////////////////////////////////////////////////////////////////////////
-// Name: winpars.cpp
+// Name: src/html/winpars.cpp
// Purpose: wxHtmlParser class (generic parser)
// Author: Vaclav Slavik
// RCS-ID: $Id$
#include "wx/wxprec.h"
-#include "wx/defs.h"
-#if wxUSE_HTML && wxUSE_STREAMS
-
#ifdef __BORLANDC__
-#pragma hdrstop
+ #pragma hdrstop
#endif
+#if wxUSE_HTML && wxUSE_STREAMS
+
#ifndef WXPRECOMP
#include "wx/intl.h"
#include "wx/dc.h"
+ #include "wx/log.h"
+ #include "wx/settings.h"
#endif
#include "wx/html/htmldefs.h"
#include "wx/html/winpars.h"
#include "wx/html/htmlwin.h"
#include "wx/fontmap.h"
-#include "wx/log.h"
-#include "wx/settings.h"
#include "wx/uri.h"
m_tmpLastWasSpace = false;
m_lastWordCell = NULL;
+ // open the toplevel container that contains everything else and that
+ // is never closed (this makes parser's life easier):
OpenContainer();
+
+ // then open the first container into which page's content will go:
OpenContainer();
#if !wxUSE_UNICODE
else
{
#ifndef __WXMAC__
- // okay, let convert to ISO_8859-1, available always
+ // okay, let's convert to ISO_8859-1, available always
m_OutputEnc = wxFONTENCODING_DEFAULT;
#else
m_OutputEnc = wxLocale::GetSystemEncoding() ;
(m_OutputEnc == wxFONTENCODING_DEFAULT) ?
wxFONTENCODING_ISO8859_1 : m_OutputEnc,
wxCONVERT_SUBSTITUTE))
- { // total failture :-(
+ { // total failure :-(
wxLogError(_("Failed to display HTML document in %s encoding"),
wxFontMapper::GetEncodingName(enc).c_str());
m_InputEnc = m_OutputEnc = wxFONTENCODING_DEFAULT;
}
#endif
-