#include "wx/html/htmltag.h"
-#ifndef WXPRECOMP
+#ifndef WX_PRECOMP
#include "wx/colour.h"
+ #include "wx/wxcrtvararg.h"
#endif
#include "wx/html/htmlpars.h"
#include <stdio.h> // for vsscanf
#include <stdarg.h>
-
//-----------------------------------------------------------------------------
// wxHtmlTagsCache
//-----------------------------------------------------------------------------
m_CacheSize = 0;
m_CachePos = 0;
- int pos = 0;
- while (pos < lng)
+ for ( int pos = 0; pos < lng; pos++ )
{
if (src[pos] == wxT('<')) // tag found:
{
+ // don't cache comment tags
+ wxString::const_iterator iter = source.begin() + pos;
+ if ( wxHtmlParser::SkipCommentTag(iter, source.end()) )
+ {
+ pos = iter - source.begin();
+ continue;
+ }
+
if (m_CacheSize % CACHE_INCREMENT == 0)
m_Cache = (wxHtmlCacheItem*) realloc(m_Cache, (m_CacheSize + CACHE_INCREMENT) * sizeof(wxHtmlCacheItem));
int tg = m_CacheSize++;
}
}
}
-
- pos++;
}
// ok, we're done, now we'll free .Name members of cache - we don't need it anymore:
}
int wxHtmlTag::ScanParam(const wxString& par,
- const wxChar *format,
+ const char *format,
+ void *param) const
+{
+ wxString parval = GetParam(par);
+ return wxSscanf(parval, format, param);
+}
+
+int wxHtmlTag::ScanParam(const wxString& par,
+ const wchar_t *format,
void *param) const
{
wxString parval = GetParam(par);