$(CXXFLAGS)
BENCH_OBJECTS = \
bench_bench.o \
+ bench_htmlpars.o \
+ bench_htmltag.o \
bench_strings.o \
bench_tls.o
### Targets: ###
-all: bench$(EXEEXT)
+all: bench$(EXEEXT) data
install: all
$(__bench___mac_setfilecmd)
$(SAMPLES_RPATH_POSTLINK)
+data:
+ @mkdir -p .
+ @for f in htmltest.html; do \
+ if test ! -f ./$$f -a ! -d ./$$f ; \
+ then x=yep ; \
+ else x=`find $(srcdir)/$$f -newer ./$$f -print` ; \
+ fi; \
+ case "$$x" in ?*) \
+ cp -pRf $(srcdir)/$$f . ;; \
+ esac; \
+ done
+
bench_bench.o: $(srcdir)/bench.cpp
$(CXXC) -c -o $@ $(BENCH_CXXFLAGS) $(srcdir)/bench.cpp
+bench_htmlpars.o: $(srcdir)/htmlparser/htmlpars.cpp
+ $(CXXC) -c -o $@ $(BENCH_CXXFLAGS) $(srcdir)/htmlparser/htmlpars.cpp
+
+bench_htmltag.o: $(srcdir)/htmlparser/htmltag.cpp
+ $(CXXC) -c -o $@ $(BENCH_CXXFLAGS) $(srcdir)/htmlparser/htmltag.cpp
+
bench_strings.o: $(srcdir)/strings.cpp
$(CXXC) -c -o $@ $(BENCH_CXXFLAGS) $(srcdir)/strings.cpp
# Include dependency info, if present:
@IF_GNU_MAKE@-include .deps/*.d
-.PHONY: all install uninstall clean distclean
+.PHONY: all install uninstall clean distclean data
template_append="wx_append_base">
<sources>
bench.cpp
+ htmlparser/htmlpars.cpp
+ htmlparser/htmltag.cpp
strings.cpp
tls.cpp
</sources>
<wx-lib>base</wx-lib>
</exe>
+ <wx-data id="data">
+ <files>htmltest.html</files>
+ </wx-data>
+
<!-- this is unused yet
<exe id="bench_gui" template="wx_sample,wx_bench"
template_append="wx_append"
\r
# PROP BASE Use_MFC 0\r
# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "vc_mswunivudll"\r
-# PROP BASE Intermediate_Dir "vc_mswunivudll\bench"\r
+# PROP BASE Output_Dir "vc6_mswunivudll"\r
+# PROP BASE Intermediate_Dir "vc6_mswunivudll\bench"\r
# PROP BASE Target_Dir ""\r
# PROP Use_MFC 0\r
# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "vc_mswunivudll"\r
-# PROP Intermediate_Dir "vc_mswunivudll\bench"\r
+# PROP Output_Dir "vc6_mswunivudll"\r
+# PROP Intermediate_Dir "vc6_mswunivudll\bench"\r
# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswunivudll\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswunivudll\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
-# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc6_mswunivudll\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc6_dll\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MD /Zi /Fdvc6_mswunivudll\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc6_dll\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc6_dll\mswunivu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc6_dll\mswunivu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
BSC32=bscmake.exe\r
# ADD BASE BSC32 /nologo\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
-# ADD BASE LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivudll\bench.exe" /debug /pdb:"vc_mswunivudll\bench.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-# ADD LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivudll\bench.exe" /debug /pdb:"vc_mswunivudll\bench.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+# ADD BASE LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswunivudll\bench.exe" /debug /pdb:"vc6_mswunivudll\bench.pdb" /libpath:".\..\..\lib\vc6_dll" /subsystem:console\r
+# ADD LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswunivudll\bench.exe" /debug /pdb:"vc6_mswunivudll\bench.pdb" /libpath:".\..\..\lib\vc6_dll" /subsystem:console\r
\r
!ELSEIF "$(CFG)" == "bench - Win32 DLL Universal Debug"\r
\r
# PROP BASE Use_MFC 0\r
# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "vc_mswunivuddll"\r
-# PROP BASE Intermediate_Dir "vc_mswunivuddll\bench"\r
+# PROP BASE Output_Dir "vc6_mswunivuddll"\r
+# PROP BASE Intermediate_Dir "vc6_mswunivuddll\bench"\r
# PROP BASE Target_Dir ""\r
# PROP Use_MFC 0\r
# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "vc_mswunivuddll"\r
-# PROP Intermediate_Dir "vc_mswunivuddll\bench"\r
+# PROP Output_Dir "vc6_mswunivuddll"\r
+# PROP Intermediate_Dir "vc6_mswunivuddll\bench"\r
# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswunivuddll\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswunivuddll\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
-# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswunivud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc6_mswunivuddll\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc6_dll\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Fdvc6_mswunivuddll\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc6_dll\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc6_dll\mswunivud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc6_dll\mswunivud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
BSC32=bscmake.exe\r
# ADD BASE BSC32 /nologo\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
-# ADD BASE LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\bench.exe" /debug /pdb:"vc_mswunivuddll\bench.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-# ADD LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\bench.exe" /debug /pdb:"vc_mswunivuddll\bench.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+# ADD BASE LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswunivuddll\bench.exe" /debug /pdb:"vc6_mswunivuddll\bench.pdb" /libpath:".\..\..\lib\vc6_dll" /subsystem:console\r
+# ADD LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswunivuddll\bench.exe" /debug /pdb:"vc6_mswunivuddll\bench.pdb" /libpath:".\..\..\lib\vc6_dll" /subsystem:console\r
\r
!ELSEIF "$(CFG)" == "bench - Win32 DLL Release"\r
\r
# PROP BASE Use_MFC 0\r
# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "vc_mswudll"\r
-# PROP BASE Intermediate_Dir "vc_mswudll\bench"\r
+# PROP BASE Output_Dir "vc6_mswudll"\r
+# PROP BASE Intermediate_Dir "vc6_mswudll\bench"\r
# PROP BASE Target_Dir ""\r
# PROP Use_MFC 0\r
# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "vc_mswudll"\r
-# PROP Intermediate_Dir "vc_mswudll\bench"\r
+# PROP Output_Dir "vc6_mswudll"\r
+# PROP Intermediate_Dir "vc6_mswudll\bench"\r
# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswudll\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswudll\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_dll\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
-# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc6_mswudll\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc6_dll\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MD /Zi /Fdvc6_mswudll\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc6_dll\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc6_dll\mswu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc6_dll\mswu" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
BSC32=bscmake.exe\r
# ADD BASE BSC32 /nologo\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
-# ADD BASE LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswudll\bench.exe" /debug /pdb:"vc_mswudll\bench.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-# ADD LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswudll\bench.exe" /debug /pdb:"vc_mswudll\bench.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+# ADD BASE LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswudll\bench.exe" /debug /pdb:"vc6_mswudll\bench.pdb" /libpath:".\..\..\lib\vc6_dll" /subsystem:console\r
+# ADD LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswudll\bench.exe" /debug /pdb:"vc6_mswudll\bench.pdb" /libpath:".\..\..\lib\vc6_dll" /subsystem:console\r
\r
!ELSEIF "$(CFG)" == "bench - Win32 DLL Debug"\r
\r
# PROP BASE Use_MFC 0\r
# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "vc_mswuddll"\r
-# PROP BASE Intermediate_Dir "vc_mswuddll\bench"\r
+# PROP BASE Output_Dir "vc6_mswuddll"\r
+# PROP BASE Intermediate_Dir "vc6_mswuddll\bench"\r
# PROP BASE Target_Dir ""\r
# PROP Use_MFC 0\r
# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "vc_mswuddll"\r
-# PROP Intermediate_Dir "vc_mswuddll\bench"\r
+# PROP Output_Dir "vc6_mswuddll"\r
+# PROP Intermediate_Dir "vc6_mswuddll\bench"\r
# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswuddll\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswuddll\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_dll\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
-# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_dll\mswud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc6_mswuddll\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc6_dll\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Fdvc6_mswuddll\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc6_dll\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc6_dll\mswud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc6_dll\mswud" /i ".\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0\r
BSC32=bscmake.exe\r
# ADD BASE BSC32 /nologo\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
-# ADD BASE LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswuddll\bench.exe" /debug /pdb:"vc_mswuddll\bench.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-# ADD LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswuddll\bench.exe" /debug /pdb:"vc_mswuddll\bench.pdb" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
+# ADD BASE LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswuddll\bench.exe" /debug /pdb:"vc6_mswuddll\bench.pdb" /libpath:".\..\..\lib\vc6_dll" /subsystem:console\r
+# ADD LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswuddll\bench.exe" /debug /pdb:"vc6_mswuddll\bench.pdb" /libpath:".\..\..\lib\vc6_dll" /subsystem:console\r
\r
!ELSEIF "$(CFG)" == "bench - Win32 Universal Release"\r
\r
# PROP BASE Use_MFC 0\r
# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "vc_mswunivu"\r
-# PROP BASE Intermediate_Dir "vc_mswunivu\bench"\r
+# PROP BASE Output_Dir "vc6_mswunivu"\r
+# PROP BASE Intermediate_Dir "vc6_mswunivu\bench"\r
# PROP BASE Target_Dir ""\r
# PROP Use_MFC 0\r
# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "vc_mswunivu"\r
-# PROP Intermediate_Dir "vc_mswunivu\bench"\r
+# PROP Output_Dir "vc6_mswunivu"\r
+# PROP Intermediate_Dir "vc6_mswunivu\bench"\r
# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswunivu\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswunivu\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
-# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc6_mswunivu\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc6_lib\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MD /Zi /Fdvc6_mswunivu\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc6_lib\mswunivu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc6_lib\mswunivu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\lib\vc6_lib\mswunivu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
BSC32=bscmake.exe\r
# ADD BASE BSC32 /nologo\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
-# ADD BASE LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivu\bench.exe" /debug /pdb:"vc_mswunivu\bench.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-# ADD LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivu\bench.exe" /debug /pdb:"vc_mswunivu\bench.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+# ADD BASE LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswunivu\bench.exe" /debug /pdb:"vc6_mswunivu\bench.pdb" /libpath:".\..\..\lib\vc6_lib" /subsystem:console\r
+# ADD LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswunivu\bench.exe" /debug /pdb:"vc6_mswunivu\bench.pdb" /libpath:".\..\..\lib\vc6_lib" /subsystem:console\r
\r
!ELSEIF "$(CFG)" == "bench - Win32 Universal Debug"\r
\r
# PROP BASE Use_MFC 0\r
# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "vc_mswunivud"\r
-# PROP BASE Intermediate_Dir "vc_mswunivud\bench"\r
+# PROP BASE Output_Dir "vc6_mswunivud"\r
+# PROP BASE Intermediate_Dir "vc6_mswunivud\bench"\r
# PROP BASE Target_Dir ""\r
# PROP Use_MFC 0\r
# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "vc_mswunivud"\r
-# PROP Intermediate_Dir "vc_mswunivud\bench"\r
+# PROP Output_Dir "vc6_mswunivud"\r
+# PROP Intermediate_Dir "vc6_mswunivud\bench"\r
# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswunivud\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswunivud\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
-# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswunivud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc6_mswunivud\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc6_lib\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Fdvc6_mswunivud\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc6_lib\mswunivud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc6_lib\mswunivud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc6_lib\mswunivud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
BSC32=bscmake.exe\r
# ADD BASE BSC32 /nologo\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
-# ADD BASE LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivud\bench.exe" /debug /pdb:"vc_mswunivud\bench.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-# ADD LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivud\bench.exe" /debug /pdb:"vc_mswunivud\bench.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+# ADD BASE LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswunivud\bench.exe" /debug /pdb:"vc6_mswunivud\bench.pdb" /libpath:".\..\..\lib\vc6_lib" /subsystem:console\r
+# ADD LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswunivud\bench.exe" /debug /pdb:"vc6_mswunivud\bench.pdb" /libpath:".\..\..\lib\vc6_lib" /subsystem:console\r
\r
!ELSEIF "$(CFG)" == "bench - Win32 Release"\r
\r
# PROP BASE Use_MFC 0\r
# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "vc_mswu"\r
-# PROP BASE Intermediate_Dir "vc_mswu\bench"\r
+# PROP BASE Output_Dir "vc6_mswu"\r
+# PROP BASE Intermediate_Dir "vc6_mswu\bench"\r
# PROP BASE Target_Dir ""\r
# PROP Use_MFC 0\r
# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "vc_mswu"\r
-# PROP Intermediate_Dir "vc_mswu\bench"\r
+# PROP Output_Dir "vc6_mswu"\r
+# PROP Intermediate_Dir "vc6_mswu\bench"\r
# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswu\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswu\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc_lib\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
-# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc6_mswu\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc6_lib\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MD /Zi /Fdvc6_mswu\bench.pdb /O2 /GR /EHsc /I ".\..\..\lib\vc6_lib\mswu" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc6_lib\mswu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\lib\vc6_lib\mswu" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
BSC32=bscmake.exe\r
# ADD BASE BSC32 /nologo\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
-# ADD BASE LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswu\bench.exe" /debug /pdb:"vc_mswu\bench.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-# ADD LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswu\bench.exe" /debug /pdb:"vc_mswu\bench.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+# ADD BASE LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswu\bench.exe" /debug /pdb:"vc6_mswu\bench.pdb" /libpath:".\..\..\lib\vc6_lib" /subsystem:console\r
+# ADD LINK32 wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswu\bench.exe" /debug /pdb:"vc6_mswu\bench.pdb" /libpath:".\..\..\lib\vc6_lib" /subsystem:console\r
\r
!ELSEIF "$(CFG)" == "bench - Win32 Debug"\r
\r
# PROP BASE Use_MFC 0\r
# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "vc_mswud"\r
-# PROP BASE Intermediate_Dir "vc_mswud\bench"\r
+# PROP BASE Output_Dir "vc6_mswud"\r
+# PROP BASE Intermediate_Dir "vc6_mswud\bench"\r
# PROP BASE Target_Dir ""\r
# PROP Use_MFC 0\r
# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "vc_mswud"\r
-# PROP Intermediate_Dir "vc_mswud\bench"\r
+# PROP Output_Dir "vc6_mswud"\r
+# PROP Intermediate_Dir "vc6_mswud\bench"\r
# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswud\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswud\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc_lib\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
-# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
-# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc_lib\mswud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc6_mswud\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc6_lib\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD CPP /nologo /FD /MDd /Zi /Fdvc6_mswud\bench.pdb /Od /Gm /GR /EHsc /I ".\..\..\lib\vc6_lib\mswud" /I ".\..\..\include" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /D wxUSE_GUI=0 /c\r
+# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc6_lib\mswud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
+# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\lib\vc6_lib\mswud" /i ".\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0\r
BSC32=bscmake.exe\r
# ADD BASE BSC32 /nologo\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
-# ADD BASE LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswud\bench.exe" /debug /pdb:"vc_mswud\bench.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-# ADD LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswud\bench.exe" /debug /pdb:"vc_mswud\bench.pdb" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
+# ADD BASE LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswud\bench.exe" /debug /pdb:"vc6_mswud\bench.pdb" /libpath:".\..\..\lib\vc6_lib" /subsystem:console\r
+# ADD LINK32 wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc6_mswud\bench.exe" /debug /pdb:"vc6_mswud\bench.pdb" /libpath:".\..\..\lib\vc6_lib" /subsystem:console\r
\r
!ENDIF\r
\r
# End Source File\r
# Begin Source File\r
\r
+SOURCE=.\htmlparser\htmlpars.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\htmlparser\htmltag.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
SOURCE=.\strings.cpp\r
# End Source File\r
# Begin Source File\r
-Microsoft Visual Studio Solution File, Format Version 9.00\r
-# Visual Studio 2005\r
+Microsoft Visual Studio Solution File, Format Version 8.00\r
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bench", "bench.vcproj", "{205F8D16-BA71-560B-A3DF-7A2A93B16CF6}"\r
EndProject\r
Global\r
-->\r
<VisualStudioProject\r
ProjectType="Visual C++"\r
- Version="8.00"\r
+ Version="7.10"\r
Name="bench"\r
- ProjectGUID="{205F8D16-BA71-560B-A3DF-7A2A93B16CF6}"\r
- >\r
+ ProjectGUID="{205F8D16-BA71-560B-A3DF-7A2A93B16CF6}">\r
<Platforms>\r
<Platform\r
- Name="Win32"\r
- />\r
+ Name="Win32"/>\r
</Platforms>\r
- <ToolFiles>\r
- \r
- </ToolFiles>\r
<Configurations>\r
<Configuration\r
Name="DLL Universal Release|Win32"\r
- OutputDirectory="vc_mswunivudll"\r
- IntermediateDirectory="vc_mswunivudll\bench"\r
+ OutputDirectory="vc7_mswunivudll"\r
+ IntermediateDirectory="vc7_mswunivudll\bench"\r
ConfigurationType="1"\r
UseOfMFC="0"\r
ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
+ CharacterSet="1">\r
<Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
+ Name="VCPreBuildEventTool"/>\r
<Tool\r
- Name="VCCustomBuildTool"\r
- />\r
+ Name="VCCustomBuildTool"/>\r
<Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
+ Name="VCXMLDataGeneratorTool"/>\r
<Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
+ Name="VCWebServiceProxyGeneratorTool"/>\r
<Tool\r
- Name="VCIDLTool"\r
- />\r
+ Name="VCIDLTool"/>\r
<Tool\r
Name="VCCLCompilerTool"\r
Optimization="2"\r
InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivu;.\..\..\include;."\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_dll\mswunivu;.\..\..\include;."\r
MinimalRebuild="false"\r
ExceptionHandling="1"\r
AdditionalOptions=""\r
DebugInformationFormat="3"\r
Detect64BitPortabilityProblems="true"\r
RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivudll\bench\"\r
- ObjectFile="vc_mswunivudll\bench\"\r
- ProgramDataBaseFileName="vc_mswunivudll\bench.pdb"\r
+ AssemblerListingLocation="vc7_mswunivudll\bench\"\r
+ ObjectFile="vc7_mswunivudll\bench\"\r
+ ProgramDataBaseFileName="vc7_mswunivudll\bench.pdb"\r
WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
+ Name="VCManagedResourceCompilerTool"/>\r
<Tool\r
Name="VCResourceCompilerTool"\r
Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivu;.\..\..\include;."\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"\r
- />\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_dll\mswunivu;.\..\..\include;."\r
+ PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"/>\r
<Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
+ Name="VCPreLinkEventTool"/>\r
<Tool\r
Name="VCLinkerTool"\r
AdditionalDependencies="wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib"\r
AdditionalOptions=""\r
- OutputFile="vc_mswunivudll\bench.exe"\r
+ OutputFile="vc7_mswunivudll\bench.exe"\r
LinkIncremental="2"\r
SubSystem="1"\r
SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
+ AdditionalLibraryDirectories=".\..\..\lib\vc7_dll"\r
GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivudll\bench.pdb"\r
- TargetMachine="1"\r
- />\r
+ ProgramDatabaseFile="vc7_mswunivudll\bench.pdb"\r
+ TargetMachine="1"/>\r
<Tool\r
- Name="VCALinkTool"\r
- />\r
+ Name="VCALinkTool"/>\r
<Tool\r
- Name="VCXDCMakeTool"\r
- />\r
+ Name="VCXDCMakeTool"/>\r
<Tool\r
Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivudll\bench.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
+ OutputFile="vc7_mswunivudll\bench.bsc"\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCFxCopTool"\r
- />\r
+ Name="VCFxCopTool"/>\r
<Tool\r
- Name="VCAppVerifierTool"\r
- />\r
+ Name="VCAppVerifierTool"/>\r
<Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
+ Name="VCWebDeploymentTool"/>\r
<Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
+ Name="VCPostBuildEventTool"/>\r
</Configuration>\r
<Configuration\r
Name="DLL Universal Debug|Win32"\r
- OutputDirectory="vc_mswunivuddll"\r
- IntermediateDirectory="vc_mswunivuddll\bench"\r
+ OutputDirectory="vc7_mswunivuddll"\r
+ IntermediateDirectory="vc7_mswunivuddll\bench"\r
ConfigurationType="1"\r
UseOfMFC="0"\r
ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
+ CharacterSet="1">\r
<Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
+ Name="VCPreBuildEventTool"/>\r
<Tool\r
- Name="VCCustomBuildTool"\r
- />\r
+ Name="VCCustomBuildTool"/>\r
<Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
+ Name="VCXMLDataGeneratorTool"/>\r
<Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
+ Name="VCWebServiceProxyGeneratorTool"/>\r
<Tool\r
- Name="VCIDLTool"\r
- />\r
+ Name="VCIDLTool"/>\r
<Tool\r
Name="VCCLCompilerTool"\r
Optimization="0"\r
InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivud;.\..\..\include;."\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_dll\mswunivud;.\..\..\include;."\r
MinimalRebuild="true"\r
ExceptionHandling="1"\r
AdditionalOptions=""\r
DebugInformationFormat="3"\r
Detect64BitPortabilityProblems="true"\r
RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivuddll\bench\"\r
- ObjectFile="vc_mswunivuddll\bench\"\r
- ProgramDataBaseFileName="vc_mswunivuddll\bench.pdb"\r
+ AssemblerListingLocation="vc7_mswunivuddll\bench\"\r
+ ObjectFile="vc7_mswunivuddll\bench\"\r
+ ProgramDataBaseFileName="vc7_mswunivuddll\bench.pdb"\r
WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
+ Name="VCManagedResourceCompilerTool"/>\r
<Tool\r
Name="VCResourceCompilerTool"\r
Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswunivud;.\..\..\include;."\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"\r
- />\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_dll\mswunivud;.\..\..\include;."\r
+ PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"/>\r
<Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
+ Name="VCPreLinkEventTool"/>\r
<Tool\r
Name="VCLinkerTool"\r
AdditionalDependencies="wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib"\r
AdditionalOptions=""\r
- OutputFile="vc_mswunivuddll\bench.exe"\r
+ OutputFile="vc7_mswunivuddll\bench.exe"\r
LinkIncremental="2"\r
SubSystem="1"\r
SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
+ AdditionalLibraryDirectories=".\..\..\lib\vc7_dll"\r
GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivuddll\bench.pdb"\r
- TargetMachine="1"\r
- />\r
+ ProgramDatabaseFile="vc7_mswunivuddll\bench.pdb"\r
+ TargetMachine="1"/>\r
<Tool\r
- Name="VCALinkTool"\r
- />\r
+ Name="VCALinkTool"/>\r
<Tool\r
- Name="VCXDCMakeTool"\r
- />\r
+ Name="VCXDCMakeTool"/>\r
<Tool\r
Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivuddll\bench.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
+ OutputFile="vc7_mswunivuddll\bench.bsc"\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCFxCopTool"\r
- />\r
+ Name="VCFxCopTool"/>\r
<Tool\r
- Name="VCAppVerifierTool"\r
- />\r
+ Name="VCAppVerifierTool"/>\r
<Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
+ Name="VCWebDeploymentTool"/>\r
<Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
+ Name="VCPostBuildEventTool"/>\r
</Configuration>\r
<Configuration\r
Name="DLL Release|Win32"\r
- OutputDirectory="vc_mswudll"\r
- IntermediateDirectory="vc_mswudll\bench"\r
+ OutputDirectory="vc7_mswudll"\r
+ IntermediateDirectory="vc7_mswudll\bench"\r
ConfigurationType="1"\r
UseOfMFC="0"\r
ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
+ CharacterSet="1">\r
<Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
+ Name="VCPreBuildEventTool"/>\r
<Tool\r
- Name="VCCustomBuildTool"\r
- />\r
+ Name="VCCustomBuildTool"/>\r
<Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
+ Name="VCXMLDataGeneratorTool"/>\r
<Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
+ Name="VCWebServiceProxyGeneratorTool"/>\r
<Tool\r
- Name="VCIDLTool"\r
- />\r
+ Name="VCIDLTool"/>\r
<Tool\r
Name="VCCLCompilerTool"\r
Optimization="2"\r
InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswu;.\..\..\include;."\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_dll\mswu;.\..\..\include;."\r
MinimalRebuild="false"\r
ExceptionHandling="1"\r
AdditionalOptions=""\r
DebugInformationFormat="3"\r
Detect64BitPortabilityProblems="true"\r
RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswudll\bench\"\r
- ObjectFile="vc_mswudll\bench\"\r
- ProgramDataBaseFileName="vc_mswudll\bench.pdb"\r
+ AssemblerListingLocation="vc7_mswudll\bench\"\r
+ ObjectFile="vc7_mswudll\bench\"\r
+ ProgramDataBaseFileName="vc7_mswudll\bench.pdb"\r
WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
+ Name="VCManagedResourceCompilerTool"/>\r
<Tool\r
Name="VCResourceCompilerTool"\r
Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswu;.\..\..\include;."\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"\r
- />\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_dll\mswu;.\..\..\include;."\r
+ PreprocessorDefinitions="__WXMSW__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"/>\r
<Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
+ Name="VCPreLinkEventTool"/>\r
<Tool\r
Name="VCLinkerTool"\r
AdditionalDependencies="wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib"\r
AdditionalOptions=""\r
- OutputFile="vc_mswudll\bench.exe"\r
+ OutputFile="vc7_mswudll\bench.exe"\r
LinkIncremental="2"\r
SubSystem="1"\r
SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
+ AdditionalLibraryDirectories=".\..\..\lib\vc7_dll"\r
GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswudll\bench.pdb"\r
- TargetMachine="1"\r
- />\r
+ ProgramDatabaseFile="vc7_mswudll\bench.pdb"\r
+ TargetMachine="1"/>\r
<Tool\r
- Name="VCALinkTool"\r
- />\r
+ Name="VCALinkTool"/>\r
<Tool\r
- Name="VCXDCMakeTool"\r
- />\r
+ Name="VCXDCMakeTool"/>\r
<Tool\r
Name="VCBscMakeTool"\r
- OutputFile="vc_mswudll\bench.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
+ OutputFile="vc7_mswudll\bench.bsc"\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCFxCopTool"\r
- />\r
+ Name="VCFxCopTool"/>\r
<Tool\r
- Name="VCAppVerifierTool"\r
- />\r
+ Name="VCAppVerifierTool"/>\r
<Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
+ Name="VCWebDeploymentTool"/>\r
<Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
+ Name="VCPostBuildEventTool"/>\r
</Configuration>\r
<Configuration\r
Name="DLL Debug|Win32"\r
- OutputDirectory="vc_mswuddll"\r
- IntermediateDirectory="vc_mswuddll\bench"\r
+ OutputDirectory="vc7_mswuddll"\r
+ IntermediateDirectory="vc7_mswuddll\bench"\r
ConfigurationType="1"\r
UseOfMFC="0"\r
ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
+ CharacterSet="1">\r
<Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
+ Name="VCPreBuildEventTool"/>\r
<Tool\r
- Name="VCCustomBuildTool"\r
- />\r
+ Name="VCCustomBuildTool"/>\r
<Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
+ Name="VCXMLDataGeneratorTool"/>\r
<Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
+ Name="VCWebServiceProxyGeneratorTool"/>\r
<Tool\r
- Name="VCIDLTool"\r
- />\r
+ Name="VCIDLTool"/>\r
<Tool\r
Name="VCCLCompilerTool"\r
Optimization="0"\r
InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswud;.\..\..\include;."\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_dll\mswud;.\..\..\include;."\r
MinimalRebuild="true"\r
ExceptionHandling="1"\r
AdditionalOptions=""\r
DebugInformationFormat="3"\r
Detect64BitPortabilityProblems="true"\r
RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswuddll\bench\"\r
- ObjectFile="vc_mswuddll\bench\"\r
- ProgramDataBaseFileName="vc_mswuddll\bench.pdb"\r
+ AssemblerListingLocation="vc7_mswuddll\bench\"\r
+ ObjectFile="vc7_mswuddll\bench\"\r
+ ProgramDataBaseFileName="vc7_mswuddll\bench.pdb"\r
WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
+ Name="VCManagedResourceCompilerTool"/>\r
<Tool\r
Name="VCResourceCompilerTool"\r
Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_dll\mswud;.\..\..\include;."\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"\r
- />\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_dll\mswud;.\..\..\include;."\r
+ PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"/>\r
<Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
+ Name="VCPreLinkEventTool"/>\r
<Tool\r
Name="VCLinkerTool"\r
AdditionalDependencies="wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib"\r
AdditionalOptions=""\r
- OutputFile="vc_mswuddll\bench.exe"\r
+ OutputFile="vc7_mswuddll\bench.exe"\r
LinkIncremental="2"\r
SubSystem="1"\r
SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
+ AdditionalLibraryDirectories=".\..\..\lib\vc7_dll"\r
GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswuddll\bench.pdb"\r
- TargetMachine="1"\r
- />\r
+ ProgramDatabaseFile="vc7_mswuddll\bench.pdb"\r
+ TargetMachine="1"/>\r
<Tool\r
- Name="VCALinkTool"\r
- />\r
+ Name="VCALinkTool"/>\r
<Tool\r
- Name="VCXDCMakeTool"\r
- />\r
+ Name="VCXDCMakeTool"/>\r
<Tool\r
Name="VCBscMakeTool"\r
- OutputFile="vc_mswuddll\bench.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
+ OutputFile="vc7_mswuddll\bench.bsc"\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCFxCopTool"\r
- />\r
+ Name="VCFxCopTool"/>\r
<Tool\r
- Name="VCAppVerifierTool"\r
- />\r
+ Name="VCAppVerifierTool"/>\r
<Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
+ Name="VCWebDeploymentTool"/>\r
<Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
+ Name="VCPostBuildEventTool"/>\r
</Configuration>\r
<Configuration\r
Name="Universal Release|Win32"\r
- OutputDirectory="vc_mswunivu"\r
- IntermediateDirectory="vc_mswunivu\bench"\r
+ OutputDirectory="vc7_mswunivu"\r
+ IntermediateDirectory="vc7_mswunivu\bench"\r
ConfigurationType="1"\r
UseOfMFC="0"\r
ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
+ CharacterSet="1">\r
<Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
+ Name="VCPreBuildEventTool"/>\r
<Tool\r
- Name="VCCustomBuildTool"\r
- />\r
+ Name="VCCustomBuildTool"/>\r
<Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
+ Name="VCXMLDataGeneratorTool"/>\r
<Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
+ Name="VCWebServiceProxyGeneratorTool"/>\r
<Tool\r
- Name="VCIDLTool"\r
- />\r
+ Name="VCIDLTool"/>\r
<Tool\r
Name="VCCLCompilerTool"\r
Optimization="2"\r
InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivu;.\..\..\include;."\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_lib\mswunivu;.\..\..\include;."\r
MinimalRebuild="false"\r
ExceptionHandling="1"\r
AdditionalOptions=""\r
DebugInformationFormat="3"\r
Detect64BitPortabilityProblems="true"\r
RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivu\bench\"\r
- ObjectFile="vc_mswunivu\bench\"\r
- ProgramDataBaseFileName="vc_mswunivu\bench.pdb"\r
+ AssemblerListingLocation="vc7_mswunivu\bench\"\r
+ ObjectFile="vc7_mswunivu\bench\"\r
+ ProgramDataBaseFileName="vc7_mswunivu\bench.pdb"\r
WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
+ Name="VCManagedResourceCompilerTool"/>\r
<Tool\r
Name="VCResourceCompilerTool"\r
Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivu;.\..\..\include;."\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;_CONSOLE;wxUSE_GUI=0"\r
- />\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_lib\mswunivu;.\..\..\include;."\r
+ PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;_CONSOLE;wxUSE_GUI=0"/>\r
<Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
+ Name="VCPreLinkEventTool"/>\r
<Tool\r
Name="VCLinkerTool"\r
AdditionalDependencies="wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib"\r
AdditionalOptions=""\r
- OutputFile="vc_mswunivu\bench.exe"\r
+ OutputFile="vc7_mswunivu\bench.exe"\r
LinkIncremental="2"\r
SubSystem="1"\r
SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
+ AdditionalLibraryDirectories=".\..\..\lib\vc7_lib"\r
GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivu\bench.pdb"\r
- TargetMachine="1"\r
- />\r
+ ProgramDatabaseFile="vc7_mswunivu\bench.pdb"\r
+ TargetMachine="1"/>\r
<Tool\r
- Name="VCALinkTool"\r
- />\r
+ Name="VCALinkTool"/>\r
<Tool\r
- Name="VCXDCMakeTool"\r
- />\r
+ Name="VCXDCMakeTool"/>\r
<Tool\r
Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivu\bench.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
+ OutputFile="vc7_mswunivu\bench.bsc"\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCFxCopTool"\r
- />\r
+ Name="VCFxCopTool"/>\r
<Tool\r
- Name="VCAppVerifierTool"\r
- />\r
+ Name="VCAppVerifierTool"/>\r
<Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
+ Name="VCWebDeploymentTool"/>\r
<Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
+ Name="VCPostBuildEventTool"/>\r
</Configuration>\r
<Configuration\r
Name="Universal Debug|Win32"\r
- OutputDirectory="vc_mswunivud"\r
- IntermediateDirectory="vc_mswunivud\bench"\r
+ OutputDirectory="vc7_mswunivud"\r
+ IntermediateDirectory="vc7_mswunivud\bench"\r
ConfigurationType="1"\r
UseOfMFC="0"\r
ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
+ CharacterSet="1">\r
<Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
+ Name="VCPreBuildEventTool"/>\r
<Tool\r
- Name="VCCustomBuildTool"\r
- />\r
+ Name="VCCustomBuildTool"/>\r
<Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
+ Name="VCXMLDataGeneratorTool"/>\r
<Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
+ Name="VCWebServiceProxyGeneratorTool"/>\r
<Tool\r
- Name="VCIDLTool"\r
- />\r
+ Name="VCIDLTool"/>\r
<Tool\r
Name="VCCLCompilerTool"\r
Optimization="0"\r
InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivud;.\..\..\include;."\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_lib\mswunivud;.\..\..\include;."\r
MinimalRebuild="true"\r
ExceptionHandling="1"\r
AdditionalOptions=""\r
DebugInformationFormat="3"\r
Detect64BitPortabilityProblems="true"\r
RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivud\bench\"\r
- ObjectFile="vc_mswunivud\bench\"\r
- ProgramDataBaseFileName="vc_mswunivud\bench.pdb"\r
+ AssemblerListingLocation="vc7_mswunivud\bench\"\r
+ ObjectFile="vc7_mswunivud\bench\"\r
+ ProgramDataBaseFileName="vc7_mswunivud\bench.pdb"\r
WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
+ Name="VCManagedResourceCompilerTool"/>\r
<Tool\r
Name="VCResourceCompilerTool"\r
Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswunivud;.\..\..\include;."\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"\r
- />\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_lib\mswunivud;.\..\..\include;."\r
+ PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"/>\r
<Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
+ Name="VCPreLinkEventTool"/>\r
<Tool\r
Name="VCLinkerTool"\r
AdditionalDependencies="wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib"\r
AdditionalOptions=""\r
- OutputFile="vc_mswunivud\bench.exe"\r
+ OutputFile="vc7_mswunivud\bench.exe"\r
LinkIncremental="2"\r
SubSystem="1"\r
SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
+ AdditionalLibraryDirectories=".\..\..\lib\vc7_lib"\r
GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivud\bench.pdb"\r
- TargetMachine="1"\r
- />\r
+ ProgramDatabaseFile="vc7_mswunivud\bench.pdb"\r
+ TargetMachine="1"/>\r
<Tool\r
- Name="VCALinkTool"\r
- />\r
+ Name="VCALinkTool"/>\r
<Tool\r
- Name="VCXDCMakeTool"\r
- />\r
+ Name="VCXDCMakeTool"/>\r
<Tool\r
Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivud\bench.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
+ OutputFile="vc7_mswunivud\bench.bsc"\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCFxCopTool"\r
- />\r
+ Name="VCFxCopTool"/>\r
<Tool\r
- Name="VCAppVerifierTool"\r
- />\r
+ Name="VCAppVerifierTool"/>\r
<Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
+ Name="VCWebDeploymentTool"/>\r
<Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
+ Name="VCPostBuildEventTool"/>\r
</Configuration>\r
<Configuration\r
Name="Release|Win32"\r
- OutputDirectory="vc_mswu"\r
- IntermediateDirectory="vc_mswu\bench"\r
+ OutputDirectory="vc7_mswu"\r
+ IntermediateDirectory="vc7_mswu\bench"\r
ConfigurationType="1"\r
UseOfMFC="0"\r
ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
+ CharacterSet="1">\r
<Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
+ Name="VCPreBuildEventTool"/>\r
<Tool\r
- Name="VCCustomBuildTool"\r
- />\r
+ Name="VCCustomBuildTool"/>\r
<Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
+ Name="VCXMLDataGeneratorTool"/>\r
<Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
+ Name="VCWebServiceProxyGeneratorTool"/>\r
<Tool\r
- Name="VCIDLTool"\r
- />\r
+ Name="VCIDLTool"/>\r
<Tool\r
Name="VCCLCompilerTool"\r
Optimization="2"\r
InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswu;.\..\..\include;."\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_lib\mswu;.\..\..\include;."\r
MinimalRebuild="false"\r
ExceptionHandling="1"\r
AdditionalOptions=""\r
DebugInformationFormat="3"\r
Detect64BitPortabilityProblems="true"\r
RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswu\bench\"\r
- ObjectFile="vc_mswu\bench\"\r
- ProgramDataBaseFileName="vc_mswu\bench.pdb"\r
+ AssemblerListingLocation="vc7_mswu\bench\"\r
+ ObjectFile="vc7_mswu\bench\"\r
+ ProgramDataBaseFileName="vc7_mswu\bench.pdb"\r
WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
+ Name="VCManagedResourceCompilerTool"/>\r
<Tool\r
Name="VCResourceCompilerTool"\r
Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswu;.\..\..\include;."\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;_CONSOLE;wxUSE_GUI=0"\r
- />\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_lib\mswu;.\..\..\include;."\r
+ PreprocessorDefinitions="__WXMSW__;_UNICODE;_CONSOLE;wxUSE_GUI=0"/>\r
<Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
+ Name="VCPreLinkEventTool"/>\r
<Tool\r
Name="VCLinkerTool"\r
AdditionalDependencies="wxbase29u.lib wxzlib.lib wxregexu.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib"\r
AdditionalOptions=""\r
- OutputFile="vc_mswu\bench.exe"\r
+ OutputFile="vc7_mswu\bench.exe"\r
LinkIncremental="2"\r
SubSystem="1"\r
SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
+ AdditionalLibraryDirectories=".\..\..\lib\vc7_lib"\r
GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswu\bench.pdb"\r
- TargetMachine="1"\r
- />\r
+ ProgramDatabaseFile="vc7_mswu\bench.pdb"\r
+ TargetMachine="1"/>\r
<Tool\r
- Name="VCALinkTool"\r
- />\r
+ Name="VCALinkTool"/>\r
<Tool\r
- Name="VCXDCMakeTool"\r
- />\r
+ Name="VCXDCMakeTool"/>\r
<Tool\r
Name="VCBscMakeTool"\r
- OutputFile="vc_mswu\bench.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
+ OutputFile="vc7_mswu\bench.bsc"\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCFxCopTool"\r
- />\r
+ Name="VCFxCopTool"/>\r
<Tool\r
- Name="VCAppVerifierTool"\r
- />\r
+ Name="VCAppVerifierTool"/>\r
<Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
+ Name="VCWebDeploymentTool"/>\r
<Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
+ Name="VCPostBuildEventTool"/>\r
</Configuration>\r
<Configuration\r
Name="Debug|Win32"\r
- OutputDirectory="vc_mswud"\r
- IntermediateDirectory="vc_mswud\bench"\r
+ OutputDirectory="vc7_mswud"\r
+ IntermediateDirectory="vc7_mswud\bench"\r
ConfigurationType="1"\r
UseOfMFC="0"\r
ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
+ CharacterSet="1">\r
<Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
+ Name="VCPreBuildEventTool"/>\r
<Tool\r
- Name="VCCustomBuildTool"\r
- />\r
+ Name="VCCustomBuildTool"/>\r
<Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
+ Name="VCXMLDataGeneratorTool"/>\r
<Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
+ Name="VCWebServiceProxyGeneratorTool"/>\r
<Tool\r
- Name="VCIDLTool"\r
- />\r
+ Name="VCIDLTool"/>\r
<Tool\r
Name="VCCLCompilerTool"\r
Optimization="0"\r
InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswud;.\..\..\include;."\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_lib\mswud;.\..\..\include;."\r
MinimalRebuild="true"\r
ExceptionHandling="1"\r
AdditionalOptions=""\r
DebugInformationFormat="3"\r
Detect64BitPortabilityProblems="true"\r
RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswud\bench\"\r
- ObjectFile="vc_mswud\bench\"\r
- ProgramDataBaseFileName="vc_mswud\bench.pdb"\r
+ AssemblerListingLocation="vc7_mswud\bench\"\r
+ ObjectFile="vc7_mswud\bench\"\r
+ ProgramDataBaseFileName="vc7_mswud\bench.pdb"\r
WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
+ Name="VCManagedResourceCompilerTool"/>\r
<Tool\r
Name="VCResourceCompilerTool"\r
Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\lib\vc_lib\mswud;.\..\..\include;."\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"\r
- />\r
+ AdditionalIncludeDirectories=".\..\..\lib\vc7_lib\mswud;.\..\..\include;."\r
+ PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"/>\r
<Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
+ Name="VCPreLinkEventTool"/>\r
<Tool\r
Name="VCLinkerTool"\r
AdditionalDependencies="wxbase29ud.lib wxzlibd.lib wxregexud.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib"\r
AdditionalOptions=""\r
- OutputFile="vc_mswud\bench.exe"\r
+ OutputFile="vc7_mswud\bench.exe"\r
LinkIncremental="2"\r
SubSystem="1"\r
SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
+ AdditionalLibraryDirectories=".\..\..\lib\vc7_lib"\r
GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswud\bench.pdb"\r
- TargetMachine="1"\r
- />\r
+ ProgramDatabaseFile="vc7_mswud\bench.pdb"\r
+ TargetMachine="1"/>\r
<Tool\r
- Name="VCALinkTool"\r
- />\r
+ Name="VCALinkTool"/>\r
<Tool\r
- Name="VCXDCMakeTool"\r
- />\r
+ Name="VCXDCMakeTool"/>\r
<Tool\r
Name="VCBscMakeTool"\r
- OutputFile="vc_mswud\bench.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
+ OutputFile="vc7_mswud\bench.bsc"\r
+ SuppressStartupBanner="true"/>\r
<Tool\r
- Name="VCFxCopTool"\r
- />\r
+ Name="VCFxCopTool"/>\r
<Tool\r
- Name="VCAppVerifierTool"\r
- />\r
+ Name="VCAppVerifierTool"/>\r
<Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
+ Name="VCWebDeploymentTool"/>\r
<Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
+ Name="VCPostBuildEventTool"/>\r
</Configuration>\r
</Configurations>\r
<References>\r
<Filter\r
Name="Source Files"\r
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
- >\r
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx">\r
+ <File\r
+ RelativePath=".\bench.cpp"/>\r
+ <File\r
+ RelativePath=".\htmlparser\htmlpars.cpp"/>\r
<File\r
- RelativePath=".\bench.cpp"\r
- />\r
+ RelativePath=".\htmlparser\htmltag.cpp"/>\r
<File\r
- RelativePath=".\strings.cpp"\r
- />\r
+ RelativePath=".\strings.cpp"/>\r
<File\r
- RelativePath=".\tls.cpp"\r
- />\r
+ RelativePath=".\tls.cpp"/>\r
</Filter>\r
</Files>\r
<Globals>\r
--- /dev/null
+
+This is a copy of wxWidgets 2.8's wxHTML parser. Unlike the 2.9+ version, it
+uses wxString::operator[] during parsing and so is perfect for testing
+real-life perfomance of the new wxString class' operator[] caching.
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: src/html/htmlpars.cpp
+// Purpose: wx28HtmlParser class (generic parser)
+// Author: Vaclav Slavik
+// RCS-ID: $Id$
+// Copyright: (c) 1999 Vaclav Slavik
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#include "htmlpars.h"
+
+#ifndef WXPRECOMP
+ #include "wx/dynarray.h"
+ #include "wx/log.h"
+ #include "wx/intl.h"
+ #include "wx/app.h"
+#endif
+
+#include "wx/tokenzr.h"
+#include "wx/wfstream.h"
+#include "wx/url.h"
+#include "wx/fontmap.h"
+#include "wx/html/htmldefs.h"
+#include "wx/arrimpl.cpp"
+
+#ifdef __WXWINCE__
+ #include "wx/msw/wince/missing.h" // for bsearch()
+#endif
+
+// DLL options compatibility check:
+WX_CHECK_BUILD_OPTIONS("wxHTML")
+
+const wxChar *wxTRACE_HTML_DEBUG = _T("htmldebug");
+
+//-----------------------------------------------------------------------------
+// wx28HtmlParser helpers
+//-----------------------------------------------------------------------------
+
+class wx28HtmlTextPiece
+{
+public:
+ wx28HtmlTextPiece(int pos, int lng) : m_pos(pos), m_lng(lng) {}
+ int m_pos, m_lng;
+};
+
+WX_DECLARE_OBJARRAY(wx28HtmlTextPiece, wx28HtmlTextPieces);
+WX_DEFINE_OBJARRAY(wx28HtmlTextPieces)
+
+class wx28HtmlParserState
+{
+public:
+ wx28HtmlTag *m_curTag;
+ wx28HtmlTag *m_tags;
+ wx28HtmlTextPieces *m_textPieces;
+ int m_curTextPiece;
+ wxString m_source;
+ wx28HtmlParserState *m_nextState;
+};
+
+//-----------------------------------------------------------------------------
+// wx28HtmlParser
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_ABSTRACT_CLASS(wx28HtmlParser,wxObject)
+
+wx28HtmlParser::wx28HtmlParser()
+ : wxObject(), m_HandlersHash(wxKEY_STRING),
+ m_FS(NULL), m_HandlersStack(NULL)
+{
+ m_entitiesParser = new wx28HtmlEntitiesParser;
+ m_Tags = NULL;
+ m_CurTag = NULL;
+ m_TextPieces = NULL;
+ m_CurTextPiece = 0;
+ m_SavedStates = NULL;
+}
+
+wx28HtmlParser::~wx28HtmlParser()
+{
+ while (RestoreState()) {}
+ DestroyDOMTree();
+
+ if (m_HandlersStack)
+ {
+ wxList& tmp = *m_HandlersStack;
+ wxList::iterator it, en;
+ for( it = tmp.begin(), en = tmp.end(); it != en; ++it )
+ delete (wxHashTable*)*it;
+ tmp.clear();
+ }
+ delete m_HandlersStack;
+ m_HandlersHash.Clear();
+ WX_CLEAR_LIST(wxList, m_HandlersList);
+ delete m_entitiesParser;
+}
+
+wxObject* wx28HtmlParser::Parse(const wxString& source)
+{
+ InitParser(source);
+ DoParsing();
+ wxObject *result = GetProduct();
+ DoneParser();
+ return result;
+}
+
+void wx28HtmlParser::InitParser(const wxString& source)
+{
+ SetSource(source);
+ m_stopParsing = false;
+}
+
+void wx28HtmlParser::DoneParser()
+{
+ DestroyDOMTree();
+}
+
+void wx28HtmlParser::SetSource(const wxString& src)
+{
+ DestroyDOMTree();
+ m_Source = src;
+ CreateDOMTree();
+ m_CurTag = NULL;
+ m_CurTextPiece = 0;
+}
+
+void wx28HtmlParser::CreateDOMTree()
+{
+ wx28HtmlTagsCache cache(m_Source);
+ m_TextPieces = new wx28HtmlTextPieces;
+ CreateDOMSubTree(NULL, 0, m_Source.length(), &cache);
+ m_CurTextPiece = 0;
+}
+
+extern bool wxIsCDATAElement(const wxChar *tag);
+
+void wx28HtmlParser::CreateDOMSubTree(wx28HtmlTag *cur,
+ int begin_pos, int end_pos,
+ wx28HtmlTagsCache *cache)
+{
+ if (end_pos <= begin_pos) return;
+
+ wxChar c;
+ int i = begin_pos;
+ int textBeginning = begin_pos;
+
+ // If the tag contains CDATA text, we include the text between beginning
+ // and ending tag verbosely. Setting i=end_pos will skip to the very
+ // end of this function where text piece is added, bypassing any child
+ // tags parsing (CDATA element can't have child elements by definition):
+ if (cur != NULL && wxIsCDATAElement(cur->GetName().c_str()))
+ {
+ i = end_pos;
+ }
+
+ while (i < end_pos)
+ {
+ c = m_Source.GetChar(i);
+
+ if (c == wxT('<'))
+ {
+ // add text to m_TextPieces:
+ if (i - textBeginning > 0)
+ m_TextPieces->Add(
+ wx28HtmlTextPiece(textBeginning, i - textBeginning));
+
+ // if it is a comment, skip it:
+ if (i < end_pos-6 && m_Source.GetChar(i+1) == wxT('!') &&
+ m_Source.GetChar(i+2) == wxT('-') &&
+ m_Source.GetChar(i+3) == wxT('-'))
+ {
+ // Comments begin with "<!--" and end with "--[ \t\r\n]*>"
+ // according to HTML 4.0
+ int dashes = 0;
+ i += 4;
+ while (i < end_pos)
+ {
+ c = m_Source.GetChar(i++);
+ if ((c == wxT(' ') || c == wxT('\n') ||
+ c == wxT('\r') || c == wxT('\t')) && dashes >= 2) {}
+ else if (c == wxT('>') && dashes >= 2)
+ {
+ textBeginning = i;
+ break;
+ }
+ else if (c == wxT('-'))
+ dashes++;
+ else
+ dashes = 0;
+ }
+ }
+
+ // add another tag to the tree:
+ else if (i < end_pos-1 && m_Source.GetChar(i+1) != wxT('/'))
+ {
+ wx28HtmlTag *chd;
+ if (cur)
+ chd = new wx28HtmlTag(cur, m_Source,
+ i, end_pos, cache, m_entitiesParser);
+ else
+ {
+ chd = new wx28HtmlTag(NULL, m_Source,
+ i, end_pos, cache, m_entitiesParser);
+ if (!m_Tags)
+ {
+ // if this is the first tag to be created make the root
+ // m_Tags point to it:
+ m_Tags = chd;
+ }
+ else
+ {
+ // if there is already a root tag add this tag as
+ // the last sibling:
+ chd->m_Prev = m_Tags->GetLastSibling();
+ chd->m_Prev->m_Next = chd;
+ }
+ }
+
+ if (chd->HasEnding())
+ {
+ CreateDOMSubTree(chd,
+ chd->GetBeginPos(), chd->GetEndPos1(),
+ cache);
+ i = chd->GetEndPos2();
+ }
+ else
+ i = chd->GetBeginPos();
+
+ textBeginning = i;
+ }
+
+ // ... or skip ending tag:
+ else
+ {
+ while (i < end_pos && m_Source.GetChar(i) != wxT('>')) i++;
+ textBeginning = i+1;
+ }
+ }
+ else i++;
+ }
+
+ // add remaining text to m_TextPieces:
+ if (end_pos - textBeginning > 0)
+ m_TextPieces->Add(
+ wx28HtmlTextPiece(textBeginning, end_pos - textBeginning));
+}
+
+void wx28HtmlParser::DestroyDOMTree()
+{
+ wx28HtmlTag *t1, *t2;
+ t1 = m_Tags;
+ while (t1)
+ {
+ t2 = t1->GetNextSibling();
+ delete t1;
+ t1 = t2;
+ }
+ m_Tags = m_CurTag = NULL;
+
+ delete m_TextPieces;
+ m_TextPieces = NULL;
+}
+
+void wx28HtmlParser::DoParsing()
+{
+ m_CurTag = m_Tags;
+ m_CurTextPiece = 0;
+ DoParsing(0, m_Source.length());
+}
+
+void wx28HtmlParser::DoParsing(int begin_pos, int end_pos)
+{
+ if (end_pos <= begin_pos) return;
+
+ wx28HtmlTextPieces& pieces = *m_TextPieces;
+ size_t piecesCnt = pieces.GetCount();
+
+ while (begin_pos < end_pos)
+ {
+ while (m_CurTag && m_CurTag->GetBeginPos() < begin_pos)
+ m_CurTag = m_CurTag->GetNextTag();
+ while (m_CurTextPiece < piecesCnt &&
+ pieces[m_CurTextPiece].m_pos < begin_pos)
+ m_CurTextPiece++;
+
+ if (m_CurTextPiece < piecesCnt &&
+ (!m_CurTag ||
+ pieces[m_CurTextPiece].m_pos < m_CurTag->GetBeginPos()))
+ {
+ // Add text:
+ AddText(GetEntitiesParser()->Parse(
+ m_Source.Mid(pieces[m_CurTextPiece].m_pos,
+ pieces[m_CurTextPiece].m_lng)));
+ begin_pos = pieces[m_CurTextPiece].m_pos +
+ pieces[m_CurTextPiece].m_lng;
+ m_CurTextPiece++;
+ }
+ else if (m_CurTag)
+ {
+ if (m_CurTag->HasEnding())
+ begin_pos = m_CurTag->GetEndPos2();
+ else
+ begin_pos = m_CurTag->GetBeginPos();
+ wx28HtmlTag *t = m_CurTag;
+ m_CurTag = m_CurTag->GetNextTag();
+ AddTag(*t);
+ if (m_stopParsing)
+ return;
+ }
+ else break;
+ }
+}
+
+void wx28HtmlParser::AddTag(const wx28HtmlTag& tag)
+{
+ wx28HtmlTagHandler *h;
+ bool inner = false;
+
+ h = (wx28HtmlTagHandler*) m_HandlersHash.Get(tag.GetName());
+ if (h)
+ {
+ inner = h->HandleTag(tag);
+ if (m_stopParsing)
+ return;
+ }
+ if (!inner)
+ {
+ if (tag.HasEnding())
+ DoParsing(tag.GetBeginPos(), tag.GetEndPos1());
+ }
+}
+
+void wx28HtmlParser::AddTagHandler(wx28HtmlTagHandler *handler)
+{
+ wxString s(handler->GetSupportedTags());
+ wxStringTokenizer tokenizer(s, wxT(", "));
+
+ while (tokenizer.HasMoreTokens())
+ m_HandlersHash.Put(tokenizer.GetNextToken(), handler);
+
+ if (m_HandlersList.IndexOf(handler) == wxNOT_FOUND)
+ m_HandlersList.Append(handler);
+
+ handler->SetParser(this);
+}
+
+void wx28HtmlParser::PushTagHandler(wx28HtmlTagHandler *handler, const wxString& tags)
+{
+ wxStringTokenizer tokenizer(tags, wxT(", "));
+ wxString key;
+
+ if (m_HandlersStack == NULL)
+ {
+ m_HandlersStack = new wxList;
+ }
+
+ m_HandlersStack->Insert((wxObject*)new wxHashTable(m_HandlersHash));
+
+ while (tokenizer.HasMoreTokens())
+ {
+ key = tokenizer.GetNextToken();
+ m_HandlersHash.Delete(key);
+ m_HandlersHash.Put(key, handler);
+ }
+}
+
+void wx28HtmlParser::PopTagHandler()
+{
+ wxList::compatibility_iterator first;
+
+ if ( !m_HandlersStack ||
+#if wxUSE_STL
+ !(first = m_HandlersStack->GetFirst())
+#else // !wxUSE_STL
+ ((first = m_HandlersStack->GetFirst()) == NULL)
+#endif // wxUSE_STL/!wxUSE_STL
+ )
+ {
+ wxLogWarning(_("Warning: attempt to remove HTML tag handler from empty stack."));
+ return;
+ }
+ m_HandlersHash = *((wxHashTable*) first->GetData());
+ delete (wxHashTable*) first->GetData();
+ m_HandlersStack->Erase(first);
+}
+
+void wx28HtmlParser::SetSourceAndSaveState(const wxString& src)
+{
+ wx28HtmlParserState *s = new wx28HtmlParserState;
+
+ s->m_curTag = m_CurTag;
+ s->m_tags = m_Tags;
+ s->m_textPieces = m_TextPieces;
+ s->m_curTextPiece = m_CurTextPiece;
+ s->m_source = m_Source;
+
+ s->m_nextState = m_SavedStates;
+ m_SavedStates = s;
+
+ m_CurTag = NULL;
+ m_Tags = NULL;
+ m_TextPieces = NULL;
+ m_CurTextPiece = 0;
+ m_Source = wxEmptyString;
+
+ SetSource(src);
+}
+
+bool wx28HtmlParser::RestoreState()
+{
+ if (!m_SavedStates) return false;
+
+ DestroyDOMTree();
+
+ wx28HtmlParserState *s = m_SavedStates;
+ m_SavedStates = s->m_nextState;
+
+ m_CurTag = s->m_curTag;
+ m_Tags = s->m_tags;
+ m_TextPieces = s->m_textPieces;
+ m_CurTextPiece = s->m_curTextPiece;
+ m_Source = s->m_source;
+
+ delete s;
+ return true;
+}
+
+wxString wx28HtmlParser::GetInnerSource(const wx28HtmlTag& tag)
+{
+ return GetSource()->Mid(tag.GetBeginPos(),
+ tag.GetEndPos1() - tag.GetBeginPos());
+}
+
+//-----------------------------------------------------------------------------
+// wx28HtmlTagHandler
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_ABSTRACT_CLASS(wx28HtmlTagHandler,wxObject)
+
+void wx28HtmlTagHandler::ParseInnerSource(const wxString& source)
+{
+ // It is safe to temporarily change the source being parsed,
+ // provided we restore the state back after parsing
+ m_Parser->SetSourceAndSaveState(source);
+ m_Parser->DoParsing();
+ m_Parser->RestoreState();
+}
+
+
+//-----------------------------------------------------------------------------
+// wx28HtmlEntitiesParser
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wx28HtmlEntitiesParser,wxObject)
+
+wx28HtmlEntitiesParser::wx28HtmlEntitiesParser()
+#if wxUSE_WCHAR_T && !wxUSE_UNICODE
+ : m_conv(NULL), m_encoding(wxFONTENCODING_SYSTEM)
+#endif
+{
+}
+
+wx28HtmlEntitiesParser::~wx28HtmlEntitiesParser()
+{
+#if wxUSE_WCHAR_T && !wxUSE_UNICODE
+ delete m_conv;
+#endif
+}
+
+void wx28HtmlEntitiesParser::SetEncoding(wxFontEncoding encoding)
+{
+#if wxUSE_WCHAR_T && !wxUSE_UNICODE
+ if (encoding == m_encoding)
+ return;
+
+ delete m_conv;
+
+ m_encoding = encoding;
+ if (m_encoding == wxFONTENCODING_SYSTEM)
+ m_conv = NULL;
+ else
+ m_conv = new wxCSConv(wxFontMapper::GetEncodingName(m_encoding));
+#else
+ (void) encoding;
+#endif
+}
+
+wxString wx28HtmlEntitiesParser::Parse(const wxString& input)
+{
+ const wxChar *c, *last;
+ const wxChar *in_str = input.c_str();
+ wxString output;
+
+ for (c = in_str, last = in_str; *c != wxT('\0'); c++)
+ {
+ if (*c == wxT('&'))
+ {
+ if ( output.empty() )
+ output.reserve(input.length());
+
+ if (c - last > 0)
+ output.append(last, c - last);
+ if ( *++c == wxT('\0') )
+ break;
+
+ wxString entity;
+ const wxChar *ent_s = c;
+ wxChar entity_char;
+
+ for (; (*c >= wxT('a') && *c <= wxT('z')) ||
+ (*c >= wxT('A') && *c <= wxT('Z')) ||
+ (*c >= wxT('0') && *c <= wxT('9')) ||
+ *c == wxT('_') || *c == wxT('#'); c++) {}
+ entity.append(ent_s, c - ent_s);
+ if (*c != wxT(';')) c--;
+ last = c+1;
+ entity_char = GetEntityChar(entity);
+ if (entity_char)
+ output << entity_char;
+ else
+ {
+ output.append(ent_s-1, c-ent_s+2);
+ wxLogTrace(wxTRACE_HTML_DEBUG,
+ wxT("Unrecognized HTML entity: '%s'"),
+ entity.c_str());
+ }
+ }
+ }
+ if (last == in_str) // common case: no entity
+ return input;
+ if (*last != wxT('\0'))
+ output.append(last);
+ return output;
+}
+
+struct wx28HtmlEntityInfo
+{
+ const wxChar *name;
+ unsigned code;
+};
+
+extern "C" int LINKAGEMODE wx28HtmlEntityCompare(const void *key, const void *item)
+{
+ return wxStrcmp((wxChar*)key, ((wx28HtmlEntityInfo*)item)->name);
+}
+
+#if !wxUSE_UNICODE
+wxChar wx28HtmlEntitiesParser::GetCharForCode(unsigned code)
+{
+#if wxUSE_WCHAR_T
+ char buf[2];
+ wchar_t wbuf[2];
+ wbuf[0] = (wchar_t)code;
+ wbuf[1] = 0;
+ wxMBConv *conv = m_conv ? m_conv : &wxConvLocal;
+ if (conv->WC2MB(buf, wbuf, 2) == (size_t)-1)
+ return '?';
+ return buf[0];
+#else
+ return (code < 256) ? (wxChar)code : '?';
+#endif
+}
+#endif
+
+wxChar wx28HtmlEntitiesParser::GetEntityChar(const wxString& entity)
+{
+ unsigned code = 0;
+
+ if (entity[0] == wxT('#'))
+ {
+ const wxChar *ent_s = entity.c_str();
+ const wxChar *format;
+
+ if (ent_s[1] == wxT('x') || ent_s[1] == wxT('X'))
+ {
+ format = wxT("%x");
+ ent_s++;
+ }
+ else
+ format = wxT("%u");
+ ent_s++;
+
+ if (wxSscanf(ent_s, format, &code) != 1)
+ code = 0;
+ }
+ else
+ {
+ static wx28HtmlEntityInfo substitutions[] = {
+ { wxT("AElig"),198 },
+ { wxT("Aacute"),193 },
+ { wxT("Acirc"),194 },
+ { wxT("Agrave"),192 },
+ { wxT("Alpha"),913 },
+ { wxT("Aring"),197 },
+ { wxT("Atilde"),195 },
+ { wxT("Auml"),196 },
+ { wxT("Beta"),914 },
+ { wxT("Ccedil"),199 },
+ { wxT("Chi"),935 },
+ { wxT("Dagger"),8225 },
+ { wxT("Delta"),916 },
+ { wxT("ETH"),208 },
+ { wxT("Eacute"),201 },
+ { wxT("Ecirc"),202 },
+ { wxT("Egrave"),200 },
+ { wxT("Epsilon"),917 },
+ { wxT("Eta"),919 },
+ { wxT("Euml"),203 },
+ { wxT("Gamma"),915 },
+ { wxT("Iacute"),205 },
+ { wxT("Icirc"),206 },
+ { wxT("Igrave"),204 },
+ { wxT("Iota"),921 },
+ { wxT("Iuml"),207 },
+ { wxT("Kappa"),922 },
+ { wxT("Lambda"),923 },
+ { wxT("Mu"),924 },
+ { wxT("Ntilde"),209 },
+ { wxT("Nu"),925 },
+ { wxT("OElig"),338 },
+ { wxT("Oacute"),211 },
+ { wxT("Ocirc"),212 },
+ { wxT("Ograve"),210 },
+ { wxT("Omega"),937 },
+ { wxT("Omicron"),927 },
+ { wxT("Oslash"),216 },
+ { wxT("Otilde"),213 },
+ { wxT("Ouml"),214 },
+ { wxT("Phi"),934 },
+ { wxT("Pi"),928 },
+ { wxT("Prime"),8243 },
+ { wxT("Psi"),936 },
+ { wxT("Rho"),929 },
+ { wxT("Scaron"),352 },
+ { wxT("Sigma"),931 },
+ { wxT("THORN"),222 },
+ { wxT("Tau"),932 },
+ { wxT("Theta"),920 },
+ { wxT("Uacute"),218 },
+ { wxT("Ucirc"),219 },
+ { wxT("Ugrave"),217 },
+ { wxT("Upsilon"),933 },
+ { wxT("Uuml"),220 },
+ { wxT("Xi"),926 },
+ { wxT("Yacute"),221 },
+ { wxT("Yuml"),376 },
+ { wxT("Zeta"),918 },
+ { wxT("aacute"),225 },
+ { wxT("acirc"),226 },
+ { wxT("acute"),180 },
+ { wxT("aelig"),230 },
+ { wxT("agrave"),224 },
+ { wxT("alefsym"),8501 },
+ { wxT("alpha"),945 },
+ { wxT("amp"),38 },
+ { wxT("and"),8743 },
+ { wxT("ang"),8736 },
+ { wxT("aring"),229 },
+ { wxT("asymp"),8776 },
+ { wxT("atilde"),227 },
+ { wxT("auml"),228 },
+ { wxT("bdquo"),8222 },
+ { wxT("beta"),946 },
+ { wxT("brvbar"),166 },
+ { wxT("bull"),8226 },
+ { wxT("cap"),8745 },
+ { wxT("ccedil"),231 },
+ { wxT("cedil"),184 },
+ { wxT("cent"),162 },
+ { wxT("chi"),967 },
+ { wxT("circ"),710 },
+ { wxT("clubs"),9827 },
+ { wxT("cong"),8773 },
+ { wxT("copy"),169 },
+ { wxT("crarr"),8629 },
+ { wxT("cup"),8746 },
+ { wxT("curren"),164 },
+ { wxT("dArr"),8659 },
+ { wxT("dagger"),8224 },
+ { wxT("darr"),8595 },
+ { wxT("deg"),176 },
+ { wxT("delta"),948 },
+ { wxT("diams"),9830 },
+ { wxT("divide"),247 },
+ { wxT("eacute"),233 },
+ { wxT("ecirc"),234 },
+ { wxT("egrave"),232 },
+ { wxT("empty"),8709 },
+ { wxT("emsp"),8195 },
+ { wxT("ensp"),8194 },
+ { wxT("epsilon"),949 },
+ { wxT("equiv"),8801 },
+ { wxT("eta"),951 },
+ { wxT("eth"),240 },
+ { wxT("euml"),235 },
+ { wxT("euro"),8364 },
+ { wxT("exist"),8707 },
+ { wxT("fnof"),402 },
+ { wxT("forall"),8704 },
+ { wxT("frac12"),189 },
+ { wxT("frac14"),188 },
+ { wxT("frac34"),190 },
+ { wxT("frasl"),8260 },
+ { wxT("gamma"),947 },
+ { wxT("ge"),8805 },
+ { wxT("gt"),62 },
+ { wxT("hArr"),8660 },
+ { wxT("harr"),8596 },
+ { wxT("hearts"),9829 },
+ { wxT("hellip"),8230 },
+ { wxT("iacute"),237 },
+ { wxT("icirc"),238 },
+ { wxT("iexcl"),161 },
+ { wxT("igrave"),236 },
+ { wxT("image"),8465 },
+ { wxT("infin"),8734 },
+ { wxT("int"),8747 },
+ { wxT("iota"),953 },
+ { wxT("iquest"),191 },
+ { wxT("isin"),8712 },
+ { wxT("iuml"),239 },
+ { wxT("kappa"),954 },
+ { wxT("lArr"),8656 },
+ { wxT("lambda"),955 },
+ { wxT("lang"),9001 },
+ { wxT("laquo"),171 },
+ { wxT("larr"),8592 },
+ { wxT("lceil"),8968 },
+ { wxT("ldquo"),8220 },
+ { wxT("le"),8804 },
+ { wxT("lfloor"),8970 },
+ { wxT("lowast"),8727 },
+ { wxT("loz"),9674 },
+ { wxT("lrm"),8206 },
+ { wxT("lsaquo"),8249 },
+ { wxT("lsquo"),8216 },
+ { wxT("lt"),60 },
+ { wxT("macr"),175 },
+ { wxT("mdash"),8212 },
+ { wxT("micro"),181 },
+ { wxT("middot"),183 },
+ { wxT("minus"),8722 },
+ { wxT("mu"),956 },
+ { wxT("nabla"),8711 },
+ { wxT("nbsp"),160 },
+ { wxT("ndash"),8211 },
+ { wxT("ne"),8800 },
+ { wxT("ni"),8715 },
+ { wxT("not"),172 },
+ { wxT("notin"),8713 },
+ { wxT("nsub"),8836 },
+ { wxT("ntilde"),241 },
+ { wxT("nu"),957 },
+ { wxT("oacute"),243 },
+ { wxT("ocirc"),244 },
+ { wxT("oelig"),339 },
+ { wxT("ograve"),242 },
+ { wxT("oline"),8254 },
+ { wxT("omega"),969 },
+ { wxT("omicron"),959 },
+ { wxT("oplus"),8853 },
+ { wxT("or"),8744 },
+ { wxT("ordf"),170 },
+ { wxT("ordm"),186 },
+ { wxT("oslash"),248 },
+ { wxT("otilde"),245 },
+ { wxT("otimes"),8855 },
+ { wxT("ouml"),246 },
+ { wxT("para"),182 },
+ { wxT("part"),8706 },
+ { wxT("permil"),8240 },
+ { wxT("perp"),8869 },
+ { wxT("phi"),966 },
+ { wxT("pi"),960 },
+ { wxT("piv"),982 },
+ { wxT("plusmn"),177 },
+ { wxT("pound"),163 },
+ { wxT("prime"),8242 },
+ { wxT("prod"),8719 },
+ { wxT("prop"),8733 },
+ { wxT("psi"),968 },
+ { wxT("quot"),34 },
+ { wxT("rArr"),8658 },
+ { wxT("radic"),8730 },
+ { wxT("rang"),9002 },
+ { wxT("raquo"),187 },
+ { wxT("rarr"),8594 },
+ { wxT("rceil"),8969 },
+ { wxT("rdquo"),8221 },
+ { wxT("real"),8476 },
+ { wxT("reg"),174 },
+ { wxT("rfloor"),8971 },
+ { wxT("rho"),961 },
+ { wxT("rlm"),8207 },
+ { wxT("rsaquo"),8250 },
+ { wxT("rsquo"),8217 },
+ { wxT("sbquo"),8218 },
+ { wxT("scaron"),353 },
+ { wxT("sdot"),8901 },
+ { wxT("sect"),167 },
+ { wxT("shy"),173 },
+ { wxT("sigma"),963 },
+ { wxT("sigmaf"),962 },
+ { wxT("sim"),8764 },
+ { wxT("spades"),9824 },
+ { wxT("sub"),8834 },
+ { wxT("sube"),8838 },
+ { wxT("sum"),8721 },
+ { wxT("sup"),8835 },
+ { wxT("sup1"),185 },
+ { wxT("sup2"),178 },
+ { wxT("sup3"),179 },
+ { wxT("supe"),8839 },
+ { wxT("szlig"),223 },
+ { wxT("tau"),964 },
+ { wxT("there4"),8756 },
+ { wxT("theta"),952 },
+ { wxT("thetasym"),977 },
+ { wxT("thinsp"),8201 },
+ { wxT("thorn"),254 },
+ { wxT("tilde"),732 },
+ { wxT("times"),215 },
+ { wxT("trade"),8482 },
+ { wxT("uArr"),8657 },
+ { wxT("uacute"),250 },
+ { wxT("uarr"),8593 },
+ { wxT("ucirc"),251 },
+ { wxT("ugrave"),249 },
+ { wxT("uml"),168 },
+ { wxT("upsih"),978 },
+ { wxT("upsilon"),965 },
+ { wxT("uuml"),252 },
+ { wxT("weierp"),8472 },
+ { wxT("xi"),958 },
+ { wxT("yacute"),253 },
+ { wxT("yen"),165 },
+ { wxT("yuml"),255 },
+ { wxT("zeta"),950 },
+ { wxT("zwj"),8205 },
+ { wxT("zwnj"),8204 },
+ {NULL, 0}};
+ static size_t substitutions_cnt = 0;
+
+ if (substitutions_cnt == 0)
+ while (substitutions[substitutions_cnt].code != 0)
+ substitutions_cnt++;
+
+ wx28HtmlEntityInfo *info = NULL;
+#ifdef __WXWINCE__
+ // bsearch crashes under WinCE for some reason
+ size_t i;
+ for (i = 0; i < substitutions_cnt; i++)
+ {
+ if (entity == substitutions[i].name)
+ {
+ info = & substitutions[i];
+ break;
+ }
+ }
+#else
+ info = (wx28HtmlEntityInfo*) bsearch(entity.c_str(), substitutions,
+ substitutions_cnt,
+ sizeof(wx28HtmlEntityInfo),
+ wx28HtmlEntityCompare);
+#endif
+ if (info)
+ code = info->code;
+ }
+
+ if (code == 0)
+ return 0;
+ else
+ return GetCharForCode(code);
+}
+
+wxFSFile *wx28HtmlParser::OpenURL(wx28HtmlURLType WXUNUSED(type),
+ const wxString& url) const
+{
+ return m_FS ? m_FS->OpenFile(url) : NULL;
+
+}
+
+
+//-----------------------------------------------------------------------------
+// wx28HtmlParser::ExtractCharsetInformation
+//-----------------------------------------------------------------------------
+
+class wxMetaTagParser : public wx28HtmlParser
+{
+public:
+ wxMetaTagParser() { }
+
+ wxObject* GetProduct() { return NULL; }
+
+protected:
+ virtual void AddText(const wxChar* WXUNUSED(txt)) {}
+
+ DECLARE_NO_COPY_CLASS(wxMetaTagParser)
+};
+
+class wxMetaTagHandler : public wx28HtmlTagHandler
+{
+public:
+ wxMetaTagHandler(wxString *retval) : wx28HtmlTagHandler(), m_retval(retval) {}
+ wxString GetSupportedTags() { return wxT("META,BODY"); }
+ bool HandleTag(const wx28HtmlTag& tag);
+
+private:
+ wxString *m_retval;
+
+ DECLARE_NO_COPY_CLASS(wxMetaTagHandler)
+};
+
+bool wxMetaTagHandler::HandleTag(const wx28HtmlTag& tag)
+{
+ if (tag.GetName() == _T("BODY"))
+ {
+ m_Parser->StopParsing();
+ return false;
+ }
+
+ if (tag.HasParam(_T("HTTP-EQUIV")) &&
+ tag.GetParam(_T("HTTP-EQUIV")).IsSameAs(_T("Content-Type"), false) &&
+ tag.HasParam(_T("CONTENT")))
+ {
+ wxString content = tag.GetParam(_T("CONTENT")).Lower();
+ if (content.Left(19) == _T("text/html; charset="))
+ {
+ *m_retval = content.Mid(19);
+ m_Parser->StopParsing();
+ }
+ }
+ return false;
+}
+
+
+/*static*/
+wxString wx28HtmlParser::ExtractCharsetInformation(const wxString& markup)
+{
+ wxString charset;
+ wxMetaTagParser *parser = new wxMetaTagParser();
+ if(parser)
+ {
+ parser->AddTagHandler(new wxMetaTagHandler(&charset));
+ parser->Parse(markup);
+ delete parser;
+ }
+ return charset;
+}
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: htmlpars.h
+// Purpose: wx28HtmlParser class (generic parser)
+// Author: Vaclav Slavik
+// RCS-ID: $Id$
+// Copyright: (c) 1999 Vaclav Slavik
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_HTMLPARS_H_
+#define _WX_HTMLPARS_H_
+
+#include "wx/defs.h"
+#include "wx/filesys.h"
+#include "wx/hash.h"
+#include "wx/fontenc.h"
+
+#include "htmltag.h"
+
+class wxMBConv;
+class wx28HtmlParser;
+class wx28HtmlTagHandler;
+class wx28HtmlEntitiesParser;
+
+class wx28HtmlTextPieces;
+class wx28HtmlParserState;
+
+
+enum wx28HtmlURLType
+{
+ wxHTML_URL_PAGE,
+ wxHTML_URL_IMAGE,
+ wxHTML_URL_OTHER
+};
+
+// This class handles generic parsing of HTML document : it scans
+// the document and divides it into blocks of tags (where one block
+// consists of starting and ending tag and of text between these
+// 2 tags.
+class wx28HtmlParser : public wxObject
+{
+ DECLARE_ABSTRACT_CLASS(wx28HtmlParser)
+
+public:
+ wx28HtmlParser();
+ virtual ~wx28HtmlParser();
+
+ // Sets the class which will be used for opening files
+ void SetFS(wxFileSystem *fs) { m_FS = fs; }
+
+ wxFileSystem* GetFS() const { return m_FS; }
+
+ // Opens file if the parser is allowed to open given URL (may be forbidden
+ // for security reasons)
+ virtual wxFSFile *OpenURL(wx28HtmlURLType type, const wxString& url) const;
+
+ // You can simply call this method when you need parsed output.
+ // This method does these things:
+ // 1. call InitParser(source);
+ // 2. call DoParsing();
+ // 3. call GetProduct(); (its return value is then returned)
+ // 4. call DoneParser();
+ wxObject* Parse(const wxString& source);
+
+ // Sets the source. This must be called before running Parse() method.
+ virtual void InitParser(const wxString& source);
+ // This must be called after Parse().
+ virtual void DoneParser();
+
+ // May be called during parsing to immediately return from Parse().
+ virtual void StopParsing() { m_stopParsing = true; }
+
+ // Parses the m_Source from begin_pos to end_pos-1.
+ // (in noparams version it parses whole m_Source)
+ void DoParsing(int begin_pos, int end_pos);
+ void DoParsing();
+
+ // Returns pointer to the tag at parser's current position
+ wx28HtmlTag *GetCurrentTag() const { return m_CurTag; }
+
+ // Returns product of parsing
+ // Returned value is result of parsing of the part. The type of this result
+ // depends on internal representation in derived parser
+ // (see wx28HtmlWinParser for details).
+ virtual wxObject* GetProduct() = 0;
+
+ // adds handler to the list & hash table of handlers.
+ virtual void AddTagHandler(wx28HtmlTagHandler *handler);
+
+ // Forces the handler to handle additional tags (not returned by GetSupportedTags).
+ // The handler should already be in use by this parser.
+ // Example: you want to parse following pseudo-html structure:
+ // <myitems>
+ // <it name="one" value="1">
+ // <it name="two" value="2">
+ // </myitems>
+ // <it> This last it has different meaning, we don't want it to be parsed by myitems handler!
+ // handler can handle only 'myitems' (e.g. its GetSupportedTags returns "MYITEMS")
+ // you can call PushTagHandler(handler, "IT") when you find <myitems>
+ // and call PopTagHandler() when you find </myitems>
+ void PushTagHandler(wx28HtmlTagHandler *handler, const wxString& tags);
+
+ // Restores state before last call to PushTagHandler
+ void PopTagHandler();
+
+ wxString* GetSource() {return &m_Source;}
+ void SetSource(const wxString& src);
+
+ // Sets HTML source and remembers current parser's state so that it can
+ // later be restored. This is useful for on-line modifications of
+ // HTML source (for example, <pre> handler replaces spaces with
+ // and newlines with <br>)
+ virtual void SetSourceAndSaveState(const wxString& src);
+ // Restores parser's state from stack or returns false if the stack is
+ // empty
+ virtual bool RestoreState();
+
+ // Returns HTML source inside the element (i.e. between the starting
+ // and ending tag)
+ wxString GetInnerSource(const wx28HtmlTag& tag);
+
+ // Parses HTML string 'markup' and extracts charset info from <meta> tag
+ // if present. Returns empty string if the tag is missing.
+ // For wxHTML's internal use.
+ static wxString ExtractCharsetInformation(const wxString& markup);
+
+ // Returns entity parser object, used to substitute HTML &entities;
+ wx28HtmlEntitiesParser *GetEntitiesParser() const { return m_entitiesParser; }
+
+protected:
+ // DOM structure
+ void CreateDOMTree();
+ void DestroyDOMTree();
+ void CreateDOMSubTree(wx28HtmlTag *cur,
+ int begin_pos, int end_pos,
+ wx28HtmlTagsCache *cache);
+
+ // Adds text to the output.
+ // This is called from Parse() and must be overriden in derived classes.
+ // txt is not guaranteed to be only one word. It is largest continuous part of text
+ // (= not broken by tags)
+ // NOTE : using char* because of speed improvements
+ virtual void AddText(const wxChar* txt) = 0;
+
+ // Adds tag and proceeds it. Parse() may (and usually is) called from this method.
+ // This is called from Parse() and may be overriden.
+ // Default behavior is that it looks for proper handler in m_Handlers. The tag is
+ // ignored if no hander is found.
+ // Derived class is *responsible* for filling in m_Handlers table.
+ virtual void AddTag(const wx28HtmlTag& tag);
+
+protected:
+ // DOM tree:
+ wx28HtmlTag *m_CurTag;
+ wx28HtmlTag *m_Tags;
+ wx28HtmlTextPieces *m_TextPieces;
+ size_t m_CurTextPiece;
+
+ wxString m_Source;
+
+ wx28HtmlParserState *m_SavedStates;
+
+ // handlers that handle particular tags. The table is accessed by
+ // key = tag's name.
+ // This attribute MUST be filled by derived class otherwise it would
+ // be empty and no tags would be recognized
+ // (see wx28HtmlWinParser for details about filling it)
+ // m_HandlersHash is for random access based on knowledge of tag name (BR, P, etc.)
+ // it may (and often does) contain more references to one object
+ // m_HandlersList is list of all handlers and it is guaranteed to contain
+ // only one reference to each handler instance.
+ wxList m_HandlersList;
+ wxHashTable m_HandlersHash;
+
+ DECLARE_NO_COPY_CLASS(wx28HtmlParser)
+
+ // class for opening files (file system)
+ wxFileSystem *m_FS;
+ // handlers stack used by PushTagHandler and PopTagHandler
+ wxList *m_HandlersStack;
+
+ // entity parse
+ wx28HtmlEntitiesParser *m_entitiesParser;
+
+ // flag indicating that the parser should stop
+ bool m_stopParsing;
+};
+
+
+
+// This class (and derived classes) cooperates with wx28HtmlParser.
+// Each recognized tag is passed to handler which is capable
+// of handling it. Each tag is handled in 3 steps:
+// 1. Handler will modifies state of parser
+// (using its public methods)
+// 2. Parser parses source between starting and ending tag
+// 3. Handler restores original state of the parser
+class wx28HtmlTagHandler : public wxObject
+{
+ DECLARE_ABSTRACT_CLASS(wx28HtmlTagHandler)
+
+public:
+ wx28HtmlTagHandler() : wxObject () { m_Parser = NULL; }
+
+ // Sets the parser.
+ // NOTE : each _instance_ of handler is guaranteed to be called
+ // only by one parser. This means you don't have to care about
+ // reentrancy.
+ virtual void SetParser(wx28HtmlParser *parser)
+ { m_Parser = parser; }
+
+ // Returns list of supported tags. The list is in uppercase and
+ // tags are delimited by ','.
+ // Example : "I,B,FONT,P"
+ // is capable of handling italic, bold, font and paragraph tags
+ virtual wxString GetSupportedTags() = 0;
+
+ // This is hadling core method. It does all the Steps 1-3.
+ // To process step 2, you can call ParseInner()
+ // returned value : true if it called ParseInner(),
+ // false etherwise
+ virtual bool HandleTag(const wx28HtmlTag& tag) = 0;
+
+protected:
+ // parses input between beginning and ending tag.
+ // m_Parser must be set.
+ void ParseInner(const wx28HtmlTag& tag)
+ { m_Parser->DoParsing(tag.GetBeginPos(), tag.GetEndPos1()); }
+
+ // Parses given source as if it was tag's inner code (see
+ // wx28HtmlParser::GetInnerSource). Unlike ParseInner(), this method lets
+ // you specify the source code to parse. This is useful when you need to
+ // modify the inner text before parsing.
+ void ParseInnerSource(const wxString& source);
+
+ wx28HtmlParser *m_Parser;
+
+ DECLARE_NO_COPY_CLASS(wx28HtmlTagHandler)
+};
+
+
+// This class is used to parse HTML entities in strings. It can handle
+// both named entities and &#xxxx entries where xxxx is Unicode code.
+class wx28HtmlEntitiesParser : public wxObject
+{
+ DECLARE_DYNAMIC_CLASS(wx28HtmlEntitiesParser)
+
+public:
+ wx28HtmlEntitiesParser();
+ virtual ~wx28HtmlEntitiesParser();
+
+ // Sets encoding of output string.
+ // Has no effect if wxUSE_WCHAR_T==0 or wxUSE_UNICODE==1
+ void SetEncoding(wxFontEncoding encoding);
+
+ // Parses entities in input and replaces them with respective characters
+ // (with respect to output encoding)
+ wxString Parse(const wxString& input);
+
+ // Returns character for given entity or 0 if the enity is unknown
+ wxChar GetEntityChar(const wxString& entity);
+
+ // Returns character that represents given Unicode code
+#if wxUSE_UNICODE
+ wxChar GetCharForCode(unsigned code) { return (wxChar)code; }
+#else
+ wxChar GetCharForCode(unsigned code);
+#endif
+
+protected:
+#if wxUSE_WCHAR_T && !wxUSE_UNICODE
+ wxMBConv *m_conv;
+ wxFontEncoding m_encoding;
+#endif
+
+ DECLARE_NO_COPY_CLASS(wx28HtmlEntitiesParser)
+};
+
+
+#endif // _WX_HTMLPARS_H_
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: src/html/htmltag.cpp
+// Purpose: wx28HtmlTag class (represents single tag)
+// Author: Vaclav Slavik
+// RCS-ID: $Id$
+// Copyright: (c) 1999 Vaclav Slavik
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#include "htmltag.h"
+
+#ifndef WXPRECOMP
+ #include "wx/colour.h"
+#endif
+
+#include "htmlpars.h"
+#include <stdio.h> // for vsscanf
+#include <stdarg.h>
+
+
+//-----------------------------------------------------------------------------
+// wx28HtmlTagsCache
+//-----------------------------------------------------------------------------
+
+struct wx28HtmlCacheItem
+{
+ // this is "pos" value passed to wx28HtmlTag's constructor.
+ // it is position of '<' character of the tag
+ int Key;
+
+ // end positions for the tag:
+ // end1 is '<' of ending tag,
+ // end2 is '>' or both are
+ // -1 if there is no ending tag for this one...
+ // or -2 if this is ending tag </...>
+ int End1, End2;
+
+ // name of this tag
+ wxChar *Name;
+};
+
+
+IMPLEMENT_CLASS(wx28HtmlTagsCache,wxObject)
+
+#define CACHE_INCREMENT 64
+
+bool wxIsCDATAElement(const wxChar *tag)
+{
+ return (wxStrcmp(tag, _T("SCRIPT")) == 0) ||
+ (wxStrcmp(tag, _T("STYLE")) == 0);
+}
+
+wx28HtmlTagsCache::wx28HtmlTagsCache(const wxString& source)
+{
+ const wxChar *src = source.c_str();
+ int lng = source.length();
+ wxChar tagBuffer[256];
+
+ m_Cache = NULL;
+ m_CacheSize = 0;
+ m_CachePos = 0;
+
+ int pos = 0;
+ while (pos < lng)
+ {
+ if (src[pos] == wxT('<')) // tag found:
+ {
+ if (m_CacheSize % CACHE_INCREMENT == 0)
+ m_Cache = (wx28HtmlCacheItem*) realloc(m_Cache, (m_CacheSize + CACHE_INCREMENT) * sizeof(wx28HtmlCacheItem));
+ int tg = m_CacheSize++;
+ int stpos = pos++;
+ m_Cache[tg].Key = stpos;
+
+ int i;
+ for ( i = 0;
+ pos < lng && i < (int)WXSIZEOF(tagBuffer) - 1 &&
+ src[pos] != wxT('>') && !wxIsspace(src[pos]);
+ i++, pos++ )
+ {
+ tagBuffer[i] = (wxChar)wxToupper(src[pos]);
+ }
+ tagBuffer[i] = _T('\0');
+
+ m_Cache[tg].Name = new wxChar[i+1];
+ memcpy(m_Cache[tg].Name, tagBuffer, (i+1)*sizeof(wxChar));
+
+ while (pos < lng && src[pos] != wxT('>')) pos++;
+
+ if (src[stpos+1] == wxT('/')) // ending tag:
+ {
+ m_Cache[tg].End1 = m_Cache[tg].End2 = -2;
+ // find matching begin tag:
+ for (i = tg; i >= 0; i--)
+ if ((m_Cache[i].End1 == -1) && (wxStrcmp(m_Cache[i].Name, tagBuffer+1) == 0))
+ {
+ m_Cache[i].End1 = stpos;
+ m_Cache[i].End2 = pos + 1;
+ break;
+ }
+ }
+ else
+ {
+ m_Cache[tg].End1 = m_Cache[tg].End2 = -1;
+
+ if (wxIsCDATAElement(tagBuffer))
+ {
+ // store the orig pos in case we are missing the closing
+ // tag (see below)
+ wxInt32 old_pos = pos;
+ bool foundCloseTag = false;
+
+ // find next matching tag
+ int tag_len = wxStrlen(tagBuffer);
+ while (pos < lng)
+ {
+ // find the ending tag
+ while (pos + 1 < lng &&
+ (src[pos] != '<' || src[pos+1] != '/'))
+ ++pos;
+ if (src[pos] == '<')
+ ++pos;
+
+ // see if it matches
+ int match_pos = 0;
+ while (pos < lng && match_pos < tag_len && src[pos] != '>' && src[pos] != '<') {
+ // cast to wxChar needed to suppress warning in
+ // Unicode build
+ if ((wxChar)wxToupper(src[pos]) == tagBuffer[match_pos]) {
+ ++match_pos;
+ }
+ else if (src[pos] == wxT(' ') || src[pos] == wxT('\n') ||
+ src[pos] == wxT('\r') || src[pos] == wxT('\t')) {
+ // need to skip over these
+ }
+ else {
+ match_pos = 0;
+ }
+ ++pos;
+ }
+
+ // found a match
+ if (match_pos == tag_len)
+ {
+ pos = pos - tag_len - 3;
+ foundCloseTag = true;
+ break;
+ }
+ else // keep looking for the closing tag
+ {
+ ++pos;
+ }
+ }
+ if (!foundCloseTag)
+ {
+ // we didn't find closing tag; this means the markup
+ // is incorrect and the best thing we can do is to
+ // ignore the unclosed tag and continue parsing as if
+ // it didn't exist:
+ pos = old_pos;
+ }
+ }
+ }
+ }
+
+ pos++;
+ }
+
+ // ok, we're done, now we'll free .Name members of cache - we don't need it anymore:
+ for (int i = 0; i < m_CacheSize; i++)
+ {
+ delete[] m_Cache[i].Name;
+ m_Cache[i].Name = NULL;
+ }
+}
+
+void wx28HtmlTagsCache::QueryTag(int at, int* end1, int* end2)
+{
+ if (m_Cache == NULL) return;
+ if (m_Cache[m_CachePos].Key != at)
+ {
+ int delta = (at < m_Cache[m_CachePos].Key) ? -1 : 1;
+ do
+ {
+ if ( m_CachePos < 0 || m_CachePos == m_CacheSize )
+ {
+ // something is very wrong with HTML, give up by returning an
+ // impossibly large value which is going to be ignored by the
+ // caller
+ *end1 =
+ *end2 = INT_MAX;
+ return;
+ }
+
+ m_CachePos += delta;
+ }
+ while (m_Cache[m_CachePos].Key != at);
+ }
+ *end1 = m_Cache[m_CachePos].End1;
+ *end2 = m_Cache[m_CachePos].End2;
+}
+
+
+
+
+//-----------------------------------------------------------------------------
+// wx28HtmlTag
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_CLASS(wx28HtmlTag,wxObject)
+
+wx28HtmlTag::wx28HtmlTag(wx28HtmlTag *parent,
+ const wxString& source, int pos, int end_pos,
+ wx28HtmlTagsCache *cache,
+ wx28HtmlEntitiesParser *entParser) : wxObject()
+{
+ /* Setup DOM relations */
+
+ m_Next = NULL;
+ m_FirstChild = m_LastChild = NULL;
+ m_Parent = parent;
+ if (parent)
+ {
+ m_Prev = m_Parent->m_LastChild;
+ if (m_Prev == NULL)
+ m_Parent->m_FirstChild = this;
+ else
+ m_Prev->m_Next = this;
+ m_Parent->m_LastChild = this;
+ }
+ else
+ m_Prev = NULL;
+
+ /* Find parameters and their values: */
+
+ int i;
+ wxChar c;
+
+ // fill-in name, params and begin pos:
+ i = pos+1;
+
+ // find tag's name and convert it to uppercase:
+ while ((i < end_pos) &&
+ ((c = source[i++]) != wxT(' ') && c != wxT('\r') &&
+ c != wxT('\n') && c != wxT('\t') &&
+ c != wxT('>')))
+ {
+ if ((c >= wxT('a')) && (c <= wxT('z')))
+ c -= (wxT('a') - wxT('A'));
+ m_Name << c;
+ }
+
+ // if the tag has parameters, read them and "normalize" them,
+ // i.e. convert to uppercase, replace whitespaces by spaces and
+ // remove whitespaces around '=':
+ if (source[i-1] != wxT('>'))
+ {
+ #define IS_WHITE(c) (c == wxT(' ') || c == wxT('\r') || \
+ c == wxT('\n') || c == wxT('\t'))
+ wxString pname, pvalue;
+ wxChar quote;
+ enum
+ {
+ ST_BEFORE_NAME = 1,
+ ST_NAME,
+ ST_BEFORE_EQ,
+ ST_BEFORE_VALUE,
+ ST_VALUE
+ } state;
+
+ quote = 0;
+ state = ST_BEFORE_NAME;
+ while (i < end_pos)
+ {
+ c = source[i++];
+
+ if (c == wxT('>') && !(state == ST_VALUE && quote != 0))
+ {
+ if (state == ST_BEFORE_EQ || state == ST_NAME)
+ {
+ m_ParamNames.Add(pname);
+ m_ParamValues.Add(wxEmptyString);
+ }
+ else if (state == ST_VALUE && quote == 0)
+ {
+ m_ParamNames.Add(pname);
+ if (entParser)
+ m_ParamValues.Add(entParser->Parse(pvalue));
+ else
+ m_ParamValues.Add(pvalue);
+ }
+ break;
+ }
+ switch (state)
+ {
+ case ST_BEFORE_NAME:
+ if (!IS_WHITE(c))
+ {
+ pname = c;
+ state = ST_NAME;
+ }
+ break;
+ case ST_NAME:
+ if (IS_WHITE(c))
+ state = ST_BEFORE_EQ;
+ else if (c == wxT('='))
+ state = ST_BEFORE_VALUE;
+ else
+ pname << c;
+ break;
+ case ST_BEFORE_EQ:
+ if (c == wxT('='))
+ state = ST_BEFORE_VALUE;
+ else if (!IS_WHITE(c))
+ {
+ m_ParamNames.Add(pname);
+ m_ParamValues.Add(wxEmptyString);
+ pname = c;
+ state = ST_NAME;
+ }
+ break;
+ case ST_BEFORE_VALUE:
+ if (!IS_WHITE(c))
+ {
+ if (c == wxT('"') || c == wxT('\''))
+ quote = c, pvalue = wxEmptyString;
+ else
+ quote = 0, pvalue = c;
+ state = ST_VALUE;
+ }
+ break;
+ case ST_VALUE:
+ if ((quote != 0 && c == quote) ||
+ (quote == 0 && IS_WHITE(c)))
+ {
+ m_ParamNames.Add(pname);
+ if (quote == 0)
+ {
+ // VS: backward compatibility, no real reason,
+ // but wxHTML code relies on this... :(
+ pvalue.MakeUpper();
+ }
+ if (entParser)
+ m_ParamValues.Add(entParser->Parse(pvalue));
+ else
+ m_ParamValues.Add(pvalue);
+ state = ST_BEFORE_NAME;
+ }
+ else
+ pvalue << c;
+ break;
+ }
+ }
+
+ #undef IS_WHITE
+ }
+ m_Begin = i;
+
+ cache->QueryTag(pos, &m_End1, &m_End2);
+ if (m_End1 > end_pos) m_End1 = end_pos;
+ if (m_End2 > end_pos) m_End2 = end_pos;
+}
+
+wx28HtmlTag::~wx28HtmlTag()
+{
+ wx28HtmlTag *t1, *t2;
+ t1 = m_FirstChild;
+ while (t1)
+ {
+ t2 = t1->GetNextSibling();
+ delete t1;
+ t1 = t2;
+ }
+}
+
+bool wx28HtmlTag::HasParam(const wxString& par) const
+{
+ return (m_ParamNames.Index(par, false) != wxNOT_FOUND);
+}
+
+wxString wx28HtmlTag::GetParam(const wxString& par, bool with_commas) const
+{
+ int index = m_ParamNames.Index(par, false);
+ if (index == wxNOT_FOUND)
+ return wxEmptyString;
+ if (with_commas)
+ {
+ // VS: backward compatibility, seems to be never used by wxHTML...
+ wxString s;
+ s << wxT('"') << m_ParamValues[index] << wxT('"');
+ return s;
+ }
+ else
+ return m_ParamValues[index];
+}
+
+int wx28HtmlTag::ScanParam(const wxString& par,
+ const wxChar *format,
+ void *param) const
+{
+ wxString parval = GetParam(par);
+ return wxSscanf(parval, format, param);
+}
+
+bool wx28HtmlTag::GetParamAsColour(const wxString& par, wxColour *clr) const
+{
+ wxCHECK_MSG( clr, false, _T("invalid colour argument") );
+
+ wxString str = GetParam(par);
+
+ // handle colours defined in HTML 4.0 first:
+ if (str.length() > 1 && str[0] != _T('#'))
+ {
+ #define HTML_COLOUR(name, r, g, b) \
+ if (str.IsSameAs(wxT(name), false)) \
+ { clr->Set(r, g, b); return true; }
+ HTML_COLOUR("black", 0x00,0x00,0x00)
+ HTML_COLOUR("silver", 0xC0,0xC0,0xC0)
+ HTML_COLOUR("gray", 0x80,0x80,0x80)
+ HTML_COLOUR("white", 0xFF,0xFF,0xFF)
+ HTML_COLOUR("maroon", 0x80,0x00,0x00)
+ HTML_COLOUR("red", 0xFF,0x00,0x00)
+ HTML_COLOUR("purple", 0x80,0x00,0x80)
+ HTML_COLOUR("fuchsia", 0xFF,0x00,0xFF)
+ HTML_COLOUR("green", 0x00,0x80,0x00)
+ HTML_COLOUR("lime", 0x00,0xFF,0x00)
+ HTML_COLOUR("olive", 0x80,0x80,0x00)
+ HTML_COLOUR("yellow", 0xFF,0xFF,0x00)
+ HTML_COLOUR("navy", 0x00,0x00,0x80)
+ HTML_COLOUR("blue", 0x00,0x00,0xFF)
+ HTML_COLOUR("teal", 0x00,0x80,0x80)
+ HTML_COLOUR("aqua", 0x00,0xFF,0xFF)
+ #undef HTML_COLOUR
+ }
+
+ // then try to parse #rrggbb representations or set from other well
+ // known names (note that this doesn't strictly conform to HTML spec,
+ // but it doesn't do real harm -- but it *must* be done after the standard
+ // colors are handled above):
+ if (clr->Set(str))
+ return true;
+
+ return false;
+}
+
+bool wx28HtmlTag::GetParamAsInt(const wxString& par, int *clr) const
+{
+ if ( !HasParam(par) )
+ return false;
+
+ long i;
+ if ( !GetParam(par).ToLong(&i) )
+ return false;
+
+ *clr = (int)i;
+ return true;
+}
+
+wxString wx28HtmlTag::GetAllParams() const
+{
+ // VS: this function is for backward compatibility only,
+ // never used by wxHTML
+ wxString s;
+ size_t cnt = m_ParamNames.GetCount();
+ for (size_t i = 0; i < cnt; i++)
+ {
+ s << m_ParamNames[i];
+ s << wxT('=');
+ if (m_ParamValues[i].Find(wxT('"')) != wxNOT_FOUND)
+ s << wxT('\'') << m_ParamValues[i] << wxT('\'');
+ else
+ s << wxT('"') << m_ParamValues[i] << wxT('"');
+ }
+ return s;
+}
+
+wx28HtmlTag *wx28HtmlTag::GetFirstSibling() const
+{
+ if (m_Parent)
+ return m_Parent->m_FirstChild;
+ else
+ {
+ wx28HtmlTag *cur = (wx28HtmlTag*)this;
+ while (cur->m_Prev)
+ cur = cur->m_Prev;
+ return cur;
+ }
+}
+
+wx28HtmlTag *wx28HtmlTag::GetLastSibling() const
+{
+ if (m_Parent)
+ return m_Parent->m_LastChild;
+ else
+ {
+ wx28HtmlTag *cur = (wx28HtmlTag*)this;
+ while (cur->m_Next)
+ cur = cur->m_Next;
+ return cur;
+ }
+}
+
+wx28HtmlTag *wx28HtmlTag::GetNextTag() const
+{
+ if (m_FirstChild) return m_FirstChild;
+ if (m_Next) return m_Next;
+ wx28HtmlTag *cur = m_Parent;
+ if (!cur) return NULL;
+ while (cur->m_Parent && !cur->m_Next)
+ cur = cur->m_Parent;
+ return cur->m_Next;
+}
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: htmltag.h
+// Purpose: wx28HtmlTag class (represents single tag)
+// Author: Vaclav Slavik
+// RCS-ID: $Id$
+// Copyright: (c) 1999 Vaclav Slavik
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_HTMLTAG_H_
+#define _WX_HTMLTAG_H_
+
+#include "wx/defs.h"
+
+#include "wx/object.h"
+#include "wx/arrstr.h"
+
+class wxColour;
+class wx28HtmlEntitiesParser;
+
+//-----------------------------------------------------------------------------
+// wx28HtmlTagsCache
+// - internal wxHTML class, do not use!
+//-----------------------------------------------------------------------------
+
+struct wx28HtmlCacheItem;
+
+class wx28HtmlTagsCache : public wxObject
+{
+ DECLARE_DYNAMIC_CLASS(wx28HtmlTagsCache)
+
+private:
+ wx28HtmlCacheItem *m_Cache;
+ int m_CacheSize;
+ int m_CachePos;
+
+public:
+ wx28HtmlTagsCache() : wxObject() {m_CacheSize = 0; m_Cache = NULL;}
+ wx28HtmlTagsCache(const wxString& source);
+ virtual ~wx28HtmlTagsCache() {free(m_Cache);}
+
+ // Finds parameters for tag starting at at and fills the variables
+ void QueryTag(int at, int* end1, int* end2);
+
+ DECLARE_NO_COPY_CLASS(wx28HtmlTagsCache)
+};
+
+
+//--------------------------------------------------------------------------------
+// wx28HtmlTag
+// This represents single tag. It is used as internal structure
+// by wx28HtmlParser.
+//--------------------------------------------------------------------------------
+
+class wx28HtmlTag : public wxObject
+{
+ DECLARE_CLASS(wx28HtmlTag)
+
+protected:
+ // constructs wx28HtmlTag object based on HTML tag.
+ // The tag begins (with '<' character) at position pos in source
+ // end_pos is position where parsing ends (usually end of document)
+ wx28HtmlTag(wx28HtmlTag *parent,
+ const wxString& source, int pos, int end_pos,
+ wx28HtmlTagsCache *cache,
+ wx28HtmlEntitiesParser *entParser);
+ friend class wx28HtmlParser;
+public:
+ virtual ~wx28HtmlTag();
+
+ wx28HtmlTag *GetParent() const {return m_Parent;}
+ wx28HtmlTag *GetFirstSibling() const;
+ wx28HtmlTag *GetLastSibling() const;
+ wx28HtmlTag *GetChildren() const { return m_FirstChild; }
+ wx28HtmlTag *GetPreviousSibling() const { return m_Prev; }
+ wx28HtmlTag *GetNextSibling() const {return m_Next; }
+ // Return next tag, as if tree had been flattened
+ wx28HtmlTag *GetNextTag() const;
+
+ // Returns tag's name in uppercase.
+ inline wxString GetName() const {return m_Name;}
+
+ // Returns true if the tag has given parameter. Parameter
+ // should always be in uppercase.
+ // Example : <IMG SRC="test.jpg"> HasParam("SRC") returns true
+ bool HasParam(const wxString& par) const;
+
+ // Returns value of the param. Value is in uppercase unless it is
+ // enclosed with "
+ // Example : <P align=right> GetParam("ALIGN") returns (RIGHT)
+ // <P IMG SRC="WhaT.jpg"> GetParam("SRC") returns (WhaT.jpg)
+ // (or ("WhaT.jpg") if with_commas == true)
+ wxString GetParam(const wxString& par, bool with_commas = false) const;
+
+ // Convenience functions:
+ bool GetParamAsColour(const wxString& par, wxColour *clr) const;
+ bool GetParamAsInt(const wxString& par, int *clr) const;
+
+ // Scans param like scanf() functions family does.
+ // Example : ScanParam("COLOR", "\"#%X\"", &clr);
+ // This is always with with_commas=false
+ // Returns number of scanned values
+ // (like sscanf() does)
+ // NOTE: unlike scanf family, this function only accepts
+ // *one* parameter !
+ int ScanParam(const wxString& par, const wxChar *format, void *param) const;
+
+ // Returns string containing all params.
+ wxString GetAllParams() const;
+
+ // return true if this there is matching ending tag
+ inline bool HasEnding() const {return m_End1 >= 0;}
+
+ // returns beginning position of _internal_ block of text
+ // See explanation (returned value is marked with *):
+ // bla bla bla <MYTAG>* bla bla intenal text</MYTAG> bla bla
+ inline int GetBeginPos() const {return m_Begin;}
+ // returns ending position of _internal_ block of text.
+ // bla bla bla <MYTAG> bla bla intenal text*</MYTAG> bla bla
+ inline int GetEndPos1() const {return m_End1;}
+ // returns end position 2 :
+ // bla bla bla <MYTAG> bla bla internal text</MYTAG>* bla bla
+ inline int GetEndPos2() const {return m_End2;}
+
+private:
+ wxString m_Name;
+ int m_Begin, m_End1, m_End2;
+ wxArrayString m_ParamNames, m_ParamValues;
+
+ // DOM tree relations:
+ wx28HtmlTag *m_Next;
+ wx28HtmlTag *m_Prev;
+ wx28HtmlTag *m_FirstChild, *m_LastChild;
+ wx28HtmlTag *m_Parent;
+
+ DECLARE_NO_COPY_CLASS(wx28HtmlTag)
+};
+
+
+
+#endif // _WX_HTMLTAG_H_
+
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+ <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
+ <META NAME="GENERATOR" CONTENT="Mozilla/4.06 [en] (X11; I; Linux 2.0.35 i686) [Netscape]">
+</HEAD>
+<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#51188E" ALINK="#FF0000">
+
+<H3>
+This is TABLES
+tests page...</H3>
+
+
+(yes, really, see below:)
+<BR>Click <a href="test.htm">here</a> to go to original testing page...
+<BR>Click <a href="../../docs/html/man.htm">here</a> to go to manuals...
+<BR>
+<CENTER><TABLE CELLSPACING=5 BORDER COLS=2 WIDTH="40%" NOSAVE >
+<TR ALIGN=CENTER NOSAVE>
+<TD WIDTH="40%" NOSAVE>Top left
+<BR>(two lines expression)
+<P>paragraph done</TD>
+
+<TD NOSAVE>Top right</TD>
+</TR>
+
+<TR>
+<TD>Bottom left</TD>
+
+<TD>Bottom right</TD>
+</TR>
+</TABLE></CENTER>
+
+<P>Subsampling is shown there:
+<BR>
+<TABLE BORDER COLS=2 WIDTH="100%" NOSAVE >
+<TR NOSAVE>
+<TD VALIGN=BOTTOM NOSAVE>
+<TABLE BORDER COLS=2 WIDTH="50%" NOSAVE >
+<TR ALIGN=CENTER BGCOLOR="#3366FF" NOSAVE>
+<TD>a</TD>
+
+<TD WIDTH="10%" NOSAVE>b</TD>
+</TR>
+
+<TR NOSAVE>
+<TD>c</TD>
+
+<TD NOSAVE>d</TD>
+</TR>
+
+</TABLE>
+</TD>
+
+<TD VALIGN=BOTTOM NOSAVE>2</TD>
+</TR>
+
+<TR NOSAVE>
+<TD>3 dflkj lkjfl dkjldkfjl flk jflkf lkjflkj ljlf ajlfj alff h khg hgj
+gjg jg gjhfg fg gjh gjf jgf jgj f gjfgj kfajg </TD>
+
+<TD ALIGN=CENTER VALIGN=BOTTOM BGCOLOR="#FFFF99" NOSAVE>4
+<BR>gh
+<BR>gfh
+<BR>gh
+<BR>hg
+<BR>5</TD>
+</TR>
+</TABLE>
+
+<P>This is "default" table - with no sizes givev:
+<BR>
+<TABLE BORDER COLS=4 WIDTH="100%" NOSAVE >
+<TR NOSAVE>
+<TD>Hello</TD>
+
+<TD NOSAVE>lkfdsjlk fj dlfj lkfj lkjflk jlfk lk fjlk elwkf lkejflek f jlekjflkj
+ljlk lk jlkf lefjl j flkj ljl lf lfj lfjl lj lwe lekf;eh kfejh lkh kjh
+kjhkj hkj hkj lkh kjh kjlh kj</TD>
+
+<TD>shortebn formo lr lk</TD>
+
+<TD>djsf lkjlf poer oi pjr po kpk </TD>
+</TR>
+
+<TR>
+<TD>a</TD>
+
+<TD>b</TD>
+
+<TD>c</TD>
+
+<TD>d</TD>
+</TR>
+
+<TR NOSAVE>
+<TD>1</TD>
+
+<TD>2</TD>
+
+<TD COLSPAN="2" ROWSPAN="2" NOSAVE>3</TD>
+</TR>
+
+<TR>
+<TD>A</TD>
+
+<TD>B</Td>
+</TR>
+</TABLE>
+
+
+<p>
+</p>
+
+<hr size="8"/>
+
+
+
+<table cellspacing='0' cellpadding='0'>
+ <tr align='left'>
+ <td width="30%" valign='top'>Error:</td>
+ <td width='5'></td>
+ <td>Sex sells better than <b>truth and honour</b></td><td align='right'>X For President is my agenda!</td>
+ </tr>
+ <tr align='left'>
+ <td valign='top'>Command:</td>
+ <td width='5'></td>
+ <td>Go out and spread the word, <b>we shall prevail!</b></td><td>X</td>
+ </tr>
+</table>
+<br><br>
+<table cellspacing='0' cellpadding='0'>
+ <tr align='left'>
+ <td valign='top'>Error:</td>
+ <td width='5'></td>
+ <td>Sex sells better than <b>truth and honour</b></td><td align='right'>X For President is my agenda!</td>
+ </tr>
+ <tr align='left'>
+ <td valign='top'>Command:</td>
+ <td width='5'></td>
+ <td>Go out and spread the word, <b>we shall prevail!</b></td><td>X</td>
+ </tr>
+</table>
+<br><br>
+<table width="200" cellspacing='0' cellpadding='0'>
+ <tr align='left'>
+ <td valign='top'>Error:</td>
+ <td width='5'></td>
+ <td nowrap>Sex sells better than <b>truth and honour</b></td><td align='right'>X For President is my agenda!</td>
+ </tr>
+ <tr align='left'>
+ <td valign='top'>Command:</td>
+ <td width='5'></td>
+ <td>Go out and spread the word, <b>we shall prevail!</b></td><td>X</td>
+ </tr>
+</table>
+<br><br>
+<table cellspacing='0' cellpadding='0'>
+ <tr align='left'>
+ <td valign='top'>Error:</td>
+ <td width='5'></td>
+ <td>
+ <table cellspacing='0' cellpadding='0'>
+ <tr align='left'>
+ <td valign='top'>Error:</td>
+ <td width='5'></td>
+ <td>Sex sells better than <b>truth and honour</b></td><td align='right'>X For President is my agenda!</td>
+ </tr>
+ <tr align='left'>
+ <td valign='top'>Command:</td>
+ <td width='5'></td>
+ <td>Go out and spread the word, <b>we shall prevail!</b></td>
+ <td>X</td>
+ </tr>
+ </table>
+ </td>
+ <td align='right'>X For President is my agenda!</td>
+ </tr>
+ <tr align='left'>
+ <td valign='top'>Command:</td>
+ <td width='5'></td>
+ <td>Go out and spread the word, <b>we shall prevail!</b></td>
+ <td>X</td>
+ </tr>
+</table>
+<br><br>
+<table cellspacing='0' cellpadding='0'>
+ <tr>
+ <td><ul><li>Just a small test</li></ul></td>
+ <td>Really, a test!</td>
+ </tr>
+</table>
-DwxUSE_GUI=0 $(CPPFLAGS) $(CXXFLAGS)
BENCH_OBJECTS = \
$(OBJS)\bench_bench.obj \
+ $(OBJS)\bench_htmlpars.obj \
+ $(OBJS)\bench_htmltag.obj \
$(OBJS)\bench_strings.obj \
$(OBJS)\bench_tls.obj
### Targets: ###
-all: $(OBJS)\bench.exe
+all: $(OBJS)\bench.exe data
clean:
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
c0x32.obj $(BENCH_OBJECTS),$@,, $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) ole2w32.lib oleacc.lib import32.lib cw32$(__THREADSFLAG_5)$(__RUNTIME_LIBS_8).lib,,
|
+data:
+ if not exist $(OBJS) mkdir $(OBJS)
+ for %f in (htmltest.html) do if not exist $(OBJS)\%f copy .\%f $(OBJS)
+
$(OBJS)\bench_bench.obj: .\bench.cpp
$(CXX) -q -c -P -o$@ $(BENCH_CXXFLAGS) .\bench.cpp
+$(OBJS)\bench_htmlpars.obj: .\htmlparser\htmlpars.cpp
+ $(CXX) -q -c -P -o$@ $(BENCH_CXXFLAGS) .\htmlparser\htmlpars.cpp
+
+$(OBJS)\bench_htmltag.obj: .\htmlparser\htmltag.cpp
+ $(CXX) -q -c -P -o$@ $(BENCH_CXXFLAGS) .\htmlparser\htmltag.cpp
+
$(OBJS)\bench_strings.obj: .\strings.cpp
$(CXX) -q -c -P -o$@ $(BENCH_CXXFLAGS) .\strings.cpp
-Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
BENCH_OBJECTS = \
$(OBJS)\bench_bench.o \
+ $(OBJS)\bench_htmlpars.o \
+ $(OBJS)\bench_htmltag.o \
$(OBJS)\bench_strings.o \
$(OBJS)\bench_tls.o
### Targets: ###
-all: $(OBJS)\bench.exe
+all: $(OBJS)\bench.exe data
clean:
-if exist $(OBJS)\*.o del $(OBJS)\*.o
$(OBJS)\bench.exe: $(BENCH_OBJECTS)
$(CXX) -o $@ $(BENCH_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
+data:
+ if not exist $(OBJS) mkdir $(OBJS)
+ for %%f in (htmltest.html) do if not exist $(OBJS)\%%f copy .\%%f $(OBJS)
+
$(OBJS)\bench_bench.o: ./bench.cpp
$(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<
+$(OBJS)\bench_htmlpars.o: ./htmlparser/htmlpars.cpp
+ $(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<
+
+$(OBJS)\bench_htmltag.o: ./htmlparser/htmltag.cpp
+ $(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<
+
$(OBJS)\bench_strings.o: ./strings.cpp
$(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\bench_tls.o: ./tls.cpp
$(CXX) -c -o $@ $(BENCH_CXXFLAGS) $(CPPDEPS) $<
-.PHONY: all clean
+.PHONY: all clean data
SHELL := $(COMSPEC)
$(CXXFLAGS)
BENCH_OBJECTS = \
$(OBJS)\bench_bench.obj \
+ $(OBJS)\bench_htmlpars.obj \
+ $(OBJS)\bench_htmltag.obj \
$(OBJS)\bench_strings.obj \
$(OBJS)\bench_tls.obj
### Targets: ###
-all: $(OBJS)\bench.exe
+all: $(OBJS)\bench.exe data
clean:
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
$(BENCH_OBJECTS) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__UNICOWS_LIB_p) $(__GDIPLUS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib
<<
+data:
+ if not exist $(OBJS) mkdir $(OBJS)
+ for %f in (htmltest.html) do if not exist $(OBJS)\%f copy .\%f $(OBJS)
+
$(OBJS)\bench_bench.obj: .\bench.cpp
$(CXX) /c /nologo /TP /Fo$@ $(BENCH_CXXFLAGS) .\bench.cpp
+$(OBJS)\bench_htmlpars.obj: .\htmlparser\htmlpars.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(BENCH_CXXFLAGS) .\htmlparser\htmlpars.cpp
+
+$(OBJS)\bench_htmltag.obj: .\htmlparser\htmltag.cpp
+ $(CXX) /c /nologo /TP /Fo$@ $(BENCH_CXXFLAGS) .\htmlparser\htmltag.cpp
+
$(OBJS)\bench_strings.obj: .\strings.cpp
$(CXX) /c /nologo /TP /Fo$@ $(BENCH_CXXFLAGS) .\strings.cpp
-dwxUSE_GUI=0 $(__RTTIFLAG_7) $(__EXCEPTIONSFLAG_8) $(CPPFLAGS) $(CXXFLAGS)
BENCH_OBJECTS = &
$(OBJS)\bench_bench.obj &
+ $(OBJS)\bench_htmlpars.obj &
+ $(OBJS)\bench_htmltag.obj &
$(OBJS)\bench_strings.obj &
$(OBJS)\bench_tls.obj
### Targets: ###
-all : .SYMBOLIC $(OBJS)\bench.exe
+all : .SYMBOLIC $(OBJS)\bench.exe data
clean : .SYMBOLIC
-if exist $(OBJS)\*.obj del $(OBJS)\*.obj
@for %i in () do @%append $(OBJS)\bench.lbc option stack=%i
wlink @$(OBJS)\bench.lbc
+data : .SYMBOLIC
+ if not exist $(OBJS) mkdir $(OBJS)
+ for %f in (htmltest.html) do if not exist $(OBJS)\%f copy .\%f $(OBJS)
+
$(OBJS)\bench_bench.obj : .AUTODEPEND .\bench.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(BENCH_CXXFLAGS) $<
+$(OBJS)\bench_htmlpars.obj : .AUTODEPEND .\htmlparser\htmlpars.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(BENCH_CXXFLAGS) $<
+
+$(OBJS)\bench_htmltag.obj : .AUTODEPEND .\htmlparser\htmltag.cpp
+ $(CXX) -bt=nt -zq -fo=$^@ $(BENCH_CXXFLAGS) $<
+
$(OBJS)\bench_strings.obj : .AUTODEPEND .\strings.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(BENCH_CXXFLAGS) $<
/////////////////////////////////////////////////////////////////////////////
#include "wx/string.h"
+#include "wx/ffile.h"
#include "bench.h"
+#include "htmlparser/htmlpars.h"
static const char asciistr[] =
"This is just the first line of a very long 7 bit ASCII string"
return wxStrlen(str.mb_str()) == ASCIISTR_LEN &&
wxStrlen(str.wc_str()) == ASCIISTR_LEN;
}
+
+
+// ----------------------------------------------------------------------------
+// wxString::operator[] - parse large HTML page
+// ----------------------------------------------------------------------------
+
+class DummyParser : public wx28HtmlParser
+{
+public:
+ virtual wxObject* GetProduct() { return NULL; }
+ virtual void AddText(const wxChar*) {}
+};
+
+
+BENCHMARK_FUNC(ParseHTML)
+{
+ // static so that construction time is not counted
+ static DummyParser parser;
+ static wxString html;
+ if ( html.empty() )
+ {
+ wxFFile("htmltest.html").ReadAll(&html, wxConvUTF8);
+ }
+
+ parser.Parse(html);
+
+ return true;
+}