]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/htmltag.cpp
Now uses the version number when doing a cleandll
[wxWidgets.git] / src / html / htmltag.cpp
index 16e780335f0d50fbe380b56de8288e160650314f..65253c20aaf7389156a8fce8951872a2c570b516 100644 (file)
@@ -25,6 +25,7 @@
 #endif
 
 #include <wx/html/htmltag.h>
+#include <stdio.h> // for vsscanf
 #include <stdarg.h>
 
 
@@ -63,7 +64,7 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source)
                 i++;
             }
             dummy[i] = 0;
-            m_Cache[tg].Name = (char*) malloc(i+1);
+            m_Cache[tg].Name = new char[i+1];
             memcpy(m_Cache[tg].Name, dummy, i+1);
 
             while (src[pos] != '>') pos++;
@@ -88,7 +89,7 @@ wxHtmlTagsCache::wxHtmlTagsCache(const wxString& source)
 
     // ok, we're done, now we'll free .Name members of cache - we don't need it anymore:
     for (i = 0; i < m_CacheSize; i++) {
-        free(m_Cache[i].Name);
+        delete[] m_Cache[i].Name;
         m_Cache[i].Name = NULL;
     }
 }
@@ -226,7 +227,8 @@ void wxHtmlTag::ScanParam(const wxString& par, char *format, ...) const
 
     va_start(argptr, format);
 
-#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__VISUALC__)
+//#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__VISUALC__)
+#ifndef HAVE_VSSCANF
     sscanf((const char*)parval, format, va_arg(argptr, void *));
 #else
     vsscanf((const char*)parval, format, argptr);
@@ -245,4 +247,4 @@ void wxHtmlTag::ScanParam(const wxString& par, char *format, ...) const
     va_end(argptr);
 }
 
-#endif
\ No newline at end of file
+#endif