#! /bin/sh
-# From configure.in Id: configure.in 52015 2008-02-22 22:27:39Z RD .
+# From configure.in Id: configure.in 52837 2008-03-26 16:40:54Z FM .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0.
#
makefiles=`(cd $srcdir ; find $subdir -name Makefile.in) | $EGREP -v "$disabled"`
fi
else
- if test ${subdir} = "samples"; then
+ if test ${subdir} = "samples"; then
makefiles="samples/Makefile.in $makefiles"
for sample in `echo $SAMPLES_SUBDIRS`; do
if test -d $srcdir/samples/$sample; then
done
elif test ${subdir} = "utils"; then
makefiles=""
- for util in HelpGen tex2rtf ; do
+ for util in ifacecheck ; do
if test -d $srcdir/utils/$util ; then
- makefiles="utils/$util/Makefile.in \
- utils/$util/src/Makefile.in \
+ makefiles="utils/$util/src/Makefile.in \
$makefiles"
fi
done
fi
else
dnl we build wxBase only
- dnl don't take all samples/utils, just those which build with
- dnl wxBase
+ dnl don't take all samples/utils, just those which build with wxBase
if test ${subdir} = "samples"; then
dnl only take those samples which compile in the current
dnl configuration and which exist
done
elif test ${subdir} = "utils"; then
makefiles=""
- for util in HelpGen tex2rtf ; do
+ for util in ifacecheck ; do
if test -d $srcdir/utils/$util ; then
- makefiles="utils/$util/Makefile.in \
- utils/$util/src/Makefile.in \
+ makefiles="utils/$util/src/Makefile.in \
$makefiles"
fi
done
or directly http://wxcode.sourceforge.net or http://www.wxcommunity.com/ .
@li @ref page_utils_emulator
-@li @ref page_utils_helpgen
@li @ref page_utils_helpview
@li @ref page_utils_hhp2cached
@li @ref page_utils_ifacecheck
-@li @ref page_utils_tex2rtf
@li @ref page_utils_wxrc
This program can be found in @c utils/emulator.
-@section page_utils_helpgen Help Generator
-
-Helpgen takes C++ header files and generates a Tex2RTF-compatible
-documentation file for each class it finds, using comments as appropriate.
-This is a good way to start a reference for a set of classes.
-
-Helpgen can be found in @c utils/HelpGen.
-
-
@section page_utils_helpview Help Viewer
Helpview is a program for displaying wxWidgets HTML Help files.
You can find it in @c utils/ifacecheck.
-@section page_utils_tex2rtf Tex2RTF
-
-Supplied with wxWidgets is a utility called Tex2RTF for
-converting @e LaTeX manuals HTML, MS HTML Help, wxHTML Help, RTF, and Windows
-Help RTF formats. Tex2RTF was used for the wxWidgets manuals and can be used
-independently by authors wishing to create on-line and printed manuals from the
-same @e LaTeX source. Please see the separate documentation for Tex2RTF.
-
-You can find it under @c utils/tex2rtf.
-
-
@section page_utils_wxrc wxWidgets XML Resource Compiler
This utility allows the user to compile @e binary versions of their XRC files,
+++ /dev/null
-
-all:
- cd src; $(MAKE)
-
-clean:
- cd src; $(MAKE) clean
-
+++ /dev/null
-# Microsoft Developer Studio Project File - Name="HelpGen" - Package Owner=<4>\r
-# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
-# ** DO NOT EDIT **\r
-\r
-# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
-\r
-CFG=HelpGen - Win32 DLL Release\r
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
-!MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "helpgen.mak".\r
-!MESSAGE \r
-!MESSAGE You can specify a configuration when running NMAKE\r
-!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "helpgen.mak" CFG="HelpGen - Win32 DLL Release"\r
-!MESSAGE \r
-!MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
-!MESSAGE "HelpGen - Win32 Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 Unicode Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 Unicode Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 Universal Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 Universal Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 Universal Unicode Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 Universal Unicode Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 DLL Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 DLL Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 DLL Unicode Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 DLL Unicode Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 DLL Universal Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 DLL Universal Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 DLL Universal Unicode Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 DLL Universal Unicode Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE \r
-\r
-# Begin Project\r
-# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName ""\r
-# PROP Scc_LocalPath ""\r
-CPP=cl.exe\r
-RSC=rc.exe\r
-\r
-!IF "$(CFG)" == "HelpGen - Win32 Debug"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "vc_mswd"\r
-# PROP BASE Intermediate_Dir "vc_mswd\HelpGen"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "vc_mswd"\r
-# PROP Intermediate_Dir "vc_mswd\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswd\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_lib\mswd" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswd\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_lib\mswd" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswd" /i "." /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswd" /i "." /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswd\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-# ADD LINK32 wxbase25d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswd\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - Win32 Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "vc_msw"\r
-# PROP BASE Intermediate_Dir "vc_msw\HelpGen"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "vc_msw"\r
-# PROP Intermediate_Dir "vc_msw\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MD /Fdvc_msw\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_lib\msw" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MD /Fdvc_msw\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_lib\msw" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "__WXMSW__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\msw" /i "." /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "__WXMSW__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\msw" /i "." /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_msw\HelpGen.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-# ADD LINK32 wxbase25.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_msw\HelpGen.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - Win32 Unicode 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\HelpGen"\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\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswud\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_lib\mswud" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswud\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_lib\mswud" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswud" /i "." /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswud" /i "." /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswud\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-# ADD LINK32 wxbase25ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswud\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - Win32 Unicode Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "vc_mswu"\r
-# PROP BASE Intermediate_Dir "vc_mswu\HelpGen"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "vc_mswu"\r
-# PROP Intermediate_Dir "vc_mswu\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MD /Fdvc_mswu\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_lib\mswu" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MD /Fdvc_mswu\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_lib\mswu" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswu" /i "." /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswu" /i "." /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswu\HelpGen.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-# ADD LINK32 wxbase25u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswu\HelpGen.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - Win32 Universal Debug"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "vc_mswunivd"\r
-# PROP BASE Intermediate_Dir "vc_mswunivd\HelpGen"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "vc_mswunivd"\r
-# PROP Intermediate_Dir "vc_mswunivd\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswunivd\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_lib\mswunivd" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswunivd\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_lib\mswunivd" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswunivd" /i "." /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswunivd" /i "." /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivd\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-# ADD LINK32 wxbase25d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivd\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - Win32 Universal Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "vc_mswuniv"\r
-# PROP BASE Intermediate_Dir "vc_mswuniv\HelpGen"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "vc_mswuniv"\r
-# PROP Intermediate_Dir "vc_mswuniv\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MD /Fdvc_mswuniv\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_lib\mswuniv" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MD /Fdvc_mswuniv\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_lib\mswuniv" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswuniv" /i "." /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswuniv" /i "." /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswuniv\HelpGen.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-# ADD LINK32 wxbase25.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswuniv\HelpGen.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - Win32 Universal Unicode 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\HelpGen"\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\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswunivud\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_lib\mswunivud" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswunivud\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_lib\mswunivud" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswunivud" /i "." /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswunivud" /i "." /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivud\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-# ADD LINK32 wxbase25ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivud\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - Win32 Universal Unicode Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "vc_mswunivu"\r
-# PROP BASE Intermediate_Dir "vc_mswunivu\HelpGen"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "vc_mswunivu"\r
-# PROP Intermediate_Dir "vc_mswunivu\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MD /Fdvc_mswunivu\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_lib\mswunivu" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MD /Fdvc_mswunivu\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_lib\mswunivu" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswunivu" /i "." /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswunivu" /i "." /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivu\HelpGen.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-# ADD LINK32 wxbase25u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivu\HelpGen.exe" /libpath:".\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Debug"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "vc_mswddll"\r
-# PROP BASE Intermediate_Dir "vc_mswddll\HelpGen"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "vc_mswddll"\r
-# PROP Intermediate_Dir "vc_mswddll\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswddll\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_dll\mswd" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswddll\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_dll\mswd" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswd" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswd" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswddll\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-# ADD LINK32 wxbase25d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswddll\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "vc_mswdll"\r
-# PROP BASE Intermediate_Dir "vc_mswdll\HelpGen"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "vc_mswdll"\r
-# PROP Intermediate_Dir "vc_mswdll\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MD /Fdvc_mswdll\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_dll\msw" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MD /Fdvc_mswdll\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_dll\msw" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "__WXMSW__" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\msw" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "__WXMSW__" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\msw" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswdll\HelpGen.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-# ADD LINK32 wxbase25.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswdll\HelpGen.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Unicode 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\HelpGen"\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\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswuddll\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_dll\mswud" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswuddll\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_dll\mswud" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswud" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswud" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswuddll\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-# ADD LINK32 wxbase25ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswuddll\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Unicode Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "vc_mswudll"\r
-# PROP BASE Intermediate_Dir "vc_mswudll\HelpGen"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "vc_mswudll"\r
-# PROP Intermediate_Dir "vc_mswudll\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MD /Fdvc_mswudll\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_dll\mswu" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MD /Fdvc_mswudll\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_dll\mswu" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswu" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswu" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswudll\HelpGen.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-# ADD LINK32 wxbase25u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswudll\HelpGen.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Universal Debug"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "vc_mswunivddll"\r
-# PROP BASE Intermediate_Dir "vc_mswunivddll\HelpGen"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "vc_mswunivddll"\r
-# PROP Intermediate_Dir "vc_mswunivddll\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswunivddll\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_dll\mswunivd" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswunivddll\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_dll\mswunivd" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswunivd" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswunivd" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivddll\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-# ADD LINK32 wxbase25d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivddll\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Universal Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "vc_mswunivdll"\r
-# PROP BASE Intermediate_Dir "vc_mswunivdll\HelpGen"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "vc_mswunivdll"\r
-# PROP Intermediate_Dir "vc_mswunivdll\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MD /Fdvc_mswunivdll\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_dll\mswuniv" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MD /Fdvc_mswunivdll\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_dll\mswuniv" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswuniv" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswuniv" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivdll\HelpGen.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-# ADD LINK32 wxbase25.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivdll\HelpGen.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Universal Unicode 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\HelpGen"\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\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswunivuddll\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_dll\mswunivud" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MDd /Zi /Gm /GZ /Fdvc_mswunivuddll\HelpGen.pdb /Od /I ".\..\..\include" /I ".\..\..\lib\vc_dll\mswunivud" /W4 /I "." /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswunivud" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswunivud" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-# ADD LINK32 wxbase25ud.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivuddll\HelpGen.exe" /debug /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Universal Unicode Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "vc_mswunivudll"\r
-# PROP BASE Intermediate_Dir "vc_mswunivudll\HelpGen"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "vc_mswunivudll"\r
-# PROP Intermediate_Dir "vc_mswunivudll\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /GR /GX /MD /Fdvc_mswunivudll\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_dll\mswunivu" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD CPP /nologo /FD /GR /GX /MD /Fdvc_mswunivudll\HelpGen.pdb /O1 /I ".\..\..\include" /I ".\..\..\lib\vc_dll\mswunivu" /W4 /I "." /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_CONSOLE" /c\r
-# ADD BASE RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswunivu" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-# ADD RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswunivu" /i "." /d "WXUSINGDLL" /d _CONSOLE\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxbase25u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivudll\HelpGen.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-# ADD LINK32 wxbase25u.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib /nologo /machine:i386 /out:"vc_mswunivudll\HelpGen.exe" /libpath:".\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ENDIF\r
-\r
-# Begin Target\r
-\r
-# Name "HelpGen - Win32 Debug"\r
-# Name "HelpGen - Win32 Release"\r
-# Name "HelpGen - Win32 Unicode Debug"\r
-# Name "HelpGen - Win32 Unicode Release"\r
-# Name "HelpGen - Win32 Universal Debug"\r
-# Name "HelpGen - Win32 Universal Release"\r
-# Name "HelpGen - Win32 Universal Unicode Debug"\r
-# Name "HelpGen - Win32 Universal Unicode Release"\r
-# Name "HelpGen - Win32 DLL Debug"\r
-# Name "HelpGen - Win32 DLL Release"\r
-# Name "HelpGen - Win32 DLL Unicode Debug"\r
-# Name "HelpGen - Win32 DLL Unicode Release"\r
-# Name "HelpGen - Win32 DLL Universal Debug"\r
-# Name "HelpGen - Win32 DLL Universal Release"\r
-# Name "HelpGen - Win32 DLL Universal Unicode Debug"\r
-# Name "HelpGen - Win32 DLL Universal Unicode Release"\r
-# Begin Group "Source Files"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\HelpGen.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\cjparser.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\docripper.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ifcontext.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\markup.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\scriptbinder.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\sourcepainter.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\srcparser.cpp\r
-# End Source File\r
-# End Group\r
-# End Target\r
-# End Project\r
-\r
+++ /dev/null
-# =========================================================================
-# This makefile was generated by
-# Bakefile 0.1.1 (http://bakefile.sourceforge.net)
-# Do not modify, all changes will be overwritten!
-# =========================================================================
-
-!ifndef BCCDIR
-BCCDIR = $(MAKEDIR)\..
-!endif
-
-!include ../../build/msw/config.bcc
-
-# -------------------------------------------------------------------------
-# Do not modify the rest of this file!
-# -------------------------------------------------------------------------
-
-!if "$(BCCDIR)" == "\.."
-!error Your Borland compiler does not define MAKEDIR. Please define the BCCDIR variable, e.g. BCCDIR=d:\bc4
-!endif
-
-### Variables: ###
-
-HELPGEN_CXXFLAGS = $(CPPFLAGS) $(__RUNTIME_LIBS_6) -I$(BCCDIR)\include \
- $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) -tWM -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
- $(__DEBUG_DEFINE_p) $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(SETUPHDIR) \
- -I. $(__DLLFLAG_p) $(CXXFLAGS)
-HELPGEN_OBJECTS = \
- $(OBJS)\HelpGen_HelpGen.obj \
- $(OBJS)\HelpGen_cjparser.obj \
- $(OBJS)\HelpGen_docripper.obj \
- $(OBJS)\HelpGen_ifcontext.obj \
- $(OBJS)\HelpGen_markup.obj \
- $(OBJS)\HelpGen_scriptbinder.obj \
- $(OBJS)\HelpGen_sourcepainter.obj \
- $(OBJS)\HelpGen_srcparser.obj
-OBJS = \
- bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
-SETUPHDIR = \
- $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
-
-### Conditionally set variables: ###
-
-!if "$(SHARED)" == "0"
-LIBDIRNAME = .\..\..\lib\bcc_lib$(CFG)
-!endif
-!if "$(SHARED)" == "1"
-LIBDIRNAME = .\..\..\lib\bcc_dll$(CFG)
-!endif
-!if "$(USE_GUI)" == "0"
-PORTNAME = base
-!endif
-!if "$(USE_GUI)" == "1"
-PORTNAME = msw
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-WXDEBUGFLAG = d
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-WXDEBUGFLAG = d
-!endif
-!if "$(SHARED)" == "1"
-WXDLLFLAG = dll
-!endif
-!if "$(UNICODE)" == "1"
-WXUNICODEFLAG = u
-!endif
-!if "$(WXUNIV)" == "1"
-WXUNIVNAME = univ
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO = -v
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO = -v-
-!endif
-!if "$(DEBUG_INFO)" == "0"
-__DEBUGINFO = -v-
-!endif
-!if "$(DEBUG_INFO)" == "1"
-__DEBUGINFO = -v
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-__DEBUG_DEFINE_p = -D__WXDEBUG__
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-__DEBUG_DEFINE_p = -D__WXDEBUG__
-!endif
-!if "$(SHARED)" == "1"
-__DLLFLAG_p = -DWXUSINGDLL
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
-!endif
-!if "$(BUILD)" == "debug"
-__OPTIMIZEFLAG_2 = -Od
-!endif
-!if "$(BUILD)" == "release"
-__OPTIMIZEFLAG_2 = -O2
-!endif
-!if "$(RUNTIME_LIBS)" == "dynamic"
-__RUNTIME_LIBS_6 = -tWR
-!endif
-!if "$(RUNTIME_LIBS)" == "static"
-__RUNTIME_LIBS_6 =
-!endif
-!if "$(RUNTIME_LIBS)" == "dynamic"
-__RUNTIME_LIBS_7 = i
-!endif
-!if "$(RUNTIME_LIBS)" == "static"
-__RUNTIME_LIBS_7 =
-!endif
-!if "$(UNICODE)" == "1"
-__UNICODE_DEFINE_p = -D_UNICODE
-!endif
-!if "$(MSLU)" == "1"
-__UNICOWS_LIB_p = unicows.lib
-!endif
-!if "$(MONOLITHIC)" == "0"
-__WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib
-!endif
-!if "$(MONOLITHIC)" == "1"
-__WXLIB_MONO_p = \
- wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib
-!endif
-!if "$(WXUNIV)" == "1"
-__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
-!endif
-
-
-all: $(OBJS)
-$(OBJS):
- -if not exist $(OBJS) mkdir $(OBJS)
-
-### Targets: ###
-
-all: $(OBJS)\HelpGen.exe
-
-$(OBJS)\HelpGen_HelpGen.obj: .\src\HelpGen.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen_cjparser.obj: .\src\cjparser.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen_docripper.obj: .\src\docripper.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen_ifcontext.obj: .\src\ifcontext.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen_markup.obj: .\src\markup.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen_scriptbinder.obj: .\src\scriptbinder.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen_sourcepainter.obj: .\src\sourcepainter.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen_srcparser.obj: .\src\srcparser.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen.exe: $(HELPGEN_OBJECTS)
- ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib $(__DEBUGINFO) -L$(LIBDIRNAME) -ap @&&|
- c0x32.obj $(HELPGEN_OBJECTS),$@,, $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(__UNICOWS_LIB_p) import32.lib ole2w32.lib import32.lib cw32mt$(__RUNTIME_LIBS_7).lib,,
-|
-
-clean:
- -if exist $(OBJS)\*.obj del $(OBJS)\*.obj
- -if exist $(OBJS)\*.res del $(OBJS)\*.res
- -if exist $(OBJS)\HelpGen.exe del $(OBJS)\HelpGen.exe
- -if exist $(OBJS)\HelpGen.tds del $(OBJS)\HelpGen.tds
- -if exist $(OBJS)\HelpGen.ilc del $(OBJS)\HelpGen.ilc
- -if exist $(OBJS)\HelpGen.ild del $(OBJS)\HelpGen.ild
- -if exist $(OBJS)\HelpGen.ilf del $(OBJS)\HelpGen.ilf
- -if exist $(OBJS)\HelpGen.ils del $(OBJS)\HelpGen.ils
+++ /dev/null
-# =========================================================================
-# This makefile was generated by
-# Bakefile 0.1.1 (http://bakefile.sourceforge.net)
-# Do not modify, all changes will be overwritten!
-# =========================================================================
-
-include ../../build/msw/config.gcc
-
-# -------------------------------------------------------------------------
-# Do not modify the rest of this file!
-# -------------------------------------------------------------------------
-
-### Variables: ###
-
-HELPGEN_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(GCCFLAGS) \
- -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
- $(__UNICODE_DEFINE_p) -I.\..\..\include -I$(SETUPHDIR) -Wall -I. \
- $(__DLLFLAG_p) $(CXXFLAGS)
-HELPGEN_OBJECTS = \
- $(OBJS)\HelpGen_HelpGen.o \
- $(OBJS)\HelpGen_cjparser.o \
- $(OBJS)\HelpGen_docripper.o \
- $(OBJS)\HelpGen_ifcontext.o \
- $(OBJS)\HelpGen_markup.o \
- $(OBJS)\HelpGen_scriptbinder.o \
- $(OBJS)\HelpGen_sourcepainter.o \
- $(OBJS)\HelpGen_srcparser.o
-OBJS = \
- gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
-SETUPHDIR = \
- $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
-
-### Conditionally set variables: ###
-
-ifeq ($(GCC_VERSION),2.95)
-GCCFLAGS = -fvtable-thunks
-endif
-ifeq ($(SHARED),0)
-LIBDIRNAME = .\..\..\lib\gcc_lib$(CFG)
-endif
-ifeq ($(SHARED),1)
-LIBDIRNAME = .\..\..\lib\gcc_dll$(CFG)
-endif
-ifeq ($(USE_GUI),0)
-PORTNAME = base
-endif
-ifeq ($(USE_GUI),1)
-PORTNAME = msw
-endif
-ifeq ($(BUILD),debug)
-ifeq ($(DEBUG_FLAG),default)
-WXDEBUGFLAG = d
-endif
-endif
-ifeq ($(DEBUG_FLAG),1)
-WXDEBUGFLAG = d
-endif
-ifeq ($(SHARED),1)
-WXDLLFLAG = dll
-endif
-ifeq ($(UNICODE),1)
-WXUNICODEFLAG = u
-endif
-ifeq ($(WXUNIV),1)
-WXUNIVNAME = univ
-endif
-ifeq ($(BUILD),debug)
-ifeq ($(DEBUG_INFO),default)
-__DEBUGINFO = -g
-endif
-endif
-ifeq ($(BUILD),release)
-ifeq ($(DEBUG_INFO),default)
-__DEBUGINFO =
-endif
-endif
-ifeq ($(DEBUG_INFO),0)
-__DEBUGINFO =
-endif
-ifeq ($(DEBUG_INFO),1)
-__DEBUGINFO = -g
-endif
-ifeq ($(BUILD),debug)
-ifeq ($(DEBUG_FLAG),default)
-__DEBUG_DEFINE_p = -D__WXDEBUG__
-endif
-endif
-ifeq ($(DEBUG_FLAG),1)
-__DEBUG_DEFINE_p = -D__WXDEBUG__
-endif
-ifeq ($(SHARED),1)
-__DLLFLAG_p = -DWXUSINGDLL
-endif
-ifeq ($(USE_GUI),1)
-__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
-endif
-ifeq ($(USE_GUI),1)
-__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
-endif
-ifeq ($(USE_GUI),1)
-__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
-endif
-ifeq ($(BUILD),debug)
-__OPTIMIZEFLAG_2 = -O0
-endif
-ifeq ($(BUILD),release)
-__OPTIMIZEFLAG_2 = -O2
-endif
-ifeq ($(UNICODE),1)
-__UNICODE_DEFINE_p = -D_UNICODE
-endif
-ifeq ($(MSLU),1)
-__UNICOWS_LIB_p = -lunicows
-endif
-ifeq ($(MONOLITHIC),0)
-__WXLIB_BASE_p = -lwxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG)
-endif
-ifeq ($(MONOLITHIC),1)
-__WXLIB_MONO_p = \
- -lwx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG)
-endif
-ifeq ($(WXUNIV),1)
-__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
-endif
-
-
-all: $(OBJS)
-$(OBJS):
- -if not exist $(OBJS) mkdir $(OBJS)
-
-### Targets: ###
-
-all: $(OBJS)\HelpGen.exe
-
-$(OBJS)\HelpGen_HelpGen.o: ./src/HelpGen.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_cjparser.o: ./src/cjparser.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_docripper.o: ./src/docripper.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_ifcontext.o: ./src/ifcontext.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_markup.o: ./src/markup.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_scriptbinder.o: ./src/scriptbinder.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_sourcepainter.o: ./src/sourcepainter.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_srcparser.o: ./src/srcparser.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen.exe: $(HELPGEN_OBJECTS)
- $(CXX) -o $@ $(HELPGEN_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) -mthreads -L$(LIBDIRNAME) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) -lwxzlib$(WXDEBUGFLAG) -lwxregex$(WXDEBUGFLAG) -lwxexpat$(WXDEBUGFLAG) $(__UNICOWS_LIB_p) -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lodbc32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
-
-clean:
- -if exist $(OBJS)\*.o del $(OBJS)\*.o
- -if exist $(OBJS)\HelpGen.exe del $(OBJS)\HelpGen.exe
-
-.PHONY: all clean
+++ /dev/null
-# =========================================================================
-# This makefile was generated by
-# Bakefile 0.1.1 (http://bakefile.sourceforge.net)
-# Do not modify, all changes will be overwritten!
-# =========================================================================
-
-!include <../../build/msw/config.vc>
-
-# -------------------------------------------------------------------------
-# Do not modify the rest of this file!
-# -------------------------------------------------------------------------
-
-### Variables: ###
-
-HELPGEN_CXXFLAGS = $(CPPFLAGS) /M$(__RUNTIME_LIBS_7)$(__DEBUGRUNTIME_3) \
- /DWIN32 $(__DEBUGINFO_0) /Fd$(OBJS)\HelpGen.pdb $(____DEBUGRUNTIME_2_p) \
- $(__OPTIMIZEFLAG_4) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
- $(__UNICODE_DEFINE_p) /I.\..\..\include /I$(SETUPHDIR) /W4 /I. $(__DLLFLAG_p) \
- /D_CONSOLE $(CXXFLAGS) /GR /GX
-HELPGEN_OBJECTS = \
- $(OBJS)\HelpGen_HelpGen.obj \
- $(OBJS)\HelpGen_cjparser.obj \
- $(OBJS)\HelpGen_docripper.obj \
- $(OBJS)\HelpGen_ifcontext.obj \
- $(OBJS)\HelpGen_markup.obj \
- $(OBJS)\HelpGen_scriptbinder.obj \
- $(OBJS)\HelpGen_sourcepainter.obj \
- $(OBJS)\HelpGen_srcparser.obj
-OBJS = \
- vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
-SETUPHDIR = \
- $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
-
-### Conditionally set variables: ###
-
-!if "$(SHARED)" == "0"
-LIBDIRNAME = .\..\..\lib\vc_lib$(CFG)
-!endif
-!if "$(SHARED)" == "1"
-LIBDIRNAME = .\..\..\lib\vc_dll$(CFG)
-!endif
-!if "$(USE_GUI)" == "0"
-PORTNAME = base
-!endif
-!if "$(USE_GUI)" == "1"
-PORTNAME = msw
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-WXDEBUGFLAG = d
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-WXDEBUGFLAG = d
-!endif
-!if "$(SHARED)" == "1"
-WXDLLFLAG = dll
-!endif
-!if "$(UNICODE)" == "1"
-WXUNICODEFLAG = u
-!endif
-!if "$(WXUNIV)" == "1"
-WXUNIVNAME = univ
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_0 = /Zi
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_0 =
-!endif
-!if "$(DEBUG_INFO)" == "0"
-__DEBUGINFO_0 =
-!endif
-!if "$(DEBUG_INFO)" == "1"
-__DEBUGINFO_0 = /Zi
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_1 = /DEBUG
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_1 =
-!endif
-!if "$(DEBUG_INFO)" == "0"
-__DEBUGINFO_1 =
-!endif
-!if "$(DEBUG_INFO)" == "1"
-__DEBUGINFO_1 = /DEBUG
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_3 = d
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_3 =
-!endif
-!if "$(DEBUG_INFO)" == "0"
-__DEBUGINFO_3 =
-!endif
-!if "$(DEBUG_INFO)" == "1"
-__DEBUGINFO_3 = d
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "0"
-__DEBUGRUNTIME_3 =
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "1"
-__DEBUGRUNTIME_3 = d
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "default"
-__DEBUGRUNTIME_3 = $(__DEBUGINFO_3)
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-__DEBUG_DEFINE_p = /D__WXDEBUG__
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-__DEBUG_DEFINE_p = /D__WXDEBUG__
-!endif
-!if "$(SHARED)" == "1"
-__DLLFLAG_p = /DWXUSINGDLL
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
-!endif
-!if "$(BUILD)" == "debug"
-__OPTIMIZEFLAG_4 = /Od
-!endif
-!if "$(BUILD)" == "release"
-__OPTIMIZEFLAG_4 = /O2
-!endif
-!if "$(RUNTIME_LIBS)" == "dynamic"
-__RUNTIME_LIBS_7 = D
-!endif
-!if "$(RUNTIME_LIBS)" == "static"
-__RUNTIME_LIBS_7 = T
-!endif
-!if "$(UNICODE)" == "1"
-__UNICODE_DEFINE_p = /D_UNICODE
-!endif
-!if "$(MSLU)" == "1"
-__UNICOWS_LIB_p = unicows.lib
-!endif
-!if "$(MONOLITHIC)" == "0"
-__WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib
-!endif
-!if "$(MONOLITHIC)" == "1"
-__WXLIB_MONO_p = \
- wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib
-!endif
-!if "$(WXUNIV)" == "1"
-__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
-____DEBUGINFO_2_p = /D_DEBUG
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
-____DEBUGINFO_2_p =
-!endif
-!if "$(DEBUG_INFO)" == "0"
-____DEBUGINFO_2_p =
-!endif
-!if "$(DEBUG_INFO)" == "1"
-____DEBUGINFO_2_p = /D_DEBUG
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "0"
-____DEBUGRUNTIME_2_p =
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "1"
-____DEBUGRUNTIME_2_p = /D_DEBUG
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "default"
-____DEBUGRUNTIME_2_p = $(____DEBUGINFO_2_p)
-!endif
-
-
-all: $(OBJS)
-$(OBJS):
- -if not exist $(OBJS) mkdir $(OBJS)
-
-### Targets: ###
-
-all: $(OBJS)\HelpGen.exe
-
-$(OBJS)\HelpGen_HelpGen.obj: .\src\HelpGen.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen_cjparser.obj: .\src\cjparser.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen_docripper.obj: .\src\docripper.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen_ifcontext.obj: .\src\ifcontext.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen_markup.obj: .\src\markup.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen_scriptbinder.obj: .\src\scriptbinder.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen_sourcepainter.obj: .\src\sourcepainter.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen_srcparser.obj: .\src\srcparser.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) $**
-
-$(OBJS)\HelpGen.exe: $(HELPGEN_OBJECTS)
- link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE @<<
- $(HELPGEN_OBJECTS) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(__UNICOWS_LIB_p) kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib
-<<
-
-clean:
- -if exist $(OBJS)\*.obj del $(OBJS)\*.obj
- -if exist $(OBJS)\*.res del $(OBJS)\*.res
- -if exist $(OBJS)\HelpGen.exe del $(OBJS)\HelpGen.exe
- -if exist $(OBJS)\HelpGen.ilk del $(OBJS)\HelpGen.ilk
- -if exist $(OBJS)\HelpGen.pdb del $(OBJS)\HelpGen.pdb
+++ /dev/null
-# =========================================================================
-# This makefile was generated by
-# Bakefile 0.1.1 (http://bakefile.sourceforge.net)
-# Do not modify, all changes will be overwritten!
-# =========================================================================
-
-!include ../../build/msw/config.wat
-
-# -------------------------------------------------------------------------
-# Do not modify the rest of this file!
-# -------------------------------------------------------------------------
-
-# Speed up compilation a bit:
-!ifdef __LOADDLL__
-! loaddll wcc wccd
-! loaddll wccaxp wccdaxp
-! loaddll wcc386 wccd386
-! loaddll wpp wppdi86
-! loaddll wppaxp wppdaxp
-! loaddll wpp386 wppd386
-! loaddll wlink wlink
-! loaddll wlib wlibd
-!endif
-
-# We need these variables in some bakefile-made rules:
-WATCOM_CWD = $+ $(%cdrive):$(%cwd) $-
-
-### Conditionally set variables: ###
-
-LIBDIRNAME =
-!ifeq SHARED 0
-LIBDIRNAME = .\..\..\lib\wat_lib$(CFG)
-!endif
-!ifeq SHARED 1
-LIBDIRNAME = .\..\..\lib\wat_dll$(CFG)
-!endif
-PORTNAME =
-!ifeq USE_GUI 0
-PORTNAME = base
-!endif
-!ifeq USE_GUI 1
-PORTNAME = msw
-!endif
-WXDEBUGFLAG =
-!ifeq BUILD debug
-!ifeq DEBUG_FLAG default
-WXDEBUGFLAG = d
-!endif
-!endif
-!ifeq DEBUG_FLAG 1
-WXDEBUGFLAG = d
-!endif
-WXDLLFLAG =
-!ifeq SHARED 1
-WXDLLFLAG = dll
-!endif
-WXUNICODEFLAG =
-!ifeq UNICODE 1
-WXUNICODEFLAG = u
-!endif
-WXUNIVNAME =
-!ifeq WXUNIV 1
-WXUNIVNAME = univ
-!endif
-__DEBUGINFO_0 =
-!ifeq BUILD debug
-!ifeq DEBUG_INFO default
-__DEBUGINFO_0 = -d2
-!endif
-!endif
-!ifeq BUILD release
-!ifeq DEBUG_INFO default
-__DEBUGINFO_0 = -d0
-!endif
-!endif
-!ifeq DEBUG_INFO 0
-__DEBUGINFO_0 = -d0
-!endif
-!ifeq DEBUG_INFO 1
-__DEBUGINFO_0 = -d2
-!endif
-__DEBUGINFO_1 =
-!ifeq BUILD debug
-!ifeq DEBUG_INFO default
-__DEBUGINFO_1 = debug all
-!endif
-!endif
-!ifeq BUILD release
-!ifeq DEBUG_INFO default
-__DEBUGINFO_1 =
-!endif
-!endif
-!ifeq DEBUG_INFO 0
-__DEBUGINFO_1 =
-!endif
-!ifeq DEBUG_INFO 1
-__DEBUGINFO_1 = debug all
-!endif
-__DEBUG_DEFINE_p =
-!ifeq BUILD debug
-!ifeq DEBUG_FLAG default
-__DEBUG_DEFINE_p = -d__WXDEBUG__
-!endif
-!endif
-!ifeq DEBUG_FLAG 1
-__DEBUG_DEFINE_p = -d__WXDEBUG__
-!endif
-__DLLFLAG_p =
-!ifeq SHARED 1
-__DLLFLAG_p = -dWXUSINGDLL
-!endif
-__LIB_JPEG_p =
-!ifeq USE_GUI 1
-__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
-!endif
-__LIB_PNG_p =
-!ifeq USE_GUI 1
-__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
-!endif
-__LIB_TIFF_p =
-!ifeq USE_GUI 1
-__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
-!endif
-__OPTIMIZEFLAG_2 =
-!ifeq BUILD debug
-__OPTIMIZEFLAG_2 = -od
-!endif
-!ifeq BUILD release
-__OPTIMIZEFLAG_2 = -ot -ox
-!endif
-__RUNTIME_LIBS_5 =
-!ifeq RUNTIME_LIBS dynamic
-__RUNTIME_LIBS_5 = -br
-!endif
-!ifeq RUNTIME_LIBS static
-__RUNTIME_LIBS_5 =
-!endif
-__UNICODE_DEFINE_p =
-!ifeq UNICODE 1
-__UNICODE_DEFINE_p = -d_UNICODE
-!endif
-__WXLIB_BASE_p =
-!ifeq MONOLITHIC 0
-__WXLIB_BASE_p = wxbase25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib
-!endif
-__WXLIB_MONO_p =
-!ifeq MONOLITHIC 1
-__WXLIB_MONO_p = &
- wx$(PORTNAME)$(WXUNIVNAME)25$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib
-!endif
-__WXUNIV_DEFINE_p =
-!ifeq WXUNIV 1
-__WXUNIV_DEFINE_p = -d__WXUNIVERSAL__
-!endif
-
-### Variables: ###
-
-HELPGEN_CXXFLAGS = $(CPPFLAGS) $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) -bm &
- $(__RUNTIME_LIBS_5) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
- $(__UNICODE_DEFINE_p) -i=.\..\..\include -i=$(SETUPHDIR) -i=. $(__DLLFLAG_p) &
- $(CXXFLAGS)
-HELPGEN_OBJECTS = &
- $(OBJS)\HelpGen_HelpGen.obj &
- $(OBJS)\HelpGen_cjparser.obj &
- $(OBJS)\HelpGen_docripper.obj &
- $(OBJS)\HelpGen_ifcontext.obj &
- $(OBJS)\HelpGen_markup.obj &
- $(OBJS)\HelpGen_scriptbinder.obj &
- $(OBJS)\HelpGen_sourcepainter.obj &
- $(OBJS)\HelpGen_srcparser.obj
-OBJS = &
- wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
-SETUPHDIR = &
- $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
-
-
-all : $(OBJS)
-$(OBJS) :
- -if not exist $(OBJS) mkdir $(OBJS)
-
-### Targets: ###
-
-all : .SYMBOLIC $(OBJS)\HelpGen.exe
-
-$(OBJS)\HelpGen_HelpGen.obj : .AUTODEPEND .\src\HelpGen.cpp
- $(CXX) -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_cjparser.obj : .AUTODEPEND .\src\cjparser.cpp
- $(CXX) -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_docripper.obj : .AUTODEPEND .\src\docripper.cpp
- $(CXX) -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_ifcontext.obj : .AUTODEPEND .\src\ifcontext.cpp
- $(CXX) -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_markup.obj : .AUTODEPEND .\src\markup.cpp
- $(CXX) -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_scriptbinder.obj : .AUTODEPEND .\src\scriptbinder.cpp
- $(CXX) -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_sourcepainter.obj : .AUTODEPEND .\src\sourcepainter.cpp
- $(CXX) -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_srcparser.obj : .AUTODEPEND .\src\srcparser.cpp
- $(CXX) -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen.exe : $(HELPGEN_OBJECTS)
- @%create $(OBJS)\HelpGen.lbc
- @%append $(OBJS)\HelpGen.lbc option quiet
- @%append $(OBJS)\HelpGen.lbc name $^@
- @%append $(OBJS)\HelpGen.lbc option caseexact
- @%append $(OBJS)\HelpGen.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt ref 'main_'
- @for %i in ($(HELPGEN_OBJECTS)) do @%append $(OBJS)\HelpGen.lbc file %i
- @for %i in ( $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib odbc32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib) do @%append $(OBJS)\HelpGen.lbc library %i
- @%append $(OBJS)\HelpGen.lbc
- wlink @$(OBJS)\HelpGen.lbc
-
-clean : .SYMBOLIC
- -if exist $(OBJS)\*.obj del $(OBJS)\*.obj
- -if exist $(OBJS)\*.res del $(OBJS)\*.res
- -if exist $(OBJS)\*.lbc del $(OBJS)\*.lbc
- -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk
- -if exist $(OBJS)\HelpGen.exe del $(OBJS)\HelpGen.exe
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: HelpGen.cpp
-// Purpose: Main program file for HelpGen
-// Author: Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Modified by:
-// Created: 06/01/99
-// RCS-ID: $Id$
-// Copyright: (c) 1999 VZ
-// Licence: wxWindows Licence
-/////////////////////////////////////////////////////////////////////////////
-
-/*
- BUGS
-
- 1. wx/string.h confuses C++ parser terribly
- 2. C++ parser doesn't know about virtual functions, nor static ones
- 3. param checking is not done for vararg functions
- 4. type comparison is dumb: it doesn't know that "char *" is the same
- that "char []" nor that "const char *" is the same as "char const *"
-
- TODO (+ means fixed), see also the change log at the end of the file.
-
- (i) small fixes in the current version
-
- +1. Quote special TeX characters like '&' and '_' (=> derive from wxFile)
- 2. Document typedefs
- 3. Document global variables
- 4. Document #defines
- +5. Program options
- 6. Include file name/line number in the "diff" messages?
- +7. Support for vararg functions
-
- (ii) plans for version 2
- 1. Use wxTextFile for direct file access to avoid one scan method problems
- 2. Use command line parser class for the options
- 3. support for overloaded functions in diff mode (search for OVER)
-
- (iii) plans for version 3
- 1. Merging with existing files
- 2. GUI
-*/
-
-// =============================================================================
-// declarations
-// =============================================================================
-
-// -----------------------------------------------------------------------------
-// headers
-// -----------------------------------------------------------------------------
-
-// wxWidgets
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
- #include "wx/string.h"
- #include "wx/log.h"
- #include "wx/dynarray.h"
- #include "wx/app.h"
-#endif // WX_PRECOMP
-
-#include "wx/file.h"
-#include "wx/regex.h"
-#include "wx/hash.h"
-
-// C++ parsing classes
-#include "cjparser.h"
-
-// standard headers
-#include <stdio.h>
-#include <time.h>
-
-// -----------------------------------------------------------------------------
-// private functions
-// -----------------------------------------------------------------------------
-
-// return the label for the given function name (i.e. argument of \label)
-static wxString MakeLabel(const char *classname, const char *funcname = NULL);
-
-// return the whole \helpref{arg}{arg_label} string
-static wxString MakeHelpref(const char *argument);
-
-// [un]quote special TeX characters (in place)
-static void TeXFilter(wxString* str);
-static void TeXUnfilter(wxString* str); // also trims spaces
-
-// get all comments associated with this context
-static wxString GetAllComments(const spContext& ctx);
-
-// get the string with current time (returns pointer to static buffer)
-// timeFormat is used for the call of strftime(3)
-static const char *GetCurrentTimeFormatted(const char *timeFormat);
-
-// get the string containing the program version
-static const wxString GetVersionString();
-
-// -----------------------------------------------------------------------------
-// private classes
-// -----------------------------------------------------------------------------
-
-// a function documentation entry
-struct FunctionDocEntry
-{
- FunctionDocEntry(const wxString& name_, const wxString& text_)
- : name(name_), text(text_) { }
-
- // the function name
- wxString name;
-
- // the function doc text
- wxString text;
-
- // sorting stuff
- static int Compare(FunctionDocEntry **pp1, FunctionDocEntry **pp2)
- {
- // the methods should appear in the following order: ctors, dtor, all
- // the rest in the alphabetical order
- bool isCtor1 = (*pp1)->name == classname;
- bool isCtor2 = (*pp2)->name == classname;
-
- if ( isCtor1 ) {
- if ( isCtor2 ) {
- // we don't order the ctors because we don't know how to do it
- return 0;
- }
-
- // ctor comes before non-ctor
- return -1;
- }
- else {
- if ( isCtor2 ) {
- // non-ctor must come after ctor
- return 1;
- }
-
- wxString dtorname = wxString(_T("~")) + classname;
-
- // there is only one dtor, so the logic here is simpler
- if ( (*pp1)->name == dtorname ) {
- return -1;
- }
- else if ( (*pp2)->name == dtorname ) {
- return 1;
- }
-
- // two normal methods
- return wxStrcmp((*pp1)->name, (*pp2)->name);
- }
- }
-
- static wxString classname;
-};
-
-wxString FunctionDocEntry::classname;
-
-WX_DECLARE_OBJARRAY(FunctionDocEntry, FunctionDocEntries);
-
-#include "wx/arrimpl.cpp"
-
-WX_DEFINE_OBJARRAY(FunctionDocEntries);
-
-// add a function which sanitazes the string before writing it to the file and
-// also capable of delaying output and sorting it before really writing it to
-// the file (done from FlushAll())
-class wxTeXFile : public wxFile
-{
-public:
- wxTeXFile() { }
-
- // write a string to file verbatim (should only be used for the strings
- // inside verbatim environment)
- void WriteVerbatim(const wxString& s)
- {
- m_text += s;
- }
-
- // write a string quoting TeX specials in it
- void WriteTeX(const wxString& s)
- {
- wxString t(s);
- TeXFilter(&t);
-
- m_text += t;
- }
-
- // do write everything to file
- bool FlushAll()
- {
- if ( m_text.empty() )
- return true;
-
- if ( !Write(m_text) ) {
- wxLogError(_T("Failed to output generated documentation."));
-
- return false;
- }
-
- m_text.clear();
-
- return true;
- }
-
-private:
- wxTeXFile(const wxTeXFile&);
- wxTeXFile& operator=(const wxTeXFile&);
-
- wxString m_text;
-};
-
-// helper class which manages the classes and function names to ignore for
-// the documentation purposes (used by both HelpGenVisitor and DocManager)
-class IgnoreNamesHandler
-{
-public:
- IgnoreNamesHandler() : m_ignore(CompareIgnoreListEntries) { }
- ~IgnoreNamesHandler() { WX_CLEAR_ARRAY(m_ignore); }
-
- // load file with classes/functions to ignore (add them to the names we
- // already have)
- bool AddNamesFromFile(const wxString& filename);
-
- // return true if we ignore this function
- bool IgnoreMethod(const wxString& classname,
- const wxString& funcname) const
- {
- if ( IgnoreClass(classname) )
- return true;
-
- IgnoreListEntry ignore(classname, funcname);
-
- return m_ignore.Index(&ignore) != wxNOT_FOUND;
- }
-
- // return true if we ignore this class entirely
- bool IgnoreClass(const wxString& classname) const
- {
- IgnoreListEntry ignore(classname, wxEmptyString);
-
- return m_ignore.Index(&ignore) != wxNOT_FOUND;
- }
-
-protected:
- struct IgnoreListEntry
- {
- IgnoreListEntry(const wxString& classname,
- const wxString& funcname)
- : m_classname(classname), m_funcname(funcname)
- {
- }
-
- wxString m_classname;
- wxString m_funcname; // if empty, ignore class entirely
- };
-
- static int CompareIgnoreListEntries(IgnoreListEntry *first,
- IgnoreListEntry *second);
-
- // for efficiency, let's sort it
-public: // FIXME: macro requires it
- WX_DEFINE_SORTED_ARRAY(IgnoreListEntry *, ArrayNamesToIgnore);
-
-protected:
- ArrayNamesToIgnore m_ignore;
-
-private:
- IgnoreNamesHandler(const IgnoreNamesHandler&);
- IgnoreNamesHandler& operator=(const IgnoreNamesHandler&);
-};
-
-// visitor implementation which writes all collected data to a .tex file
-class HelpGenVisitor : public spVisitor
-{
-public:
- // ctor
- HelpGenVisitor(const wxString& directoryOut, bool overwrite);
-
- virtual void VisitFile( spFile& fl );
- virtual void VisitClass( spClass& cl );
- virtual void VisitEnumeration( spEnumeration& en );
- virtual void VisitTypeDef( spTypeDef& td );
- virtual void VisitPreprocessorLine( spPreprocessorLine& pd );
- virtual void VisitAttribute( spAttribute& attr );
- virtual void VisitOperation( spOperation& op );
- virtual void VisitParameter( spParameter& param );
-
- void EndVisit();
-
- // get our `ignore' object
- IgnoreNamesHandler& GetIgnoreHandler() { return m_ignoreNames; }
-
- // shut up g++ warning (ain't it stupid?)
- virtual ~HelpGenVisitor() { }
-
-protected:
- // (re)initialize the state
- void Reset();
-
- // insert documentation for enums/typedefs coming immediately before the
- // class declaration into the class documentation
- void InsertTypedefDocs();
- void InsertEnumDocs();
-
- // write the headers for corresponding sections (only once)
- void InsertDataStructuresHeader();
- void InsertMethodsHeader();
-
- // terminate the function documentation if it was started
- void CloseFunction();
-
- // write out all function docs when there are no more left in this class
- // after sorting them in alphabetical order
- void CloseClass();
-
- wxString m_directoryOut, // directory for the output
- m_fileHeader; // name of the .h file we parse
- bool m_overwrite; // overwrite existing files?
- wxTeXFile m_file; // file we're writing to now
-
- // state variables
- bool m_inClass, // true after file successfully opened
- m_inTypesSection, // enums & typedefs go there
- m_inMethodSection, // functions go here
- m_isFirstParam; // first parameter of current function?
-
- // non empty while parsing a class
- wxString m_classname;
-
- // these are only non-empty while parsing a method:
- wxString m_funcName, // the function name
- m_textFunc; // the function doc text
-
- // the array containing the documentation entries for the functions in the
- // class currently being parsed
- FunctionDocEntries m_arrayFuncDocs;
-
- // holders for "saved" documentation
- wxString m_textStoredTypedefs,
- m_textStoredFunctionComment;
-
- // for enums we have to use an array as we can't intermix the normal text
- // and the text inside verbatim environment
- wxArrayString m_storedEnums,
- m_storedEnumsVerb;
-
- // headers included by this file
- wxArrayString m_headers;
-
- // ignore handler: tells us which classes to ignore for doc generation
- // purposes
- IgnoreNamesHandler m_ignoreNames;
-
-private:
- HelpGenVisitor(const HelpGenVisitor&);
- HelpGenVisitor& operator=(const HelpGenVisitor&);
-};
-
-// documentation manager - a class which parses TeX files and remembers the
-// functions documented in them and can later compare them with all functions
-// found under ctxTop by C++ parser
-class DocManager
-{
-public:
- DocManager(bool checkParamNames);
- ~DocManager();
-
- // returns false on failure
- bool ParseTeXFile(const wxString& filename);
-
- // returns false if there were any differences
- bool DumpDifferences(spContext *ctxTop) const;
-
- // get our `ignore' object
- IgnoreNamesHandler& GetIgnoreHandler() { return m_ignoreNames; }
-
-protected:
- // parsing TeX files
- // -----------------
-
- // returns the length of 'match' if the string 'str' starts with it or 0
- // otherwise
- static size_t TryMatch(const char *str, const char *match);
-
- // skip spaces: returns pointer to first non space character (also
- // updates the value of m_line)
- const char *SkipSpaces(const char *p)
- {
- while ( isspace(*p) ) {
- if ( *p++ == '\n' )
- m_line++;
- }
-
- return p;
- }
-
- // skips characters until the next 'c' in '*pp' unless it ends before in
- // which case false is returned and pp points to '\0', otherwise true is
- // returned and pp points to 'c'
- bool SkipUntil(const char **pp, char c);
-
- // the same as SkipUntil() but only spaces are skipped: on first non space
- // character different from 'c' the function stops and returns false
- bool SkipSpaceUntil(const char **pp, char c);
-
- // extract the string between {} and modify '*pp' to point at the
- // character immediately after the closing '}'. The returned string is empty
- // on error.
- wxString ExtractStringBetweenBraces(const char **pp);
-
- // the current file and line while we're in ParseTeXFile (for error
- // messages)
- wxString m_filename;
- size_t m_line;
-
- // functions and classes to ignore during diff
- // -------------------------------------------
-
- IgnoreNamesHandler m_ignoreNames;
-
- // information about all functions documented in the TeX file(s)
- // -------------------------------------------------------------
-
-public: // Note: Sun C++ 5.5 requires TypeInfo and ParamInfo to be public
-
- // info about a type: for now stored as text string, but must be parsed
- // further later (to know that "char *" == "char []" - TODO)
- class TypeInfo
- {
- public:
- TypeInfo(const wxString& type) : m_type(type) { }
-
- bool operator==(const wxString& type) const { return m_type == type; }
- bool operator!=(const wxString& type) const { return m_type != type; }
-
- const wxString& GetName() const { return m_type; }
-
- private:
- wxString m_type;
- };
-
- friend class ParamInfo; // for access to TypeInfo
-
- // info abotu a function parameter
- class ParamInfo
- {
- public:
- ParamInfo(const wxString& type,
- const wxString& name,
- const wxString& value)
- : m_type(type), m_name(name), m_value(value)
- {
- }
-
- const TypeInfo& GetType() const { return m_type; }
- const wxString& GetName() const { return m_name; }
- const wxString& GetDefValue() const { return m_value; }
-
- private:
- TypeInfo m_type; // type of parameter
- wxString m_name; // name
- wxString m_value; // default value
- };
-
-public: // FIXME: macro requires it
- WX_DEFINE_ARRAY_PTR(ParamInfo *, ArrayParamInfo);
-
- // info about a function
- struct MethodInfo
- {
- public:
- enum MethodFlags
- {
- Const = 0x0001,
- Virtual = 0x0002,
- Pure = 0x0004,
- Static = 0x0008,
- Vararg = 0x0010
- };
-
- MethodInfo(const wxString& type,
- const wxString& name,
- const ArrayParamInfo& params)
- : m_typeRet(type), m_name(name), m_params(params)
- {
- m_flags = 0;
- }
-
- void SetFlag(MethodFlags flag) { m_flags |= flag; }
-
- const TypeInfo& GetType() const { return m_typeRet; }
- const wxString& GetName() const { return m_name; }
- const ParamInfo& GetParam(size_t n) const { return *(m_params[n]); }
- size_t GetParamCount() const { return m_params.GetCount(); }
-
- bool HasFlag(MethodFlags flag) const { return (m_flags & flag) != 0; }
-
- ~MethodInfo() { WX_CLEAR_ARRAY(m_params); }
-
- private:
- TypeInfo m_typeRet; // return type
- wxString m_name;
- int m_flags; // bit mask of the value from the enum above
-
- ArrayParamInfo m_params;
- };
-
- WX_DEFINE_ARRAY_PTR(MethodInfo *, ArrayMethodInfo);
- WX_DEFINE_ARRAY_PTR(ArrayMethodInfo *, ArrayMethodInfos);
-
-private:
- // first array contains the names of all classes we found, the second has a
- // pointer to the array of methods of the given class at the same index as
- // the class name appears in m_classes
- wxArrayString m_classes;
- ArrayMethodInfos m_methods;
-
- // are we checking parameter names?
- bool m_checkParamNames;
-
-private:
- DocManager(const DocManager&);
- DocManager& operator=(const DocManager&);
-};
-
-// =============================================================================
-// implementation
-// =============================================================================
-
-static char **g_argv = NULL;
-
-// this function never returns
-static void usage()
-{
- wxString prog = g_argv[0];
- wxString basename = prog.AfterLast('/');
-#ifdef __WXMSW__
- if ( !basename )
- basename = prog.AfterLast('\\');
-#endif
- if ( !basename )
- basename = prog;
-
- wxLogMessage(
-"usage: %s [global options] <mode> [mode options] <files...>\n"
-"\n"
-" where global options are:\n"
-" -q be quiet\n"
-" -v be verbose\n"
-" -H give this usage message\n"
-" -V print the version info\n"
-" -i file file with classes/function to ignore\n"
-"\n"
-" where mode is one of: dump, diff\n"
-"\n"
-" dump means generate .tex files for TeX2RTF converter from specified\n"
-" headers files, mode options are:\n"
-" -f overwrite existing files\n"
-" -o outdir directory for generated files\n"
-"\n"
-" diff means compare the set of methods documented .tex file with the\n"
-" methods declared in the header:\n"
-" %s diff <file.h> <files.tex...>.\n"
-" mode specific options are:\n"
-" -p do check parameter names (not done by default)\n"
-"\n", basename.c_str(), basename.c_str());
-
- exit(1);
-}
-
-int main(int argc, char **argv)
-{
- g_argv = argv;
-
- wxInitializer initializer;
- if ( !initializer )
- {
- fprintf(stderr, "Failed to initialize the wxWidgets library, aborting.");
-
- return -1;
- }
-
- enum
- {
- Mode_None,
- Mode_Dump,
- Mode_Diff
- } mode = Mode_None;
-
- if ( argc < 2 ) {
- usage();
- }
-
- wxArrayString filesH, filesTeX;
- wxString directoryOut, // directory for 'dmup' output
- ignoreFile; // file with classes/functions to ignore
- bool overwrite = false, // overwrite existing files during 'dump'?
- paramNames = false; // check param names during 'diff'?
-
- for ( int current = 1; current < argc ; current++ ) {
- // all options have one letter
- if ( argv[current][0] == '-' ) {
- if ( argv[current][2] == '\0' ) {
- switch ( argv[current][1] ) {
- case 'v':
- // be verbose
- wxLog::GetActiveTarget()->SetVerbose();
- continue;
-
- case 'q':
- // be quiet
- wxLog::GetActiveTarget()->SetVerbose(false);
- continue;
-
- case 'H':
- // help requested
- usage();
- // doesn't return
-
- case 'V':
- // version requested
- wxLogMessage("HelpGen version %s\n"
- "(c) 1999-2001 Vadim Zeitlin\n",
- GetVersionString().c_str());
- return 0;
-
- case 'i':
- current++;
- if ( current >= argc ) {
- wxLogError("-i option requires an argument.");
-
- break;
- }
-
- ignoreFile = argv[current];
- continue;
-
- case 'p':
- if ( mode != Mode_Diff ) {
- wxLogError("-p is only valid with diff.");
-
- break;
- }
-
- paramNames = true;
- continue;
-
- case 'f':
- if ( mode != Mode_Dump ) {
- wxLogError("-f is only valid with dump.");
-
- break;
- }
-
- overwrite = true;
- continue;
-
- case 'o':
- if ( mode != Mode_Dump ) {
- wxLogError("-o is only valid with dump.");
-
- break;
- }
-
- current++;
- if ( current >= argc ) {
- wxLogError("-o option requires an argument.");
-
- break;
- }
-
- directoryOut = argv[current];
- if ( !directoryOut.empty() ) {
- // terminate with a '/' if it doesn't have it
- switch ( directoryOut.Last().GetValue() ) {
- case '/':
-#ifdef __WXMSW__
- case '\\':
-#endif
- break;
-
- default:
- directoryOut += '/';
- }
- }
- //else: it's empty, do nothing
-
- continue;
-
- default:
- wxLogError("unknown option '%s'", argv[current]);
- break;
- }
- }
- else {
- wxLogError("only one letter options are allowed, not '%s'.",
- argv[current]);
- }
-
- // only get here after a break from switch or from else branch of if
-
- usage();
- }
- else {
- if ( mode == Mode_None ) {
- if ( strcmp(argv[current], "diff") == 0 )
- mode = Mode_Diff;
- else if ( strcmp(argv[current], "dump") == 0 )
- mode = Mode_Dump;
- else {
- wxLogError("unknown mode '%s'.", argv[current]);
-
- usage();
- }
- }
- else {
- if ( mode == Mode_Dump || filesH.IsEmpty() ) {
- filesH.Add(argv[current]);
- }
- else {
- // 2nd files and further are TeX files in diff mode
- wxASSERT( mode == Mode_Diff );
-
- filesTeX.Add(argv[current]);
- }
- }
- }
- }
-
- // create a parser object and a visitor derivation
- CJSourceParser parser;
- HelpGenVisitor visitor(directoryOut, overwrite);
- if ( !ignoreFile.empty() && mode == Mode_Dump )
- visitor.GetIgnoreHandler().AddNamesFromFile(ignoreFile);
-
- spContext *ctxTop = NULL;
-
- // parse all header files
- size_t nFiles = filesH.GetCount();
- for ( size_t n = 0; n < nFiles; n++ ) {
- wxString header = filesH[n];
- ctxTop = parser.ParseFile(header);
- if ( !ctxTop ) {
- wxLogWarning("Header file '%s' couldn't be processed.",
- header.c_str());
- }
- else if ( mode == Mode_Dump ) {
- ((spFile *)ctxTop)->m_FileName = header;
- visitor.VisitAll(*ctxTop);
- visitor.EndVisit();
- }
-
-#ifdef __WXDEBUG__
- if ( 0 && ctxTop )
- ctxTop->Dump(wxEmptyString);
-#endif // __WXDEBUG__
- }
-
- // parse all TeX files
- if ( mode == Mode_Diff ) {
- if ( !ctxTop ) {
- wxLogError("Can't complete diff.");
-
- // failure
- return false;
- }
-
- DocManager docman(paramNames);
-
- size_t nFiles = filesTeX.GetCount();
- for ( size_t n = 0; n < nFiles; n++ ) {
- wxString file = filesTeX[n];
- if ( !docman.ParseTeXFile(file) ) {
- wxLogWarning("TeX file '%s' couldn't be processed.",
- file.c_str());
- }
- }
-
- if ( !ignoreFile.empty() )
- docman.GetIgnoreHandler().AddNamesFromFile(ignoreFile);
-
- docman.DumpDifferences(ctxTop);
- }
-
- return 0;
-}
-
-// -----------------------------------------------------------------------------
-// HelpGenVisitor implementation
-// -----------------------------------------------------------------------------
-
-HelpGenVisitor::HelpGenVisitor(const wxString& directoryOut,
- bool overwrite)
- : m_directoryOut(directoryOut)
-{
- m_overwrite = overwrite;
-
- Reset();
-}
-
-void HelpGenVisitor::Reset()
-{
- m_inClass =
- m_inTypesSection =
- m_inMethodSection = false;
-
- m_classname =
- m_funcName =
- m_textFunc =
- m_textStoredTypedefs =
- m_textStoredFunctionComment = wxEmptyString;
-
- m_arrayFuncDocs.Empty();
-
- m_storedEnums.Empty();
- m_storedEnumsVerb.Empty();
- m_headers.Empty();
-}
-
-void HelpGenVisitor::InsertTypedefDocs()
-{
- m_file.WriteTeX(m_textStoredTypedefs);
- m_textStoredTypedefs.Empty();
-}
-
-void HelpGenVisitor::InsertEnumDocs()
-{
- size_t count = m_storedEnums.GetCount();
- for ( size_t n = 0; n < count; n++ )
- {
- m_file.WriteTeX(m_storedEnums[n]);
- m_file.WriteVerbatim(m_storedEnumsVerb[n] + '\n');
- }
-
- m_storedEnums.Empty();
- m_storedEnumsVerb.Empty();
-}
-
-void HelpGenVisitor::InsertDataStructuresHeader()
-{
- if ( !m_inTypesSection ) {
- m_inTypesSection = true;
-
- m_file.WriteVerbatim("\\wxheading{Data structures}\n\n");
- }
-}
-
-void HelpGenVisitor::InsertMethodsHeader()
-{
- if ( !m_inMethodSection ) {
- m_inMethodSection = true;
-
- m_file.WriteVerbatim( "\\latexignore{\\rtfignore{\\wxheading{Members}}}\n\n");
- }
-}
-
-void HelpGenVisitor::CloseFunction()
-{
- if ( !m_funcName.empty() ) {
- if ( m_isFirstParam ) {
- // no params found
- m_textFunc << "\\void";
- }
-
- m_textFunc << "}\n\n";
-
- if ( !m_textStoredFunctionComment.empty() ) {
- m_textFunc << m_textStoredFunctionComment << '\n';
- }
-
- m_arrayFuncDocs.Add(new FunctionDocEntry(m_funcName, m_textFunc));
-
- m_funcName.clear();
- }
-}
-
-void HelpGenVisitor::CloseClass()
-{
- CloseFunction();
-
- if ( m_inClass )
- {
- size_t count = m_arrayFuncDocs.GetCount();
- if ( count )
- {
- size_t n;
- FunctionDocEntry::classname = m_classname;
-
- m_arrayFuncDocs.Sort(FunctionDocEntry::Compare);
-
- // Now examine each first line and if it's been seen, cut it
- // off (it's a duplicate \membersection)
- wxHashTable membersections(wxKEY_STRING);
-
- for ( n = 0; n < count; n++ )
- {
- wxString section(m_arrayFuncDocs[n].text);
-
- // Strip leading whitespace
- int pos = section.Find(_T("\\membersection"));
- if (pos > -1)
- {
- section = section.Mid(pos);
- }
-
- wxString ms(section.BeforeFirst(wxT('\n')));
- if (membersections.Get(ms))
- {
- m_arrayFuncDocs[n].text = section.AfterFirst(wxT('\n'));
- }
- else
- {
- membersections.Put(ms.c_str(), & membersections);
- }
- }
-
- for ( n = 0; n < count; n++ ) {
- m_file.WriteTeX(m_arrayFuncDocs[n].text);
- }
-
- m_arrayFuncDocs.Empty();
- }
-
- m_inClass = false;
- m_classname.clear();
- }
- m_file.FlushAll();
-}
-
-void HelpGenVisitor::EndVisit()
-{
- CloseFunction();
-
- CloseClass();
-
- m_fileHeader.Empty();
-
- m_file.FlushAll();
- if (m_file.IsOpened())
- {
- m_file.Flush();
- m_file.Close();
- }
-
- wxLogVerbose("%s: finished generating for the current file.",
- GetCurrentTimeFormatted("%H:%M:%S"));
-}
-
-void HelpGenVisitor::VisitFile( spFile& file )
-{
- m_fileHeader = file.m_FileName;
- wxLogVerbose("%s: started generating docs for classes from file '%s'...",
- GetCurrentTimeFormatted("%H:%M:%S"), m_fileHeader.c_str());
-}
-
-void HelpGenVisitor::VisitClass( spClass& cl )
-{
- CloseClass();
-
- if (m_file.IsOpened())
- {
- m_file.Flush();
- m_file.Close();
- }
-
- wxString name = cl.GetName();
-
- if ( m_ignoreNames.IgnoreClass(name) ) {
- wxLogVerbose("Skipping ignored class '%s'.", name.c_str());
-
- return;
- }
-
- // the file name is built from the class name by removing the leading "wx"
- // if any and converting it to the lower case
- wxString filename;
- if ( name(0, 2) == "wx" ) {
- filename << name.c_str() + 2;
- }
- else {
- filename << name;
- }
-
- filename.MakeLower();
- filename += ".tex";
- filename.Prepend(m_directoryOut);
-
- if ( !m_overwrite && wxFile::Exists(filename) ) {
- wxLogError("Won't overwrite existing file '%s' - please use '-f'.",
- filename.c_str());
-
- return;
- }
-
- m_inClass = m_file.Open(filename, wxFile::write);
- if ( !m_inClass ) {
- wxLogError("Can't generate documentation for the class '%s'.",
- name.c_str());
-
- return;
- }
-
- m_inMethodSection =
- m_inTypesSection = false;
-
- wxLogInfo("Created new file '%s' for class '%s'.",
- filename.c_str(), name.c_str());
-
- // write out the header
- wxString header;
- header.Printf("%%\n"
- "%% automatically generated by HelpGen %s from\n"
- "%% %s at %s\n"
- "%%\n"
- "\n"
- "\n"
- "\\section{\\class{%s}}\\label{%s}\n\n",
- GetVersionString().c_str(),
- m_fileHeader.c_str(),
- GetCurrentTimeFormatted("%d/%b/%y %H:%M:%S"),
- name.c_str(),
- wxString(name).MakeLower().c_str());
-
- m_file.WriteVerbatim(header);
-
- // the entire text we're writing to file
- wxString totalText;
-
- // if the header includes other headers they must be related to it... try to
- // automatically generate the "See also" clause
- if ( !m_headers.IsEmpty() ) {
- // correspondence between wxWidgets headers and class names
- static const char *headers[] = {
- "object",
- "defs",
- "string",
- "dynarray",
- "file",
- "time",
- };
-
- // NULL here means not to insert anything in "See also" for the
- // corresponding header
- static const char *classes[] = {
- NULL,
- NULL,
- NULL,
- NULL,
- "wxFile",
- "wxTime",
- };
-
- wxASSERT_MSG( WXSIZEOF(headers) == WXSIZEOF(classes),
- "arrays must be in sync!" );
-
- wxArrayInt interestingClasses;
-
- size_t count = m_headers.Count(), index;
- for ( size_t n = 0; n < count; n++ ) {
- wxString baseHeaderName = m_headers[n].Before('.');
- if ( baseHeaderName(0, 3) != "wx/" )
- continue;
-
- baseHeaderName.erase(0, 3);
- for ( index = 0; index < WXSIZEOF(headers); index++ ) {
- if ( wxStricmp(baseHeaderName, headers[index]) == 0 )
- break;
- }
-
- if ( (index < WXSIZEOF(headers)) && classes[index] ) {
- // interesting header
- interestingClasses.Add(index);
- }
- }
-
- if ( !interestingClasses.IsEmpty() ) {
- // do generate "See also" clause
- totalText << "\\wxheading{See also:}\n\n";
-
- count = interestingClasses.Count();
- for ( index = 0; index < count; index++ ) {
- if ( index > 0 )
- totalText << ", ";
-
- totalText << MakeHelpref(classes[interestingClasses[index]]);
- }
-
- totalText << "\n\n";
- }
- }
-
- // the comment before the class generally explains what is it for so put it
- // in place of the class description
- if ( cl.HasComments() ) {
- wxString comment = GetAllComments(cl);
-
- totalText << '\n' << comment << '\n';
- }
-
- // derived from section
- wxString derived = "\\wxheading{Derived from}\n\n";
-
- const StrListT& baseClasses = cl.m_SuperClassNames;
- if ( baseClasses.size() == 0 ) {
- derived << "No base class";
- }
- else {
- bool first = true;
- for ( StrListT::const_iterator i = baseClasses.begin();
- i != baseClasses.end();
- i++ ) {
- if ( !first ) {
- // separate from the previous one
- derived << "\\\\\n";
- }
- else {
- first = false;
- }
-
- wxString baseclass = *i;
- derived << "\\helpref{" << baseclass << "}";
- derived << "{" << baseclass.MakeLower() << "}";
- }
- }
- totalText << derived << "\n\n";
-
- // include file section
- wxString includeFile = "\\wxheading{Include files}\n\n";
- includeFile << "<" << m_fileHeader << ">";
-
- totalText << includeFile << "\n\n";
-
- // write all this to file
- m_file.WriteTeX(totalText);
-
- // if there were any enums/typedefs before, insert their documentation now
- InsertDataStructuresHeader();
- InsertTypedefDocs();
- InsertEnumDocs();
-
- //m_file.Flush();
-}
-
-void HelpGenVisitor::VisitEnumeration( spEnumeration& en )
-{
- CloseFunction();
-
- if ( m_inMethodSection ) {
- // FIXME that's a bug, but tell the user aboit it nevertheless... we
- // should be smart enough to process even the enums which come after the
- // functions
- wxLogWarning("enum '%s' ignored, please put it before the class "
- "methods.", en.GetName().c_str());
- return;
- }
-
- // simply copy the enum text in the docs
- wxString enumeration = GetAllComments(en),
- enumerationVerb;
-
- enumerationVerb << _T("\\begin{verbatim}\n")
- << en.m_EnumContent
- << _T("\n\\end{verbatim}\n");
-
- // remember for later use if we're not inside a class yet
- if ( !m_inClass ) {
- m_storedEnums.Add(enumeration);
- m_storedEnumsVerb.Add(enumerationVerb);
- }
- else {
- // write the header for this section if not done yet
- InsertDataStructuresHeader();
-
- m_file.WriteTeX(enumeration);
- m_file.WriteVerbatim(enumerationVerb);
- m_file.WriteVerbatim('\n');
- }
-}
-
-void HelpGenVisitor::VisitTypeDef( spTypeDef& td )
-{
- CloseFunction();
-
- if ( m_inMethodSection ) {
- // FIXME that's a bug, but tell the user aboit it nevertheless...
- wxLogWarning("typedef '%s' ignored, please put it before the class "
- "methods.", td.GetName().c_str());
- return;
- }
-
- wxString typedefdoc;
- typedefdoc << _T("{\\small \\begin{verbatim}\n")
- << _T("typedef ") << td.m_OriginalType << _T(' ') << td.GetName()
- << _T("\n\\end{verbatim}}\n")
- << GetAllComments(td);
-
- // remember for later use if we're not inside a class yet
- if ( !m_inClass ) {
- if ( !m_textStoredTypedefs.empty() ) {
- m_textStoredTypedefs << '\n';
- }
-
- m_textStoredTypedefs << typedefdoc;
- }
- else {
- // write the header for this section if not done yet
- InsertDataStructuresHeader();
-
- typedefdoc << '\n';
- m_file.WriteTeX(typedefdoc);
- }
-}
-
-void HelpGenVisitor::VisitPreprocessorLine( spPreprocessorLine& pd )
-{
- switch ( pd.GetStatementType() ) {
- case SP_PREP_DEF_INCLUDE_FILE:
- m_headers.Add(pd.CPP_GetIncludedFileNeme());
- break;
-
- case SP_PREP_DEF_DEFINE_SYMBOL:
- // TODO decide if it's a constant and document it if it is
- break;
- }
-}
-
-void HelpGenVisitor::VisitAttribute( spAttribute& attr )
-{
- CloseFunction();
-
- // only document the public member variables
- if ( !m_inClass || !attr.IsPublic() )
- return;
-
- wxLogWarning("Ignoring member variable '%s'.", attr.GetName().c_str());
-}
-
-void HelpGenVisitor::VisitOperation( spOperation& op )
-{
- CloseFunction();
-
- if ( !m_inClass ) {
- // we don't generate docs right now - either we ignore this class
- // entirely or we couldn't open the file
- return;
- }
-
- if ( !op.IsInClass() ) {
- // TODO document global functions
- wxLogWarning("skipped global function '%s'.", op.GetName().c_str());
-
- return;
- }
-
- if ( op.mVisibility == SP_VIS_PRIVATE ) {
- // FIXME should we document protected functions?
- return;
- }
-
- m_classname = op.GetClass().GetName();
- wxString funcname = op.GetName();
-
- if ( m_ignoreNames.IgnoreMethod(m_classname, funcname) ) {
- wxLogVerbose("Skipping ignored '%s::%s'.",
- m_classname.c_str(), funcname.c_str());
-
- return;
- }
-
- InsertMethodsHeader();
-
- // save state info
- m_funcName = funcname;
- m_isFirstParam = true;
-
- m_textStoredFunctionComment = GetAllComments(op);
-
- // start function documentation
- wxString totalText;
-
- // check for the special case of dtor
- wxString dtor;
- if ( (funcname[0u] == '~') && (m_classname == funcname.c_str() + 1) ) {
- dtor.Printf("\\destruct{%s}", m_classname.c_str());
- funcname = dtor;
- }
-
- m_textFunc.Printf("\n"
- "\\membersection{%s::%s}\\label{%s}\n",
- m_classname.c_str(), funcname.c_str(),
- MakeLabel(m_classname, funcname).c_str());
-
- wxString constStr;
- if(op.mIsConstant) constStr = _T("const");
-
- wxString virtualStr;
- if(op.mIsVirtual) virtualStr = _T("virtual ");
-
- wxString func;
- func.Printf(_T("\n")
- _T("\\%sfunc{%s%s}{%s}{"),
- constStr.c_str(),
- virtualStr.c_str(),
- op.m_RetType.c_str(),
- funcname.c_str());
- m_textFunc += func;
-}
-
-void HelpGenVisitor::VisitParameter( spParameter& param )
-{
- if ( m_funcName.empty() )
- return;
-
- if ( m_isFirstParam ) {
- m_isFirstParam = false;
- }
- else {
- m_textFunc << ", ";
- }
-
- m_textFunc << "\\param{" << param.m_Type << " }{" << param.GetName();
- wxString defvalue = param.m_InitVal;
- if ( !defvalue.empty() ) {
- m_textFunc << " = " << defvalue;
- }
-
- m_textFunc << '}';
-}
-
-// ---------------------------------------------------------------------------
-// DocManager
-// ---------------------------------------------------------------------------
-
-DocManager::DocManager(bool checkParamNames)
-{
- m_checkParamNames = checkParamNames;
-}
-
-size_t DocManager::TryMatch(const char *str, const char *match)
-{
- size_t lenMatch = 0;
- while ( str[lenMatch] == match[lenMatch] ) {
- lenMatch++;
-
- if ( match[lenMatch] == '\0' )
- return lenMatch;
- }
-
- return 0;
-}
-
-bool DocManager::SkipUntil(const char **pp, char c)
-{
- const char *p = *pp;
- while ( *p != c ) {
- if ( *p == '\0' )
- break;
-
- if ( *p == '\n' )
- m_line++;
-
- p++;
- }
-
- *pp = p;
-
- return *p == c;
-}
-
-bool DocManager::SkipSpaceUntil(const char **pp, char c)
-{
- const char *p = *pp;
- while ( *p != c ) {
- if ( !isspace(*p) || *p == '\0' )
- break;
-
- if ( *p == '\n' )
- m_line++;
-
- p++;
- }
-
- *pp = p;
-
- return *p == c;
-}
-
-wxString DocManager::ExtractStringBetweenBraces(const char **pp)
-{
- wxString result;
-
- if ( !SkipSpaceUntil(pp, '{') ) {
- wxLogWarning("file %s(%d): '{' expected after '\\param'",
- m_filename.c_str(), (int)m_line);
-
- }
- else {
- const char *startParam = ++*pp; // skip '{'
-
- if ( !SkipUntil(pp, '}') ) {
- wxLogWarning("file %s(%d): '}' expected after '\\param'",
- m_filename.c_str(), (int)m_line);
- }
- else {
- result = wxString(startParam, (*pp)++ - startParam);
- }
- }
-
- return result;
-}
-
-bool DocManager::ParseTeXFile(const wxString& filename)
-{
- m_filename = filename;
-
- wxFile file(m_filename, wxFile::read);
- if ( !file.IsOpened() )
- return false;
-
- off_t len = file.Length();
- if ( len == wxInvalidOffset )
- return false;
-
- char *buf = new char[len + 1];
- buf[len] = '\0';
-
- if ( file.Read(buf, len) == wxInvalidOffset ) {
- delete [] buf;
-
- return false;
- }
-
- // reinit everything
- m_line = 1;
-
- wxLogVerbose("%s: starting to parse doc file '%s'.",
- GetCurrentTimeFormatted("%H:%M:%S"), m_filename.c_str());
-
- // the name of the class from the last "\membersection" command: we assume
- // that the following "\func" or "\constfunc" always documents a method of
- // this class (and it should always be like that in wxWidgets documentation)
- wxString classname;
-
- for ( const char *current = buf; current - buf < len; current++ ) {
- // FIXME parsing is awfully inefficient
-
- if ( *current == '%' ) {
- // comment, skip until the end of line
- current++;
- SkipUntil(¤t, '\n');
-
- continue;
- }
-
- // all the command we're interested in start with '\\'
- while ( *current != '\\' && *current != '\0' ) {
- if ( *current++ == '\n' )
- m_line++;
- }
-
- if ( *current == '\0' ) {
- // no more TeX commands left
- break;
- }
-
- current++; // skip '\\'
-
- enum
- {
- Nothing,
- Func,
- ConstFunc,
- MemberSect
- } foundCommand = Nothing;
-
- size_t lenMatch = TryMatch(current, "func");
- if ( lenMatch ) {
- foundCommand = Func;
- }
- else {
- lenMatch = TryMatch(current, "constfunc");
- if ( lenMatch )
- foundCommand = ConstFunc;
- else {
- lenMatch = TryMatch(current, "membersection");
-
- if ( lenMatch )
- foundCommand = MemberSect;
- }
- }
-
- if ( foundCommand == Nothing )
- continue;
-
- current += lenMatch;
-
- if ( !SkipSpaceUntil(¤t, '{') ) {
- wxLogWarning("file %s(%d): '{' expected after \\func, "
- "\\constfunc or \\membersection.",
- m_filename.c_str(), (int)m_line);
-
- continue;
- }
-
- current++;
-
- if ( foundCommand == MemberSect ) {
- // what follows has the form <classname>::<funcname>
- const char *startClass = current;
- if ( !SkipUntil(¤t, ':') || *(current + 1) != ':' ) {
- wxLogWarning("file %s(%d): '::' expected after "
- "\\membersection.", m_filename.c_str(), (int)m_line);
- }
- else {
- classname = wxString(startClass, current - startClass);
- TeXUnfilter(&classname);
- }
-
- continue;
- }
-
- // extract the return type
- const char *startRetType = current;
-
- if ( !SkipUntil(¤t, '}') ) {
- wxLogWarning("file %s(%d): '}' expected after return type",
- m_filename.c_str(), (int)m_line);
-
- continue;
- }
-
- wxString returnType = wxString(startRetType, current - startRetType);
- TeXUnfilter(&returnType);
-
- current++;
- if ( !SkipSpaceUntil(¤t, '{') ) {
- wxLogWarning("file %s(%d): '{' expected after return type",
- m_filename.c_str(), (int)m_line);
-
- continue;
- }
-
- current++;
- const char *funcEnd = current;
- if ( !SkipUntil(&funcEnd, '}') ) {
- wxLogWarning("file %s(%d): '}' expected after function name",
- m_filename.c_str(), (int)m_line);
-
- continue;
- }
-
- wxString funcName = wxString(current, funcEnd - current);
- current = funcEnd + 1;
-
- // trim spaces from both sides
- funcName.Trim(false);
- funcName.Trim(true);
-
- // special cases: '$...$' may be used for LaTeX inline math, remove the
- // '$'s
- if ( funcName.Find('$') != wxNOT_FOUND ) {
- wxString name;
- for ( const char *p = funcName.c_str(); *p != '\0'; p++ ) {
- if ( *p != '$' && !isspace(*p) )
- name += *p;
- }
-
- funcName = name;
- }
-
- // \destruct{foo} is really ~foo
- if ( funcName[0u] == '\\' ) {
- size_t len = strlen("\\destruct{");
- if ( funcName(0, len) != "\\destruct{" ) {
- wxLogWarning("file %s(%d): \\destruct expected",
- m_filename.c_str(), (int)m_line);
-
- continue;
- }
-
- funcName.erase(0, len);
- funcName.Prepend('~');
-
- if ( !SkipSpaceUntil(¤t, '}') ) {
- wxLogWarning("file %s(%d): '}' expected after destructor",
- m_filename.c_str(), (int)m_line);
-
- continue;
- }
-
- funcEnd++; // there is an extra '}' to count
- }
-
- TeXUnfilter(&funcName);
-
- // extract params
- current = funcEnd + 1; // skip '}'
- if ( !SkipSpaceUntil(¤t, '{') ||
- (current++, !SkipSpaceUntil(¤t, '\\')) ) {
- wxLogWarning("file %s(%d): '\\param' or '\\void' expected",
- m_filename.c_str(), (int)m_line);
-
- continue;
- }
-
- wxArrayString paramNames, paramTypes, paramValues;
-
- bool isVararg = false;
-
- current++; // skip '\\'
- lenMatch = TryMatch(current, "void");
- if ( !lenMatch ) {
- lenMatch = TryMatch(current, "param");
- while ( lenMatch && (current - buf < len) ) {
- current += lenMatch;
-
- // now come {paramtype}{paramname}
- wxString paramType = ExtractStringBetweenBraces(¤t);
- if ( !paramType.empty() ) {
- wxString paramText = ExtractStringBetweenBraces(¤t);
- if ( !paramText.empty() ) {
- // the param declaration may contain default value
- wxString paramName = paramText.BeforeFirst('='),
- paramValue = paramText.AfterFirst('=');
-
- // sanitize all strings
- TeXUnfilter(¶mValue);
- TeXUnfilter(¶mName);
- TeXUnfilter(¶mType);
-
- paramValues.Add(paramValue);
- paramNames.Add(paramName);
- paramTypes.Add(paramType);
- }
- }
- else {
- // vararg function?
- wxString paramText = ExtractStringBetweenBraces(¤t);
- if ( paramText == "..." ) {
- isVararg = true;
- }
- else {
- wxLogWarning("Parameters of '%s::%s' are in "
- "incorrect form.",
- classname.c_str(), funcName.c_str());
- }
- }
-
- // what's next?
- current = SkipSpaces(current);
- if ( *current == ',' || *current == '}' ) {
- current = SkipSpaces(++current);
-
- lenMatch = TryMatch(current, "\\param");
- }
- else {
- wxLogWarning("file %s(%d): ',' or '}' expected after "
- "'\\param'", m_filename.c_str(), (int)m_line);
-
- continue;
- }
- }
-
- // if we got here there was no '\\void', so must have some params
- if ( paramNames.IsEmpty() ) {
- wxLogWarning("file %s(%d): '\\param' or '\\void' expected",
- m_filename.c_str(), (int)m_line);
-
- continue;
- }
- }
-
- // verbose diagnostic output
- wxString paramsAll;
- size_t param, paramCount = paramNames.GetCount();
- for ( param = 0; param < paramCount; param++ ) {
- if ( param != 0 ) {
- paramsAll << ", ";
- }
-
- paramsAll << paramTypes[param] << ' ' << paramNames[param];
- }
-
- wxString constStr;
- if (foundCommand == ConstFunc)
- constStr = _T(" const");
-
- wxLogVerbose("file %s(%d): found '%s %s::%s(%s)%s'",
- m_filename.c_str(),
- (int)m_line,
- returnType.c_str(),
- classname.c_str(),
- funcName.c_str(),
- paramsAll.c_str(),
- constStr.c_str());
-
- // store the info about the just found function
- ArrayMethodInfo *methods;
- int index = m_classes.Index(classname);
- if ( index == wxNOT_FOUND ) {
- m_classes.Add(classname);
-
- methods = new ArrayMethodInfo;
- m_methods.Add(methods);
- }
- else {
- methods = m_methods[(size_t)index];
- }
-
- ArrayParamInfo params;
- for ( param = 0; param < paramCount; param++ ) {
- params.Add(new ParamInfo(paramTypes[param],
- paramNames[param],
- paramValues[param]));
- }
-
- MethodInfo *method = new MethodInfo(returnType, funcName, params);
- if ( foundCommand == ConstFunc )
- method->SetFlag(MethodInfo::Const);
- if ( isVararg )
- method->SetFlag(MethodInfo::Vararg);
-
- methods->Add(method);
- }
-
- delete [] buf;
-
- wxLogVerbose("%s: finished parsing doc file '%s'.\n",
- GetCurrentTimeFormatted("%H:%M:%S"), m_filename.c_str());
-
- return true;
-}
-
-bool DocManager::DumpDifferences(spContext *ctxTop) const
-{
- typedef MMemberListT::const_iterator MemberIndex;
-
- bool foundDiff = false;
-
- // flag telling us whether the given class was found at all in the header
- size_t nClass, countClassesInDocs = m_classes.GetCount();
- bool *classExists = new bool[countClassesInDocs];
- for ( nClass = 0; nClass < countClassesInDocs; nClass++ ) {
- classExists[nClass] = false;
- }
-
- // ctxTop is normally an spFile
- wxASSERT( ctxTop->GetContextType() == SP_CTX_FILE );
-
- const MMemberListT& classes = ctxTop->GetMembers();
- for ( MemberIndex i = classes.begin(); i != classes.end(); i++ ) {
- spContext *ctx = *i;
- if ( ctx->GetContextType() != SP_CTX_CLASS ) {
- // TODO process also global functions, macros, ...
- continue;
- }
-
- spClass *ctxClass = (spClass *)ctx;
- const wxString& nameClass = ctxClass->m_Name;
- int index = m_classes.Index(nameClass);
- if ( index == wxNOT_FOUND ) {
- if ( !m_ignoreNames.IgnoreClass(nameClass) ) {
- foundDiff = true;
-
- wxLogError("Class '%s' is not documented at all.",
- nameClass.c_str());
- }
-
- // it makes no sense to check for its functions
- continue;
- }
- else {
- classExists[index] = true;
- }
-
- // array of method descriptions for this class
- const ArrayMethodInfo& methods = *(m_methods[index]);
- size_t nMethod, countMethods = methods.GetCount();
-
- // flags telling if we already processed given function
- bool *methodExists = new bool[countMethods];
- for ( nMethod = 0; nMethod < countMethods; nMethod++ ) {
- methodExists[nMethod] = false;
- }
-
- wxArrayString aOverloadedMethods;
-
- const MMemberListT& functions = ctxClass->GetMembers();
- for ( MemberIndex j = functions.begin(); j != functions.end(); j++ ) {
- ctx = *j;
- if ( ctx->GetContextType() != SP_CTX_OPERATION )
- continue;
-
- spOperation *ctxMethod = (spOperation *)ctx;
- const wxString& nameMethod = ctxMethod->m_Name;
-
- // find all functions with the same name
- wxArrayInt aMethodsWithSameName;
- for ( nMethod = 0; nMethod < countMethods; nMethod++ ) {
- if ( methods[nMethod]->GetName() == nameMethod )
- aMethodsWithSameName.Add(nMethod);
- }
-
- if ( aMethodsWithSameName.IsEmpty() && ctxMethod->IsPublic() ) {
- if ( !m_ignoreNames.IgnoreMethod(nameClass, nameMethod) ) {
- foundDiff = true;
-
- wxLogError("'%s::%s' is not documented.",
- nameClass.c_str(),
- nameMethod.c_str());
- }
-
- // don't check params
- continue;
- }
- else if ( aMethodsWithSameName.GetCount() == 1 ) {
- index = (size_t)aMethodsWithSameName[0u];
- methodExists[index] = true;
-
- if ( m_ignoreNames.IgnoreMethod(nameClass, nameMethod) )
- continue;
-
- if ( !ctxMethod->IsPublic() ) {
- wxLogWarning("'%s::%s' is documented but not public.",
- nameClass.c_str(),
- nameMethod.c_str());
- }
-
- // check that the flags match
- const MethodInfo& method = *(methods[index]);
-
- bool isVirtual = ctxMethod->mIsVirtual;
- if ( isVirtual != method.HasFlag(MethodInfo::Virtual) )
- {
- wxString virtualStr;
- if(isVirtual)virtualStr = _T("not ");
-
- wxLogWarning("'%s::%s' is incorrectly documented as %s"
- "virtual.",
- nameClass.c_str(),
- nameMethod.c_str(),
- virtualStr.c_str());
- }
-
- bool isConst = ctxMethod->mIsConstant;
- if ( isConst != method.HasFlag(MethodInfo::Const) )
- {
- wxString constStr;
- if(isConst)constStr = _T("not ");
-
- wxLogWarning("'%s::%s' is incorrectly documented as %s"
- "constant.",
- nameClass.c_str(),
- nameMethod.c_str(),
- constStr.c_str());
- }
-
- // check that the params match
- const MMemberListT& params = ctxMethod->GetMembers();
-
- if ( params.size() != method.GetParamCount() ) {
- wxLogError("Incorrect number of parameters for '%s::%s' "
- "in the docs: should be %d instead of %d.",
- nameClass.c_str(),
- nameMethod.c_str(),
- (int)params.size(), (int)method.GetParamCount());
- }
- else {
- size_t nParam = 0;
- for ( MemberIndex k = params.begin();
- k != params.end();
- k++, nParam++ ) {
- ctx = *k;
-
- // what else can a function have?
- wxASSERT( ctx->GetContextType() == SP_CTX_PARAMETER );
-
- spParameter *ctxParam = (spParameter *)ctx;
- const ParamInfo& param = method.GetParam(nParam);
- if ( m_checkParamNames &&
- (param.GetName() != ctxParam->m_Name.c_str()) ) {
- foundDiff = true;
-
- wxLogError("Parameter #%d of '%s::%s' should be "
- "'%s' and not '%s'.",
- (int)(nParam + 1),
- nameClass.c_str(),
- nameMethod.c_str(),
- ctxParam->m_Name.c_str(),
- param.GetName().c_str());
-
- continue;
- }
-
- if ( param.GetType() != ctxParam->m_Type ) {
- foundDiff = true;
-
- wxLogError("Type of parameter '%s' of '%s::%s' "
- "should be '%s' and not '%s'.",
- ctxParam->m_Name.c_str(),
- nameClass.c_str(),
- nameMethod.c_str(),
- ctxParam->m_Type.c_str(),
- param.GetType().GetName().c_str());
-
- continue;
- }
-
- if ( param.GetDefValue() != ctxParam->m_InitVal.c_str() ) {
- wxLogWarning("Default value of parameter '%s' of "
- "'%s::%s' should be '%s' and not "
- "'%s'.",
- ctxParam->m_Name.c_str(),
- nameClass.c_str(),
- nameMethod.c_str(),
- ctxParam->m_InitVal.c_str(),
- param.GetDefValue().c_str());
- }
- }
- }
- }
- else {
- // TODO OVER add real support for overloaded methods
-
- if ( m_ignoreNames.IgnoreMethod(nameClass, nameMethod) )
- continue;
-
- if ( aOverloadedMethods.Index(nameMethod) == wxNOT_FOUND ) {
- // mark all methods with this name as existing
- for ( nMethod = 0; nMethod < countMethods; nMethod++ ) {
- if ( methods[nMethod]->GetName() == nameMethod )
- methodExists[nMethod] = true;
- }
-
- aOverloadedMethods.Add(nameMethod);
-
- wxLogVerbose("'%s::%s' is overloaded and I'm too "
- "stupid to find the right match - skipping "
- "the param and flags checks.",
- nameClass.c_str(),
- nameMethod.c_str());
- }
- //else: warning already given
- }
- }
-
- for ( nMethod = 0; nMethod < countMethods; nMethod++ ) {
- if ( !methodExists[nMethod] ) {
- const wxString& nameMethod = methods[nMethod]->GetName();
- if ( !m_ignoreNames.IgnoreMethod(nameClass, nameMethod) ) {
- foundDiff = true;
-
- wxLogError("'%s::%s' is documented but doesn't exist.",
- nameClass.c_str(),
- nameMethod.c_str());
- }
- }
- }
-
- delete [] methodExists;
- }
-
- // check that all classes we found in the docs really exist
- for ( nClass = 0; nClass < countClassesInDocs; nClass++ ) {
- if ( !classExists[nClass] ) {
- foundDiff = true;
-
- wxLogError("Class '%s' is documented but doesn't exist.",
- m_classes[nClass].c_str());
- }
- }
-
- delete [] classExists;
-
- return !foundDiff;
-}
-
-DocManager::~DocManager()
-{
- WX_CLEAR_ARRAY(m_methods);
-}
-
-// ---------------------------------------------------------------------------
-// IgnoreNamesHandler implementation
-// ---------------------------------------------------------------------------
-
-int IgnoreNamesHandler::CompareIgnoreListEntries(IgnoreListEntry *first,
- IgnoreListEntry *second)
-{
- // first compare the classes
- int rc = first->m_classname.Cmp(second->m_classname);
- if ( rc == 0 )
- rc = first->m_funcname.Cmp(second->m_funcname);
-
- return rc;
-}
-
-bool IgnoreNamesHandler::AddNamesFromFile(const wxString& filename)
-{
- wxFile file(filename, wxFile::read);
- if ( !file.IsOpened() )
- return false;
-
- off_t len = file.Length();
- if ( len == wxInvalidOffset )
- return false;
-
- char *buf = new char[len + 1];
- buf[len] = '\0';
-
- if ( file.Read(buf, len) == wxInvalidOffset ) {
- delete [] buf;
-
- return false;
- }
-
- wxString line;
- for ( const char *current = buf; ; current++ ) {
-#ifdef __WXMSW__
- // skip DOS line separator
- if ( *current == '\r' )
- current++;
-#endif // wxMSW
-
- if ( *current == '\n' || *current == '\0' ) {
- if ( line[0u] != '#' ) {
- if ( line.Find(':') != wxNOT_FOUND ) {
- wxString classname = line.BeforeFirst(':'),
- funcname = line.AfterLast(':');
- m_ignore.Add(new IgnoreListEntry(classname, funcname));
- }
- else {
- // entire class
- m_ignore.Add(new IgnoreListEntry(line, wxEmptyString));
- }
- }
- //else: comment
-
- if ( *current == '\0' )
- break;
-
- line.Empty();
- }
- else {
- line += *current;
- }
- }
-
- delete [] buf;
-
- return true;
-}
-
-// -----------------------------------------------------------------------------
-// global function implementation
-// -----------------------------------------------------------------------------
-
-static wxString MakeLabel(const char *classname, const char *funcname)
-{
- wxString label(classname);
- if ( funcname && funcname[0] == '\\' ) {
- // we may have some special TeX macro - so far only \destruct exists,
- // but may be later others will be added
- static const char *macros[] = { "destruct" };
- static const char *replacement[] = { "dtor" };
-
- size_t n;
- for ( n = 0; n < WXSIZEOF(macros); n++ ) {
- if ( strncmp(funcname + 1, macros[n], strlen(macros[n])) == 0 ) {
- // found
- break;
- }
- }
-
- if ( n == WXSIZEOF(macros) ) {
- wxLogWarning("unknown function name '%s' - leaving as is.",
- funcname);
- }
- else {
- funcname = replacement[n];
- }
- }
-
- if ( funcname ) {
- // special treatment for operatorXXX() stuff because the C operators
- // are not valid in LaTeX labels
- wxString oper;
- if ( wxString(funcname).StartsWith("operator", &oper) ) {
- label << "operator";
-
- static const struct
- {
- const char *oper;
- const char *name;
- } operatorNames[] =
- {
- { "=", "assign" },
- { "==", "equal" },
- };
-
- size_t n;
- for ( n = 0; n < WXSIZEOF(operatorNames); n++ ) {
- if ( oper == operatorNames[n].oper ) {
- label << operatorNames[n].name;
-
- break;
- }
- }
-
- if ( n == WXSIZEOF(operatorNames) ) {
- wxLogWarning("unknown operator '%s' - making dummy label.",
- oper.c_str());
-
- label << "unknown";
- }
- }
- else // simply use the func name
- {
- label << funcname;
- }
- }
-
- label.MakeLower();
-
- return label;
-}
-
-static wxString MakeHelpref(const char *argument)
-{
- wxString helpref;
- helpref << "\\helpref{" << argument << "}{" << MakeLabel(argument) << '}';
-
- return helpref;
-}
-
-static void TeXFilter(wxString* str)
-{
- // TeX special which can be quoted (don't include backslash nor braces as
- // we generate them
- static wxRegEx reNonSpecialSpecials("[#$%&_]"),
- reAccents("[~^]");
-
- // just quote
- reNonSpecialSpecials.ReplaceAll(str, "\\\\\\0");
-
- // can't quote these ones as they produce accents when preceded by
- // backslash, so put them inside verb
- reAccents.ReplaceAll(str, "\\\\verb|\\0|");
-}
-
-static void TeXUnfilter(wxString* str)
-{
- // FIXME may be done much more quickly
- str->Trim(true);
- str->Trim(false);
-
- // undo TeXFilter
- static wxRegEx reNonSpecialSpecials("\\\\([#$%&_{}])"),
- reAccents("\\\\verb\\|([~^])\\|");
-
- reNonSpecialSpecials.ReplaceAll(str, "\\1");
- reAccents.ReplaceAll(str, "\\1");
-}
-
-static wxString GetAllComments(const spContext& ctx)
-{
- wxString comments;
- const MCommentListT& commentsList = ctx.GetCommentList();
- for ( MCommentListT::const_iterator i = commentsList.begin();
- i != commentsList.end();
- i++ ) {
- wxString comment = (*i)->GetText();
-
- // don't take comments like "// ----------" &c
- comment.Trim(false);
- if ( !comment.empty() &&
- comment == wxString(comment[0u], comment.length() - 1) + '\n' )
- comments << "\n";
- else
- comments << comment;
- }
-
- return comments;
-}
-
-static const char *GetCurrentTimeFormatted(const char *timeFormat)
-{
- static char s_timeBuffer[128];
- time_t timeNow;
- struct tm *ptmNow;
-
- time(&timeNow);
- ptmNow = localtime(&timeNow);
-
- strftime(s_timeBuffer, WXSIZEOF(s_timeBuffer), timeFormat, ptmNow);
-
- return s_timeBuffer;
-}
-
-static const wxString GetVersionString()
-{
- wxString version = "$Revision$";
- wxRegEx("^\\$Revision$$").ReplaceFirst(&version, "\\1");
- return version;
-}
-
-/*
- $Log$
- Revision 1.45 2007/05/25 20:29:14 VS
- compilation fix: can't use wxUniCharRef in switch statement
-
- Revision 1.44 2005/05/31 17:47:45 ABX
- More warning and error fixes (work in progress with Tinderbox).
-
- Revision 1.43 2005/05/31 15:42:43 ABX
- More warning and error fixes (work in progress with Tinderbox).
-
- Revision 1.42 2005/05/31 15:32:49 ABX
- More warning and error fixes (work in progress with Tinderbox).
-
- Revision 1.41 2005/05/30 13:06:15 ABX
- More warning and error fixes (work in progress with Tinderbox).
-
- Revision 1.40 2005/05/30 11:49:32 ABX
- More warning and error fixes (work in progress with Tinderbox).
-
- Revision 1.39 2005/05/30 09:26:42 ABX
- More warning and error fixes (work in progress with Tinderbox).
-
- Revision 1.38 2005/05/24 09:06:20 ABX
- More fixes and wxWidgets coding standards.
-
- Revision 1.37 2005/05/23 15:22:08 ABX
- Initial HelpGen source cleaning.
-
- Revision 1.36 2005/04/07 19:54:58 MW
- Workarounds to allow compilation by Sun C++ 5.5
-
- Revision 1.35 2004/12/12 11:03:31 VZ
- give an error message if we're built in Unicode mode (in response to bug 1079224)
-
- Revision 1.34 2004/11/23 09:53:31 JS
- Changed GPL to wxWindows Licence
-
- Revision 1.33 2004/11/12 03:30:07 RL
-
- Cruft cleanup from MJW, strip the tabs out of sound.cpp
-
- Revision 1.32 2004/11/10 21:02:58 VZ
- new set of fixes for problems due to huge files support: drop wxFileSize_t, use wxFileOffset only, make wxInvalidOffset an int (main part of the patch 1063498)
-
- Revision 1.31 2004/10/05 15:38:29 ABX
- Warning fixes found under hardest mode of OpenWatcom. Seems clean in Borland, MinGW and DMC.
-
- Revision 1.30 2004/06/18 19:25:50 ABX
- Small step in making HelpGen up to date unicode application.
-
- Revision 1.29 2004/06/17 19:00:22 ABX
- Warning fixes. Code cleanup. Whitespaces and tabs removed.
-
- Revision 1.28 2004/05/25 11:19:57 JS
- More name changes
-
- Revision 1.27 2003/10/13 17:21:30 MBN
- Compilation fixes.
-
- Revision 1.26 2003/09/29 15:18:35 MBN
- (Blind) compilation fix for Sun compiler.
-
- Revision 1.25 2003/09/03 17:39:27 MBN
- Compilation fixes.
-
- Revision 1.24 2003/08/13 22:59:37 VZ
- compilation fix
-
- Revision 1.23 2003/06/13 17:05:43 VZ
- quote '|' inside regexes (fixes dump mode); fixed crash due to strange HelpGenApp code
-
- Revision 1.22 2002/01/21 21:18:50 JS
- Now adds 'include file' heading
-
- Revision 1.21 2002/01/04 11:06:09 JS
- Fixed missing membersections bug and also bug with functions not being written
- in the right class
-
- Revision 1.20 2002/01/03 14:23:33 JS
- Added code to make it not duplicate membersections for overloaded functions
-
- Revision 1.19 2002/01/03 13:34:12 JS
- Added FlushAll to CloseClass, otherwise text was only flushed right at the end,
- and appeared in one file.
-
- Revision 1.18 2002/01/03 12:02:47 JS
- Added main() and corrected VC++ project settings
-
- Revision 1.17 2001/11/30 21:43:35 VZ
- now the methods are sorted in the correct order in the generated docs
-
- Revision 1.16 2001/11/28 19:27:33 VZ
- HelpGen doesn't work in GUI mode
-
- Revision 1.15 2001/11/22 21:59:58 GD
- use "..." instead of <...> for wx headers
-
- Revision 1.14 2001/07/19 13:51:29 VZ
- fixes to version string
-
- Revision 1.13 2001/07/19 13:44:57 VZ
- 1. compilation fixes
- 2. don't quote special characters inside verbatim environment
-
- Revision 1.12 2000/10/09 13:53:33 juliansmart
-
- Doc corrections; added HelpGen project files
-
- Revision 1.11 2000/07/15 19:50:42 cvsuser
- merged 2.2 branch
-
- Revision 1.10.2.2 2000/03/27 15:33:10 VZ
- don't trasnform output dir name to lower case
-
- Revision 1.10 2000/03/11 10:05:23 VS
- now compiles with wxBase
-
- Revision 1.9 2000/01/16 13:25:21 VS
- compilation fixes (gcc)
-
- Revision 1.8 1999/09/13 14:29:39 JS
-
- Made HelpGen into a wxWin app (still uses command-line args); moved includes
- into src for simplicity; added VC++ 5 project file
-
- Revision 1.7 1999/02/21 22:32:32 VZ
- 1. more C++ parser fixes - now it almost parses wx/string.h
- a) #if/#ifdef/#else (very) limited support
- b) param type fix - now indirection chars are correctly handled
- c) class/struct/union distinction
- d) public/private fixes
- e) Dump() function added - very useful for debugging
-
- 2. option to ignore parameter names during 'diff' (in fact, they're ignored
- by default, and this option switches it on)
-
- Revision 1.6 1999/02/20 23:00:26 VZ
- 1. new 'diff' mode which seems to work
- 2. output files are not overwritten in 'dmup' mode
- 3. fixes for better handling of const functions and operators
- ----------------------------
- revision 1.5
- date: 1999/02/15 23:07:25; author: VZ; state: Exp; lines: +106 -45
- 1. Parser improvements
- a) const and virtual methods are parsed correctly (not static yet)
- b) "const" which is part of the return type is not swallowed
-
- 2. HelpGen improvements: -o outputdir parameter added to the cmd line,
- "//---------" kind comments discarded now.
- ----------------------------
- revision 1.4
- date: 1999/01/13 14:23:31; author: JS; state: Exp; lines: +4 -4
-
- some tweaks to HelpGen
- ----------------------------
- revision 1.3
- date: 1999/01/09 20:18:03; author: JS; state: Exp; lines: +7 -2
-
- HelpGen starting to compile with VC++
- ----------------------------
- revision 1.2
- date: 1999/01/08 19:46:22; author: VZ; state: Exp; lines: +208 -35
-
- supports typedefs, generates "See also:" and adds "virtual " for virtual
- functions
- ----------------------------
- revision 1.1
- date: 1999/01/08 17:45:55; author: VZ; state: Exp;
-
- HelpGen is a prototype of the tool for automatic generation of the .tex files
- for wxWidgets documentation from C++ headers
-*/
-
-/* vi: set tw=80 et ts=4 sw=4: */
+++ /dev/null
-# =========================================================================
-# This makefile was generated by
-# Bakefile 0.2.3 (http://www.bakefile.org)
-# Do not modify, all changes will be overwritten!
-# =========================================================================
-
-
-@MAKE_SET@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-datarootdir = @datarootdir@
-INSTALL = @INSTALL@
-EXEEXT = @EXEEXT@
-SETFILE = @SETFILE@
-BK_DEPS = @BK_DEPS@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-LIBS = @LIBS@
-CXX = @CXX@
-CXXFLAGS = @CXXFLAGS@
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-WX_LIB_FLAVOUR = @WX_LIB_FLAVOUR@
-TOOLKIT = @TOOLKIT@
-TOOLKIT_LOWERCASE = @TOOLKIT_LOWERCASE@
-TOOLKIT_VERSION = @TOOLKIT_VERSION@
-EXTRALIBS = @EXTRALIBS@
-EXTRALIBS_GUI = @EXTRALIBS_GUI@
-CXXWARNINGS = @CXXWARNINGS@
-HOST_SUFFIX = @HOST_SUFFIX@
-wx_top_builddir = @wx_top_builddir@
-
-### Variables: ###
-
-DESTDIR =
-WX_RELEASE = 2.9
-LIBDIRNAME = $(wx_top_builddir)/lib
-HELPGEN_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
- $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
- -I$(srcdir) $(__DLLFLAG_p) -DwxUSE_GUI=0 $(CXXWARNINGS) $(CPPFLAGS) \
- $(CXXFLAGS)
-HELPGEN_OBJECTS = \
- HelpGen_HelpGen.o \
- HelpGen_cjparser.o \
- HelpGen_docripper.o \
- HelpGen_ifcontext.o \
- HelpGen_markup.o \
- HelpGen_scriptbinder.o \
- HelpGen_sourcepainter.o \
- HelpGen_srcparser.o
-
-### Conditionally set variables: ###
-
-@COND_DEPS_TRACKING_0@CXXC = $(CXX)
-@COND_DEPS_TRACKING_1@CXXC = $(BK_DEPS) $(CXX)
-@COND_USE_GUI_0@PORTNAME = base
-@COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
-@COND_TOOLKIT_MAC@WXBASEPORT = _carbon
-@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d
-@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d
-@COND_UNICODE_1@WXUNICODEFLAG = u
-@COND_WXUNIV_1@WXUNIVNAME = univ
-@COND_MONOLITHIC_0@EXTRALIBS_FOR_BASE = $(EXTRALIBS)
-@COND_MONOLITHIC_1@EXTRALIBS_FOR_BASE = $(EXTRALIBS) $(EXTRALIBS_GUI)
-@COND_PLATFORM_MAC_0@__HelpGen___mac_setfilecmd = @true
-@COND_PLATFORM_MAC_1@__HelpGen___mac_setfilecmd = \
-@COND_PLATFORM_MAC_1@ $(SETFILE) -t APPL HelpGen$(EXEEXT)
-@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
-@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
-@COND_USE_RTTI_0@__RTTI_DEFINE_p = -DwxNO_RTTI
-@COND_USE_THREADS_0@__THREAD_DEFINE_p = -DwxNO_THREADS
-@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL
-COND_MONOLITHIC_0___WXLIB_BASE_p = \
- -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
-@COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
-COND_MONOLITHIC_1___WXLIB_MONO_p = \
- -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
-@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
-@COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \
-@COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
-COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p = \
- -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
-@COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = $(COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p)
-@COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \
-@COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
-
-### Targets: ###
-
-all: HelpGen$(EXEEXT)
-
-install: all
-
-uninstall:
-
-install-strip: install
-
-clean:
- rm -rf ./.deps ./.pch
- rm -f ./*.o
- rm -f HelpGen$(EXEEXT)
-
-distclean: clean
- rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
-
-HelpGen$(EXEEXT): $(HELPGEN_OBJECTS)
- $(CXX) -o $@ $(HELPGEN_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LIBS) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE)
-
- $(__HelpGen___mac_setfilecmd)
-
-HelpGen_HelpGen.o: $(srcdir)/HelpGen.cpp
- $(CXXC) -c -o $@ $(HELPGEN_CXXFLAGS) $(srcdir)/HelpGen.cpp
-
-HelpGen_cjparser.o: $(srcdir)/cjparser.cpp
- $(CXXC) -c -o $@ $(HELPGEN_CXXFLAGS) $(srcdir)/cjparser.cpp
-
-HelpGen_docripper.o: $(srcdir)/docripper.cpp
- $(CXXC) -c -o $@ $(HELPGEN_CXXFLAGS) $(srcdir)/docripper.cpp
-
-HelpGen_ifcontext.o: $(srcdir)/ifcontext.cpp
- $(CXXC) -c -o $@ $(HELPGEN_CXXFLAGS) $(srcdir)/ifcontext.cpp
-
-HelpGen_markup.o: $(srcdir)/markup.cpp
- $(CXXC) -c -o $@ $(HELPGEN_CXXFLAGS) $(srcdir)/markup.cpp
-
-HelpGen_scriptbinder.o: $(srcdir)/scriptbinder.cpp
- $(CXXC) -c -o $@ $(HELPGEN_CXXFLAGS) $(srcdir)/scriptbinder.cpp
-
-HelpGen_sourcepainter.o: $(srcdir)/sourcepainter.cpp
- $(CXXC) -c -o $@ $(HELPGEN_CXXFLAGS) $(srcdir)/sourcepainter.cpp
-
-HelpGen_srcparser.o: $(srcdir)/srcparser.cpp
- $(CXXC) -c -o $@ $(HELPGEN_CXXFLAGS) $(srcdir)/srcparser.cpp
-
-
-# Include dependency info, if present:
-@IF_GNU_MAKE@-include .deps/*.d
-
-.PHONY: all install uninstall clean distclean
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 22/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-#include "cjparser.h"
-
-#if defined( wxUSE_TEMPLATE_STL )
-
- #include <map>
-
-#else
-
- #include "wxstlac.h"
-
-#endif
-
-
-/***** Implementation for class SJParser *****/
-
-// statics used by inline'ed C helper-functions
-static char* _gSrcStart = 0;
-static char* _gSrcEnd = 0;
-static char* _gLastSuppresedComment = 0;
-static int _gLineNo = 0;
-
-// FOR NOW:: comments queue is static
-#define MAX_CQ_ENTRIES 128
-static char* _gCommentsQueue[MAX_CQ_ENTRIES];
-static int _gCQSize = 0;
-
-/***** keyword map related structures *****/
-
-struct less_c_str
-{
- inline bool operator()( char* x, char* y) const
- { return ( strcmp( x,y ) < 0 );
- }
-};
-
-//WXSTL_MAP(CharPtrT,CharPtrT, LESS_THEN_FUNCTOR(CharPtrT));
-
-#if defined( wxUSE_TEMPLATE_STL )
-
- typedef map< char*, char*, less_c_str > KeywordMapT;
-
-#else
-
- typedef char* CharPtrT;
- typedef WXSTL_MAP( CharPtrT, CharPtrT ,less_c_str) KeywordMapT;
-
-#endif
-
-static KeywordMapT __gMultiLangMap;
-static int __gMapReady = 0;
-
-static char* __gKeyWords[] =
-{
- "public",
- "protected",
- "private",
-
- "class",
- "struct",
- "union",
- "enum",
- "interface",
-
- "package",
- "import",
-
- "typedef",
- "template",
- "friend",
- "const",
- "volatile",
- "mutable",
- "virtual",
- "inline",
- "static",
- "register",
-
- "final",
- "abstract",
- "native",
-
- "__stdcall",
- "extern",
-
- 0
-};
-
-static void check_keyword_map()
-{
- if ( !__gMapReady )
- {
- __gMapReady = 1;
-
- // "make sure" the address of the first member of non-polimorphic class
- // coinsides with the address of the instance
-
- char** keyword = __gKeyWords;
-
- while ( (*keyword) != 0 )
- {
- __gMultiLangMap.insert(
- KeywordMapT::value_type( *keyword, *keyword )
- );
-
- ++keyword;
- }
- }
-}
-
-/***** helper functions *****/
-
-static inline void skip_to_eol( char*& cur )
-{
- while( *(cur) != 10 && *cur != 13 && cur < _gSrcEnd) ++cur;
-}
-
-static inline void skip_eol( char*& cur )
-{
- if ( *cur == 13 )
-
- cur += 2;
- else
- cur += 1;
-
- ++_gLineNo;
-}
-
-static inline bool skip_to_next_comment_in_the_line( char*& cur )
-{
- do
- {
- while( cur < _gSrcEnd &&
- *cur != 10 &&
- *cur != 13 &&
- *cur != '/'
- ) ++cur;
-
- if ( cur == _gSrcEnd ) return false;
-
- if ( *cur == '/' )
- {
- if ( (*(cur+1) == '*') ||
- (*(cur+1) == '/') ) return true;
- else
- {
- ++cur;
- continue;
- }
- }
-
- return false;
-
- } while(1);
-}
-
-inline static void store_line_no( int& toVar )
-{
- toVar = _gLineNo;
-}
-
-inline static void restore_line_no( int storedLineNo )
-{
- _gLineNo = storedLineNo;
-}
-
-inline static int get_line_no()
-{
- return _gLineNo;
-}
-
-static void skip_to_prev_line( char*& cur )
-{
- while( cur >= _gSrcStart &&
- *cur != 10 &&
- *cur != 13
- ) --cur;
-
- // NOTE:: '\n' is 13,10 for DOS
- // '\n' is 10 for UNIX
-
- // NOTE1: '\n' symbol is not used here,
- // to provide possibility of loading
- // file as binary
-
- --cur;
- if ( *cur == 10 )
- {
- ++cur;
- return;
- }
-
- if ( *cur == 13 ) --cur;
-
- while( cur >= _gSrcStart &&
- *cur != 10 &&
- *cur != 13
- ) --cur;
-
- ++cur; // move to the first character in the line
-}
-
-static inline void skip_comments( char*& cur )
-{
- ++cur; // skip '/' token
-
- if ( *cur != '/' && *cur != '*' ) return;
-
- // first, store position of the comment into the queue
- // (which further will be attached to the next context
- // found)
-
- if ( cur-1 != _gLastSuppresedComment )
- {
- if ( _gCQSize == MAX_CQ_ENTRIES )
- {
- size_t i = MAX_CQ_ENTRIES-1;
-
- while( i != 0 )
- {
- _gCommentsQueue[i-1] = _gCommentsQueue[i];
- --i;
- }
-
- --_gCQSize ;
- }
-
- _gCommentsQueue[_gCQSize++] = cur-1;
- }
-
- // if signle-line comment, skip it now
- if ( *cur == '/' )
- {
- skip_to_eol( cur );
- skip_eol( cur );
- return;
- }
-
- size_t level = 1;
-
- // check for multiline comment (handle nested multiline comments!)
-
- int line_len = 0;
-
- ++cur;
- ++cur;
- do
- {
- // TBD:: check eof cond.
-
- // detect and remove vertical columns of '*''s
-
- while ( *cur != '/' && cur < _gSrcEnd )
- {
- switch (*cur)
- {
- case '*' :
- {
- if ( *(cur+1) != '/' )
- {
- if ( line_len == 1 )
-
- *cur = ' ';
- }
-
- break;
- }
-
- case 13 : line_len = 0; break;
- case 10 : { line_len = 0; ++_gLineNo; } break;
-
- default : ++line_len;
- }
-
- ++cur;
- }
-
- if ( cur >= _gSrcEnd ) return;
-
- ++cur;
-
- if ( *(cur-2) == '*' )
- {
- --level;
- if ( level == 0 )
- break;
- }
- else
- if ( *cur == '*' )
- {
- ++cur;
- ++cur;
-
- ++level;
- }
-
- } while(1);
-}
-
-static inline void clear_commets_queue()
-{
- _gCQSize = 0;
-}
-
-static inline void skip_quoted_string( char*& cur )
-{
- ++cur; // skip first quote '"'
-
- // check if quote wasn't prefixed
- if ( *(cur-2) == '\\' )
- return;
-
- do
- {
- while ( *cur != '"' && cur < _gSrcEnd )
- {
- if ( *cur == 10 ) ++_gLineNo;
- ++cur;
- }
-
- if ( cur >= _gSrcEnd ) return;
-
- ++cur; // skip the last quote
-
- // check if it wasn't prefixed
-
- if ( *(cur-2) != '\\' )
- break;
-
- } while (1);
-}
-
-// skips subsequent white space and comments
-// (return false if the end of source code reached)
-
-static inline bool get_next_token( char*& cur )
-{
- for( ; cur < _gSrcEnd; ++cur )
- {
- switch( *(cur) )
- {
- case ' ' : continue;
- case '\t': continue;
- case 13 : continue;
-
- case 10 : { ++_gLineNo;continue; }
-
- case '/' : skip_comments( cur );
- --cur;
- continue;
-
- default : break;
- };
-
- break;
- }
-
- if ( cur >= _gSrcEnd )
- return false;
- else
- return true;
-}
-
-static inline void skip_preprocessor_dir( char*& cur )
-{
- do
- {
- skip_to_eol(cur);
-
- if ( *(cur-1) != '\\' )
- break;
-
- if ( cur < _gSrcEnd )
- skip_eol( cur );
- else
- break;
-
- } while(1);
-}
-
-static void skip_token( char*& cur )
-{
- if ( *cur == '"' )
- {
- skip_quoted_string( cur );
- return;
- }
-
- if ( *cur == ',' ||
- *cur == ';' ||
- *cur == ')' ||
- *cur == '('
- )
- {
- ++cur;
- return;
- }
-
- // special case of "!=", "<=", ... 2 character composite tokens
- if ( *cur == '<' ||
- *cur == '>' ||
- *cur == '=' ||
- *cur == '!'
- )
- {
- cur++;
- if ( *cur == '=' )
- cur++;
-
- return;
- }
-
- ++cur; // leading character is always skipped
-
- for( ; cur < _gSrcEnd ; ++cur )
- {
- switch ( *cur )
- {
- case ' ' : break;
- case '\t': break;
- case 13 : break;
- case 10 : break;
- case ',' : break;
- case ';' : break;
- case '<' : break;
- case '>' : break;
-
- // FIXME:: QUICK-HACK:: to treat scope resolution
- // tokens are a part of the string - e.g. SomeSpace::SubName would
- // become one token
-
- case ':' : if ( *(cur+1) == ':' )
- {
- ++cur;
- continue;
- }
-
- break;
- case '=' : break;
- case '(' : break;
- case ')' : break;
- case '{' : break;
- case '}' : break;
-
- default : continue;
- };
- break;
- }
-}
-
-static inline size_t get_token_len( char* tok )
-{
- char* start = tok;
-
- skip_token( tok );
-
- return size_t( tok - start );
-}
-
-// returns true, if given tokens are equel
-
-static inline bool cmp_tokens( char* tok1, char* tok2 )
-{
- // NOTE:: the case one token includes
- // other in it's entirely is not handled
-
- size_t len = get_token_len( tok1 );
-
- // assuming that tokens are non-zero length
-
- do
- {
- if ( *(tok1++) != *(tok2++) )
- return false;
-
- --len;
-
- } while ( --len );
-
- return true;
-}
-
-static inline bool cmp_tokens_fast( char* tok1, char* tok2, size_t len )
-{
- do
- {
- if ( *(tok1++) != *(tok2++) )
- return false;
-
- } while ( --len );
-
- return true;
-}
-
-static inline void skip_tempalate_statement( char*& cur )
-{
- size_t level = 0;
-
- // go one level deeper
- while( *cur != '<' && cur < _gSrcEnd )
- {
- if (*cur == 10 ) ++_gLineNo;
- ++cur;
- }
-
- // FIXME:: template should be checked statement for
- // comments inside of it
-
- do
- {
- if ( *cur == '<' )
- ++level;
- else
- --level;
-
- ++cur; // skip '<' or '>' token
-
- if ( level == 0 )
- return;
-
- while( *cur != '<' && *cur != '>' && cur < _gSrcEnd )
- {
- if (*cur == 10 ) ++_gLineNo;
- ++cur;
- }
-
- } while (1);
-}
-
-static inline void skip_statement( char*& cur )
-{
- for( ; cur < _gSrcEnd; ++cur )
-
- switch (*cur)
- {
- case ';' : ++cur; // skip statement-terminator token
- return;
-
- case '"' : skip_quoted_string(cur);
- --cur;
- continue;
-
- case 10 : ++_gLineNo;
-
- continue;
- case '/' : skip_comments( cur );
- --cur;
- continue;
- default : continue;
- }
-}
-
-// "reversed" versions of skip_token() and get_next_token()
-
-static inline void skip_token_back( char*& cur )
-{
- // FIXME:: now, when moving backwards, neither strings nor
- // comment blocks are checked
-
- --cur; // skip to the trailing character
-
- if ( *cur == ',' ||
- *cur == ')' ||
- *cur == '('
- )
- return;
-
-
- for( ; cur < _gSrcEnd ; --cur )
- {
- switch ( *cur )
- {
- case ' ' : break;
- case '\t': break;
- case 13 : break;
- case 10 : break;
- case ',' : break;
- case '(' : break;
-
- default : continue;
- };
-
- break;
- }
-
- ++cur; // get to the leading character of the token
-}
-
-static inline void skip_next_token_back( char*& cur )
-{
- --cur; // skip leading character of the current token
-
- if ( *cur == ',' ||
- *cur == ')' ||
- *cur == '('
- )
- {
- ++cur;
- return;
- }
-
- for( ; cur < _gSrcEnd; --cur )
- {
- switch ( *cur )
- {
- case ' ' : continue;
- case '\t': continue;
- case 13 : continue;
- case 10 : continue;
- case ',' : continue;
- case '(' : continue;
-
- default : break;
- };
-
- break;
- }
-
- ++cur; // position after the trailing charcter of the prev token
-}
-
-static wxString get_token_str( char* cur )
-{
- return wxString( cur, get_token_len( cur ) );
-}
-
-// skips token or whole expression which may have
-// nested expressions between '(' ')' brackets.
-//
-// Upon return, the cursor points to the terminating bracket ')',
-//
-// Return value is the size of the block
-
-static size_t skip_block( char*& cur )
-{
- size_t level = 0; // nesting level
-
- char* start = cur;
-
- // NOTE:: assumed that block not necessarely starts
- // with bracket rightaway
-
- if ( *cur == '(' )
- {
- ++level;
- }
-
- do
- {
- skip_token( cur );
-
- char* savedPos = cur;
- int tmpLnNo;
- store_line_no( tmpLnNo );
-
- get_next_token( cur );
-
- if ( cur >= _gSrcEnd ) return 0;
-
- if ( *cur == '(' )
- {
- ++level;
- }
- else
- if ( *cur == ')' )
- {
- if ( level == 0 )
- {
- cur = savedPos;
- restore_line_no( tmpLnNo );
-
- return size_t(cur-start);
- }
-
- --level;
-
- if ( level == 0 )
- {
- ++cur;
-
- // QUICK-HACK::to easily handle function prototypes ,
- // it works, besause theoretically there should
- // be no cast-expressions in non-implementation
- // scope (e.g. "time( (long*)(ptr+1) )" should not
- // appear in the declarations, thus it is most likelly
- // for the ")(" fragment to be within a function
- // prototype in the declarations scope
-
- if ( *cur == '(' )
- {
- ++level;
- continue;
- }
-
- else return size_t(cur-start);
- }
- }
- else
- {
- if ( level == 0 )
- {
- cur = savedPos;
- restore_line_no( tmpLnNo );
-
- return size_t(cur-start);
- }
- }
-
- } while(1);
-}
-
-// returns 0, if end of source reached
-static inline bool skip_imp_block( char*& cur )
-{
- while( *cur != '{' && cur < _gSrcEnd )
- {
- skip_token( cur );
- if ( !get_next_token( cur ) ) return false;
- }
-
- while( *cur != '}' && cur < _gSrcEnd )
- {
- skip_token( cur );
- if ( !get_next_token( cur ) ) return false;
- }
-
- ++cur;
-
- return true;
-}
-
-static bool is_class_token( char*& cur )
-{
- // FIXME:: the below mess should be cleaned in it's entirely
-
- if ( *cur == 'i' )
- if ( *(cur+1) == 'n' )
-
- return cmp_tokens_fast( cur, "interface", 9 );
-
- if ( *cur == 'c' )
- if ( *(cur+1) == 'l' )
-
- return cmp_tokens_fast( cur, "class", 5 );
-
- if ( *cur == 's' )
- if ( *(cur+1) == 't' )
-
- return cmp_tokens_fast( cur, "struct", 6 );
-
- if ( *cur == 'u' )
- if ( *(cur+1) == 'n' )
-
- return cmp_tokens_fast( cur, "union", 5 );
-
- return false;
-}
-
-inline static bool is_forward_decl( char* cur )
-{
- do
- {
- switch( *cur )
- {
- case ':' : return false;
- case '{' : return false;
- case '(' : return false;
-
- case ';' : return true;
-
- default : break;
- };
-
- ++cur;
-
- } while (cur < _gSrcEnd); // prevent running out of bounds
-
- return false;
-}
-
-inline static bool is_function( char* cur, bool& isAMacro )
-{
- isAMacro = false;
-
- int tmpLnNo;
- store_line_no( tmpLnNo );
-
- // NOTE:: comments and quoted strings are not checked here
-
- // first,check for "single-line hanginging macros" like:
- // ___UNICODE
- //
-
- char* eol = cur;
- skip_to_eol( eol );
-
- skip_token( cur );
- get_next_token( cur );
-
- if ( cur > eol )
- {
- isAMacro = true;
- restore_line_no( tmpLnNo );
-
- return true;
- }
-
- // it's not a macro, go to the begining of arg. list
-
- do
- {
- // if bracket found, it's a function or a begining
- // of some macro
- if ( *cur == '(' )
- {
- restore_line_no( tmpLnNo );
- return true;
- }
-
- // end of statement found without any brackets in it
- // - it cannot be a function
-
- if ( *cur == ';' )
- {
- restore_line_no( tmpLnNo );
- return false;
- }
-
- ++cur;
-
- } while( cur < _gSrcEnd);
-
- isAMacro = 1;
- restore_line_no( tmpLnNo );
-
- return false;
-}
-
-// upon return the cursor is positioned after the
-// terminating curly brace
-
-static inline void skip_scope_block( char*& cur )
-{
- size_t level = 0;
-
- for( ; cur < _gSrcEnd ; ++cur )
-
- switch( *cur )
- {
- case '/' : skip_comments( cur );
- --cur;
- continue;
- case '"' : skip_quoted_string( cur );
- --cur;
- continue;
-
- case '{' : ++level;
- continue;
-
- case '}' :--level;
- if ( level == 0 )
- {
- ++cur; // skip final closing curly brace
- return;
- }
-
- case 10 : ++_gLineNo; continue;
-
- default : continue;
- };
-}
-
-// moves tokens like '*' '**', '***', '&' from the name
-// to the type
-
-static void arrange_indirection_tokens_between( wxString& type,
- wxString& identifier )
-{
- // TBD:: FIXME:: return value of operators !
-
- while ( identifier[0u] == '*' ||
- identifier[0u] == '&'
- )
- {
- type += identifier[0u];
- identifier.erase(0,1);
-
- if ( !identifier.length() ) return;
- }
-}
-
-
-// the only function where multi-lang keyword map is accessed
-
-static bool is_keyword( char* cur )
-{
- size_t len = get_token_len( cur );
-
- // put a terminating zero after the given token
- char tmp = *(cur + len);
- *(cur+len) = '\0';
-
- KeywordMapT::iterator i;
-
- i = __gMultiLangMap.find( cur );
-
- // restore original character suppresed by terminating zero
- *(cur + len) = tmp;
-
- return i == __gMultiLangMap.end() ? false : true;
-}
-
-static inline void get_string_between( char* start, char* end,
- wxString* pStr )
-{
- char saved = *end;
-
- *end = '\0';
- *pStr = start;
- *end = saved;
-}
-
-static char* set_comment_text( wxString& text, char* start )
-{
- char* end = start;
-
- // to avoid poluting the queue with this comment
- _gLastSuppresedComment = start;
-
- skip_comments( end );
-
- if ( *(end-1) == '/' )
- end -= 2;
-
- start += 2;
-
- // skip multiple leading '/''s or '*''s
- while( *start == '/' && start < end ) ++start;
- while( *start == '*' && start < end ) ++start;
-
- get_string_between( start, end, &text );
-
- return end;
-}
-
-/***** Implementation for class CJSourceParser *****/
-
-CJSourceParser::CJSourceParser( bool collectCommnets, bool collectMacros )
- : mpStart(0),
- mpEnd(0),
- mpCurCtx( 0 ),
- mCommentsOn( collectCommnets ),
- mMacrosOn ( collectMacros )
-{
- check_keyword_map();
-}
-
-spFile* CJSourceParser::Parse( char* start, char* end )
-{
- // set up state variables
- mCurVis = SP_VIS_PRIVATE;
-
- spFile* pTopCtx = new spFile();
- mpCurCtx = pTopCtx;
-
- mIsVirtual = 0;
- mIsTemplate = 0;
- mNestingLevel = 0;
-
- m_cur = start;
-
- mpStart = start;
- mpEnd = end;
-
- _gSrcEnd = mpEnd; // let all the C-functions "smell" the end of file
- _gSrcStart = start;
-
- _gLineNo = 0;
-
- clear_commets_queue();
-
- // main parsing loop
-
- do
- {
- if ( !get_next_token( m_cur ) )
- // end of source reached
- return pTopCtx;
-
- if ( memcmp( m_cur, "ScriptSection( const string&",
- strlen( "ScriptSection( const string&" )
- ) == 0
- )
- {
- // int o = 0;
- // ++o;
- }
-
- switch (*m_cur)
- {
- case '#' :
- {
- AddMacroNode( m_cur );
- continue;
- }
-
- case ':' :
- {
- skip_token( m_cur );
- continue;
- }
-
- case ';' :
- {
- skip_token( m_cur );
- continue;
- }
-
- case ')' :
- {
- skip_token( m_cur );
- continue;
- }
-
- case '=' :
- {
- skip_token( m_cur );
- continue;
- }
-
- default: break;
- }
-
- // 'const' is a part of the return type, not a keyword here
- if ( strncmp(m_cur, "const", 5) != 0 && is_keyword( m_cur ) )
- {
- // parses, token, if token identifies
- // the container context (e.g. class/namespace)
- // the corresponding context object is created
- // and set as current context
-
- ParseKeyword( m_cur );
- continue;
- }
-
- if ( *m_cur >= '0' && *m_cur <= '9' )
- {
- skip_token( m_cur );
- continue;
- }
-
- if ( *m_cur == '}' )
- {
- if ( mCurCtxType != SP_CTX_CLASS )
- {
- // FOR NOW:: disable the below assertion
-
- // DBG:: unexpected closing-bracket found
- //ASSERT(0);
-
- skip_token( m_cur ); // just skip it
- continue;
- }
-
- if ( mpCurCtx->GetType() == SP_CTX_CLASS )
- {
- int curOfs = ( (m_cur+1) - _gSrcStart );
-
- mpCurCtx->mContextLength = ( curOfs - mpCurCtx->mSrcOffset );
- }
-
- --mNestingLevel;
-
- // terminate operation/class/namespace context
- // TBD:: check if it's really this type of context
-
- wxASSERT( mpCurCtx );
- mpCurCtx = mpCurCtx->GetOutterContext();
- wxASSERT( mpCurCtx );
-
- if ( mNestingLevel == 0 )
- {
-
- mCurCtxType = SP_CTX_FILE;
-
- // not-nested class delclaration finished,
- // rest template flag in any case
- mIsTemplate = 0;
- }
-
- skip_token( m_cur );
- continue;
- }
-
- bool isAMacro = false;
-
- if ( is_function( m_cur, isAMacro ) )
- {
- if ( isAMacro )
- {
- skip_token( m_cur );
- continue;
- }
-
- char* savedPos = m_cur;
-
- int tmpLnNo;
- store_line_no( tmpLnNo );
- wxUnusedVar( tmpLnNo );
-
- isAMacro = false;
-
- if ( !ParseNameAndRetVal( m_cur, isAMacro ) )
- {
- if ( !isAMacro )
- {
- m_cur = savedPos;
- SkipFunction( m_cur );
- }
- continue;
- }
-
- if ( !ParseArguments( m_cur ) )
- {
- // failure while parsing arguments,
- // remove enclosing operation context
-
- spContext* pFailed = mpCurCtx;
- mpCurCtx = mpCurCtx->GetOutterContext();
- mpCurCtx->RemoveChild( pFailed );
-
- skip_to_eol( m_cur );
- //m_cur = savedPos;
- }
- else
- {
- // otherwise, successfully close operation context:
-
- clear_commets_queue();
-
- SkipFunctionBody( m_cur );
-
- mpCurCtx = mpCurCtx->GetOutterContext();
-
- // DBG::
- wxASSERT( mpCurCtx );
-
- }
- }
- else // otherwise it's declaration of a variable;
- {
- // now, the cursor point to the end of statement (';' token)
-
- if ( mCurCtxType != SP_CTX_CLASS )
- {
- // non-class members are ignored
-
- skip_token( m_cur ); // skip the end of statement
- continue;
- }
-
- ParseMemberVar( m_cur );
- }
-
- } while( 1 );
-}
-
-void CJSourceParser::AttachComments( spContext& ctx, char* cur )
-{
- if ( !mCommentsOn ) return;
-
- MCommentListT& lst = ctx.GetCommentList();
-
- char* prevComEnd = 0;
-
- int tmpLnNo;
- store_line_no( tmpLnNo );
-
- // attach comments which were found before the given context
-
- for( int i = 0; i != _gCQSize; ++i )
- {
- spComment* pComment = new spComment();
- lst.push_back( pComment );
-
- // find the end of comment
- char* start = _gCommentsQueue[i];
-
- pComment->mIsMultiline = ( *(start+1) == '*' );
-
- // first comment in the queue and multiline
- // comments are always treated as a begining
- // of the new paragraph in the comment text
-
- if ( i == 0 )
- {
- pComment->mStartsPar = true;
- }
- else if ( pComment->mIsMultiline )
- {
- pComment->mStartsPar = true;
- }
- else
- {
- // find out wheather there is a new-line
- // between to adjecent comments
-
- char* prevLine = start;
- skip_to_prev_line(prevLine);
-
- if ( prevLine >= prevComEnd )
- pComment->mStartsPar = true;
- else
- pComment->mStartsPar = false;
- }
-
- prevComEnd = set_comment_text( pComment->m_Text, start );
- }
-
- // attach comments which are at the end of the line
- // of the given context (if any)
-
- if ( skip_to_next_comment_in_the_line( cur ) )
- {
- spComment* pComment = new spComment();
- lst.push_back( pComment );
-
- set_comment_text( pComment->m_Text, cur );
-
- pComment->mStartsPar = 1;
- pComment->mIsMultiline = ( *(cur+1) == '*' );
-
- // mark this comment, so that it would not
- // get in the comments list of the next context
- _gLastSuppresedComment = cur;
- }
-
- restore_line_no( tmpLnNo );
-
- clear_commets_queue();
-}
-
-void CJSourceParser::AddMacroNode( char*& cur )
-{
- char* start = cur;
-
- int lineNo = get_line_no();
-
- skip_preprocessor_dir( cur );
-
- int tmpLnNo;
- store_line_no( tmpLnNo );
-
- if ( !mMacrosOn ) return;
-
- spPreprocessorLine* pPL = new spPreprocessorLine();
- pPL->mSrcLineNo = lineNo;
-
- AttachComments( *pPL, cur );
-
- get_string_between( start, cur, &pPL->m_Line );
-
- ++start; // skip '#'
- get_next_token( start );
-
- pPL->mDefType = SP_PREP_DEF_OTHER;
-
- // if we found a definition or redefinition,
- // determine the type exactly and assign
- // a name to the context
-
- if ( *start == 'd' )
- {
- if ( cmp_tokens_fast( start, "define", 6 ) )
- {
- char* tok = start+6;
-
- get_next_token( tok );
-
- pPL->m_Name = get_token_str( tok );
-
- skip_token( tok );
- get_next_token( tok);
-
-
- if ( tok > cur )
- pPL->mDefType = SP_PREP_DEF_DEFINE_SYMBOL;
- else
- pPL->mDefType = SP_PREP_DEF_REDEFINE_SYMBOL;
- }
- }
- else if ( *start == 'i' )
- {
- if ( cmp_tokens_fast( start, "include", 7 ) )
- {
- pPL->mDefType = SP_PREP_DEF_INCLUDE_FILE;
- }
- else if ( *++start == 'f' )
- {
- // either "#if" or "#ifdef"
- cur = start;
- skip_token( cur );
- get_next_token( cur );
-
- wxString condition = get_token_str( cur );
-
- // currently, everything except '0' is true
- if ( condition == "0" ) {
- // skip until the following else or enif
- while ( cur < _gSrcEnd ) {
- skip_to_eol( cur );
- skip_eol( cur );
-
- get_next_token( cur );
- if ( *cur++ == '#' && *cur == 'e' )
- break;
- }
- }
-
- // TODO parse the condition...
- }
- }
- else if ( cmp_tokens_fast( start, "else", 4 ) )
- {
- // skip until "#endif"
- while ( cur < _gSrcEnd ) {
- skip_to_eol( cur );
- skip_eol( cur );
-
- get_next_token( cur );
- if ( *cur++ == '#' && cmp_tokens_fast( cur, "endif", 5 ) )
- break;
- }
- }
-
- mpCurCtx->AddMember( pPL );
-
- skip_to_eol( cur );
- skip_eol( cur );
-
- restore_line_no( tmpLnNo );
-
- clear_commets_queue();
-}
-
-void CJSourceParser::ParseKeyword( char*& cur )
-{
- // analyze token, which identifies the begining of a new context
-
- if ( CheckVisibilty( cur ) )
- {
- skip_token( cur );
- return;
- }
-
- if ( is_class_token( cur ) )
- {
- if ( is_forward_decl( cur ) )
- {
- // forward declarations are ignored;
- skip_token( cur );
- return;
- }
-
- if ( mNestingLevel == 0 )
- {
- // change context form global class context
- mCurCtxType = SP_CTX_CLASS;
- }
-
- ++mNestingLevel;
-
- // add information about new class (name, inheritance, etc)
- AddClassNode( cur );
-
- // the default visiblity for class members is 'private'
- mCurVis = SP_VIS_PRIVATE;
-
- return;
- }
-
- size_t len = get_token_len( cur );
-
- if ( cmp_tokens_fast( cur, "typedef", len ) )
- {
- skip_token(cur);
- get_next_token(cur);
-
- if ( cmp_tokens_fast( cur, "struct", len ) ||
- cmp_tokens_fast( cur, "union", len ) ||
- cmp_tokens_fast( cur, "class", len )
- )
- {
- if ( mNestingLevel == 0 )
- {
- // change context form global class context
- mCurCtxType = SP_CTX_CLASS;
- }
-
- ++mNestingLevel;
-
- // add information about new class (name, inheritance, etc)
- AddClassNode( cur );
-
- // the default visiblity for class members is 'private'
- mCurVis = SP_VIS_PRIVATE;
-
- return;
-
- // FOR NOW:: typedef struct, etc are also ignored
- //skip_scope_block( cur );
- }
-
- if ( cmp_tokens_fast( cur, "enum", len ) )
- {
- AddEnumNode( cur );
- return;
- }
-
- AddTypeDefNode( cur );
-
- return;
- }
-
- if ( cmp_tokens_fast( cur, "enum", len ) )
- {
- AddEnumNode( cur );
- return;
- }
-
- if ( cmp_tokens_fast( cur, "extern", len ) )
- {
- // extern's are ignored (both extern "C" and extern vars)
- while ( *cur != '{' &&
- *cur != ';' )
- {
- skip_token( cur );
- get_next_token( cur );
- }
- return;
-
- }
- if ( cmp_tokens_fast( cur, "enum", len ) )
- {
- // enumeration blocks are ignored
-
- skip_scope_block( cur );
-
- get_next_token( cur );
- skip_token( cur ); // skip ';' token;
- return;
- }
-
- if ( cmp_tokens_fast( cur, "package", len ) )
- {
- // packages are ignored
- skip_statement( cur );
- return;
- };
-
- if ( cmp_tokens_fast( cur, "import", len ) )
- {
- // import statements are ignored
- skip_statement( cur );
- return;
- }
-
- if ( cmp_tokens_fast( cur, "virtual", len ) )
- {
- // probably the virtual method is in front of us;
- mIsVirtual = 1;
- skip_token( cur );
- return;
- }
-
- if ( cmp_tokens_fast( cur, "template", len ) )
- {
- mIsTemplate = 1;
- skip_tempalate_statement( cur );
- return;
- }
-
- if ( cmp_tokens_fast( cur, "friend", len ) )
- {
- skip_statement( cur );
- return;
- }
-
- // ingnore "unsigificant" tokens (i.e. which do not
- // affect the current parsing context)
-
- skip_token( cur );
-}
-
-bool CJSourceParser::ParseNameAndRetVal( char*& cur, bool& isAMacro )
-{
- isAMacro = false;
-
- // FOR NOW:: all functions in the global
- // scope are ignored
-
- int lineNo = get_line_no();
-
- char* start = cur;
-
- bool isVirtual = false;
- while( *cur != '(' )
- {
- if ( get_token_str( cur ) == "virtual" )
- isVirtual = true;
-
- skip_token( cur );
- if ( !get_next_token( cur ) ) return false;
- }
-
- char* bracketPos = cur;
- char* savedPos = cur + 1;
-
- int tmpLnNo;
- store_line_no( tmpLnNo );
-
- // skip gap between function name and start of paramters list
- while ( *(cur-1) == ' ' )
- --cur;
-
- // check if it's not a macro, and let plugin handle it, if so
-
- if ( mpPlugin )
- {
- skip_token_back( cur );
-
- char* tmp = cur;
-
- if ( mpPlugin->CanUnderstandContext( tmp, _gSrcEnd, mpCurCtx ) )
- {
- cur = tmp;
-
- mpPlugin->ParseContext( _gSrcStart, cur, _gSrcEnd, mpCurCtx );
-
- isAMacro = true;
-
- return false;
- }
- }
-
- spOperation* pOp = new spOperation();
-
- pOp->mSrcLineNo = lineNo;
- pOp->mSrcOffset = int( start - _gSrcStart );
- pOp->mHeaderLength = int( bracketPos - start );
- if ( mpCurCtx->GetContextType() == SP_CTX_CLASS )
- pOp->mScope = mpCurCtx->m_Name;
-
- mpCurCtx->AddMember( pOp );
- pOp->mVisibility = mCurVis;
- pOp->mIsVirtual = isVirtual;
-
- // add comments about operation
- AttachComments( *pOp, cur );
-
- // go backwards to method name
- skip_token_back( cur );
-
- pOp->m_Name = get_token_str( cur );
-
- // checker whether it's not an operator
- char chFirst = *pOp->m_Name.c_str();
- if ( !isalpha(chFirst) && chFirst != '_' && chFirst != '~' ) {
- // skip 'operator'
- skip_next_token_back( cur );
- skip_token_back( cur );
-
- wxString lastToken = get_token_str( cur );
- if ( lastToken == "operator" ) {
- lastToken += pOp->m_Name;
- pOp->m_Name = lastToken;
- }
- else {
- // ok, it wasn't an operator after all
- skip_token( cur );
- }
- }
- else if ( pOp->m_Name == "operator" ) {
- skip_token( cur );
- get_next_token( cur );
- wxString oper = get_token_str( cur );
-
- pOp->m_Name += oper;
- }
-
- // go backwards to method return type
- skip_next_token_back( cur );
-
- if ( cur >= start )
- {
- wxString rettype = wxString( start, size_t( cur-start ) );
- // FIXME just for now...
- wxString::size_type pos = 0;
- wxString toerase("WXDLLEXPORT ");
- while((pos = rettype.find(toerase, pos)) != wxString::npos)
- rettype.erase(pos, toerase.length());
- pOp->m_RetType = rettype;
- }
-
- arrange_indirection_tokens_between( pOp->m_RetType, pOp->m_Name );
-
- cur = savedPos;
- restore_line_no( tmpLnNo );
-
- // now, enter operation context
- mpCurCtx = pOp;
-
- return true;
-}
-
-bool CJSourceParser::ParseArguments( char*& cur )
-{
- // DANGER-MACROS::
-
- // now cursor position is right after the first opening bracket
- // of the function declaration
-
- char* blocks [16]; // used exclusivelly for iterative "lean out"
- // of macros and misc. not-obviouse grammar
- // (dirty,, but we cannot do it very nice,
- // we're not preprocessor-free C/C++ code)
- int blockSizes[16];
-
- do
- {
- size_t blocksSkipped = 0;
-
- get_next_token( cur );
-
- bool first_blk = true;
-
- while( *cur != ')' && *cur != ',' )
- {
- blocks[blocksSkipped] = cur;
-
- if ( first_blk )
- {
- char* prev = cur;
- skip_token( cur );
-
- blockSizes[blocksSkipped] = size_t(cur-prev);
-
- first_blk = 0;
- }
- else
- blockSizes[blocksSkipped] = skip_block( cur );
-
- get_next_token( cur );
- ++blocksSkipped;
- }
-
-
- if ( blocksSkipped == 1 )
- {
- // check if the empty arg. list stressed with "void" inside
- if ( cmp_tokens_fast( blocks[0] , "void", 4 ) )
- {
- cur++; // skip ')'
-
- break;
- }
-
- // FIXME:: TBD:: K&R-style function declarations!
-
- // if only one block enclosed, than it's probably
- // some macro, there should be at least two blocks,
- // one for argument type and another for it's identifier
- return false;
- }
-
- if ( blocksSkipped == 0 )
- {
- if ( *cur == 10 ) ++_gLineNo;
- ++cur; // skip ')'
-
- break; // function without paramters
- }
-
- // we should be in the operation context now
- spOperation* pOp = (spOperation*)mpCurCtx;
-
- spParameter* pPar = new spParameter();
-
- pOp->AddMember( pPar );
- // FOR NOW:: line number is not exact if argument list is mutiline
- pPar->mSrcLineNo = get_line_no();
-
- size_t nameBlock = blocksSkipped - 1;
- size_t typeBlock = nameBlock - 1;
-
- // check if default values present
- if ( *blocks[typeBlock] == '=' )
- {
- // expressions like "int = 5" are ignored,
- // since name for paramters is required
- if ( blocksSkipped == 3 )
- {
- if ( *cur == ')' )
- {
- ++cur;
- break;
- }
- else
- continue;
- }
-
- pPar->m_InitVal = wxString( blocks[nameBlock], blockSizes[nameBlock] );
-
- nameBlock = nameBlock - 2; // skip '=' token and default value block
- typeBlock = nameBlock - 1;
- }
-
- // attach comments about the parameter
- AttachComments( *pPar, blocks[nameBlock] );
-
- // retrieve argument name
- pPar->m_Name = wxString( blocks[nameBlock], blockSizes[nameBlock] );
-
- // retreive argument type
-
- size_t len = blockSizes[ typeBlock ];
- len = size_t ( (blocks[ typeBlock ] + len) - blocks[ 0 ] );
-
- pPar->m_Type = wxString( blocks[0], len );
-
- arrange_indirection_tokens_between( pPar->m_Type, pPar->m_Name );
-
- if ( *cur == ')' )
- {
- ++cur;
- break;
- }
-
- ++cur; // skip comma
- get_next_token(cur);
-
- } while(1);
-
- // skip possible whitespace between ')' and following "const"
- while ( isspace(*cur) )
- cur++;
-
- // check if it was really a function not a macro,
- // if so, than it should be terminated with semicolon ';'
- // or opening implemenetaton bracket '{'
-
- char* tok = cur;
-
- int tmpLnNo;
- store_line_no( tmpLnNo );
-
- bool result = true;
-
- do
- {
- if ( *tok == '{' || *tok == ';' )
- {
- restore_line_no(tmpLnNo);
- break;
- }
-
- // check for unexpected tokens
- if ( *tok == '=' || *tok == '0' )
- {
- skip_token(tok);
- if ( !get_next_token(tok) ) return false;
- continue;
- }
-
- if ( *tok == '}' ) return false;
-
- // if initialization list found
- if ( *tok == ':' )
- {
- restore_line_no(tmpLnNo);
- break;
- }
-
- if ( cmp_tokens_fast( tok, "const", 5 ) )
- {
- ((spOperation*)mpCurCtx)->mIsConstant = true;
-
- skip_token(tok);
- if ( !get_next_token(tok) ) return false;
- continue;
- }
-
- if ( CheckVisibilty( tok ) ) return false;
-
- // if next context found
- if ( is_keyword( tok ) ) return false;
-
- skip_token(tok);
- if ( !get_next_token(tok) ) return false;
-
- } while(1);
-
- return result;
-}
-
-void CJSourceParser::ParseMemberVar( char*& cur )
-{
- MMemberListT& members = mpCurCtx->GetMembers();
-
- bool firstMember = true;
-
- wxString type;
-
- // jump to the end of statement
- // and start collecting same-type varibles
- // back-to-front towards the type identifier
-
- skip_statement( cur );
- char* savedPos = cur;
-
- int tmpLnNo;
- store_line_no( tmpLnNo );
-
- --cur; // rewind back to ';'
-
- do
- {
- spAttribute* pAttr = new spAttribute();
- // FOR NOW:: line not is not exact, if member declaration is multiline
- pAttr->mSrcLineNo = get_line_no();
-
- mpCurCtx->AddMember( pAttr );
- pAttr->mVisibility = mCurVis;
-
- pAttr->mIsConstant = 0;
-
- if ( firstMember )
- {
- firstMember = 0;
- }
-
- skip_token_back( cur );
-
- // attach comments about the attribute
- AttachComments( *pAttr, cur );
-
- pAttr->m_Name = get_token_str( cur );
-
- // guessing that this going to be variable type
- skip_next_token_back( cur );
- skip_token_back( cur );
-
- pAttr->m_Type = get_token_str( cur );
-
- // if comma, than variable list continues
- // otherwise the variable type reached - stop
-
- if ( *cur == '=' )
- {
- // yes, we've mistaken, it was not a identifier,
- // but it's default value
- pAttr->m_InitVal = pAttr->m_Name;
-
- // skip default value and '=' symbol
- skip_next_token_back( cur );
- skip_token_back( cur );
-
- pAttr->m_Name = get_token_str( cur );
-
- skip_next_token_back( cur );
- skip_token_back( cur );
- }
-
- if ( *cur != ',' )
- {
- type = get_token_str( cur );
- break;
- }
-
- } while(1);
-
- size_t first = 0;
-
- // set up types for all collected (same-type) attributes;
- while ( first != members.size() - 1 )
- {
- spAttribute* pAttr = members[first++]->CastToAttribute();
- if ( !pAttr )
- continue;
-
- if ( pAttr->m_Type.empty() )
- pAttr->m_Type = type;
- pAttr->mVisibility = mCurVis;
-
- if ( !pAttr->m_Name.empty() )
- arrange_indirection_tokens_between( pAttr->m_Type, pAttr->m_Name );
- }
-
- cur = savedPos;
- restore_line_no( tmpLnNo );
-
- clear_commets_queue();
-
-
-}
-
-void CJSourceParser::SkipFunction( char*& cur )
-{
- while ( *cur != '(' && cur < _gSrcEnd )
- {
- if (*cur == 10 ) ++_gLineNo;
- ++cur;
- }
-
- skip_next_token_back( cur ); // go back and skip function identifier
- skip_token_back( cur ); // go back and skip return type
-
- skip_block( cur ); // now, go ahead and skip whole declaration
-
- SkipFunctionBody( cur );
-
-}
-
-void CJSourceParser::SkipFunctionBody( char*& cur )
-{
- // FIXME:: check for comments and quoted stirngs here
-
- bool hasDefinition = false;
-
- while( *cur != '{' && *cur != ';' )
- {
- if (*cur == 10 ) ++_gLineNo;
- ++cur;
- }
-
- if ( *cur == ';' )
- {
- ++cur;
- }
- else
- {
- hasDefinition = true;
-
- skip_scope_block( cur ); // skip the whole imp.
- }
-
- if ( mpCurCtx->GetType() == SP_CTX_OPERATION )
- {
- spOperation& op = *((spOperation*)mpCurCtx);
-
- int curOfs = int ( cur - _gSrcStart );
-
- op.mContextLength = curOfs - mpCurCtx->mSrcOffset;
-
- op.mHasDefinition = hasDefinition;
-
- // separate scope resolution token from the name of operation
-
- for( size_t i = 0; i != op.m_Name.length(); ++i )
- {
- if ( op.m_Name[i] == ':' && op.m_Name[i+1] == ':' )
- {
- wxString unscoped( op.m_Name, i+2, op.m_Name.length() - ( i + 2 ) );
-
- op.mScope = wxString( op.m_Name, 0, i );
-
- op.m_Name = unscoped;
-
- break;
- }
- }
- }
-}
-
-bool CJSourceParser::CheckVisibilty( char*& cur )
-{
- size_t len = get_token_len( cur );
-
- if ( cmp_tokens_fast( cur, "public:", len ) )
- {
- mCurVis = SP_VIS_PUBLIC;
- return true;
- }
-
- if ( cmp_tokens_fast( cur, "protected:", len ) )
- {
- mCurVis = SP_VIS_PROTECTED;
- return true;
- }
-
- if ( cmp_tokens_fast( cur, "private:", len ) )
- {
- mCurVis = SP_VIS_PRIVATE;
- return true;
- }
-
- return false;
-}
-
-void CJSourceParser::AddClassNode( char*& cur )
-{
- char* ctxStart = cur;
-
- wxString classkeyword = get_token_str( cur );
-
- skip_token( cur ); // skip 'class' keyword
- if ( !get_next_token( cur ) ) return;
-
- // in C++
- if ( *cur == ':' )
- {
- skip_token( cur );
- get_next_token( cur );
- }
-
- // by default all class members are private
- mCurVis = SP_VIS_PRIVATE;
-
- spClass* pClass = new spClass();
- if ( classkeyword == "class" )
- pClass->mClassSubType = SP_CLTYPE_CLASS;
- else if ( classkeyword == "struct" ) {
- pClass->mClassSubType = SP_CLTYPE_STRUCTURE;
-
- mCurVis = SP_VIS_PUBLIC;
- }
- else if ( classkeyword == "union" ) {
- pClass->mClassSubType = SP_CLTYPE_UNION;
-
- mCurVis = SP_VIS_PUBLIC;
- }
- else if ( classkeyword == "interface" )
- pClass->mClassSubType = SP_CLTYPE_INTERFACE;
- else {
- pClass->mClassSubType = SP_CLTYPE_INVALID;
-
- wxFAIL_MSG("unknown class keyword");
- }
-
- mpCurCtx->AddMember( pClass );
-
- // attach comments about the class
- AttachComments( *pClass, cur );
-
- pClass->mSrcLineNo = get_line_no();
-
- pClass->mSrcOffset = int( ctxStart - _gSrcStart );
-
- char* nameTok = cur;
- pClass->m_Name = get_token_str( cur );
-
- bool isDerived = 0;
-
- // DANGER-MACROS::
-
- do
- {
- skip_token( cur );
- if ( !get_next_token( cur ) ) return;
-
- if ( *cur == ':' )
- {
- isDerived = 1;
-
- char* tok = cur;
-
- int tmpLn;
- store_line_no( tmpLn );
-
- skip_next_token_back( tok );
- skip_token_back( tok );
-
- restore_line_no( tmpLn );
-
- // class name should precend ':' colon, thus
- // the one which was captured before was
- // proablty something else (like __dllexport MyClass : ... )
-
- if ( nameTok != tok )
- {
- pClass->m_Name = get_token_str( tok );
- }
-
- }
-
- if ( *cur == '{' )
- break;
-
- if ( *cur == ',' )
- continue;
-
- size_t len = get_token_len( cur );
-
- // skip neglectable C++ modifieres
- if ( cmp_tokens_fast( cur, "public", len ) )
- continue;
-
- if ( cmp_tokens_fast( cur, "protected", len ) )
- continue;
-
- if ( cmp_tokens_fast( cur, "private", len ) )
- continue;
-
- if ( cmp_tokens_fast( cur, "virtual", len ) )
- continue;
-
- // skip neglectable JAVA modifieres
-
- if ( cmp_tokens_fast( cur, "extends", len ) )
- {
- isDerived = 1;
- continue;
- }
-
- if ( cmp_tokens_fast( cur, "implements", len ) )
- {
- isDerived = 1;
- continue;
- }
-
- // all we need to know is superclass or interface
-
- char* tok = cur;
- int tmpLn;
- store_line_no( tmpLn );
-
- skip_token(tok);
- get_next_token(tok);
-
- restore_line_no( tmpLn );
-
- if ( *tok != ':' && *cur != ':' )
-
- pClass->m_SuperClassNames.push_back( wxString( cur, len ) );
-
- } while(1);
-
- if ( !isDerived )
- {
- int tmpLn;
- store_line_no( tmpLn );
-
- while ( pClass->m_SuperClassNames.size() )
-
- pClass->m_SuperClassNames.erase( &pClass->m_SuperClassNames[0] );
-
- char* tok = cur;
-
- // some non-obviouse token was following "class" keyword -
- // we've confused it with class name - thus now we're reverting this mistake
-
- skip_next_token_back( tok );
- skip_token_back( tok );
-
- pClass->m_Name = get_token_str( tok );
-
- restore_line_no( tmpLn );
- }
-
-
- ++cur; // skip opening curly brace
-
- pClass->mHeaderLength = ( cur - ctxStart );
-
- // now, enter the class context
- mpCurCtx = pClass;
-
- clear_commets_queue();
-}
-
-void CJSourceParser::AddEnumNode( char*& cur )
-{
- // now the cursor is at "enum" keyword
- char* start = cur;
-
- spEnumeration* pEnum = new spEnumeration();
- mpCurCtx->AddMember( pEnum );
-
- pEnum->mSrcLineNo = get_line_no();
-
-
- AttachComments( *pEnum, cur );
-
- skip_token( cur );
- if ( !get_next_token( cur ) ) return;
-
- // check if enumeration has got it's identifier
- if ( *cur != '{' )
- {
- pEnum->m_Name = get_token_str( cur );
- }
-
- if ( !skip_imp_block( cur ) ) return;
-
- get_string_between( start, cur, &pEnum->m_EnumContent );
-
- if ( get_next_token(cur) )
- {
- // check if the identifier if after the {...} block
- if ( *cur != ';' )
-
- pEnum->m_Name = get_token_str( cur );
- }
-
- clear_commets_queue();
-}
-
-void CJSourceParser::AddTypeDefNode( char*& cur )
-{
- // now the cursor at the token next to "typedef" keyword
-
- if ( !get_next_token(cur) ) return;
-
- char* start = cur;
-
- spTypeDef* pTDef = new spTypeDef();
- mpCurCtx->AddMember( pTDef );
-
- pTDef->mSrcLineNo = get_line_no();
-
- AttachComments( *pTDef, cur );
-
- skip_statement( cur );
-
- int tmpLnNo;
- store_line_no( tmpLnNo );
-
- char* tok = cur-1;
- skip_next_token_back( tok );
-
- char* nameEnd = tok;
-
- skip_token_back( tok );
-
- char* nameStart = tok;
-
- skip_next_token_back( tok );
-
- char* typeEnd = tok;
-
- // check if it's function prototype
- if ( *nameStart == ')' )
- {
- typeEnd = nameStart+1;
-
- // skip argument list
- while ( *nameStart != '(' ) --nameStart;
-
- // skip to function type definition
- while ( *nameStart != ')' ) --nameStart;
-
- skip_next_token_back( nameStart );
-
- nameEnd = nameStart;
-
- skip_token_back( nameStart );
-
- if ( *nameStart == '*' ) ++nameStart;
- }
-
- get_string_between( start, typeEnd, &pTDef->m_OriginalType );
-
- get_string_between( nameStart, nameEnd, &pTDef->m_Name );
-
- clear_commets_queue();
-
- restore_line_no( tmpLnNo );
-}
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Implementation of C++/Java parser
-// compatible with SourceParserBase interface
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 22/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef __CJPARSESR_G__
-#define __CJPARSESR_G__
-
-#include "srcparser.h"
-
-#include <memory.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#if wxUSE_IOSTREAMH
- #include <iostream.h>
-#else
- #include <iostream>
-#endif
-
-// class parses given "memory-resident" Java or C++ source code
-// and captures information about classes/attrubutes/methods/
-// arguments/etc into structures. Conforms with SourceParserBase
-// interface requirements.
-
-class CJSourceParser : public SourceParserBase
-{
-protected:
- // begining of the full-text area of the source file
- char* mpStart;
-
- // points to first character after the end
- // of teh full-text area
- char* mpEnd;
-
- // current "privacy level"
- int mCurVis;
-
- // current parsing position int full-text area
- char* m_cur;
-
- // about the current class
- bool mIsVirtual;
- bool mIsTemplate;
- size_t mNestingLevel;
-
- // context data for which is currently being collected
- spContext* mpCurCtx;
-
- int mCurCtxType; // type of the current context
-
- bool mCommentsOn;
- bool mMacrosOn;
-
-protected:
-
- void AttachComments( spContext& ctx, char* cur );
- void ParseKeyword( char*& cur );
- bool ParseNameAndRetVal( char*& cur, bool& isAMacro );
- bool ParseArguments( char*& cur );
- void ParseMemberVar( char*& cur );
- void SkipFunction( char*& cur );
- void SkipFunctionBody( char*& cur );
- bool CheckVisibilty( char*& cur );
-
- void AddClassNode( char*& cur );
- void AddMacroNode( char*& cur );
- void AddEnumNode( char*& cur );
- void AddTypeDefNode( char*& cur );
-
- void DumpOperationInfo( spOperation& info, const wxString& tab, wxSTD ostream& os );
- void DumpClassHeader( spClass& info, wxSTD ostream& os );
- void DumpClassBody( spClass& info, wxSTD ostream& os );
-
-public:
-
- // NOTE:: discarding of macros or comments improves performance and
- // decreases memory usage
-
- CJSourceParser(bool collectCommnets = 1,
- bool collectMacros = 1);
-
- // returns the root-node of the created context tree
- // (user is responsible for releasing it from the heep)
- // "end" should point to the last (character + 1) of the
- // source text
-
- virtual spFile* Parse( char* start, char* end );
-};
-
-// inline'ed helpers used (just info):
-/*
-static inline void skip_to_eol( char*& cur );
-static inline void skip_eol( char*& cur );
-static inline bool skip_to_next_comment_in_the_line( char*& cur );
-static void skip_to_prev_line( char*& cur );
-static inline void skip_comments( char*& cur );
-static inline void clear_commets_queue();
-static inline void skip_quoted_string( char*& cur );
-static inline bool get_next_token( char*& cur );
-static inline void skip_preprocessor_dir( char*& cur );
-static void skip_token( char*& cur );
-static inline size_t get_token_len( char* tok );
-static inline bool cmp_tokens( char* tok1, char* tok2 );
-static inline bool cmp_tokens_fast( char* tok1, char* tok2, size_t len );
-static inline void skip_tempalate_statement( char*& cur );
-static inline void skip_statement( char*& cur );
-static inline void skip_token_back( char*& cur );
-static inline void skip_next_token_back( char*& cur );
-static wxString get_token_str( char* cur );
-static size_t skip_block( char*& cur );
-static inline bool skip_imp_block( char*& cur );
-static bool is_class_token( char*& cur );
-inline static bool is_forward_decl( char* cur );
-inline static bool is_function( char* cur, bool& isAMacro );
-static inline void skip_scope_block( char*& cur );
-static void arrange_indirection_tokens_between( wxString& type, wxString& identifier );
-static bool is_keyword( char* cur );
-static inline void get_string_between( char* start, char* end, wxString* pStr );
-static char* set_comment_text( wxString& text, char* start );
-*/
-
-#endif
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 22/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-#include "docripper.h"
-
-#if wxUSE_IOSTREAMH
- #include <iostream.h>
-#else
- #include <iostream>
-#endif
-
-// script templates
-
-// ***** currently only HTML versions of variouse templates available ***** //
-
-static const char* HTM_TopTempl =
-
-"<html><body bgcolor=#FFFFFF>\n\
-\n\n<!------ Automatically Generated by \"wxDocRipper\"------->\n\n\n\
-<p><h2>$(NAME)</h2><p>\n\
-<ul>\n\
-$(REFLIST)\
-</ul><p>\n\n\
-";
-
-static const char* HTM_ContentIdxTempl =
-
-"\
-<a name=\"r$(ID)_$(NAME)\">\n\
-<p><hr>\n\
-<h2><p>$(NAME)<p></h2>\
-<ul>\n\
-$(REFLIST)\
-</ul><p>\n\n\
-";
-
-static const char* HTM_SuperContentTempl =
-
-"\
-<a name=\"r$(ID)_$(NAME)\">\n\
-<p><hr>\n\
-<p><h2>$(NAME)<p></h2>\
-$(BODY)\n\
-";
-
-static const char* HTM_SubContentTempl =
-
-"\
-<a name=\"r$(ID)_$(NAME)\">\n\
-<p><hr>\n\
-<p><h3>$(NAME)<p></h3>\
-$(BODY)\n\
-";
-
-static const char* HTM_OutLineTempl =
-
-"\
-<p>\n\
-<b><font color=\"#FF0000\">$(NAME)</font></b><p>\n\
-";
-
-static const char* HTM_OutLine1Templ =
-
-"\
-<p>\n\
-<b><i><font color=\"#101010\">$(NAME)</font></i></b>\n\
-<ul>\n\
-$(REFLIST)\
-</ul>\n\n\
-";
-
-static const char* HTM_RefTempl =
-
-"\
-<li><a href=\"#r$(ID)_$(NAME)\">$(NAME)</A>\n\
-";
-
-static const char* HTM_DeadRefTempl =
-
-"\
-<li></b>$(NAME)\n\
-";
-
-/***** Implementation for class RipperDocGen *****/
-
-RipperDocGen::RipperDocGen()
-
- : mTopTempl ( HTM_TopTempl ),
- mContentIdxTempl ( HTM_ContentIdxTempl ),
- mSuperContentTempl( HTM_SuperContentTempl ),
- mSubContentTempl ( HTM_SubContentTempl ),
- mOutLineTempl ( HTM_OutLineTempl ),
- mOutLine1Templ ( HTM_OutLine1Templ ),
-
- mRefTempl ( HTM_RefTempl ),
- mDeadRefTempl ( HTM_DeadRefTempl ),
-
- mpCurClassSect(0)
-{
- // topIndex is not referenced
- mpTopIdx = new ScriptSection( "Source Code Contents" , wxEmptyString, &mTopTempl , 0 );
- mpClassIdx = new ScriptSection( "Classes Reference" , wxEmptyString, &mContentIdxTempl, &mRefTempl );
- mpEnumIdx = new ScriptSection( "Enumerations Reference" , wxEmptyString, &mContentIdxTempl, &mRefTempl );
- mpTypeDefIdx = new ScriptSection( "Type Definitions Reference" , wxEmptyString, &mContentIdxTempl, &mRefTempl );
- mpMacroIdx = new ScriptSection( "Macros Reference" , wxEmptyString, &mContentIdxTempl, &mRefTempl );
- mpGlobalVarsIdx = new ScriptSection( "Global Variables Reference" , wxEmptyString, &mContentIdxTempl, &mRefTempl );
- mpGlobalFuncIdx = new ScriptSection( "Global Functions Reference", wxEmptyString, &mContentIdxTempl, &mRefTempl );
- mpConstIdx = new ScriptSection( "Constants Reference" , wxEmptyString, &mContentIdxTempl, &mRefTempl );
-
- // assemble top index
- mpTopIdx->AddSection( mpClassIdx , 1 );
- mpTopIdx->AddSection( mpEnumIdx , 1 );
- mpTopIdx->AddSection( mpTypeDefIdx , 1 );
- mpTopIdx->AddSection( mpMacroIdx , 1 );
- mpTopIdx->AddSection( mpGlobalVarsIdx, 1 );
- mpTopIdx->AddSection( mpGlobalFuncIdx, 1 );
- mpTopIdx->AddSection( mpConstIdx , 1 );
-
- // register reserved variables for index and description templates
- ScriptSection::RegisterTemplate( mTopTempl );
- ScriptSection::RegisterTemplate( mContentIdxTempl );
- ScriptSection::RegisterTemplate( mSuperContentTempl );
- ScriptSection::RegisterTemplate( mSubContentTempl );
- ScriptSection::RegisterTemplate( mOutLineTempl );
- ScriptSection::RegisterTemplate( mOutLine1Templ );
- ScriptSection::RegisterTemplate( mRefTempl );
- ScriptSection::RegisterTemplate( mDeadRefTempl );
-
- // create the top-most (interfile) context
- mpFileBinderCtx = new spFile();
-
- // the default script is HTML
- m_Tags = get_HTML_markup_tags();
-
- mpParser = 0; // no default parser!
-}
-
-void RipperDocGen::Init( SourceParserBase* pParser )
-{
- mpParser = pParser;
-}
-
-RipperDocGen::~RipperDocGen()
-{
- delete mpFileBinderCtx;
-}
-
-void RipperDocGen::AppendComments( spContext& fromContext, wxString& str )
-{
- if ( !fromContext.HasComments() ) return;
-
- size_t start = str.length();
-
- str += m_Tags[TAG_BOLD].end;
- str += m_Tags[TAG_PARAGRAPH].start;
-
- MCommentListT& lst = fromContext.GetCommentList();
-
- for( size_t i = 0; i != lst.size(); ++i )
- {
-
- if ( i != 0 )
-
- if ( lst[i]->StartsParagraph() )
- {
- str += m_Tags[TAG_PARAGRAPH].start;
- }
-
- str += lst[i]->m_Text;
- }
-
- // remove new lines, and insert paragraph breaks
-
- // if empty lines found
-
- size_t len = str.length();
-
- for( size_t n = start; n != len; ++n )
-
- if ( str[n] == 10 ||
- str[n] == 13 )
- {
- if ( n + 2 < len )
- {
- if ( ( str[n] == 13 && str[n+1] == 10 && // FIXME:: quick-hack
- str[n+2] == 13 ) ||
- ( str[n] == 10 && str[n+1] == 10 )
- )
- {
- str.insert( n + 1, _T("<p>") ); // FIXME:: quick-hack
- len += 3;
- }
- }
- str[n] = _T(' ');
- }
- str += m_Tags[TAG_PARAGRAPH].end;
-}
-
-void RipperDocGen::AppendMulitilineStr( wxString& st, wxString& mlStr )
-{
- st = m_Tags[TAG_FIXED_FONT].start;
- st += mlStr;
- st += m_Tags[TAG_FIXED_FONT].end;
-}
-
-void RipperDocGen::AppendHighlightedSource( wxString& st, wxString source )
-{
- // FIXME:: below should not be fixed :)
- char buf[1024*32];
-
- // DBG:::
-// ASSERT( source.length() + 1 < sizeof(buf) );
-
- wxStrcpy( buf, source.c_str() );
-
- // highlight things
- mSrcPainter.Init();
- mSrcPainter.ProcessSource( buf, strlen(buf) );
- mSrcPainter.GetResultString( st, m_Tags );
-}
-
-bool RipperDocGen::CheckIfUncommented( spContext& ctx, ScriptSection& toSect )
-{
- if ( ctx.HasComments() ) return 0;
-
- toSect.AddReference(
- new ScriptSection( GetScopedName( ctx ), wxEmptyString, 0, &mDeadRefTempl )
- );
-
- return 1;
-}
-
-ScriptTemplate* RipperDocGen::GetRefTemplFor( spContext& ctx )
-{
- if ( ctx.HasComments() )
- return &mRefTempl;
- else
- return &mDeadRefTempl;
-}
-
-wxString RipperDocGen::GetScopedName( spContext& ofCtx )
-{
- if ( ofCtx.IsInFile() )
- return ofCtx.GetName();
- else
- return ofCtx.GetOutterContext()->GetName() +
- _T("::") + ofCtx.GetName();
-}
-
-void RipperDocGen::AddToCurrentClass( ScriptSection* pSection, spContext& ctx,
- const char* subSectionName )
-{
- wxString sName;
-
- if ( ctx.mVisibility == SP_VIS_PROTECTED )
- sName = "Protected members/";
- else
- if ( ctx.mVisibility == SP_VIS_PRIVATE )
- sName = "Private members/";
- else
- sName = "Public members/";
-
- sName += subSectionName;
-
- ScriptSection* pSect = mpCurClassSect->GetSubsection( sName.c_str() );
-
- if ( CheckIfUncommented( ctx, *pSect ) )
- {
- delete pSection;
- return;
- }
-
- pSect->AddReference( pSection );
-
- mpCurClassSect->AddSection( pSection );
-}
-
-void RipperDocGen::LinkSuperClassRefs()
-{
- MMemberListT clLst;
-
- // collect all classes in the context tree
- mpFileBinderCtx->GetContextList( clLst, SP_CTX_CLASS );
-
- for( size_t i = 0; i != clLst.size(); ++i )
- {
- spClass& cl = *((spClass*)clLst[i]);
-
- // FIXME:: why sometimes GetUserData() returns NULL?
- if ( !cl.GetUserData() )
- continue;
-
- ScriptSection* pClSect = (ScriptSection*)cl.GetUserData();
- ScriptSection* pSuperSect = pClSect->GetSubsection("Derived from");
-
- for( size_t n = 0; n != cl.m_SuperClassNames.size(); ++n )
- {
- wxString& superClName = cl.m_SuperClassNames[n];
-
- spClass* pFound = NULL;
-
- for( size_t k = 0; k != clLst.size(); ++k )
- {
- if ( clLst[k]->GetName() == superClName )
- {
- pFound = (spClass*)clLst[k];
- break;
- }
- }
-
- if ( !pFound )
- {
- ScriptSection* pNotFound =
- new ScriptSection( superClName, wxEmptyString, 0, &mDeadRefTempl );
-
- pSuperSect->AddReference( pNotFound );
- }
- else
- if ( pFound->GetUserData() )
-
- pSuperSect->AddReference(
- (ScriptSection*)pFound->GetUserData() );
- }
- }
-}
-
-void RipperDocGen::ProcessFile( const char* sourceFile )
-{
- wxSTD cout << "Processing file " << sourceFile << "..." << wxSTD endl;
-
- spFile* pCtx = mpParser->ParseFile( sourceFile );
-
- if ( pCtx == NULL )
- {
- wxSTD cout << "Cannot open file " << sourceFile << ", skipped..." << wxSTD endl;
-
- return;
- }
-
- VisitAll( *pCtx, true );
-
- mpFileBinderCtx->AddMember( pCtx );
-}
-
-// implementations of "visiting procedures"
-
-void RipperDocGen::VisitEnumeration( spEnumeration& en )
-{
- // FOR NOW:: do not reference "nameless" enums
- if ( en.GetName().empty() ) return;
-
- if ( CheckIfUncommented( en, *mpEnumIdx ) )
- return;
-
- wxString body;
- body += m_Tags[TAG_BOLD].start;
-
- AppendMulitilineStr( body, en.m_EnumContent );
-
- body += m_Tags[TAG_BOLD].end;
-
- wxString line;
- AppendHighlightedSource( line, body );
- AppendComments( en, line );
-
- mpEnumIdx->AddSection(
- new ScriptSection( en.GetName(), line,
- &mSubContentTempl,
- GetRefTemplFor( en ) ), 1
- );
-}
-
-void RipperDocGen::VisitTypeDef( spTypeDef& td )
-{
- if ( CheckIfUncommented( td, *mpTypeDefIdx ) )
- return;
-
- wxString body;
- body += m_Tags[TAG_BOLD].start;
- body += "typdef ";
- body += m_Tags[TAG_BOLD].end;
-
- AppendMulitilineStr( body, td.m_OriginalType );
- body += td.m_OriginalType;
- body += ' ';
-
- body += m_Tags[TAG_BOLD].start;
- body += td.GetName();
- body += m_Tags[TAG_BOLD].end;
-
- wxString line;
- AppendHighlightedSource( line, body );
- AppendComments( td, line );
-
- mpTypeDefIdx->AddSection(
- new ScriptSection( td.GetName(), line,
- &mSubContentTempl,
- GetRefTemplFor( td ) ), true
- );
-}
-
-void RipperDocGen::VisitPreprocessorLine( spPreprocessorLine& pd )
-{
- if ( pd.mDefType != SP_PREP_DEF_REDEFINE_SYMBOL )
- return;
-
- if ( CheckIfUncommented( pd, *mpMacroIdx ) )
- return;
-
- wxString body;
- body += m_Tags[TAG_FIXED_FONT].start;
-
- wxString coloredLine = pd.m_Line;
- AppendHighlightedSource( coloredLine, pd.m_Line );
-
- AppendMulitilineStr( body, coloredLine );
-
- body += m_Tags[TAG_FIXED_FONT].end;
-
- AppendComments( pd, body );
-
- mpMacroIdx->AddSection(
- new ScriptSection( pd.GetName(), body,
- &mSubContentTempl,
- GetRefTemplFor( pd ) ), true
- );
-}
-
-void RipperDocGen::VisitClass( spClass& cl )
-{
- // FOR NOW:: do not document nested classes -
- // nicier visiting method yet needed
-
- if ( cl.IsInClass() )
- {
- SkipChildren(); // spVisitor's method
- return;
- }
-
- wxString body;
- AppendComments( cl, body );
-
- mpCurClassSect =
- new ScriptSection( cl.GetName(), body, &mSuperContentTempl, &mRefTempl );
-
- // set up reference in the class context, pointing back
- // to the section where this class is represented
- cl.SetUserData( mpCurClassSect );
-
- ScriptSection* pSuper = new ScriptSection( "Derived from" ,wxEmptyString, &mOutLine1Templ,0, 1 );
-
- ScriptSection* pPublic = new ScriptSection( "Public members" ,wxEmptyString, &mOutLineTempl,0, 1 );
- ScriptSection* pProtected = new ScriptSection( "Protected members" ,wxEmptyString, &mOutLineTempl,0, 1 );
- ScriptSection* pPrivate = new ScriptSection( "Private members" ,wxEmptyString, &mOutLineTempl,0, 1 );
-
- pPublic->AddSection( new ScriptSection( "Operations", wxEmptyString, &mOutLine1Templ, 0, 1 ) );
- pPublic->AddSection( new ScriptSection( "Attributes", wxEmptyString, &mOutLine1Templ, 0, 1 ) );
-
- pProtected->AddSection( new ScriptSection( "Operations", wxEmptyString, &mOutLine1Templ, 0, 1 ) );
- pProtected->AddSection( new ScriptSection( "Attributes", wxEmptyString, &mOutLine1Templ, 0, 1 ) );
-
- pPrivate->AddSection( new ScriptSection( "Operations", wxEmptyString, &mOutLine1Templ, 0, 1 ) );
- pPrivate->AddSection( new ScriptSection( "Attributes", wxEmptyString, &mOutLine1Templ, 0, 1 ) );
-
- mpCurClassSect->AddSection( pSuper );
- mpCurClassSect->AddSection( pPublic );
- mpCurClassSect->AddSection( pProtected );
- mpCurClassSect->AddSection( pPrivate );
-
- mpClassIdx->AddSection( mpCurClassSect, true );
-}
-
-void RipperDocGen::VisitAttribute( spAttribute& attr )
-{
- wxString body;
- body += m_Tags[TAG_BOLD].start;
- body += attr.m_Type;
- body += m_Tags[TAG_BOLD].end;
-
- body += m_Tags[TAG_ITALIC].start;
- body += ' ';
- body += attr.GetName();
- body += m_Tags[TAG_ITALIC].end;
-
- wxString line;
- AppendHighlightedSource( line, body );
- AppendComments( attr, line );
-
- ScriptSection* pSection =
- new ScriptSection( GetScopedName( attr ), line,
- &mSubContentTempl,
- GetRefTemplFor( attr ) );
-
- if ( attr.mIsConstant )
- mpConstIdx->AddSection( pSection, true );
- else
- if ( !attr.IsInClass() )
- {
- if ( CheckIfUncommented( attr, *mpGlobalVarsIdx ) )
- return;
- mpGlobalVarsIdx->AddSection( pSection, true );
- }
- else
- AddToCurrentClass( pSection, attr, "Attributes" );
-}
-
-void RipperDocGen::VisitOperation( spOperation& op )
-{
- wxString body;
-
- AppendHighlightedSource( body, op.GetFullName(m_Tags) );
-
- AppendComments( op, body );
-
- ScriptSection* pSection =
- new ScriptSection( GetScopedName( op ), body,
- &mSubContentTempl,
- GetRefTemplFor( op ) );
-
- if ( !op.IsInClass() )
- {
- if ( CheckIfUncommented( op, *mpGlobalFuncIdx ) )
- return;
-
- mpGlobalFuncIdx->AddSection( pSection, 1 );
- }
- else
- AddToCurrentClass( pSection, op, "Operations" );
-}
-
-bool RipperDocGen::OnSaveDocument( ScriptStream& WXUNUSED(stm) )
-{
- LinkSuperClassRefs();
-
- // FOR NOW:: doesn't work yet
- //mpTopIdx->RemoveEmptySections();
-
- return 1; // saving can proceed now
-}
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 22/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef __DOCRIPPER_G__
-#define __DOCRIPPER_G__
-
-#include "scriptbinder.h"
-#include "srcparser.h"
-#include "sourcepainter.h"
-
-#if defined( wxUSE_TEMPLATE_STL )
-
- #include <vector>
-
- typedef vector<ScriptTemplate*> STemplateListT;
-
-#else
-
- #include "wxstlvec.h"
-
- typedef ScriptTemplate* ScriptTemplatePtrT;
- typedef WXSTL_VECTOR_SHALLOW_COPY(ScriptTemplatePtrT) STemplateListT;
-
-#endif
-
-
-// specific DocGenerator class for "Ripper",
-// also acts as source code visitor
-
-class RipperDocGen : public DocGeneratorBase, public spVisitor
-{
-protected:
- // templates for various sections
- ScriptTemplate mTopTempl;
- ScriptTemplate mContentIdxTempl;
- ScriptTemplate mSuperContentTempl;
- ScriptTemplate mSubContentTempl;
- ScriptTemplate mOutLineTempl;
- ScriptTemplate mOutLine1Templ;
-
- // template used for corss-references
- ScriptTemplate mRefTempl;
-
- // template used to show not-existing sections
- ScriptTemplate mDeadRefTempl;
-
- // template collection for generation of class-tree
- STemplateListT mTreeTemplates;
-
- // pointers to all major index sections
- ScriptSection* mpTopIdx;
- ScriptSection* mpClassIdx;
- ScriptSection* mpEnumIdx;
- ScriptSection* mpTypeDefIdx;
- ScriptSection* mpMacroIdx;
- ScriptSection* mpGlobalVarsIdx;
- ScriptSection* mpGlobalFuncIdx;
- ScriptSection* mpConstIdx;
-
- // parser set up from user-code for sepcific language
- SourceParserBase* mpParser;
-
- // class section, which is currently being
- // assembled
- ScriptSection* mpCurClassSect;
-
- // source syntax heighlighter object
- SourcePainter mSrcPainter;
-
- // context, to which all file contexts
- // are assembled
- spContext* mpFileBinderCtx;
-
- // script tags set up from usesr code
- MarkupTagsT m_Tags;
-
-protected:
- // helpers
- void AppendComments( spContext& fromContext, wxString& str );
-
- void AppendMulitilineStr( wxString& st, wxString& mlStr );
-
- void AppendHighlightedSource( wxString& st, wxString source );
-
- // returns true, if no comments found in the context,
- // plus, creates dummy(empty) section, and puts a
- // reference woth "dead-link" template to it in the
- // given index-section "toSect"
-
- bool CheckIfUncommented( spContext& ctx, ScriptSection& toSect );
-
- // checks if context has any comments, then returns
- // template of normal reference, otherwise of dead reference
-
- ScriptTemplate* GetRefTemplFor( spContext& ctx );
-
- // adds "someClass::" perfix to the context name,
- // if it's not in the file scope (i.e. if it's not global)
-
- wxString GetScopedName( spContext& ofCtx );
-
- // adds section to currently assembled class section
- // and places references to it from "public", "protected"
- // or "private" indexing-subsections of the class, depending
- // on the visibility of the context
-
- void AddToCurrentClass( ScriptSection* pSection, spContext& ctx,
- const char* subSectionName );
-
- // called, after all files are processed, to
- // resolve possible super/derived class relations,
- // and put cross references to them - where resolution was
- // successful
- void LinkSuperClassRefs();
-
- // implementations of "visiting procedures", declared in spVisitor
-
- virtual void VisitClass( spClass& cl );
- virtual void VisitEnumeration( spEnumeration& en );
- virtual void VisitTypeDef( spTypeDef& td );
- virtual void VisitPreprocessorLine( spPreprocessorLine& pd );
- virtual void VisitAttribute( spAttribute& attr );
- virtual void VisitOperation( spOperation& op );
-
- // overriden member of DocGernatorBase
-
- virtual bool OnSaveDocument( ScriptStream& stm );
-
- virtual ScriptSection* GetTopSection()
- { return mpTopIdx; }
-
-public:
- RipperDocGen();
- virtual ~RipperDocGen();
-
- // should be called onece to set user-code provided,
- // parser for specific source code language
- // (NOTE:: it's the user-code's responsibility to
- // relseas memory of pParser)
-
- void Init( SourceParserBase* pParser );
-
- // should be called on each file
-
- void ProcessFile( const char* sourceFile );
-};
-
-
-#endif
+++ /dev/null
-<?xml version="1.0" ?>
-<!-- $Id$ -->
-
-<makefile>
-
- <include file="../../../build/bakefiles/common_samples.bkl"/>
-
- <exe id="HelpGen" template="wx_util_console"
- template_append="wx_append_base">
- <sources>
- HelpGen.cpp
- cjparser.cpp
- docripper.cpp
- ifcontext.cpp
- markup.cpp
- scriptbinder.cpp
- sourcepainter.cpp
- srcparser.cpp
- </sources>
- <wx-lib>base</wx-lib>
- </exe>
-
-</makefile>
+++ /dev/null
-# Microsoft Developer Studio Project File - Name="helpgen" - Package Owner=<4>\r
-# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
-# ** DO NOT EDIT **\r
-\r
-# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
-\r
-CFG=HelpGen - Win32 Debug\r
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
-!MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "helpgen.mak".\r
-!MESSAGE \r
-!MESSAGE You can specify a configuration when running NMAKE\r
-!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "helpgen.mak" CFG="HelpGen - Win32 Debug"\r
-!MESSAGE \r
-!MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
-!MESSAGE "HelpGen - Win32 DLL Universal Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 DLL Universal Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 DLL Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 DLL Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 Universal Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 Universal Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "HelpGen - Win32 Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE \r
-\r
-# Begin Project\r
-# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName ""\r
-# PROP Scc_LocalPath ""\r
-CPP=cl.exe\r
-RSC=rc.exe\r
-\r
-!IF "$(CFG)" == "HelpGen - Win32 DLL Universal Release"\r
-\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\HelpGen"\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\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswunivudll\HelpGen.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\HelpGen.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
-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\HelpGen.exe" /debug /pdb:"vc_mswunivudll\HelpGen.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\HelpGen.exe" /debug /pdb:"vc_mswunivudll\HelpGen.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - 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\HelpGen"\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\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswunivuddll\HelpGen.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\HelpGen.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
-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\HelpGen.exe" /debug /pdb:"vc_mswunivuddll\HelpGen.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\HelpGen.exe" /debug /pdb:"vc_mswunivuddll\HelpGen.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - 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\HelpGen"\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\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswudll\HelpGen.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\HelpGen.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
-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\HelpGen.exe" /debug /pdb:"vc_mswudll\HelpGen.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\HelpGen.exe" /debug /pdb:"vc_mswudll\HelpGen.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - 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\HelpGen"\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\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswuddll\HelpGen.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\HelpGen.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
-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\HelpGen.exe" /debug /pdb:"vc_mswuddll\HelpGen.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\HelpGen.exe" /debug /pdb:"vc_mswuddll\HelpGen.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - 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\HelpGen"\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\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswunivu\HelpGen.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\HelpGen.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
-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\HelpGen.exe" /debug /pdb:"vc_mswunivu\HelpGen.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\HelpGen.exe" /debug /pdb:"vc_mswunivu\HelpGen.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - 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\HelpGen"\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\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswunivud\HelpGen.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\HelpGen.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
-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\HelpGen.exe" /debug /pdb:"vc_mswunivud\HelpGen.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\HelpGen.exe" /debug /pdb:"vc_mswunivud\HelpGen.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - 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\HelpGen"\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\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswu\HelpGen.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\HelpGen.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
-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\HelpGen.exe" /debug /pdb:"vc_mswu\HelpGen.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\HelpGen.exe" /debug /pdb:"vc_mswu\HelpGen.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "HelpGen - 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\HelpGen"\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\HelpGen"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswud\HelpGen.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\HelpGen.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
-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\HelpGen.exe" /debug /pdb:"vc_mswud\HelpGen.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\HelpGen.exe" /debug /pdb:"vc_mswud\HelpGen.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ENDIF\r
-\r
-# Begin Target\r
-\r
-# Name "HelpGen - Win32 DLL Universal Release"\r
-# Name "HelpGen - Win32 DLL Universal Debug"\r
-# Name "HelpGen - Win32 DLL Release"\r
-# Name "HelpGen - Win32 DLL Debug"\r
-# Name "HelpGen - Win32 Universal Release"\r
-# Name "HelpGen - Win32 Universal Debug"\r
-# Name "HelpGen - Win32 Release"\r
-# Name "HelpGen - Win32 Debug"\r
-# Begin Group "Source Files"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\HelpGen.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\cjparser.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\docripper.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\ifcontext.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\markup.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\scriptbinder.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\sourcepainter.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\srcparser.cpp\r
-# End Source File\r
-# End Group\r
-# End Target\r
-# End Project\r
-\r
+++ /dev/null
-<?xml version="1.0" ?>\r
-<!--\r
-\r
- This makefile was generated by\r
- Bakefile 0.2.3 (http://www.bakefile.org)\r
- Do not modify, all changes will be overwritten!\r
-\r
--->\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="7.10"\r
- Name="HelpGen"\r
- ProjectGUID="{C7F52383-60B2-5A7E-A909-145DA57B5577}">\r
- <Platforms>\r
- <Platform\r
- Name="Win32"/>\r
- </Platforms>\r
- <Configurations>\r
- <Configuration\r
- Name="DLL Universal Release|Win32"\r
- OutputDirectory="vc_mswunivudll"\r
- IntermediateDirectory="vc_mswunivudll\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivudll\HelpGen\"\r
- ObjectFile="vc_mswunivudll\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswunivudll\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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
- <Tool\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivudll\HelpGen.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivudll\helpgen_vc7.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Universal Debug|Win32"\r
- OutputDirectory="vc_mswunivuddll"\r
- IntermediateDirectory="vc_mswunivuddll\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivuddll\HelpGen\"\r
- ObjectFile="vc_mswunivuddll\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswunivuddll\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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
- <Tool\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivuddll\HelpGen.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivuddll\helpgen_vc7.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Release|Win32"\r
- OutputDirectory="vc_mswudll"\r
- IntermediateDirectory="vc_mswudll\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswudll\HelpGen\"\r
- ObjectFile="vc_mswudll\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswudll\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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
- <Tool\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswudll\HelpGen.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswudll\helpgen_vc7.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Debug|Win32"\r
- OutputDirectory="vc_mswuddll"\r
- IntermediateDirectory="vc_mswuddll\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswuddll\HelpGen\"\r
- ObjectFile="vc_mswuddll\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswuddll\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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
- <Tool\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswuddll\HelpGen.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswuddll\helpgen_vc7.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="Universal Release|Win32"\r
- OutputDirectory="vc_mswunivu"\r
- IntermediateDirectory="vc_mswunivu\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivu\HelpGen\"\r
- ObjectFile="vc_mswunivu\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswunivu\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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
- <Tool\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivu\HelpGen.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivu\helpgen_vc7.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="Universal Debug|Win32"\r
- OutputDirectory="vc_mswunivud"\r
- IntermediateDirectory="vc_mswunivud\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivud\HelpGen\"\r
- ObjectFile="vc_mswunivud\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswunivud\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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
- <Tool\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivud\HelpGen.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivud\helpgen_vc7.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="vc_mswu"\r
- IntermediateDirectory="vc_mswu\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswu\HelpGen\"\r
- ObjectFile="vc_mswu\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswu\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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
- <Tool\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswu\HelpGen.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswu\helpgen_vc7.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="vc_mswud"\r
- IntermediateDirectory="vc_mswud\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswud\HelpGen\"\r
- ObjectFile="vc_mswud\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswud\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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
- <Tool\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswud\HelpGen.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswud\helpgen_vc7.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- \r
- </References>\r
- <Files>\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
- <File\r
- RelativePath=".\HelpGen.cpp"/>\r
- <File\r
- RelativePath=".\cjparser.cpp"/>\r
- <File\r
- RelativePath=".\docripper.cpp"/>\r
- <File\r
- RelativePath=".\ifcontext.cpp"/>\r
- <File\r
- RelativePath=".\markup.cpp"/>\r
- <File\r
- RelativePath=".\scriptbinder.cpp"/>\r
- <File\r
- RelativePath=".\sourcepainter.cpp"/>\r
- <File\r
- RelativePath=".\srcparser.cpp"/>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- \r
- </Globals>\r
-</VisualStudioProject>\r
-\r
+++ /dev/null
-<?xml version="1.0" ?>\r
-<!--\r
-\r
- This makefile was generated by\r
- Bakefile 0.2.3 (http://www.bakefile.org)\r
- Do not modify, all changes will be overwritten!\r
-\r
--->\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="HelpGen"\r
- ProjectGUID="{89310150-233B-5DDC-9173-35B7F50CF9B4}"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\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\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivudll\HelpGen\"\r
- ObjectFile="vc_mswunivudll\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswunivudll\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\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
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivudll\HelpGen.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivudll\helpgen_vc8.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Universal Debug|Win32"\r
- OutputDirectory="vc_mswunivuddll"\r
- IntermediateDirectory="vc_mswunivuddll\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivuddll\HelpGen\"\r
- ObjectFile="vc_mswunivuddll\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswunivuddll\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\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
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivuddll\HelpGen.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivuddll\helpgen_vc8.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Release|Win32"\r
- OutputDirectory="vc_mswudll"\r
- IntermediateDirectory="vc_mswudll\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswudll\HelpGen\"\r
- ObjectFile="vc_mswudll\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswudll\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\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
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswudll\HelpGen.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswudll\helpgen_vc8.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Debug|Win32"\r
- OutputDirectory="vc_mswuddll"\r
- IntermediateDirectory="vc_mswuddll\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswuddll\HelpGen\"\r
- ObjectFile="vc_mswuddll\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswuddll\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\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
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswuddll\HelpGen.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswuddll\helpgen_vc8.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Universal Release|Win32"\r
- OutputDirectory="vc_mswunivu"\r
- IntermediateDirectory="vc_mswunivu\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivu\HelpGen\"\r
- ObjectFile="vc_mswunivu\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswunivu\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\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
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivu\HelpGen.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivu\helpgen_vc8.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Universal Debug|Win32"\r
- OutputDirectory="vc_mswunivud"\r
- IntermediateDirectory="vc_mswunivud\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivud\HelpGen\"\r
- ObjectFile="vc_mswunivud\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswunivud\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\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
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivud\HelpGen.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivud\helpgen_vc8.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="vc_mswu"\r
- IntermediateDirectory="vc_mswu\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswu\HelpGen\"\r
- ObjectFile="vc_mswu\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswu\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\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
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswu\HelpGen.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswu\helpgen_vc8.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="vc_mswud"\r
- IntermediateDirectory="vc_mswud\HelpGen"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswud\HelpGen\"\r
- ObjectFile="vc_mswud\HelpGen\"\r
- ProgramDataBaseFileName="vc_mswud\HelpGen.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\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
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\HelpGen.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswud\HelpGen.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswud\helpgen_vc8.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- \r
- </References>\r
- <Files>\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
- <File\r
- RelativePath=".\HelpGen.cpp"\r
- />\r
- <File\r
- RelativePath=".\cjparser.cpp"\r
- />\r
- <File\r
- RelativePath=".\docripper.cpp"\r
- />\r
- <File\r
- RelativePath=".\ifcontext.cpp"\r
- />\r
- <File\r
- RelativePath=".\markup.cpp"\r
- />\r
- <File\r
- RelativePath=".\scriptbinder.cpp"\r
- />\r
- <File\r
- RelativePath=".\sourcepainter.cpp"\r
- />\r
- <File\r
- RelativePath=".\srcparser.cpp"\r
- />\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- \r
- </Globals>\r
-</VisualStudioProject>\r
-\r
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 27/12/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-#include <stdio.h>
-
-#include "ifcontext.h"
-
-/***** Implementation for class spInterFileContext *****/
-
-size_t spInterFileContext::GetFileNo( const wxString& fname )
-{
- for ( size_t i = 0; i != m_Files.size(); ++i )
- {
- if ( fname == m_Files[i] )
- return i;
- }
-
- wxFAIL_MSG("File not found in array in function spInterFileContext::GetFileNo()");
-
- return 0;
-}
-
-size_t spInterFileContext::GetFileNoOfContext( spContext& ctx )
-{
- spContext* pCtx = ctx.GetEnclosingContext( SP_CTX_FILE );
-
- // DBG:: outer-file context should be present
- wxASSERT( pCtx && pCtx->GetType() == SP_CTX_FILE );
-
- return GetFileNo( ((spFile*)pCtx)->m_FileName );
-}
-
-/*** public interface ***/
-
-spInterFileContext::spInterFileContext()
-{}
-
-spInterFileContext::~spInterFileContext()
-{}
-
-void spInterFileContext::AddFile( const wxString& fname, const wxString& content )
-{
- m_Files.push_back( fname );
- m_Contents.push_back( content );
-}
-
-void spInterFileContext::RemoveContext( spContext& ctx )
-{
- wxASSERT( ctx.PositionIsKnown() ); // DBG:: should be checked by-user code
-
- size_t fNo = GetFileNoOfContext( ctx );
-
- mDeletionMarks.push_back( spBookmark( ctx.mSrcOffset, ctx.mContextLength, fNo ) );
-}
-
-void spInterFileContext::InsertBookmarkSorted( BookmarkListT& lst, spBookmark& mark )
-{
- for( size_t i = 0; i != lst.size(); ++i )
-
- if ( lst[i].mFrom > mark.mFrom )
- {
- lst.insert( &lst[i], mark );
- return;
- }
-
- lst.push_back( mark );
-}
-
-void spInterFileContext::DoAppendSourceFragment( wxString& source,
- wxString& result,
- size_t pos, size_t len )
-{
- mFiltered.erase( mFiltered.begin(), mFiltered.end() );
-
- size_t i;
-
- for( i = 0; i != mDeletionMarks.size(); ++i )
- {
- spBookmark& mark = mDeletionMarks[i];
-
- if ( mark.mFileNo == mCurFileNo &&
- mark.mFrom >= pos && mark.mFrom < pos + len )
-
- InsertBookmarkSorted( mFiltered, mark );
- }
-
- size_t cur = pos;
-
- for( i = 0; i != mFiltered.size(); ++ i )
- {
- spBookmark& mark = mFiltered[i];
-
- result.append( source, cur, ( (size_t)mark.mFrom - cur ) );
-
- cur = size_t( mark.mFrom + mark.mLen );
-
- if ( cur >= pos + len ) // check if we've overstepped the current source-fragment
- {
-// wxASSERT(0); // DBG:: with current imp. this should not happen
- wxFAIL_MSG("Overstepped the current source fragment in function\nspInterFileContext::DoAppendSourceFragment()");
- cur = pos + len; break;
- }
- }
-
- result.append( source, cur, ( pos + len ) - cur );
-}
-
-void spInterFileContext::GenerateContextBody( spContext& ctx,
- wxString& source,
- wxString& result,
- size_t& lastSavedPos,
- size_t& lastKnownPos )
-{
- if ( ctx.PositionIsKnown() )
- lastKnownPos = ctx.mSrcOffset;
-
- if ( ctx.IsVirtualContext() )
- {
- // add fragment accumulated before this context
-
- DoAppendSourceFragment( source, result,
- size_t(lastSavedPos),
- size_t(lastKnownPos - lastSavedPos) );
-
- // add context body
-
- result += ctx.GetVirtualContextBody();
-
- lastSavedPos = lastKnownPos;
-
- if ( ctx.PositionIsKnown() )
- {
- if ( ctx.VitualContextHasChildren() )
- {
- lastKnownPos = ctx.mSrcOffset + ctx.mHeaderLength;
-
- lastSavedPos = lastKnownPos;
- }
- else
- {
- lastKnownPos = ctx.mSrcOffset + ctx.mContextLength;
-
- lastSavedPos = lastKnownPos;
-
- return; // have not children
- }
- }
- }
-
- MMemberListT& lst = ctx.GetMembers();
-
- for( size_t i = 0; i != lst.size(); ++i )
- {
- GenerateContextBody( *lst[i], source, result, lastSavedPos, lastKnownPos );
- }
-
- if ( ctx.IsVirtualContext() )
- {
- if ( ctx.VitualContextHasChildren() && !ctx.GetFooterOfVirtualContextBody().empty() )
- {
- // append the reminder space after children of the context
-
- DoAppendSourceFragment( result, source,
- size_t(lastSavedPos),
- size_t(lastKnownPos - lastSavedPos) );
-
- // add footer
- result += ctx.GetFooterOfVirtualContextBody();
-
- lastKnownPos = ctx.mSrcOffset + ctx.mContextLength;
-
- lastSavedPos = lastKnownPos;
- }
- }
-
- if ( ctx.PositionIsKnown() )
-
- lastKnownPos = ctx.mSrcOffset + ctx.mContextLength;
-}
-
-void spInterFileContext::GenrateContents()
-{
- MMemberListT& lst = GetMembers();
-
- for( size_t f = 0; f != lst.size(); ++f )
- {
- wxString& fname = ((spFile*)lst[f])->m_FileName;
-
- size_t fileNo = GetFileNo( fname );
-
- wxString& source = m_Contents[ fileNo ];
-
- wxString result;
-
- size_t lastKnownPos = 0, // the begining of the file is always "known"
- lastSavedPos = 0;
-
- mCurFileNo = fileNo;
-
- GenerateContextBody( *lst[f], source, result, lastSavedPos, lastKnownPos );
-
- // the end of file is always known
-
- lastKnownPos = m_Contents[ fileNo ].length();
-
- // append the reminder
-
- DoAppendSourceFragment( source, result,
- size_t(lastSavedPos),
- size_t(lastKnownPos - lastSavedPos) );
-
- // replace original contnet with newly generated one
-
- m_Contents[ fileNo ] = result;
- }
-}
-
-void spInterFileContext::ParseContents( SourceParserPlugin* pPlugin )
-{
- mDeletionMarks.erase( mDeletionMarks.begin(), mDeletionMarks.end() );
-
- RemoveChildren(); // clean up top-level context
-
- mParser.SetPlugin( pPlugin );
-
- for( size_t i = 0; i != m_Files.size(); ++i )
- {
- wxWritableCharBuffer s(m_Contents[i].char_str());
-
- spFile* pFCtx = mParser.Parse( s, s + m_Contents[i].length() );
-
- pFCtx->m_FileName = m_Files[i];
-
- AddMember( pFCtx );
- }
-}
-
-void spInterFileContext::WriteToFiles()
-{
- for( size_t i = 0; i != m_Files.size(); ++i )
- {
- FILE* fp = fopen( m_Files[i].c_str(), "w+t" );
-
- if ( fp != NULL )
- {
- fwrite( m_Contents[i].c_str(), sizeof(char), m_Contents[i].length(), fp );
-
- fclose( fp );
- }
- }
-}
-
-wxString spInterFileContext::GetBody( spContext* pCtx )
-{
- wxASSERT( pCtx->PositionIsKnown() ); // DBG:: should be checked by-user code
-
- wxString& source = m_Contents[ GetFileNoOfContext( *pCtx ) ];
-
- return wxString( source.c_str() + pCtx->mSrcOffset, pCtx->mContextLength );
-}
-
-wxString spInterFileContext::GetHeader( spContext* pCtx )
-{
- wxASSERT( pCtx->PositionIsKnown() ); // DBG:: should be checked by-user code
-
- wxASSERT( pCtx->mHeaderLength != -1 ); // DBG:: -/-
-
- wxString& source = m_Contents[ GetFileNoOfContext( *pCtx ) ];
-
- return wxString( source.c_str() + pCtx->mSrcOffset, pCtx->mHeaderLength );
-}
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 27/12/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef __IFCONTEXT_G__
-#define __IFCONTEXT_G__
-
-#include "srcparser.h"
-#include "cjparser.h"
-
-class spBookmark
-{
-public:
- size_t mFrom;
- size_t mLen;
- size_t mFileNo;
-
- inline spBookmark() {}
-
- inline spBookmark( int from, int len, int fileNo )
- : mFrom( from ), mLen( len ), mFileNo( fileNo )
- {}
-};
-
-#if defined( wxUSE_TEMPLATE_STL )
-
- typedef vector<spBookmark) BookmarkListT
-
-#else
-
- typedef WXSTL_VECTOR_SHALLOW_COPY(spBookmark) BookmarkListT;
-
-#endif
-
-
-class spInterFileContext : public spContext
-{
-protected:
-
- BookmarkListT mDeletionMarks;
-
- BookmarkListT mFiltered;
-
- size_t mCurFileNo;
-
- CJSourceParser mParser;
-
-protected:
-
- size_t GetFileNoOfContext( spContext& ctx );
- size_t GetFileNo( const wxString& fname );
-
- void InsertBookmarkSorted( BookmarkListT& lst, spBookmark& mark );
-
- void DoAppendSourceFragment( wxString& source,
- wxString& result,
- size_t pos,
- size_t len );
-
- void GenerateContextBody( spContext& ctx,
- wxString& source,
- wxString& result,
- size_t& lastSavedPos,
- size_t& lastKnownPos );
-
-public:
-
- StrListT m_Files;
- StrListT m_Contents;
-
-public:
-
- spInterFileContext();
- virtual ~spInterFileContext();
-
- void AddFile( const wxString& fname, const wxString& content );
-
- void RemoveContext( spContext& ctx );
-
- void GenrateContents();
-
- void ParseContents( SourceParserPlugin* pPlugin = NULL );
-
- void WriteToFiles();
-
- // overriden method of the base class (finds out the source fragment)
-
- virtual wxString GetBody( spContext* pCtx = NULL );
-
- virtual wxString GetHeader( spContext* pCtx = NULL );
-};
-
-
-#endif
+++ /dev/null
-# =========================================================================
-# This makefile was generated by
-# Bakefile 0.2.3 (http://www.bakefile.org)
-# Do not modify, all changes will be overwritten!
-# =========================================================================
-
-.autodepend
-
-!ifndef BCCDIR
-!ifndef MAKEDIR
-!error Your Borland compiler does not define MAKEDIR. Please define the BCCDIR variable, e.g. BCCDIR=d:\bc4
-!endif
-BCCDIR = $(MAKEDIR)\..
-!endif
-
-!include ../../../build/msw/config.bcc
-
-# -------------------------------------------------------------------------
-# Do not modify the rest of this file!
-# -------------------------------------------------------------------------
-
-### Variables: ###
-
-WX_RELEASE_NODOT = 29
-COMPILER_PREFIX = bcc
-OBJS = \
- $(COMPILER_PREFIX)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
-LIBDIRNAME = .\..\..\..\lib\$(COMPILER_PREFIX)_$(LIBTYPE_SUFFIX)$(CFG)
-SETUPHDIR = \
- $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
-HELPGEN_CXXFLAGS = $(__RUNTIME_LIBS_7) -I$(BCCDIR)\include $(__DEBUGINFO) \
- $(__OPTIMIZEFLAG_2) $(__THREADSFLAG_6) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
- $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
- $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
- $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\..\include -I. $(__DLLFLAG_p) \
- -DwxUSE_GUI=0 $(CPPFLAGS) $(CXXFLAGS)
-HELPGEN_OBJECTS = \
- $(OBJS)\HelpGen_HelpGen.obj \
- $(OBJS)\HelpGen_cjparser.obj \
- $(OBJS)\HelpGen_docripper.obj \
- $(OBJS)\HelpGen_ifcontext.obj \
- $(OBJS)\HelpGen_markup.obj \
- $(OBJS)\HelpGen_scriptbinder.obj \
- $(OBJS)\HelpGen_sourcepainter.obj \
- $(OBJS)\HelpGen_srcparser.obj
-
-### Conditionally set variables: ###
-
-!if "$(USE_GUI)" == "0"
-PORTNAME = base
-!endif
-!if "$(USE_GUI)" == "1"
-PORTNAME = msw
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-WXDEBUGFLAG = d
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-WXDEBUGFLAG = d
-!endif
-!if "$(UNICODE)" == "1"
-WXUNICODEFLAG = u
-!endif
-!if "$(WXUNIV)" == "1"
-WXUNIVNAME = univ
-!endif
-!if "$(SHARED)" == "1"
-WXDLLFLAG = dll
-!endif
-!if "$(SHARED)" == "0"
-LIBTYPE_SUFFIX = lib
-!endif
-!if "$(SHARED)" == "1"
-LIBTYPE_SUFFIX = dll
-!endif
-!if "$(MONOLITHIC)" == "0"
-EXTRALIBS_FOR_BASE =
-!endif
-!if "$(MONOLITHIC)" == "1"
-EXTRALIBS_FOR_BASE =
-!endif
-!if "$(BUILD)" == "debug"
-__OPTIMIZEFLAG_2 = -Od
-!endif
-!if "$(BUILD)" == "release"
-__OPTIMIZEFLAG_2 = -O2
-!endif
-!if "$(USE_THREADS)" == "0"
-__THREADSFLAG_5 =
-!endif
-!if "$(USE_THREADS)" == "1"
-__THREADSFLAG_5 = mt
-!endif
-!if "$(USE_THREADS)" == "0"
-__THREADSFLAG_6 =
-!endif
-!if "$(USE_THREADS)" == "1"
-__THREADSFLAG_6 = -tWM
-!endif
-!if "$(RUNTIME_LIBS)" == "dynamic"
-__RUNTIME_LIBS_7 = -tWR
-!endif
-!if "$(RUNTIME_LIBS)" == "static"
-__RUNTIME_LIBS_7 =
-!endif
-!if "$(RUNTIME_LIBS)" == "dynamic"
-__RUNTIME_LIBS_8 = i
-!endif
-!if "$(RUNTIME_LIBS)" == "static"
-__RUNTIME_LIBS_8 =
-!endif
-!if "$(WXUNIV)" == "1"
-__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-__DEBUG_DEFINE_p = -D__WXDEBUG__
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-__DEBUG_DEFINE_p = -D__WXDEBUG__
-!endif
-!if "$(USE_EXCEPTIONS)" == "0"
-__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
-!endif
-!if "$(USE_RTTI)" == "0"
-__RTTI_DEFINE_p = -DwxNO_RTTI
-!endif
-!if "$(USE_THREADS)" == "0"
-__THREAD_DEFINE_p = -DwxNO_THREADS
-!endif
-!if "$(UNICODE)" == "0"
-__UNICODE_DEFINE_p = -DwxUSE_UNICODE=0
-!endif
-!if "$(UNICODE)" == "1"
-__UNICODE_DEFINE_p = -D_UNICODE
-!endif
-!if "$(MSLU)" == "1"
-__MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1
-!endif
-!if "$(USE_GDIPLUS)" == "1"
-__GFXCTX_DEFINE_p = -DwxUSE_GRAPHICS_CONTEXT=1
-!endif
-!if "$(SHARED)" == "1"
-__DLLFLAG_p = -DWXUSINGDLL
-!endif
-!if "$(MONOLITHIC)" == "0"
-__WXLIB_BASE_p = \
- wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-!if "$(MONOLITHIC)" == "1"
-__WXLIB_MONO_p = \
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-!if "$(MSLU)" == "1"
-__UNICOWS_LIB_p = unicows.lib
-!endif
-!if "$(USE_GDIPLUS)" == "1"
-__GDIPLUS_LIB_p = gdiplus.lib
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO = -v
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO = -v-
-!endif
-!if "$(DEBUG_INFO)" == "0"
-__DEBUGINFO = -v-
-!endif
-!if "$(DEBUG_INFO)" == "1"
-__DEBUGINFO = -v
-!endif
-
-
-all: $(OBJS)
-$(OBJS):
- -if not exist $(OBJS) mkdir $(OBJS)
-
-### Targets: ###
-
-all: $(OBJS)\HelpGen.exe
-
-clean:
- -if exist $(OBJS)\*.obj del $(OBJS)\*.obj
- -if exist $(OBJS)\*.res del $(OBJS)\*.res
- -if exist $(OBJS)\*.csm del $(OBJS)\*.csm
- -if exist $(OBJS)\HelpGen.exe del $(OBJS)\HelpGen.exe
- -if exist $(OBJS)\HelpGen.tds del $(OBJS)\HelpGen.tds
- -if exist $(OBJS)\HelpGen.ilc del $(OBJS)\HelpGen.ilc
- -if exist $(OBJS)\HelpGen.ild del $(OBJS)\HelpGen.ild
- -if exist $(OBJS)\HelpGen.ilf del $(OBJS)\HelpGen.ilf
- -if exist $(OBJS)\HelpGen.ils del $(OBJS)\HelpGen.ils
-
-$(OBJS)\HelpGen.exe: $(HELPGEN_OBJECTS)
- ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -ap @&&|
- c0x32.obj $(HELPGEN_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,,
-|
-
-$(OBJS)\HelpGen_HelpGen.obj: .\HelpGen.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) .\HelpGen.cpp
-
-$(OBJS)\HelpGen_cjparser.obj: .\cjparser.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) .\cjparser.cpp
-
-$(OBJS)\HelpGen_docripper.obj: .\docripper.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) .\docripper.cpp
-
-$(OBJS)\HelpGen_ifcontext.obj: .\ifcontext.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) .\ifcontext.cpp
-
-$(OBJS)\HelpGen_markup.obj: .\markup.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) .\markup.cpp
-
-$(OBJS)\HelpGen_scriptbinder.obj: .\scriptbinder.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) .\scriptbinder.cpp
-
-$(OBJS)\HelpGen_sourcepainter.obj: .\sourcepainter.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) .\sourcepainter.cpp
-
-$(OBJS)\HelpGen_srcparser.obj: .\srcparser.cpp
- $(CXX) -q -c -P -o$@ $(HELPGEN_CXXFLAGS) .\srcparser.cpp
-
+++ /dev/null
-# =========================================================================
-# This makefile was generated by
-# Bakefile 0.2.3 (http://www.bakefile.org)
-# Do not modify, all changes will be overwritten!
-# =========================================================================
-
-include ../../../build/msw/config.gcc
-
-# -------------------------------------------------------------------------
-# Do not modify the rest of this file!
-# -------------------------------------------------------------------------
-
-### Variables: ###
-
-CPPDEPS = -MT$@ -MF$@.d -MD
-WX_RELEASE_NODOT = 29
-COMPILER_PREFIX = gcc
-OBJS = \
- $(COMPILER_PREFIX)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
-LIBDIRNAME = .\..\..\..\lib\$(COMPILER_PREFIX)_$(LIBTYPE_SUFFIX)$(CFG)
-SETUPHDIR = \
- $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
-HELPGEN_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG) \
- $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
- $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
- $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
- $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\..\include -W -Wall -I. \
- $(__DLLFLAG_p) -DwxUSE_GUI=0 $(__RTTIFLAG_5) $(__EXCEPTIONSFLAG_6) \
- -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
-HELPGEN_OBJECTS = \
- $(OBJS)\HelpGen_HelpGen.o \
- $(OBJS)\HelpGen_cjparser.o \
- $(OBJS)\HelpGen_docripper.o \
- $(OBJS)\HelpGen_ifcontext.o \
- $(OBJS)\HelpGen_markup.o \
- $(OBJS)\HelpGen_scriptbinder.o \
- $(OBJS)\HelpGen_sourcepainter.o \
- $(OBJS)\HelpGen_srcparser.o
-
-### Conditionally set variables: ###
-
-ifeq ($(GCC_VERSION),2.95)
-GCCFLAGS = -fvtable-thunks
-endif
-ifeq ($(USE_GUI),0)
-PORTNAME = base
-endif
-ifeq ($(USE_GUI),1)
-PORTNAME = msw
-endif
-ifeq ($(BUILD),debug)
-ifeq ($(DEBUG_FLAG),default)
-WXDEBUGFLAG = d
-endif
-endif
-ifeq ($(DEBUG_FLAG),1)
-WXDEBUGFLAG = d
-endif
-ifeq ($(UNICODE),1)
-WXUNICODEFLAG = u
-endif
-ifeq ($(WXUNIV),1)
-WXUNIVNAME = univ
-endif
-ifeq ($(SHARED),1)
-WXDLLFLAG = dll
-endif
-ifeq ($(SHARED),0)
-LIBTYPE_SUFFIX = lib
-endif
-ifeq ($(SHARED),1)
-LIBTYPE_SUFFIX = dll
-endif
-ifeq ($(MONOLITHIC),0)
-EXTRALIBS_FOR_BASE =
-endif
-ifeq ($(MONOLITHIC),1)
-EXTRALIBS_FOR_BASE =
-endif
-ifeq ($(BUILD),debug)
-__OPTIMIZEFLAG_2 = -O0
-endif
-ifeq ($(BUILD),release)
-__OPTIMIZEFLAG_2 = -O2
-endif
-ifeq ($(USE_RTTI),0)
-__RTTIFLAG_5 = -fno-rtti
-endif
-ifeq ($(USE_RTTI),1)
-__RTTIFLAG_5 =
-endif
-ifeq ($(USE_EXCEPTIONS),0)
-__EXCEPTIONSFLAG_6 = -fno-exceptions
-endif
-ifeq ($(USE_EXCEPTIONS),1)
-__EXCEPTIONSFLAG_6 =
-endif
-ifeq ($(WXUNIV),1)
-__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
-endif
-ifeq ($(BUILD),debug)
-ifeq ($(DEBUG_FLAG),default)
-__DEBUG_DEFINE_p = -D__WXDEBUG__
-endif
-endif
-ifeq ($(DEBUG_FLAG),1)
-__DEBUG_DEFINE_p = -D__WXDEBUG__
-endif
-ifeq ($(USE_EXCEPTIONS),0)
-__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
-endif
-ifeq ($(USE_RTTI),0)
-__RTTI_DEFINE_p = -DwxNO_RTTI
-endif
-ifeq ($(USE_THREADS),0)
-__THREAD_DEFINE_p = -DwxNO_THREADS
-endif
-ifeq ($(UNICODE),0)
-__UNICODE_DEFINE_p = -DwxUSE_UNICODE=0
-endif
-ifeq ($(UNICODE),1)
-__UNICODE_DEFINE_p = -D_UNICODE
-endif
-ifeq ($(MSLU),1)
-__MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1
-endif
-ifeq ($(USE_GDIPLUS),1)
-__GFXCTX_DEFINE_p = -DwxUSE_GRAPHICS_CONTEXT=1
-endif
-ifeq ($(SHARED),1)
-__DLLFLAG_p = -DWXUSINGDLL
-endif
-ifeq ($(MONOLITHIC),0)
-__WXLIB_BASE_p = \
- -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
-endif
-ifeq ($(MONOLITHIC),1)
-__WXLIB_MONO_p = \
- -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
-endif
-ifeq ($(MSLU),1)
-__UNICOWS_LIB_p = -lunicows
-endif
-ifeq ($(USE_GDIPLUS),1)
-__GDIPLUS_LIB_p = -lgdiplus
-endif
-ifeq ($(BUILD),debug)
-ifeq ($(DEBUG_INFO),default)
-__DEBUGINFO = -g
-endif
-endif
-ifeq ($(BUILD),release)
-ifeq ($(DEBUG_INFO),default)
-__DEBUGINFO =
-endif
-endif
-ifeq ($(DEBUG_INFO),0)
-__DEBUGINFO =
-endif
-ifeq ($(DEBUG_INFO),1)
-__DEBUGINFO = -g
-endif
-ifeq ($(USE_THREADS),0)
-__THREADSFLAG =
-endif
-ifeq ($(USE_THREADS),1)
-__THREADSFLAG = -mthreads
-endif
-
-
-all: $(OBJS)
-$(OBJS):
- -if not exist $(OBJS) mkdir $(OBJS)
-
-### Targets: ###
-
-all: $(OBJS)\HelpGen.exe
-
-clean:
- -if exist $(OBJS)\*.o del $(OBJS)\*.o
- -if exist $(OBJS)\*.d del $(OBJS)\*.d
- -if exist $(OBJS)\HelpGen.exe del $(OBJS)\HelpGen.exe
-
-$(OBJS)\HelpGen.exe: $(HELPGEN_OBJECTS)
- $(CXX) -o $@ $(HELPGEN_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
-
-$(OBJS)\HelpGen_HelpGen.o: ./HelpGen.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\HelpGen_cjparser.o: ./cjparser.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\HelpGen_docripper.o: ./docripper.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\HelpGen_ifcontext.o: ./ifcontext.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\HelpGen_markup.o: ./markup.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\HelpGen_scriptbinder.o: ./scriptbinder.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\HelpGen_sourcepainter.o: ./sourcepainter.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\HelpGen_srcparser.o: ./srcparser.cpp
- $(CXX) -c -o $@ $(HELPGEN_CXXFLAGS) $(CPPDEPS) $<
-
-.PHONY: all clean
-
-
-SHELL := $(COMSPEC)
-
-# Dependencies tracking:
--include $(OBJS)/*.d
+++ /dev/null
-# =========================================================================
-# This makefile was generated by
-# Bakefile 0.2.3 (http://www.bakefile.org)
-# Do not modify, all changes will be overwritten!
-# =========================================================================
-
-!include <../../../build/msw/config.vc>
-
-# -------------------------------------------------------------------------
-# Do not modify the rest of this file!
-# -------------------------------------------------------------------------
-
-### Variables: ###
-
-WX_RELEASE_NODOT = 29
-COMPILER_PREFIX = vc
-OBJS = \
- $(COMPILER_PREFIX)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)$(DIR_SUFFIX_CPU)
-LIBDIRNAME = \
- .\..\..\..\lib\$(COMPILER_PREFIX)$(DIR_SUFFIX_CPU)_$(LIBTYPE_SUFFIX)$(CFG)
-SETUPHDIR = \
- $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
-HELPGEN_CXXFLAGS = /M$(__RUNTIME_LIBS_8)$(__DEBUGRUNTIME_3) /DWIN32 \
- $(__DEBUGINFO_0) /Fd$(OBJS)\HelpGen.pdb $(____DEBUGRUNTIME_2_p) \
- $(__OPTIMIZEFLAG_4) $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) \
- $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
- $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
- $(__GFXCTX_DEFINE_p) /I$(SETUPHDIR) /I.\..\..\..\include /W4 /I. \
- $(__DLLFLAG_p) /D_CONSOLE /DwxUSE_GUI=0 $(__RTTIFLAG_9) \
- $(__EXCEPTIONSFLAG_10) $(CPPFLAGS) $(CXXFLAGS)
-HELPGEN_OBJECTS = \
- $(OBJS)\HelpGen_HelpGen.obj \
- $(OBJS)\HelpGen_cjparser.obj \
- $(OBJS)\HelpGen_docripper.obj \
- $(OBJS)\HelpGen_ifcontext.obj \
- $(OBJS)\HelpGen_markup.obj \
- $(OBJS)\HelpGen_scriptbinder.obj \
- $(OBJS)\HelpGen_sourcepainter.obj \
- $(OBJS)\HelpGen_srcparser.obj
-
-### Conditionally set variables: ###
-
-!if "$(USE_GUI)" == "0"
-PORTNAME = base
-!endif
-!if "$(USE_GUI)" == "1"
-PORTNAME = msw
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-WXDEBUGFLAG = d
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-WXDEBUGFLAG = d
-!endif
-!if "$(UNICODE)" == "1"
-WXUNICODEFLAG = u
-!endif
-!if "$(WXUNIV)" == "1"
-WXUNIVNAME = univ
-!endif
-!if "$(TARGET_CPU)" == "amd64"
-DIR_SUFFIX_CPU = _amd64
-!endif
-!if "$(TARGET_CPU)" == "amd64"
-DIR_SUFFIX_CPU = _amd64
-!endif
-!if "$(TARGET_CPU)" == "ia64"
-DIR_SUFFIX_CPU = _ia64
-!endif
-!if "$(TARGET_CPU)" == "ia64"
-DIR_SUFFIX_CPU = _ia64
-!endif
-!if "$(SHARED)" == "1"
-WXDLLFLAG = dll
-!endif
-!if "$(SHARED)" == "0"
-LIBTYPE_SUFFIX = lib
-!endif
-!if "$(SHARED)" == "1"
-LIBTYPE_SUFFIX = dll
-!endif
-!if "$(TARGET_CPU)" == "amd64"
-LINK_TARGET_CPU = /MACHINE:AMD64
-!endif
-!if "$(TARGET_CPU)" == "amd64"
-LINK_TARGET_CPU = /MACHINE:AMD64
-!endif
-!if "$(TARGET_CPU)" == "ia64"
-LINK_TARGET_CPU = /MACHINE:IA64
-!endif
-!if "$(TARGET_CPU)" == "ia64"
-LINK_TARGET_CPU = /MACHINE:IA64
-!endif
-!if "$(MONOLITHIC)" == "0"
-EXTRALIBS_FOR_BASE =
-!endif
-!if "$(MONOLITHIC)" == "1"
-EXTRALIBS_FOR_BASE =
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_0 = /Zi
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_0 =
-!endif
-!if "$(DEBUG_INFO)" == "0"
-__DEBUGINFO_0 =
-!endif
-!if "$(DEBUG_INFO)" == "1"
-__DEBUGINFO_0 = /Zi
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_1 = /DEBUG
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_1 =
-!endif
-!if "$(DEBUG_INFO)" == "0"
-__DEBUGINFO_1 =
-!endif
-!if "$(DEBUG_INFO)" == "1"
-__DEBUGINFO_1 = /DEBUG
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
-____DEBUGRUNTIME_2_p = /D_DEBUG
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
-____DEBUGRUNTIME_2_p =
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "0"
-____DEBUGRUNTIME_2_p =
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "1"
-____DEBUGRUNTIME_2_p = /D_DEBUG
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
-__DEBUGRUNTIME_3 = d
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
-__DEBUGRUNTIME_3 =
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "0"
-__DEBUGRUNTIME_3 =
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "1"
-__DEBUGRUNTIME_3 = d
-!endif
-!if "$(BUILD)" == "debug"
-__OPTIMIZEFLAG_4 = /Od
-!endif
-!if "$(BUILD)" == "release"
-__OPTIMIZEFLAG_4 = /O2
-!endif
-!if "$(USE_THREADS)" == "0"
-__THREADSFLAG_7 = L
-!endif
-!if "$(USE_THREADS)" == "1"
-__THREADSFLAG_7 = T
-!endif
-!if "$(RUNTIME_LIBS)" == "dynamic"
-__RUNTIME_LIBS_8 = D
-!endif
-!if "$(RUNTIME_LIBS)" == "static"
-__RUNTIME_LIBS_8 = $(__THREADSFLAG_7)
-!endif
-!if "$(USE_RTTI)" == "0"
-__RTTIFLAG_9 =
-!endif
-!if "$(USE_RTTI)" == "1"
-__RTTIFLAG_9 = /GR
-!endif
-!if "$(USE_EXCEPTIONS)" == "0"
-__EXCEPTIONSFLAG_10 =
-!endif
-!if "$(USE_EXCEPTIONS)" == "1"
-__EXCEPTIONSFLAG_10 = /EHsc
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
-__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
-__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
-!endif
-!if "$(WXUNIV)" == "1"
-__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-__DEBUG_DEFINE_p = /D__WXDEBUG__
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-__DEBUG_DEFINE_p = /D__WXDEBUG__
-!endif
-!if "$(USE_EXCEPTIONS)" == "0"
-__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS
-!endif
-!if "$(USE_RTTI)" == "0"
-__RTTI_DEFINE_p = /DwxNO_RTTI
-!endif
-!if "$(USE_THREADS)" == "0"
-__THREAD_DEFINE_p = /DwxNO_THREADS
-!endif
-!if "$(UNICODE)" == "0"
-__UNICODE_DEFINE_p = /DwxUSE_UNICODE=0
-!endif
-!if "$(UNICODE)" == "1"
-__UNICODE_DEFINE_p = /D_UNICODE
-!endif
-!if "$(MSLU)" == "1"
-__MSLU_DEFINE_p = /DwxUSE_UNICODE_MSLU=1
-!endif
-!if "$(USE_GDIPLUS)" == "1"
-__GFXCTX_DEFINE_p = /DwxUSE_GRAPHICS_CONTEXT=1
-!endif
-!if "$(SHARED)" == "1"
-__DLLFLAG_p = /DWXUSINGDLL
-!endif
-!if "$(MONOLITHIC)" == "0"
-__WXLIB_BASE_p = \
- wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-!if "$(MONOLITHIC)" == "1"
-__WXLIB_MONO_p = \
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-!if "$(MSLU)" == "1"
-__UNICOWS_LIB_p = unicows.lib
-!endif
-!if "$(USE_GDIPLUS)" == "1"
-__GDIPLUS_LIB_p = gdiplus.lib
-!endif
-
-
-all: $(OBJS)
-$(OBJS):
- -if not exist $(OBJS) mkdir $(OBJS)
-
-### Targets: ###
-
-all: $(OBJS)\HelpGen.exe
-
-clean:
- -if exist $(OBJS)\*.obj del $(OBJS)\*.obj
- -if exist $(OBJS)\*.res del $(OBJS)\*.res
- -if exist $(OBJS)\*.pch del $(OBJS)\*.pch
- -if exist $(OBJS)\HelpGen.exe del $(OBJS)\HelpGen.exe
- -if exist $(OBJS)\HelpGen.ilk del $(OBJS)\HelpGen.ilk
- -if exist $(OBJS)\HelpGen.pdb del $(OBJS)\HelpGen.pdb
-
-$(OBJS)\HelpGen.exe: $(HELPGEN_OBJECTS)
- link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /pdb:"$(OBJS)\HelpGen.pdb" $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE @<<
- $(HELPGEN_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
-<<
-
-$(OBJS)\HelpGen_HelpGen.obj: .\HelpGen.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) .\HelpGen.cpp
-
-$(OBJS)\HelpGen_cjparser.obj: .\cjparser.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) .\cjparser.cpp
-
-$(OBJS)\HelpGen_docripper.obj: .\docripper.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) .\docripper.cpp
-
-$(OBJS)\HelpGen_ifcontext.obj: .\ifcontext.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) .\ifcontext.cpp
-
-$(OBJS)\HelpGen_markup.obj: .\markup.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) .\markup.cpp
-
-$(OBJS)\HelpGen_scriptbinder.obj: .\scriptbinder.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) .\scriptbinder.cpp
-
-$(OBJS)\HelpGen_sourcepainter.obj: .\sourcepainter.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) .\sourcepainter.cpp
-
-$(OBJS)\HelpGen_srcparser.obj: .\srcparser.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(HELPGEN_CXXFLAGS) .\srcparser.cpp
-
+++ /dev/null
-# =========================================================================
-# This makefile was generated by
-# Bakefile 0.2.3 (http://www.bakefile.org)
-# Do not modify, all changes will be overwritten!
-# =========================================================================
-
-!include ../../../build/msw/config.wat
-
-# -------------------------------------------------------------------------
-# Do not modify the rest of this file!
-# -------------------------------------------------------------------------
-
-# Speed up compilation a bit:
-!ifdef __LOADDLL__
-! loaddll wcc wccd
-! loaddll wccaxp wccdaxp
-! loaddll wcc386 wccd386
-! loaddll wpp wppdi86
-! loaddll wppaxp wppdaxp
-! loaddll wpp386 wppd386
-! loaddll wlink wlink
-! loaddll wlib wlibd
-!endif
-
-# We need these variables in some bakefile-made rules:
-WATCOM_CWD = $+ $(%cdrive):$(%cwd) $-
-
-### Conditionally set variables: ###
-
-PORTNAME =
-!ifeq USE_GUI 0
-PORTNAME = base
-!endif
-!ifeq USE_GUI 1
-PORTNAME = msw
-!endif
-WXDEBUGFLAG =
-!ifeq BUILD debug
-!ifeq DEBUG_FLAG default
-WXDEBUGFLAG = d
-!endif
-!endif
-!ifeq DEBUG_FLAG 1
-WXDEBUGFLAG = d
-!endif
-WXUNICODEFLAG =
-!ifeq UNICODE 1
-WXUNICODEFLAG = u
-!endif
-WXUNIVNAME =
-!ifeq WXUNIV 1
-WXUNIVNAME = univ
-!endif
-WXDLLFLAG =
-!ifeq SHARED 1
-WXDLLFLAG = dll
-!endif
-LIBTYPE_SUFFIX =
-!ifeq SHARED 0
-LIBTYPE_SUFFIX = lib
-!endif
-!ifeq SHARED 1
-LIBTYPE_SUFFIX = dll
-!endif
-EXTRALIBS_FOR_BASE =
-!ifeq MONOLITHIC 0
-EXTRALIBS_FOR_BASE =
-!endif
-!ifeq MONOLITHIC 1
-EXTRALIBS_FOR_BASE =
-!endif
-__DEBUGINFO_0 =
-!ifeq BUILD debug
-!ifeq DEBUG_INFO default
-__DEBUGINFO_0 = -d2
-!endif
-!endif
-!ifeq BUILD release
-!ifeq DEBUG_INFO default
-__DEBUGINFO_0 = -d0
-!endif
-!endif
-!ifeq DEBUG_INFO 0
-__DEBUGINFO_0 = -d0
-!endif
-!ifeq DEBUG_INFO 1
-__DEBUGINFO_0 = -d2
-!endif
-__DEBUGINFO_1 =
-!ifeq BUILD debug
-!ifeq DEBUG_INFO default
-__DEBUGINFO_1 = debug all
-!endif
-!endif
-!ifeq BUILD release
-!ifeq DEBUG_INFO default
-__DEBUGINFO_1 =
-!endif
-!endif
-!ifeq DEBUG_INFO 0
-__DEBUGINFO_1 =
-!endif
-!ifeq DEBUG_INFO 1
-__DEBUGINFO_1 = debug all
-!endif
-__OPTIMIZEFLAG_2 =
-!ifeq BUILD debug
-__OPTIMIZEFLAG_2 = -od
-!endif
-!ifeq BUILD release
-__OPTIMIZEFLAG_2 = -ot -ox
-!endif
-__THREADSFLAG_5 =
-!ifeq USE_THREADS 0
-__THREADSFLAG_5 =
-!endif
-!ifeq USE_THREADS 1
-__THREADSFLAG_5 = -bm
-!endif
-__RUNTIME_LIBS_6 =
-!ifeq RUNTIME_LIBS dynamic
-__RUNTIME_LIBS_6 = -br
-!endif
-!ifeq RUNTIME_LIBS static
-__RUNTIME_LIBS_6 =
-!endif
-__RTTIFLAG_7 =
-!ifeq USE_RTTI 0
-__RTTIFLAG_7 =
-!endif
-!ifeq USE_RTTI 1
-__RTTIFLAG_7 = -xr
-!endif
-__EXCEPTIONSFLAG_8 =
-!ifeq USE_EXCEPTIONS 0
-__EXCEPTIONSFLAG_8 =
-!endif
-!ifeq USE_EXCEPTIONS 1
-__EXCEPTIONSFLAG_8 = -xs
-!endif
-__WXUNIV_DEFINE_p =
-!ifeq WXUNIV 1
-__WXUNIV_DEFINE_p = -d__WXUNIVERSAL__
-!endif
-__DEBUG_DEFINE_p =
-!ifeq BUILD debug
-!ifeq DEBUG_FLAG default
-__DEBUG_DEFINE_p = -d__WXDEBUG__
-!endif
-!endif
-!ifeq DEBUG_FLAG 1
-__DEBUG_DEFINE_p = -d__WXDEBUG__
-!endif
-__EXCEPTIONS_DEFINE_p =
-!ifeq USE_EXCEPTIONS 0
-__EXCEPTIONS_DEFINE_p = -dwxNO_EXCEPTIONS
-!endif
-__RTTI_DEFINE_p =
-!ifeq USE_RTTI 0
-__RTTI_DEFINE_p = -dwxNO_RTTI
-!endif
-__THREAD_DEFINE_p =
-!ifeq USE_THREADS 0
-__THREAD_DEFINE_p = -dwxNO_THREADS
-!endif
-__UNICODE_DEFINE_p =
-!ifeq UNICODE 0
-__UNICODE_DEFINE_p = -dwxUSE_UNICODE=0
-!endif
-!ifeq UNICODE 1
-__UNICODE_DEFINE_p = -d_UNICODE
-!endif
-__GFXCTX_DEFINE_p =
-!ifeq USE_GDIPLUS 1
-__GFXCTX_DEFINE_p = -dwxUSE_GRAPHICS_CONTEXT=1
-!endif
-__DLLFLAG_p =
-!ifeq SHARED 1
-__DLLFLAG_p = -dWXUSINGDLL
-!endif
-__WXLIB_BASE_p =
-!ifeq MONOLITHIC 0
-__WXLIB_BASE_p = &
- wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-__WXLIB_MONO_p =
-!ifeq MONOLITHIC 1
-__WXLIB_MONO_p = &
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-__GDIPLUS_LIB_p =
-!ifeq USE_GDIPLUS 1
-__GDIPLUS_LIB_p = gdiplus.lib
-!endif
-
-### Variables: ###
-
-WX_RELEASE_NODOT = 29
-COMPILER_PREFIX = wat
-OBJS = &
- $(COMPILER_PREFIX)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
-LIBDIRNAME = .\..\..\..\lib\$(COMPILER_PREFIX)_$(LIBTYPE_SUFFIX)$(CFG)
-SETUPHDIR = &
- $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
-HELPGEN_CXXFLAGS = $(__DEBUGINFO_0) $(__OPTIMIZEFLAG_2) $(__THREADSFLAG_5) &
- $(__RUNTIME_LIBS_6) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
- $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) &
- $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) &
- -i=.\..\..\..\include -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 -i=. &
- $(__DLLFLAG_p) -dwxUSE_GUI=0 $(__RTTIFLAG_7) $(__EXCEPTIONSFLAG_8) &
- $(CPPFLAGS) $(CXXFLAGS)
-HELPGEN_OBJECTS = &
- $(OBJS)\HelpGen_HelpGen.obj &
- $(OBJS)\HelpGen_cjparser.obj &
- $(OBJS)\HelpGen_docripper.obj &
- $(OBJS)\HelpGen_ifcontext.obj &
- $(OBJS)\HelpGen_markup.obj &
- $(OBJS)\HelpGen_scriptbinder.obj &
- $(OBJS)\HelpGen_sourcepainter.obj &
- $(OBJS)\HelpGen_srcparser.obj
-
-
-all : $(OBJS)
-$(OBJS) :
- -if not exist $(OBJS) mkdir $(OBJS)
-
-### Targets: ###
-
-all : .SYMBOLIC $(OBJS)\HelpGen.exe
-
-clean : .SYMBOLIC
- -if exist $(OBJS)\*.obj del $(OBJS)\*.obj
- -if exist $(OBJS)\*.res del $(OBJS)\*.res
- -if exist $(OBJS)\*.lbc del $(OBJS)\*.lbc
- -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk
- -if exist $(OBJS)\*.pch del $(OBJS)\*.pch
- -if exist $(OBJS)\HelpGen.exe del $(OBJS)\HelpGen.exe
-
-$(OBJS)\HelpGen.exe : $(HELPGEN_OBJECTS)
- @%create $(OBJS)\HelpGen.lbc
- @%append $(OBJS)\HelpGen.lbc option quiet
- @%append $(OBJS)\HelpGen.lbc name $^@
- @%append $(OBJS)\HelpGen.lbc option caseexact
- @%append $(OBJS)\HelpGen.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt ref 'main_'
- @for %i in ($(HELPGEN_OBJECTS)) do @%append $(OBJS)\HelpGen.lbc file %i
- @for %i in ( $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__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) do @%append $(OBJS)\HelpGen.lbc library %i
- @%append $(OBJS)\HelpGen.lbc
- @for %i in () do @%append $(OBJS)\HelpGen.lbc option stack=%i
- wlink @$(OBJS)\HelpGen.lbc
-
-$(OBJS)\HelpGen_HelpGen.obj : .AUTODEPEND .\HelpGen.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_cjparser.obj : .AUTODEPEND .\cjparser.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_docripper.obj : .AUTODEPEND .\docripper.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_ifcontext.obj : .AUTODEPEND .\ifcontext.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_markup.obj : .AUTODEPEND .\markup.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_scriptbinder.obj : .AUTODEPEND .\scriptbinder.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_sourcepainter.obj : .AUTODEPEND .\sourcepainter.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
-$(OBJS)\HelpGen_srcparser.obj : .AUTODEPEND .\srcparser.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(HELPGEN_CXXFLAGS) $<
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 22/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-#include "markup.h"
-
-static TagStructT htmlTags[] =
-{
- { "<b>","</b>" }, // 0
- { "<i>","</i>" }, // 1
- { "<pre>","</pre>" }, // 2
- { "<font color=\"#000000\">","</font>" }, // 3
- { "<font color=\"#8F0000\">","</font>" }, // 4
- { "<font color=\"#008F00\">","</font>" }, // 5
- { "<font color=\"#0000CF\">","</font>" }, // 6
- { "<p>","</p>" }, // 7
- { "<br>","" }, // 8
- { "<h1>","</h1>" }, // 9
- { "<h2>","</h2>" }, // 10
- { "<h3>","</h3>" }, // 11
- { "<ul>","</ul>" }, // 12
- { "<li>","</li>" }, // 13
-};
-
-MarkupTagsT get_HTML_markup_tags()
-{
- return htmlTags;
-}
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 22/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef __MARKUP_G__
-#define __MARKUP_G__
-
-// indicies for the MarkupTagsT array
-
-#define TAG_BOLD 0
-#define TAG_ITALIC 1
-
-#define TAG_FIXED_FONT 2
-#define TAG_BLACK_FONT 3
-#define TAG_RED_FONT 4
-#define TAG_GREEN_FONT 5
-#define TAG_BLUE_FONT 6
-
-#define TAG_PARAGRAPH 7
-#define TAG_NEW_LINE 8
-#define TAG_HEADING_1 9
-#define TAG_HEADING_2 10
-#define TAG_HEADING_3 11
-
-#define TAG_ITEM_LIST 12
-#define TAG_LIST_ITEM 13
-
-struct TagStructT
-{
- char* start; // tag that starts style
- char* end; // tag that finishes style
-};
-
-// tag array
-typedef TagStructT* MarkupTagsT;
-
-// returns array of TagStructT with tag strings for HTML
-
-MarkupTagsT get_HTML_markup_tags();
-
-// MarkupTagsT get_PostScript_markup_tags();
-// MarkupTagsT get_Latex_markup_tags();
-
-#endif
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 22/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-#ifdef WIN32
-#include <io.h>
-#endif
-
-#include <stdio.h>
-
-#include "markup.h" // get_HTML_markup_tags() will be used
-
-#include "docripper.h"
-#include "cjparser.h" // C++/Java will be parsed here
-
-/***** Main funciton *****/
-
-#ifdef WIN32
-
-// NOTE:: under Windows this generator parses all .h files
-// int the current directory
-
-#include "direct.h"
-
-
-void main(int argc, char** argv)
-{
- cout << "C++/JAVA Source Documentation Generator (\"wxDocRipper\")" << endl
- << "(C) 1998, Aleksandras Gluchovas (mailto:alex@soften.ktu.lt)"
- << endl << endl;
-
-
- RipperDocGen gen;
-
- // set up target script
- gen.SetScriptMarkupTags( get_HTML_markup_tags() );
-
- // setup source langauge
- CJSourceParser* pParser = new CJSourceParser();
-
- gen.Init( pParser );
-
- // read process all files in the current directory
-
- struct _finddata_t c_file; // NT-specific?
- long hFile;
-
- hFile = _findfirst( "*.h", &c_file );
- int total = 0;
-
- while( hFile != -1L )
- {
- gen.ProcessFile( c_file.name );
- ++total;
-
- if ( _findnext( hFile, &c_file ) == -1L )
- break;
- }
-
-
- if ( total )
- {
- cout << endl
- << "*** storing source documenation into ./srcref.html ***"
- << endl << endl;
-
- if ( !gen.SaveDocument( "srcref.html" ) )
-
- cout << "\nERROR: document cannot be saved" << endl;
- }
- else
- {
- cout << "\nno .h files found in this directory - You must be running Windows now :-)"
- << endl;
- return;
- }
-
-
- printf( "\nTotal %d file(s) processed, done.\n", total );
-}
-
-
-#else
-
-// NOTE:: on platfroms other then Windows this generator parses all files
-// given from the command line
-
-int main(int argc, char** argv)
-{
- cout << "C++/JAVA Source Documentation Generator (\"wxDocRipper\")" << endl
- << "(C) 1998, Aleksandras Gluchovas (mailto:alex@soften.ktu.lt)"
- << endl << endl;
-
- if ( argc < 2 )
- {
- cout << "Usage: list of files with .h, .hpp, .cpp or .java extentions"
- << endl;
- return 1;
- }
-
- int from = 1, no_dump = 0;
-
- if ( strcmp( argv[1], "-x" ) == 0 )
- {
- from = 2;
- no_dump = 1;
- }
-
- RipperDocGen gen;
-
- // set up target script
- gen.SetScriptMarkupTags( get_HTML_markup_tags() );
-
- // setup source langauge
- CJSourceParser* pParser = new CJSourceParser();
-
- gen.Init( pParser );
-
- for( int i = from; i != argc; ++i )
-
- gen.ProcessFile( argv[i] );
-
- if ( !no_dump )
- {
- cout << endl
- << "*** storing source documenation into ./srcref.html ***"
- << endl << endl;
-
- if ( !gen.SaveDocument( "srcref.html" ) )
-
- cout << "\nERROR: document cannot be saved" << endl;
- }
-
- printf( "\nTotal %d file(s) processed, done.\n", argc-from );
-
- return 0;
-}
-
-#endif
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 22/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-#include <string.h>
-#include <memory.h>
-
-#include <stdio.h> // import sprintf() (for doubles)
-#include <stdlib.h> // import atoi() (for integers)
-
-#include "scriptbinder.h"
-
-// helper functions
-
-static size_t wx_log2(size_t nr)
-{
- size_t tmp = 0;
- while (nr >= 2 )
- {
- nr /= 2;
- ++tmp;
- }
-
- return tmp;
-}
-
-/***** Implementation for class ScriptStream *****/
-
-ScriptStream::ScriptStream()
- : m_pBuf(0),
- m_Size(0),
- m_Capacity(0)
-{}
-
-ScriptStream::~ScriptStream()
-{
- if ( m_pBuf ) delete m_pBuf;
-}
-
-void ScriptStream::WriteBytes( const void* srcBuf, size_t count )
-{
- if ( !count ) return;
-
- // increase the capacity if necessary
- if ( m_Size + count > m_Capacity )
- {
- m_Capacity =
- ( 0x2 << (wx_log2( m_Size + count ) + 1 ) );
-
- if ( m_Capacity < 128 ) m_Capacity = 128;
-
- char* oldBuf = m_pBuf;
-
- m_pBuf = new char[m_Capacity];
-
- if ( oldBuf )
- {
- memcpy( m_pBuf, oldBuf, m_Size );
- delete oldBuf;
- }
- }
-
- // append new data
- memcpy( &m_pBuf[m_Size], srcBuf, count );
-
- m_Size += count;
-}
-
-ScriptStream& ScriptStream::operator<<( const char* str )
-{
- WriteBytes( str, strlen( str ) );
-
- return *this;
-}
-
-ScriptStream& ScriptStream::operator<<( const wxString& str )
-{
- if ( str.length() < 512 )
- {
- char buf[512];
- size_t len = str.length();
-
- for( size_t i = 0; i != len; ++i )
- buf[i] = str[i];
-
- WriteBytes( buf, len );
- }
- else
- WriteBytes( str.c_str(), str.length() );
-
- return *this;
-}
-
-ScriptStream& ScriptStream::operator<<( char ch )
-{
- WriteBytes( &ch, 1 );
-
- return *this;
-}
-
-void ScriptStream::endl()
-{
- char ch = '\n';
- WriteBytes( &ch, 1 );
-}
-
-/***** Implementation for class ScriptTemplate *****/
-
-ScriptTemplate::ScriptTemplate( const wxString& templateText )
-{
- wxString tmp = templateText;
-
- m_TText = (char*)malloc( tmp.length() + 1 );
-
- strcpy( m_TText, tmp.c_str() );
-}
-
-ScriptTemplate::~ScriptTemplate()
-{
- for( size_t i = 0; i != m_Vars.size(); ++i )
-
- delete m_Vars[i];
-
- free( m_TText );
-}
-
-bool ScriptTemplate::HasVar( const char* name )
-{
- for( size_t i = 0; i != m_Vars.size(); ++i )
-
- if ( strcmp( m_Vars[i]->m_Name, name ) == 0 )
-
- return 1;
-
- return 0;
-}
-
-void ScriptTemplate::AddStringVar ( const char* name, int ofs )
-{
- m_Vars.push_back( new TVarInfo( name, ofs, TVAR_STRING ) );
-}
-
-void ScriptTemplate::AddIntegerVar( const char* name, int ofs )
-{
- m_Vars.push_back( new TVarInfo( name, ofs, TVAR_INTEGER ) );
-}
-
-void ScriptTemplate::AddDoubleVar ( const char* name, int ofs )
-{
- m_Vars.push_back( new TVarInfo( name, ofs, TVAR_DOUBLE ) );
-}
-
-void ScriptTemplate::AddObjectRefArray( const char* name,
- int ofsRefToFirstObj,
- int ofsObjSizeInt,
- int ofsObjRefTempl
- )
-{
- TArrayInfo* pInfo = new TArrayInfo( name );
-
- m_Vars.push_back( pInfo );
-
- pInfo->m_RefOfs = ofsRefToFirstObj;
- pInfo->m_SizeIntOfs = ofsObjSizeInt;
- pInfo->m_ObjRefTemplOfs = ofsObjRefTempl;
-}
-
-inline void ScriptTemplate::PrintVar( TVarInfo* pInfo,
- void* dataObj,
- ScriptStream& stm )
-{
- char buf[128];
-
- switch ( pInfo->m_Type )
- {
- case TVAR_INTEGER :
- {
- sprintf(buf, "%d",*( (int*) ((char*)dataObj + pInfo->m_Ofs) ) );
-
- stm.WriteBytes( buf, strlen(buf ) );
- break;
- }
-
- case TVAR_STRING :
- {
- wxString& str = *( (wxString*) ((char*)dataObj+pInfo->m_Ofs) );
-
- const char* cs = str.c_str();
-#ifdef DEBUG_WEIRED_OFFSETS
- cout << "DBG:: cs address is " << (int)cs << endl;
- cout << "DBG:: str address is " << (int)(&str) << endl;
- cout << "DBG:: dataObj points to " << (int)dataObj << endl;
- cout << "DBG:: pInfo->m_Ofs value is " << (int)pInfo->m_Ofs << endl;
- cout << "DBG:: d+pInfo->m_Ofs is " << (int)((char*)dataObj + pInfo->m_Ofs) << endl;
- cout << "DBG:: pInfo->m_Name is " << pInfo->m_Name << endl;
- cout << "DBG:: pInfo->m_Type is " << pInfo->m_Type << endl;
- cout << "DBG:: end of dump. " << endl;
-
- cout << "DBG:: cs value is " << endl << cs << endl;
-#endif
- stm.WriteBytes( cs, strlen(cs) );
- break;
- }
-
- case TVAR_DOUBLE :
- {
- sprintf( buf, "%f",
- *( (double*)( (char*)dataObj+pInfo->m_Ofs) ) );
-
- stm.WriteBytes( buf, strlen(buf ) );
- break;
- }
-
- case TVAR_REF_ARRAY :
- {
- TArrayInfo& info = *((TArrayInfo*)pInfo);
-
- int sz = *((int*) ( (char*)dataObj+info.m_SizeIntOfs ));
- if ( !sz )
- {
- // DBG::
- int u = 0;
- ++u;
- break;
- }
-
- int* array = *((int**)( (char*)dataObj+info.m_RefOfs ));
-
- ScriptTemplate* pRefTempl;
-
- for( int i = 0; i != sz; ++i )
- {
- pRefTempl =
- *((ScriptTemplate**)((char*)(array[i])+info.m_ObjRefTemplOfs));
-
- pRefTempl->PrintScript( (void*)array[i], stm );
- }
-
- break;
- }
-
- default : break;
- }
-}
-
-void ScriptTemplate::PrintScript( void* dataObj, ScriptStream& stm )
-{
- char* cur = m_TText;
-
- // template parsing loop
- do
- {
- char* start = cur;
-
- while( *cur != '\0' && *cur != '$' ) ++cur;
-
- // flush text collected between variables
- stm.WriteBytes( start, cur - start );
-
- if ( *cur == '\0' ) break;
-
- cur += 2; // skip to the name of the var
-
- start = cur;
-
- while( *cur != ')' ) ++cur;
-
- // put terminating zero temorarely
-
- *cur = '\0';
-
- // look up variable
-
- size_t sz = m_Vars.size();
- // bool found = false;
-
- for( size_t i = 0; i != sz; ++i )
- {
- if ( strcmp( m_Vars[i]->m_Name, start ) == 0 )
- {
- PrintVar( m_Vars[i], dataObj, stm );
-
- *cur = ')'; // remove terminating zero
- ++cur;
- // found = 1;
- break;
- }
- }
-
- // variable referred by template script is not
- // registered to this tempalte object
- // ASSERT( found );
-
- } while(1);
-}
-
-/***** implementation for class ScriptSection *****/
-
-int ScriptSection::m_IdCounter = 0;
-
-ScriptSection::ScriptSection( const wxString& name,
- const wxString& body,
- ScriptTemplate* pSectionTemplate,
- ScriptTemplate* pReferenceTemplate,
- bool autoHide,
- bool sorted
- )
- : m_pParent ( NULL ),
-
- m_Name ( name ),
- m_Body ( body ),
-
- m_AutoHide ( autoHide ),
- m_SortOn ( sorted ),
-
- m_pSectTempl( pSectionTemplate ),
- m_pRefTempl ( pReferenceTemplate ),
-
- m_RefCount( 0 ),
- m_ArrSize( 0 )
-{
- // generate GUID
-
- wxChar buf[32];
- wxSprintf( buf, _T("%d"), ++m_IdCounter );
- m_Id = buf;
-}
-
-ScriptSection::~ScriptSection()
-{
- SectListT lst = m_Subsections;
-
- while( m_Subsections.size() )
-
- m_Subsections[0]->RemoveRef();
-
- for( size_t i = 0; i != m_References.size(); ++i )
-
- m_References[i]->RemoveRef();
-}
-
-void ScriptSection::AddRef()
-{
- ++m_RefCount;
-}
-
-void ScriptSection::RemoveRef()
-{
- if ( !m_RefCount || !(--m_RefCount) )
- {
- if (m_pParent)
- {
- // remove ourselves from parent's list
-
- SectListT& lst = m_pParent->m_Subsections;
- for( size_t i = 0; i != lst.size(); ++i )
-
- if ( lst[i] == this )
- {
- lst.erase( &lst[i] );
- break;
- }
- }
-
- delete this;
- }
-}
-
-ScriptSection* ScriptSection::GetSubsection( const char* name )
-{
- // FOR NOW:: fixed section name length
- char buf[128];
-
- size_t cur = 0;
-
- while( name[cur] && name[cur] != '/' )
- {
- buf[cur] = name[cur];
- ++cur;
- }
-
- // ASSERT( cur < sizeof(buf) );
-
- buf[cur] = '\0';
-
- size_t sz = m_Subsections.size();
-
- for( size_t i = 0; i != sz; ++i )
- {
- // DBG::
- //ScriptSection& sect = *m_Subsections[i];
-
- if ( m_Subsections[i]->m_Name == buf )
- {
- if ( name[cur] == '/' )
-
- // search recursivelly
- return m_Subsections[i]->GetSubsection( &name[cur+1] );
- else
- return m_Subsections[i];
- }
- }
-
- return 0;
-}
-
-void ScriptSection::AddSection( ScriptSection* pSection,
- bool addToReferencesToo
- )
-{
- m_Subsections.push_back( pSection );
-
- pSection->AddRef();
-
- // can add section to multiple containers
- // ASSERT( pSection->m_pParent == 0 );
-
- pSection->m_pParent = this;
-
- if ( addToReferencesToo )
-
- AddReference( pSection );
-}
-
-void ScriptSection::AddReference( ScriptSection* pReferredSection )
-{
- m_References.push_back( pReferredSection );
-
- pReferredSection->AddRef();
-
- // set up mandatory fields used by ScriptTemplate
- m_ArrSize = m_References.size();
- if ( m_ArrSize )
- m_RefFirst = (void*)&m_References[0];
-}
-
-SectListT& ScriptSection::GetSubsections()
-{
- return m_Subsections;
-}
-
-// static method:
-void ScriptSection::RegisterTemplate( ScriptTemplate& sectionTempalte )
-{
- int nameOfs, bodyOfs, idOfs,
- arrRefOfs, arrSizeOfs, refTemplOfs;
-
- // obtaining offsets of member vars
-
- GET_VAR_OFS( ScriptSection, m_Name, &nameOfs )
- GET_VAR_OFS( ScriptSection, m_Body, &bodyOfs )
- GET_VAR_OFS( ScriptSection, m_Id, &idOfs )
- GET_VAR_OFS( ScriptSection, m_RefFirst,&arrRefOfs )
- GET_VAR_OFS( ScriptSection, m_ArrSize, &arrSizeOfs )
-
- GET_VAR_OFS( ScriptSection, m_pRefTempl, &refTemplOfs )
-
- // registering member variables with given script template
-
- sectionTempalte.AddStringVar( "NAME", nameOfs );
- sectionTempalte.AddStringVar( "BODY", bodyOfs );
- sectionTempalte.AddStringVar( "ID", idOfs );
-
- sectionTempalte.AddObjectRefArray( "REFLIST",
- arrRefOfs, arrSizeOfs, refTemplOfs );
-}
-
-void ScriptSection::Print( ScriptStream& stm )
-{
- // TBD:: sorting
-
- // print out this content first
- if ( m_pSectTempl )
-
- m_pSectTempl->PrintScript( this, stm );
-
- // attach contents subsections at the end of this content
-
- for( size_t i = 0; i != m_Subsections.size(); ++i )
-
- m_Subsections[i]->Print( stm );
-}
-
-void ScriptSection::DoRemoveEmptySections(int& nRemoved, SectListT& removedLst)
-{
- for( size_t i = 0; i != m_Subsections.size(); ++i )
- {
- ScriptSection& sect = *m_Subsections[i];
-
- sect.DoRemoveEmptySections( nRemoved, removedLst );
-
- if (sect.m_AutoHide )
-
- if ( sect.m_References.size() == 0 )
- {
- bool found = false;
- for( size_t k = 0; k != removedLst.size(); ++k )
-
- if ( removedLst[k] == § )
- {
- found = 1;
- break;
- }
-
- if ( !found )
- {
- removedLst.push_back( § );
- ++nRemoved;
-
- delete §
- --i;
- }
- }
- }
-}
-
-void ScriptSection::DoRemoveDeadLinks( SectListT& removedLst)
-{
- size_t dsz = removedLst.size();
-
- for( size_t i = 0; i != m_Subsections.size(); ++i )
- {
- m_Subsections[i]->DoRemoveDeadLinks( removedLst );
- }
-
- for( size_t n = 0; n != m_References.size(); ++n )
- {
- for( size_t k = 0; k != dsz; ++k )
-
- if ( removedLst[k] == m_References[n] )
- {
- m_References.erase( &m_References[n] );
- --n;
-
- // set up mandatory fields used by ScriptTemplate
- m_ArrSize = m_References.size();
- if ( m_ArrSize )
- m_RefFirst = (void*)&m_References[0];
-
- break;
- }
- }
-}
-
-
-void ScriptSection::RemoveEmptySections()
-{
- // FIXME:: this is very_very_very slow alg.! +"doesn't work"
-
- int nRemoved = 0;
-
- do
- {
- SectListT removedLst;
- nRemoved = 0;
-
- DoRemoveEmptySections( nRemoved, removedLst );
-
- DoRemoveDeadLinks( removedLst );
- }
- while( nRemoved );
-}
-
-/***** Iimplementation for class DocGeneratorBase *****/
-
-bool DocGeneratorBase::SaveDocument( const char* fname,
- const char* fopenOptions,
- ScriptSection* pFromSection
- )
-{
- FILE* fp = fopen( fname, fopenOptions );
-
- if ( !fp ) return 0;
-
- ScriptStream stm;
-
- // check if derived class agrees about saving it
- if ( !OnSaveDocument( stm ) ) return 0;
-
- if ( pFromSection )
-
- pFromSection->Print( stm );
- else
- {
- ScriptSection* pTopSect = GetTopSection();
- // ASSERT( pTopSect );
- pTopSect->Print( stm );
- }
-
- size_t nWrite = fwrite( stm.GetBuf(), 1, stm.GetBufSize(), fp );
-
- if ( nWrite != stm.GetBufSize() ) return 0;
-
- fclose( fp );
-
- return 1;
-
- // that^s it
-}
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 22/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef __SCRIPTBINDER_G__
-#define __SCRIPTBINDER_G__
-
-#if defined( wxUSE_TEMPLATE_STL )
-
- #include <vector>
-
- #ifdef WIN32
- #include <bstring.h>
- #else
- #include <strclass.h>
- #include <string.h>
- #endif
-
-#else
-
- #include "wxstlvec.h"
- #include "wx/string.h"
-
-#endif
-
-#ifndef ASSERT
-// assert yourself
-#define ASSERT(x) if (!(x) ) throw;
-#endif
-
-#include "markup.h"
-
-// just another portable stream class...
-
-class ScriptStream
-{
-protected:
- char* m_pBuf;
- size_t m_Size;
- size_t m_Capacity;
-public:
- ScriptStream();
- ~ScriptStream();
-
- void WriteBytes( const void* srcBuf, size_t count );
-
- ScriptStream& operator<<( const char* str );
- ScriptStream& operator<<( const wxString& str );
- ScriptStream& operator<<( char ch );
-
- void endl();
-
- inline char* GetBuf() { return m_pBuf; }
- inline size_t GetBufSize() { return m_Size; }
-
- // clears current contents of the stream
- void Reset() { m_Size = 0; }
-};
-
-
-class ScriptTemplate;
-
-// used internally by ScriptTemplate
-
-enum TEMPLATE_VARIABLE_TYPES
-{
- TVAR_INTEGER,
- TVAR_STRING,
- TVAR_DOUBLE,
- TVAR_REF_ARRAY
-};
-
-// helper structures used only by ScriptTemplate
-
-struct TVarInfo
-{
-public:
- const char* m_Name;
- int m_Type;
- int m_Ofs;
-
- TVarInfo( const char* name, int ofs, int varType )
- : m_Name(name),
- m_Type( varType ),
- m_Ofs( ofs )
- {}
-};
-
-struct TArrayInfo : public TVarInfo
-{
-public:
- int m_RefOfs;
- int m_SizeIntOfs;
- int m_ObjRefTemplOfs;
-
- TArrayInfo( const char* name )
- : TVarInfo( name, 0, TVAR_REF_ARRAY )
- {}
-};
-
-// stores offset of the given member (of the given class)
-// to (*pOfs), though the use of template classes would have
-// solved this problem in much clearer fashion
-
-// FOR NOW:: obtaining physical offset of class member
-// does not appeare to be protable across compilers?
-// FIXME:: +/- 1 problem
-
-#ifdef __UNIX__
- #define WEIRD_OFFSET 1
-#else
- #define WEIRD_OFFSET 0
-
-#endif
-
-#define GET_VAR_OFS( className, varName, pOfs ) \
- { \
- int* className::* varPtr; \
- varPtr = (int* className::*)&className::varName; \
- \
- (*pOfs) = int(*(int*)&varPtr)-WEIRD_OFFSET; \
- }
-
-class ScriptSection;
-
-#if defined( wxUSE_TEMPLATE_STL )
-
- typedef vector<TVarInfo*> TVarListT;
-
- // container class for sections
- typedef vector<ScriptSection*> SectListT;
-
-#else
-
- typedef TVarInfo* TVarInfoPtrT;
- typedef ScriptSection* ScriptSectionPtrT;
-
- typedef WXSTL_VECTOR_SHALLOW_COPY(TVarInfoPtrT) TVarListT;
-
- // container class for sections
- typedef WXSTL_VECTOR_SHALLOW_COPY(ScriptSectionPtrT) SectListT;
-
-#endif
-
-// class performs preprocessing of arbitrary scripts,
-// replaces identifiers enclosed in $(..) tag, whith
-// values of the corresponding class member variables
-
-class ScriptTemplate
-{
-protected:
- // do not use wxString object here - parsing of
- // C string can be much faster (in debug v.)
- char* m_TText;
-
- TVarListT m_Vars;
-
- inline void PrintVar( TVarInfo* pInfo,
- void* dataObj,
- ScriptStream& stm );
-
-public:
- ScriptTemplate( const wxString& templateText );
- virtual ~ScriptTemplate();
-
- bool HasVar( const char* name );
-
- // Member variables registration methods.
-
- // NOTE:: GET_VAR_OFS() macro should be used
- // to get offset of the class member (see #define above)
- void AddStringVar ( const char* name, int ofs );
- void AddIntegerVar( const char* name, int ofs );
- void AddDoubleVar ( const char* name, int ofs );
-
- void AddObjectRefArray( const char* name,
- int ofsRefToFirstObj,
- int ofsObjSizeInt,
- int ofsObjRefTempl
- );
-
- // reads the script, replaces $(..) tags with values
- // of registered members of dataObj object, and outputs
- // the result to given text stream
-
- void PrintScript( void* dataObj, ScriptStream& stm );
-};
-
-class ScriptSection;
-
-// class manages section and aggregated sections of
-// inter-linked documents
-
-class ScriptSection
-{
-protected:
-
- // NOTE:: "$(NAME)", $(ID), "$(BODY)" and "$(REFLIST)" are
- // reseved template variables of ScriptSection
-
- // the below there members are registered to ScriptTemplate,
- // GUID within the section tree (numeric)
-
- ScriptSection* m_pParent;
- wxString m_Id; // $(ID)
- wxString m_Name;// $(NAME)
- wxString m_Body; // $(BODY)
-
- // NULL, if this section is not aggregated anywhere
-
- SectListT m_Subsections; // aggregated sectons
- SectListT m_References; // registered as $(REFLIST)
-
- bool m_AutoHide; // see autoHide arg, in constructor
- bool m_SortOn; // true, if sort subsectons by naem
-
- // tempalte for this section
- ScriptTemplate* m_pSectTempl;
-
- // template used for links (or references) to this section
- ScriptTemplate* m_pRefTempl;
-
- // do not call destructor of this object,
- // call RemoveRef() instead
- int m_RefCount;
-
- static int m_IdCounter; // generator of GUIDs
-
- // fields registered and used by ScriptTemplate object
- void* m_RefFirst;
- int m_ArrSize;
-
-protected:
- virtual void AddRef();
- virtual void RemoveRef();
- void DoRemoveEmptySections(int& nRemoved, SectListT& removedLst);
- void DoRemoveDeadLinks( SectListT& removedLst);
-
-public:
-
- // NOTE:: pass NULL to certain template, if your sure
- // this kind of template will never be used,
- // e.g. if section is contained but never referrenced,
- // then pReferenceTemplate can be NULL
-
- // if autoHide option is true, the section will be automatically
- // collapsed (not shown) if it doesn't contain any references
- // to other sections (e.g. could be usefull for autoamically
- // hiding empty index-sections).
-
- ScriptSection( const wxString& name = wxEmptyString,
- const wxString& body = wxEmptyString,
- ScriptTemplate* pSectionTemplate = NULL,
- ScriptTemplate* pReferenceTemplate = NULL,
- bool autoHide = false,
- bool sorted = false
- );
-
- // calls RemoveRef() to all aggreagated sections first,
- // then to all referenced section - this way all
- // sections (even not aggregated ones) become "garbage-collected"
-
- // NOTE:: do not call destructor directlly, call RemoveRef()
- // instead
- virtual ~ScriptSection();
-
-
- // if addToReferencesToo is true, section is aggregated and
- // also added to reference list of this section
-
- void AddSection( ScriptSection* pSection, bool addToReferencesToo = false );
-
- // add cross-reference to this given section
- void AddReference( ScriptSection* pReferredSection );
-
- // subsection may be given of variable depth level,
- // e.g. "publications/reviews/software"
-
- ScriptSection* GetSubsection( const char* name );
-
- // returns list aggregated sections
- SectListT& GetSubsections();
-
- // binds reserved template names ( $(..) ) to member
- // vairalbes in the ScriptSection class, should be called
- // to initialize each user-code provided script template
-
- static void RegisterTemplate( ScriptTemplate& sectionTempalte );
-
- // prints out section tree to the stream, starting from
- // this section as a root node
- virtual void Print( ScriptStream& stm );
-
- // searches empty sections which has autoHide == true,
- // and colapses them (this method should be called )
- // on the root-section of the sections tree
-
- // NOTE:: does not work properly, yet!
- void RemoveEmptySections();
-};
-
-// base class for documnetation generators
-// (allows user code set up target script type,
-// independently of documentation type)
-
-class DocGeneratorBase
-{
-protected:
- MarkupTagsT m_Tags;
-
- // override this method to do some post processing
- // after generation of document, or even write some
- // data into output stream, before the section tree
- // is flushed into it.
-
- // return false, if something has gone wrong and
- // document cannot be saved now
-
- virtual bool OnSaveDocument( ScriptStream& WXUNUSED(stm) )
- { return 1; }
-
- // override this method to provide reference to
- // the top section of the document (used as default
- // starting section when saving a document)
-
- virtual ScriptSection* GetTopSection()
- { return 0; }
-
-public:
-
- DocGeneratorBase()
- : m_Tags(0) // no defaul script
- {}
-
- // dectrouctors of polymorphic classes SHOULD be virtual
- virtual ~DocGeneratorBase() {}
-
- // returns tags, being used for specific target script
- MarkupTagsT GetScriptMarkupTags() { return m_Tags; }
-
- // sets tag array for specific script
-
- // NOTE:: Why virtual? since approach with MarkupTagsT is
- // "flowless" only in theory. Overriding this method
- // allows document generators to check the type of the
- // target script, and perhaps make some modifications
- // to generator's tamplates, to match the specific script
-
- virtual void SetScriptMarkupTags( MarkupTagsT tags )
- { m_Tags = tags; }
-
- // seves document to file starting from the root-node of
- // the document (provided by GetTopSection() method),
- // or from "pFromSection" if it's not NULL.
-
- // fopenOptions arg. is string passed to fopen() method,
- // returns true, if saving was successful
-
- virtual bool SaveDocument( const char* fname,
- const char* fopenOptions = "w",
- ScriptSection* pFromSection = NULL
- );
-
-};
-
-#endif
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 22/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-#if defined( wxUSE_TEMPLATE_STL )
-# include <map>
-#else
-# include "wxstlac.h"
-#endif
-
-#include "sourcepainter.h"
-
-const int MAX_KEYWORD_LEN = 16;
-
-struct KeywordT
-{
- char keyWord[MAX_KEYWORD_LEN];
- int rank;
-};
-
-// source fragment ranks :
-
-// 0 - nomral text
-// 1 - basic types
-// 2 - reserved words
-
-// multil-language keywords map
-
-static KeywordT __gKeyWords[] =
-{
- { "for", 1 },
- { "FOR", 1 },
- { "For", 1 },
-
- { "next", 1 },
- { "Next", 1 },
- { "NEXT", 1 },
-
- { "if", 1 },
- { "If", 1 },
- { "IF", 1 },
-
- { "then", 1 },
- { "Then", 1 },
- { "THEN", 1 },
-
- { "else", 1 },
- { "Else", 1 },
- { "ELSE", 1 },
-
- { "do", 1 },
- { "Do", 1 },
- { "DO", 1 },
-
-
- { "break", 1 },
- { "Break", 1 },
- { "BREAK", 1 },
-
- { "continue", 1 },
-
- { "goto", 1 },
- { "Goto", 1 },
- { "GOTO", 1 },
-
- { "switch", 1 },
- { "default", 1 },
- { "case", 1 },
-
- { "repeat", 1 },
- { "Repeat", 1 },
- { "REPEAT", 1 },
-
- { "until", 1 },
- { "Until", 1 },
- { "UNTIL", 1 },
-
- { "return", 1 },
- { "Return", 1 },
- { "RETURN", 1 },
-
- { "unit", 1 },
- { "Unit", 1 },
- { "UNIT", 1 },
-
- { "procedure", 1 },
- { "Procedure", 1 },
- { "PROCEDURE", 1 },
-
- { "function", 1 },
- { "Function", 1 },
- { "FUNCTION", 1 },
-
- { "begin", 1 },
- { "Begin", 1 },
- { "BEGIN", 1 },
-
- { "End", 1 },
- { "END", 1 },
-
- ////////////////////////////////////////////////////
-
- { "enum", 1 },
- { "static", 1 },
- { "const", 1 },
- { "mutable", 1 },
- { "volatile", 1 },
- { "__asm", 1 },
- { "asm", 1 },
-
- { "typeid", 1 },
- { "sizeof", 1 },
- { "typeof", 1 },
-
-
- { "native", 1 },
-
- { "#include", 1 },
- { "#define", 1 },
- { "#def", 1 },
- { "#undef", 1 },
- { "#ifdef", 1 },
- { "#ifndef", 1 },
- { "#if", 1 },
- { "#endif", 1 },
- { "#elif", 1 },
- { "#else", 1 },
- { "#pragma", 1 },
- { "#line", 1 },
-
- { "package", 1 },
- { "import", 1 },
- { "export", 1 },
-
- ////////////////////////////////////////////////////
-
- { "dynamic_cast", 1 },
- { "const_cast", 1 },
-
- //////// some hacks for VB /////////
-
- { "sub", 1 },
- { "Sub", 1 },
- { "SUB", 1 },
- { "as", 1 },
- { "As", 1 },
- { "AS", 1 },
-
- /////// data types ///////
-
- { "int" , 1 },
- { "integer", 1 },
- { "Integer", 1 },
- { "INTEGER", 1 },
-
- { "real", 1 },
- { "Real", 1 },
- { "REAL", 1 },
-
- { "float", 1 },
- { "Float", 1 },
- { "FLOAT", 1 },
-
- { "char", 1 },
- { "Char", 1 },
- { "CHAR", 1 },
-
- { "register", 1 },
-
- { "string", 1 },
- { "String", 1 },
- { "STRING", 1 },
-
- { "array", 1 },
- { "Array", 1 },
- { "ARRAY", 1 },
-
- { "packed", 1 },
- { "Packed", 1 },
- { "PACKED", 1 },
-
- { "property", 1 },
- { "Property", 1 },
- { "PROPERTY", 1 },
-
- { "unsigned", 1 },
-
- { "long", 1 },
- { "double", 1 },
- { "short", 1 },
- { "bool", 1 },
-
- { "longint", 1 },
- { "Longint", 1 },
- { "LONGINT", 1 },
-
- { "extended", 1 },
- { "Extended", 1 },
- { "EXTENTED", 1 },
-
- { "pointer", 1 },
- { "Pointer", 1 },
- { "POINTER", 1 },
-
- { "and", 1 },
- { "And", 1 },
- { "AND", 1 },
- { "or", 1 },
- { "Or", 1 },
- { "OR", 1 },
- { "xor", 1 },
- { "Xor", 1 },
- { "XOR", 1 },
-
- { "void", 1 },
- { "__stdcall", 1 },
- { "__declspec", 1 },
- { "extern", 1 },
- { "stdcall", 1 },
- { "dllimport", 1 },
- { "dllexport", 1 },
- { "__cdecl", 1 },
- { "cdecl", 1 },
- { "template", 1 },
- { "typedef", 1 },
- { "naked", 1 },
-
- { "try", 1 },
- { "catch", 1 },
- { "throw", 2 }, // C++
- { "throws", 1 }, // Java
-
-
- { "finalize", 1 },
-
- // "STL-suport"
-
- { "size_t", 1 },
- { "NPOS", 1 },
- { "vector", 1 },
- { "list", 1 },
- { "map", 1 },
- { "multimap", 1 },
-
- { "external", 1 },
- { "External", 1 },
- { "EXTERNAL", 1 },
-
- //////////// meta-information //////////////
-
- { "virtual", 2 },
- { "Virtual", 2 },
-
- { "override", 2 },
- { "Override", 2 },
-
- { "class", 2 },
- { "Class", 2 },
- { "CLASS", 2 },
-
- { "struct", 2 },
- { "union", 2 },
-
- { "record", 2 },
- { "Record", 2 },
- { "RECORD", 2 },
-
- { "form", 1 },
- { "Form", 1 },
- { "FORM", 1 },
-
- { "namespace", 2 },
-
- { "interface" , 2 },
- { "abstract", 2 },
-
- { "Interface" , 2 },
- { "INTERFACE" , 2 },
-
- { "implementation", 2 },
- { "Implementation", 2 },
- { "IMPLEMENTATION", 2 },
-
- { "label", 2 },
- { "Label", 2 },
- { "LABEL", 2 },
-
- { "implements", 2 },
-
- { "public", 2 },
- { "private", 2 },
- { "protected", 2 },
-
- { "this", 2 },
- { "This", 2 },
- { "THIS", 2 },
-
- { "new", 2 },
- { "New", 2 },
- { "NEW", 2 },
-
- { "delete", 2 },
- { "inline", 2 },
-
- { "operator", 2 },
-
- { "Inherited", 2 },
- { "Inherited", 2 },
-
- { "final", 2 },
- { "implements", 2 },
- { "super", 2 },
-
- // even more...
- { "java", 2 },
- { "Java", 2 },
- { "JAVA", 2 },
- { "delphi", 2 },
- { "Delphi", 2 },
- { "SmallTalk", 2 },
- { "Smalltalk", 2 },
- { "smalltalk", 2 },
- { "assembler", 2 },
- { "Assembler", 2 },
- { "Basic", 2 },
- { "BASIC", 2 },
- { "basic", 2 },
- { "CORBA", 2 },
- { "COBOL", 2 },
- { "ADA", 2 },
- { "LISP", 2 },
-
- // just for fun...
- { "life", 2 },
- { "sucks", 2 },
- { "rules", 2 },
- { "Quake", 2 },
- { "QuakeWorld", 2 },
- { "[ag_slammer]",2 },
- { "Aleksandras", 2 },
- { "Gluchovas" , 2 },
- { "Alex", 2 },
- { "alex", 2 },
- { "aleks", 2 },
- { "aleksas", 3 },
- { "AlexSoft", 2 },
- { "Alexsoft", 2 },
- { "SpringSky", 2 },
- { "SK_Team", 2 },
- { "soften", 2 },
- { "UB40", 2 },
- { "U96", 2 }
-};
-
-struct less_c_str
-{
- inline bool operator()( char* x, char* y) const
- { return ( strcmp( x,y ) < 0 );
- }
-};
-
-#if defined( wxUSE_TEMPLATE_STL )
-
- typedef map< char*, char*, less_c_str > KeywordMapT;
-
-#else
-
- typedef char* CharPtrT;
- typedef WXSTL_MAP( CharPtrT, CharPtrT ,less_c_str) KeywordMapT;
-
-#endif
-
-static KeywordMapT __gMultiLangMap;
-static int __gMapReady = 0;
-
-void check_keyword_map( int WXUNUSED(keywordMapNr) )
-{
- if ( !__gMapReady )
- {
- __gMapReady = 1;
-
- // "make sure" the address of the first member of non-polimorphic class
- // coinsides with the address of the instance
-
-/*
- KeywordT dummy;
-
- if ( (char*)& dummy != &dummy.keyWord[0] )
- throw;
-*/
-
- int size = sizeof(__gKeyWords) / sizeof( KeywordT );
-
- for( int i = 0; i != size; ++i )
-
- __gMultiLangMap.insert(
- KeywordMapT::value_type( (char*)&__gKeyWords[i],
- (char*)&__gKeyWords[i]
- )
- );
- }
-}
-
-int get_rank( char* start, char* end )
-{
- // FIXME:: what if end is no longer leagal adress?
-
- char tmp = *end;
- *end = '\0'; // put temporary terminator
-
- KeywordMapT::iterator i;
-
- if ( (i = __gMultiLangMap.find( start ) ) != __gMultiLangMap.end() )
- {
- KeywordT* pKey = (KeywordT*)(*i).second;
-
- *end = tmp;
-
- return pKey->rank;
- }
- else
- {
- *end = tmp;
- return 0;
- }
-}
-
-static inline void store_range( SPBlockListT& results, int rank, int range_len )
-{
- if ( !range_len ) return;
-
- results.push_back ( ( rank << 16 ) | ( range_len ) );
-}
-
-
-#define STORE_RANGE store_range( results, cur_rank, cur_range_len ); \
- cur_rank = cur_range_len = 0; \
- wxUnusedVar( cur_rank );
-
-#define NEXT_CHAR cur_range_len++; \
- ++cur; \
- continue;
-
-static inline int is_alpha( char ch )
-{
- return ( (( ch >= '_' ) && ( ch <= 'z' )) ||
- (( ch >= 'A' ) && ( ch <= 'Z' ))
- );
-}
-
- // _ . .
- // Ziema atEjo netikEtai
-
-static void heighlight_syntax( char* str, int strLen,
- SPBlockListT& results, bool& isComment )
-{
- bool isMultiline = false;
- char* cur = str;
- char* end = str + strLen;
-
- int cur_rank = ( isComment == 1 ) ? RANK_GREEN : RANK_BLACK;
- int cur_range_len = 0;
-
- while ( cur != end )
- {
- int has_next = ( cur+1 != end );
-
- if ( isComment )
- {
- if ( *cur == '*' )
- if ( has_next && *(cur+1) == '/' )
- {
- // turn off multiline comment mode
- cur += 2;
- cur_range_len += 2;
- isComment = 0;
- isMultiline = 0;
- STORE_RANGE;
-
- continue;
- }
-
- ++cur_range_len;
- ++cur;
- continue;
- }
-
- /*
- if ( *cur == 10 )
- if ( isComment )
- if ( isMultiline )
- {
- cur_rank = RANK_GREEN;
- cur_range_len = end - cur;
- STORE_RANGE;
- isComment = 0;
- isMultiline = 0;
- continue;
- }*/
-
- if ( *cur == '/' )
- {
- if ( has_next )
- {
- if ( *(cur+1) == '/' )
- {
- STORE_RANGE;
-
- char* eol = cur;
- while ( eol < end && *eol != 10 )
- ++eol;
-
- cur_rank = RANK_GREEN;
- cur_range_len = eol - cur;
- cur = eol;
- STORE_RANGE;
-
- continue;
- }
-
- if ( *(cur+1) == '*' )
- {
- STORE_RANGE;
- cur_rank = RANK_GREEN;
- cur_range_len = 2;
- isComment = 1;
- cur += 2;
- isMultiline = 1;
- continue;
- }
- }
-
- NEXT_CHAR;
- }
-
- if ( ( is_alpha( *cur ) || *(cur) == '#' )
- && has_next
- )
- {
- if ( is_alpha( *(cur+1) ) )
- {
- char* start = cur;
- cur += 2;
-
- while ( cur != end && is_alpha(*cur) ) ++cur;
-
- int wordRank;
-
- if ( (wordRank = get_rank( start, cur )) > 0 )
- {
- STORE_RANGE;
-
- store_range( results, wordRank, int(cur-start) );
- cur_rank = cur_range_len = 0;
- continue;
- }
-
- cur_range_len += ( cur-start );
- continue;
- }
- else
- NEXT_CHAR;
- }
-
- NEXT_CHAR;
- }
-
- if ( cur_range_len > 0 ) STORE_RANGE;
-
- wxUnusedVar(isMultiline);
-}
-
-/***** Implementation for class SourcePainter ******/
-
-SourcePainter::SourcePainter( bool assembleResultString )
- : mCollectResultsOn( assembleResultString ),
- mIsInComment( false ),
- mCommentIsMultiline( false )
-{
- check_keyword_map(0);
-}
-
-void SourcePainter::ProcessSource( char* src, int srcLen )
-{
- // TBD:: multilne state...
-
- heighlight_syntax( src, srcLen, mBlocks, mIsInComment );
-
- if ( mCollectResultsOn )
-
- mResultStr += wxString( src, srcLen );
-}
-
-void SourcePainter::SetState( bool isInComment,
- bool commentIsMultiline )
-{
- mIsInComment = isInComment;
- mCommentIsMultiline = commentIsMultiline;
-}
-
-void SourcePainter::Init(bool assembleResultString)
-{
- mIsInComment = 0;
- mCommentIsMultiline = 0;
- mCollectResultsOn = assembleResultString;
-
- mResultStr = wxEmptyString;
-
- mBlocks.erase( mBlocks.begin(), mBlocks.end() );
-}
-
-static int rank_tags_map[] =
-{
- TAG_BLACK_FONT,
- TAG_BLUE_FONT,
- TAG_RED_FONT,
- TAG_GREEN_FONT
-};
-
-void SourcePainter::GetResultString(wxString& result, MarkupTagsT tags)
-{
- // this method works, only if results of processing
- // are collected
- // ASSERT( mCollectResultsOn );
- result = wxEmptyString;
-
- unsigned pos = 0;
-
- for( size_t i = 0; i != mBlocks.size(); ++i )
- {
- int desc = mBlocks[i];
-
- unsigned len = desc & 0xFFFF;
- int rank = (desc >> 16) & 0xFFFF;
-
- result += tags[ rank_tags_map[rank] ].start;
-
- for( unsigned n = 0; n != len; ++n )
- {
- result += mResultStr[(unsigned int)(pos+n)];
- }
-
- pos += len;
-
- result += tags[ rank_tags_map[rank] ].end;
- }
-}
-
-SPBlockListT& SourcePainter::GetBlocks()
-{
- return mBlocks;
-}
-
-bool SourcePainter::IsKeyword( char* word, int wordLen )
-{
- check_keyword_map(0);
-
- int rank = get_rank( word, word + wordLen );
-
- return ( rank == RANK_BLUE || rank == RANK_RED );
-}
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 22/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef __SOURCEPAINTER_G__
-#define __SOURCEPAINTER_G__
-
-#ifndef ASSERT
-#define ASSERT(x) if (!(x)) throw
-#endif
-
-#if defined( wxUSE_TEMPLATE_STL )
-
- #include <vector.h>
- typedef vector<int> SPBlockListT;
-
- #ifdef WIN32
- #include <bstring.h>
- #else
- #include <strclass.h>
- #include <string.h>
- #endif
-#else
-
- #include "wxstlvec.h"
- #include "wx/string.h"
-
- typedef WXSTL_VECTOR_SHALLOW_COPY(int) SPBlockListT;
-
-#endif
-
-#include "markup.h" // import MarkupTagsT definition
-
-// "colored" codes for highlighted blocks
-
-#define RANK_BLACK 0 // common source fragments
-#define RANK_BLUE 1 // basic types
-#define RANK_RED 2 // reserved words
-#define RANK_GREEN 3 // comments
-
-// colored block description format :
-// int( ( rank << 16 ) | ( source_range_len ) )
-
-
-// FOR NOW:: no lagnguage-map selection
-
-// source code syntax heighlighter (CPP+JAVA+VB+PASCAL)
-
-class SourcePainter
-{
-protected:
- wxString mResultStr;
- SPBlockListT mBlocks;
- bool mCollectResultsOn;
-
- // state variables
- bool mIsInComment;
- bool mCommentIsMultiline;
-public:
-
- // assembleResultString == true - instructs painter
- // to collect each chunk of srouce passed to ProcessSource(),
- // so that results cann be futher obtained in a single string
- // instead of vector of block descriptions
-
- SourcePainter( bool assembleResultString = true );
- virtual ~SourcePainter() {}
-
- // can be called multiple times (e.g. on each source line)
- void ProcessSource( char* src, int srcLen );
-
- // method, for manually adjusting state of source painter
- void SetState( bool isInComment,
- bool commentIsMultiline );
-
- // reinitializes object - clears results of previouse processing
- void Init( bool assembleResultString = true );
-
- // generates string of highlighted source for the scipting
- // language given by "tags" argument
-
- virtual void GetResultString(wxString& result, MarkupTagsT tags);
-
- // returns vector of block descriptors, see SPBlockListT definition
- // (block descriptors can be used for fast custom highlighted text generation)
-
- SPBlockListT& GetBlocks();
-
- // NOTE:: static method
- // returns if the given word is a reserved word or basic type identifier
- static bool IsKeyword( char* word, int wordLen );
-};
-
-#endif
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 22/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-#include <stdio.h>
-
-#include "srcparser.h"
-
-/***** Implementation for class spVisitor *****/
-
-void spVisitor::VisitAll( spContext& atContext,
- bool sortContent
- )
-{
- mSiblingSkipped = false;
- mChildSkipped = false;
- mContextMask = SP_CTX_ANY; // FIXME:: should be an arg.
-
- if ( sortContent && !atContext.IsSorted() )
-
- atContext.SortMembers();
-
- mpCurCxt = &atContext; // FIXME:: this is dirty, restoring it each time
-
- if ( atContext.GetContextType() & mContextMask )
-
- atContext.AcceptVisitor( *this );
-
- MMemberListT& members = atContext.GetMembers();
-
- for( size_t i = 0; i != members.size(); ++i )
- {
- if ( mSiblingSkipped )
-
- return;
-
- if ( !mChildSkipped )
- {
- size_t prevSz = members.size();
-
- // visit members of the context recursivelly
- VisitAll( *members[i], sortContent );
-
- if ( members.size() != prevSz )
-
- --i; // current member was removed!
-
- mChildSkipped = 0;
- }
- }
-}
-
-void spVisitor::RemoveCurrentContext()
-{
- if ( mpCurCxt->GetParent() )
-
- mpCurCxt->GetParent()->RemoveChild( mpCurCxt );
-}
-
-void spVisitor::SkipSiblings()
-{
- mSiblingSkipped = true;
-}
-
-void spVisitor::SkipChildren()
-{
- mChildSkipped = true;
-}
-
-void spVisitor::SetFilter( int contextMask )
-{
- mContextMask = contextMask;
-}
-
-/***** Implementation for class spComment *****/
-
-bool spComment::IsMultiline() const
-{
- return mIsMultiline;
-}
-
-bool spComment::StartsParagraph() const
-{
- return mStartsPar;
-}
-
-wxString& spComment::GetText()
-{
- return m_Text;
-}
-
-wxString spComment::GetText() const
-{
- return m_Text;
-}
-
-/***** Implementation for class spContext *****/
-
-spContext::spContext()
-
- : m_pParent ( NULL ),
- mpFirstOccurence( NULL ),
- mAlreadySorted ( false ),
-
- mSrcLineNo (-1),
- mSrcOffset (-1),
- mContextLength(-1),
- mLastScrLineNo(-1),
-
- mHeaderLength (-1),
- mFooterLength (-1),
-
- mFirstCharPos (-1),
- mLastCharPos (-1),
-
- mVisibility( SP_VIS_PRIVATE ),
-
- mIsVirtualContext ( false ),
- mVirtualContextHasChildren( false ),
-
- mpUserData( NULL )
-{}
-
-void spContext::RemoveChildren()
-{
- for( size_t i = 0; i != mMembers.size(); ++i )
-
- delete mMembers[i];
-
- mMembers.erase( mMembers.begin(), mMembers.end() );
-}
-
-spContext::~spContext()
-{
- RemoveChildren();
-
- for( size_t i = 0; i != mComments.size(); ++i )
-
- delete mComments[i];
-}
-
-bool spContext::IsSorted()
-{
- return mAlreadySorted;
-}
-
-void spContext::GetContextList( MMemberListT& lst, int contextMask )
-{
- for( size_t i = 0; i != mMembers.size(); ++i )
- {
- spContext& member = *mMembers[i];
-
- if ( member.GetContextType() & contextMask )
-
- lst.push_back( &member );
-
- // collect required contexts recursively
- member.GetContextList( lst, contextMask );
- }
-}
-
-bool spContext::HasComments()
-{
- return ( mComments.size() != 0 );
-}
-
-void spContext::RemoveChild( spContext* pChild )
-{
- for( size_t i = 0; i != mMembers.size(); ++i )
-
- if ( mMembers[i] == pChild )
- {
- mMembers.erase( &mMembers[i] );
-
- delete pChild;
- return;
- }
-
- // the given child should exist on the parent's list
- wxASSERT( 0 );
-}
-
-spContext* spContext::GetEnclosingContext( int mask )
-{
- spContext* cur = this->GetParent();
-
- while ( cur && !(cur->GetContextType() & mask) )
-
- cur = cur->GetParent();
-
- return cur;
-}
-
-bool spContext::PositionIsKnown()
-{
- return ( mSrcOffset != (-1) && mContextLength != (-1) );
-}
-
-bool spContext::IsVirtualContext()
-{
- return mIsVirtualContext;
-}
-
-bool spContext::VitualContextHasChildren()
-{
- return mVirtualContextHasChildren;
-}
-
-wxString spContext::GetVirtualContextBody()
-{
- wxASSERT( mIsVirtualContext );
-
- return mVirtualContextBody;
-}
-
-wxString spContext::GetFooterOfVirtualContextBody()
-{
- wxASSERT( mIsVirtualContext );
-
- return mVittualContextFooter;
-}
-
-
-void spContext::SetVirtualContextBody( const wxString& body,
- bool hasChildren,
- const wxString& footer )
-{
- mVirtualContextHasChildren = hasChildren;
-
- mVirtualContextBody = body;
- mVittualContextFooter = footer;
-
- // atuomaticllay becomes virtual context
-
- mIsVirtualContext = true;
-}
-
-wxString spContext::GetBody( spContext* pCtx )
-{
- if ( ( pCtx == NULL || pCtx == this ) && mIsVirtualContext )
- return mVirtualContextBody;
-
- if ( GetParent() )
- return GetParent()->GetBody( ( pCtx != NULL ) ? pCtx : this );
- else
- return wxEmptyString; // source-fragment cannot be found
-}
-
-wxString spContext::GetHeader( spContext* pCtx )
-{
- if ( GetParent() )
- return GetParent()->GetHeader( ( pCtx != NULL ) ? pCtx : this );
- else
- return wxEmptyString; // source-fragment cannot be found
-}
-
-bool spContext::IsFirstOccurence()
-{
- return ( mpFirstOccurence != 0 );
-}
-
-spContext* spContext::GetFirstOccurence()
-{
- // this object should not itself be
- // the first occurence of the context
- wxASSERT( mpFirstOccurence != 0 );
-
- return mpFirstOccurence;
-}
-
-void spContext::AddMember( spContext* pMember )
-{
- mMembers.push_back( pMember );
-
- pMember->m_pParent = this;
-}
-
-void spContext::AddComment( spComment* pComment )
-{
- mComments.push_back( pComment );
-}
-
-MMemberListT& spContext::GetMembers()
-{
- return mMembers;
-}
-
-spContext* spContext::FindContext( const wxString& identifier,
- int contextType,
- bool searchSubMembers
- )
-{
- for( size_t i = 0; i != mMembers.size(); ++i )
- {
- spContext& member = *mMembers[i];
-
- if ( member.GetName() == identifier &&
- ( contextType & member.GetContextType() )
- )
-
- return &member;
-
- if ( searchSubMembers )
- {
- spContext* result =
- member.FindContext( identifier, contextType, 1 );
-
- if ( result ) return result;
- }
- }
-
- return 0;
-}
-
-void spContext::RemoveThisContext()
-{
- if ( m_pParent )
- m_pParent->RemoveChild( this );
- else
- // context should have a parent
- wxFAIL_MSG("Context should have a parent");
-}
-
-spContext* spContext::GetOutterContext()
-{
- return m_pParent;
-}
-
-bool spContext::HasOutterContext()
-{
- return ( m_pParent != 0 );
-}
-
-bool spContext::IsInFile()
-{
- return ( GetOutterContext()->GetContextType() == SP_CTX_FILE );
-}
-
-bool spContext::IsInNameSpace()
-{
- return ( GetOutterContext()->GetContextType() == SP_CTX_NAMESPACE );
-}
-
-bool spContext::IsInClass()
-{
- return ( GetOutterContext()->GetContextType() == SP_CTX_CLASS );
-}
-
-bool spContext::IsInOperation()
-{
- return ( GetOutterContext()->GetContextType() == SP_CTX_OPERATION );
-}
-
-spClass& spContext::GetClass()
-{
- wxASSERT( GetOutterContext()->GetType() == SP_CTX_CLASS );
- return *((spClass*)m_pParent );
-}
-
-spFile& spContext::GetFile()
-{
- wxASSERT( GetOutterContext()->GetType() == SP_CTX_FILE );
- return *((spFile*)m_pParent );
-}
-
-spNameSpace& spContext::GetNameSpace()
-{
- wxASSERT( GetOutterContext()->GetType() == SP_CTX_NAMESPACE );
- return *((spNameSpace*)m_pParent );
-}
-
-spOperation& spContext::GetOperation()
-{
- wxASSERT( GetOutterContext()->GetType() == SP_CTX_OPERATION );
- return *((spOperation*)m_pParent );
-}
-
-/***** Implementation for class spClass *****/
-
-void spClass::SortMembers()
-{
- // TBD::
-}
-
-/***** Implementation for class spOperation *****/
-
-spOperation::spOperation()
-
- : mHasDefinition( false )
-{
- mIsConstant =
- mIsVirtual =
- mHasDefinition = false;
-}
-
-wxString spOperation::GetFullName(MarkupTagsT tags)
-{
- wxString txt = tags[TAG_BOLD].start + m_RetType;
- txt += _T(" ");
- txt += m_Name;
- txt += _T("( ");
- txt += tags[TAG_BOLD].end;
-
- for( size_t i = 0; i != mMembers.size(); ++i )
- {
- // DBG::
- wxASSERT( mMembers[i]->GetContextType() == SP_CTX_PARAMETER );
-
- spParameter& param = *((spParameter*)mMembers[i]);
-
- if ( i != 0 )
- txt += _T(", ");
-
- txt += tags[TAG_BOLD].start;
-
- txt += param.m_Type;
-
- txt += tags[TAG_BOLD].end;
- txt += tags[TAG_ITALIC].start;
-
- txt += _T(" ");
- txt += param.m_Name;
-
- if ( !param.m_InitVal.empty() )
- {
- txt += _T(" = ");
- txt += tags[TAG_BOLD].start;
-
- txt += param.m_InitVal;
-
- txt += tags[TAG_BOLD].end;
- }
-
- txt += tags[TAG_ITALIC].end;;
- }
-
- txt += tags[TAG_BOLD].start;
- txt += " )";
- txt += tags[TAG_BOLD].end;
-
- // TBD:: constantness of method
-
- return txt;
-}
-
-/***** Implemenentation for class spPreprocessorLine *****/
-
-wxString spPreprocessorLine::CPP_GetIncludedFileNeme() const
-{
- wxASSERT( GetStatementType() == SP_PREP_DEF_INCLUDE_FILE );
-
- size_t i = 0;
-
- while( i < m_Line.length() && m_Line[i] != _T('"') && m_Line[i] != _T('<') )
-
- ++i;
-
- ++i;
-
- size_t start = i;
-
- while( i < m_Line.length() && m_Line[i] != _T('"') && m_Line[i] != _T('>') )
-
- ++i;
-
- if ( start < m_Line.length() )
- {
- wxString fname;
- fname.append( m_Line, start, ( i - start ) );
-
- return fname;
- }
- else
- return wxEmptyString; // syntax error probably
-}
-
-
-
-/***** Implemenentation for class SourceParserBase *****/
-
-SourceParserBase::SourceParserBase()
-
- : mpFileBuf( NULL ),
- mFileBufSz( 0 ),
-
- mpPlugin( NULL )
-{}
-
-SourceParserBase::~SourceParserBase()
-{
- if ( mpFileBuf ) free( mpFileBuf );
-
- if ( mpPlugin ) delete mpPlugin;
-}
-
-spFile* SourceParserBase::ParseFile( const char* fname )
-{
- // FIXME:: the below should not be fixed!
-
- const size_t MAX_BUF_SIZE = 1024*256;
-
- if ( !mpFileBuf ) mpFileBuf = (char*)malloc( MAX_BUF_SIZE );
-
- mFileBufSz = MAX_BUF_SIZE;
-
- FILE* fp = fopen( fname, "rt" );
-
- if ( !fp ) return NULL;
-
- int sz = fread( mpFileBuf, 1, mFileBufSz, fp );
-
- return Parse( mpFileBuf, mpFileBuf + sz );
-}
-
-void SourceParserBase::SetPlugin( SourceParserPlugin* pPlugin )
-{
- if ( mpPlugin ) delete mpPlugin;
-
- mpPlugin = pPlugin;
-}
-
-// ===========================================================================
-// debug methods
-// ===========================================================================
-
-#ifdef __WXDEBUG__
-
-void spContext::Dump(const wxString& indent) const
-{
- DumpThis(indent);
-
- // increase it for the children
- wxString indentChild = indent + " ";
-
- for ( MMemberListT::const_iterator i = mMembers.begin();
- i != mMembers.end();
- i++ ) {
- (*i)->Dump(indentChild);
- }
-}
-
-void spContext::DumpThis(const wxString& WXUNUSED(indent)) const
-{
- wxFAIL_MSG("abstract base class can't be found in parser tree!");
-}
-
-void spParameter::DumpThis(const wxString& indent) const
-{
- wxLogDebug("%sparam named '%s' of type '%s'",
- indent.c_str(), m_Name.c_str(), m_Type.c_str());
-}
-
-void spAttribute::DumpThis(const wxString& indent) const
-{
- wxLogDebug("%svariable named '%s' of type '%s'",
- indent.c_str(), m_Name.c_str(), m_Type.c_str());
-}
-
-void spOperation::DumpThis(const wxString& indent) const
-{
- wxString protection;
- if ( !mScope.empty() ) {
- switch ( mVisibility ) {
- case SP_VIS_PUBLIC:
- protection = "public";
- break;
-
- case SP_VIS_PROTECTED:
- protection = "protected";
- break;
-
- case SP_VIS_PRIVATE:
- protection = "private";
- break;
-
- default:
- wxFAIL_MSG("unknown protection type");
- }
- }
- else {
- protection = "global";
- }
-
- wxString constStr,virtualStr;
- if(mIsConstant) constStr = _T("const ");
- if(mIsVirtual) virtualStr = _T("virtual ");
-
- wxLogDebug("%s%s%s%s function named '%s::%s' of type '%s'",
- indent.c_str(),
- constStr.c_str(),
- virtualStr.c_str(),
- protection.c_str(),
- mScope.c_str(), m_Name.c_str(), m_RetType.c_str());
-}
-
-void spPreprocessorLine::DumpThis(const wxString& indent) const
-{
- wxString kind;
- switch ( mDefType ) {
- case SP_PREP_DEF_DEFINE_SYMBOL:
- kind = "define";
- break;
-
- case SP_PREP_DEF_REDEFINE_SYMBOL:
- kind = "redefine";
- break;
-
- case SP_PREP_DEF_INCLUDE_FILE:
- kind.Printf("include (%s)", CPP_GetIncludedFileNeme().c_str());
- break;
-
- case SP_PREP_DEF_OTHER:
- kind = "other";
- break;
-
- }
-
- wxLogDebug("%spreprocessor statement: %s",
- indent.c_str(), kind.c_str());
-}
-
-void spClass::DumpThis(const wxString& indent) const
-{
- wxString base;
- for ( StrListT::const_iterator i = m_SuperClassNames.begin();
- i != m_SuperClassNames.end();
- i++ ) {
- if ( !base.empty() )
- base += ", ";
- base += *i;
- }
-
- if ( !base )
- base = "none";
-
- wxString kind;
- switch ( mClassSubType ) {
- case SP_CLTYPE_CLASS:
- kind = "class";
- break;
-
- case SP_CLTYPE_TEMPLATE_CLASS:
- kind = "template class";
- break;
-
- case SP_CLTYPE_STRUCTURE:
- kind = "struc";
- break;
-
- case SP_CLTYPE_UNION:
- kind = "union";
- break;
-
- case SP_CLTYPE_INTERFACE:
- kind = "interface";
- break;
-
- default:
- wxFAIL_MSG("unknown class subtype");
- }
-
- wxLogDebug("%s%s named '%s' (base classes: %s)",
- indent.c_str(), kind.c_str(),
- m_Name.c_str(), base.c_str());
-}
-
-void spEnumeration::DumpThis(const wxString& indent) const
-{
- wxLogDebug("%senum named '%s'",
- indent.c_str(), m_Name.c_str());
-}
-
-void spTypeDef::DumpThis(const wxString& indent) const
-{
- wxLogDebug("%stypedef %s = %s",
- indent.c_str(), m_Name.c_str(), m_OriginalType.c_str());
-}
-
-void spFile::DumpThis(const wxString& indent) const
-{
- wxLogDebug("%sfile '%s'",
- indent.c_str(), m_FileName.c_str());
-}
-
-#endif // __WXDEBUG__
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: To provide a simple _framework_
-// for series of source code parsers with
-// compatible interfaces
-// Author: Aleksandras Gluchovas
-// Modified by: AG on 28/12/98
-// Created: 22/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef __SRCPARSER_G__
-#define __SRCPARSER_G__
-
-#if defined( wxUSE_TEMPLATE_STL )
- #include <vector>
-
- #ifdef WIN32
- #include <bstring.h>
- #else
-
- #include <strclass.h>
- #include <string.h>
-
- #endif
-
-#else
- #include "wx/string.h"
- #include "wxstlvec.h"
-
-#endif
-
-#include "markup.h" // markup tags used in spOperator::GetFullName()
-
-// these methods are used for debugging only and disappear in the release build
-#ifdef __WXDEBUG__
- #define DECLARE_DUMP virtual void DumpThis(const wxString& indent) const;
-#else
- #define DECLARE_DUMP
-#endif
-
-// context class list in "inside-out" order :
-
-class spContext;
-
-class spParameter;
-class spAttribute;
-class spOperation;
-class spEnumeration;
-class spTypeDef;
-class spPreprocessorLine;
-class spClass;
-class spNameSpace;
-class spFile;
-
-// source context visibilities
-enum SRC_VISIBLITY_TYPES
-{
- SP_VIS_PUBLIC,
- SP_VIS_PROTECTED,
- SP_VIS_PRIVATE
-};
-
-// class types
-enum SP_CLASS_TYPES
-{
- SP_CLTYPE_INVALID,
- SP_CLTYPE_CLASS,
- SP_CLTYPE_TEMPLATE_CLASS,
- SP_CLTYPE_STRUCTURE,
- SP_CLTYPE_UNION,
- SP_CLTYPE_INTERFACE
-};
-
-// inheritance types
-enum SP_INHERITANCE_TYPES
-{
- SP_INHERIT_VIRTUAL,
- SP_INHERIT_PUBLIC,
- SP_INHERIT_PRIVATE
-};
-
-// proprocessor definitions types (specific to C++ code)
-
-enum SP_PREP_DEFINITION_TYPES
-{
- SP_PREP_DEF_DEFINE_SYMBOL,
- SP_PREP_DEF_REDEFINE_SYMBOL,
- SP_PREP_DEF_INCLUDE_FILE,
- SP_PREP_DEF_OTHER
-};
-
-// common context types
-
-#define SP_CTX_UNKNOWN 0x000
-#define SP_CTX_FILE 0x001
-#define SP_CTX_NAMESPACE 0x002
-#define SP_CTX_CLASS 0x004
-#define SP_CTX_TYPEDEF 0x008
-#define SP_CTX_PREPROCESSOR 0x010
-#define SP_CTX_ENUMERATION 0x020
-#define SP_CTX_ATTRIBUTE 0x040
-#define SP_CTX_OPERATION 0x080
-#define SP_CTX_PARAMETER 0x100
-
-// other (custom) context codes may be defined elsewere, however they should
-// not clash with above codes for common type and also should not
-// exceed 16-bits of in value
-
-// masks all context types (up to 16 custom context can be defined)
-
-#define SP_CTX_ANY 0xFFFF
-
-class spComment;
-
-
-
-#if defined( wxUSE_TEMPLATE_STL )
-
- // context members
- typedef vector<spContext*> MMemberListT;
- // comments list
- typedef vector<spComment*> MCommentListT;
- // list of parameters
- typedef vector<spParameter*> MParamListT;
- // wxString list
- typedef vector<wxString> StrListT;
-
-#else
-
- typedef spContext* spContextPtrT;
- typedef spComment* spCommentPtrT;
- typedef spParameter* spParameterPtrT;
- typedef WXSTL_VECTOR_SHALLOW_COPY(spContextPtrT) MMemberListT;
- typedef WXSTL_VECTOR_SHALLOW_COPY(spCommentPtrT) MCommentListT;
- typedef WXSTL_VECTOR_SHALLOW_COPY(spParameterPtrT) MParamListT;
- typedef WXSTL_VECTOR_SHALLOW_COPY(wxString) StrListT;
-
-#endif
-// base class for all visitors of source code contents
-
-class spVisitor
-{
-protected:
- bool mSiblingSkipped;
- bool mChildSkipped;
- int mContextMask;
-
- spContext* mpCurCxt;
-
-public:
- // methods invoked by context
-
- // method invoked from user's controling code
- // to visit all nodes staring at the given context.
- // Content is sorted if requrired, see comments
- // spClass on sorting the class members
-
- void VisitAll( spContext& atContext,
- bool sortContent = true
- );
-
- // methods invoked by visitor
-
- // goes to the next context in the outter scope
- // NOTE:: should not be invoked more than once while
- // visiting certain context
-
- void SkipSiblings();
-
- // prevents going down into the contexts contained by
- // the current context
- // NOTE:: the same as above
-
- void SkipChildren();
-
- // can be called only in from visiting procedure
- void RemoveCurrentContext();
-
- // method enables fast filtered traversal
- // of source content, e.g. collecting only classes,
- // or only global functions
-
- // arg. context - can contain combination of contexts concatinated
- // with bitwise OR, e.g. SP_CTX_CLASS | SP_CTX_NAMESPACE
- //
- // method can be invoked from the user's controling as well as
- // from within the visting procedure
-
- void SetFilter( int contextMask );
-
- // methods should be implemneted by specific visitor:
-
- // NOTE:: Do not confuse visiting with parsing, first
- // the source is parsed, and than can be visited
- // multiple times by variouse visitors (there can
- // be more the one visitor visiting content at a time)
-
- virtual void VisitFile( spFile& WXUNUSED(fl) ) {}
-
- virtual void VisitNameSpace( spNameSpace& WXUNUSED(ns) ) {}
-
- virtual void VisitClass( spClass& WXUNUSED(cl) ) {}
-
- virtual void VisitEnumeration( spEnumeration& WXUNUSED(en) ) {}
-
- virtual void VisitTypeDef( spTypeDef& WXUNUSED(td) ) {}
-
- virtual void VisitPreprocessorLine( spPreprocessorLine& WXUNUSED(pd) ) {}
-
- virtual void VisitAttribute( spAttribute& WXUNUSED(attr) ) {}
-
- virtual void VisitOperation( spOperation& WXUNUSED(op) ) {}
-
- virtual void VisitParameter( spParameter& WXUNUSED(param) ) {}
-
- virtual void VisitCustomContext( spContext& WXUNUSED(ctx) ) {}
-
- virtual ~spVisitor() { }
-};
-
-// stores one section of comments,
-// multiple sections can be put to geather
-// and attached to some context
-
-class spComment
-{
-public:
- wxString m_Text;
- bool mIsMultiline; // multiline comments ar those with /**/'s
-
- // true, if these was an empty empty
- // line above single line comment
-
- bool mStartsPar;
-
-public:
-
- bool IsMultiline() const;
- bool StartsParagraph() const;
-
- wxString& GetText();
-
- // contstant version of GetText()
- wxString GetText() const;
-};
-
-// abstract base class for common (to most languages) code
-// contexts (constructs), e.g file, namespace, class, operation,
-// etc
-
-class spContext
-{
-protected:
- // "linked" list of comments belonging to this context
- MCommentListT mComments;
-
- // NULL, if this is file context
- MMemberListT mMembers;
-
- // NULL, if this is top-most context
- spContext* m_pParent;
-
- // points to context object, where the this context
- // was originally declared, meaning that this object
- // is redeclaration (or if in the case of operation
- // this context object most probably referres to the
- // implemnetation in .cpp file for example)
-
- // is NULL, if this object referres to the first occurence
- // of the context
-
- spContext* mpFirstOccurence;
-
- // used, to avoid excessive sorting of context's agreggates
- bool mAlreadySorted;
-
-public:
-
- // source line number, (-1) if unknown
- int mSrcLineNo;
-
- // offset of context in the source file, (-1) if unknown
- int mSrcOffset;
-
- // lentgh of the context in characters, (-1) if unknown
- int mContextLength;
-
- // source line number, in which this cotext ends, (-1) if unknown
- int mLastScrLineNo;
-
- // fields are valid, if the may contain other contexts nested inside
- int mHeaderLength;
- int mFooterLength;
-
- // zero-based index of the first character of
- // this context in the source line, (-1) if unknown
- int mFirstCharPos;
-
- // zero-based index of the first character of
- // this context in the last source line of this context, (-1) if unknown
- int mLastCharPos;
-
- // see SRC_VISIBLITY_TYPES enumeration
- int mVisibility;
-
- // true, if context does not really exist in the source
- // but was created by external tools (e.g. forward engineering)
-
- bool mIsVirtualContext;
- bool mVirtualContextHasChildren;
-
- // body of the context in case (mIsVirtual == true)
- wxString mVirtualContextBody;
- wxString mVittualContextFooter;
-
- // e.g. can be used by documentation generator to store
- // reference to section object
- void* mpUserData;
-
-public:
- // universal identifier of the context (e.g. class name)
- wxString m_Name;
-
-public:
- // default constructor
- spContext();
-
- // automatically destorys all aggregated contexts
- // (thus, it's enought to call destructor of root-context)
- virtual ~spContext();
-
- // see mUererData member;
- void* GetUserData() { return mpUserData; }
-
- // sets untyped pointer to user data
- void SetUserData( void* pUserData )
- { mpUserData = pUserData; }
-
- // searches the whole context tree for the cotnexts
- // which match given masks, pust results into lst array
- void GetContextList( MMemberListT& lst, int contextMask );
-
- // used by default visitor's implementation
- bool IsSorted();
-
- /*** forward/reverse ingineering fecilities ***/
-
- bool PositionIsKnown();
-
- bool IsVirtualContext();
-
- bool VitualContextHasChildren();
-
- void SetVirtualContextBody( const wxString& body,
- bool hasChildren = false,
- const wxString& footer = wxEmptyString );
-
- wxString GetVirtualContextBody();
- wxString GetFooterOfVirtualContextBody();
-
- // can be overriden by top-level context classes
- // to find-out ot the source-fragment of this
- // context using it's position information
- virtual wxString GetBody( spContext* pCtx = NULL );
-
- virtual wxString GetHeader( spContext* pCtx = NULL );
-
- // true, if there is at least one entry
- // in the comment list of this context
- bool HasComments();
- MCommentListT& GetCommentList() { return mComments; }
- const MCommentListT& GetCommentList() const { return mComments; }
-
- // should be overriden, if the context supports sorting
- // of it's members
- virtual void SortMembers() {}
-
- // returns identifier of this context
- inline wxString& GetName() { return m_Name; }
-
- // returns -1, if souce line # is unknow
- inline int GetSourceLineNo() { return mSrcLineNo; }
-
- // see comments on mpFirstOccurence member variable
- bool IsFirstOccurence();
- spContext* GetFirstOccurence();
-
- // returns not-NULL value if this context
- // is aggregated by another cotnext
- spContext* GetOutterContext();
-
- // perhaps more intuitive alias for `GetOutterContext()'
- inline spContext* GetParent() { return m_pParent; }
-
- bool HasOutterContext();
-
- // add one aggregate (or child) into this context
- void AddMember ( spContext* pMember );
- MMemberListT& GetMembers();
-
- // append comment to the comment list decribing
- // this context
- void AddComment( spComment* pComment );
-
- // returns NULL, if the context with the given
- // name and type is not contained by this context
- // and it's children. Children's children are not
- // searched recursivelly if searchSubMembers is false
-
- spContext* FindContext( const wxString& identifier,
- int contextType = SP_CTX_ANY,
- bool searchSubMembers = true
- );
-
- // removes this context from it's parent
- // (NOTE:: context should have an outter cotnext
- // to when this method is called, otherwise removal
- // will result assertion failure)
- void RemoveThisContext();
-
- // returns true, if this object is aggregated in the file
- bool IsInFile();
-
- // true, if outter context is a namespace
- bool IsInNameSpace();
-
- // true, if outter context is a class
- bool IsInClass();
-
- // true, if outter cotext is an operation (true for "spParameter"s)
- bool IsInOperation();
-
- // true if the context is public
- bool IsPublic() const { return mVisibility == SP_VIS_PUBLIC; }
-
- // NOTE:: method returns not the type of this object
- // but the file/namespace/class/operation or file in which this
- // attribute is contained. First, check for the type of
- // context using the above method.
-
- // Requiering container which does not exist, will result
- // in assertion failure
-
- spClass& GetClass();
- spFile& GetFile();
- spNameSpace& GetNameSpace();
- spOperation& GetOperation();
-
- // each new context should override this method
- // to return it's specific type
- virtual int GetContextType() const { return SP_CTX_UNKNOWN; }
-
- // perhaps more intuitive short-cut
- inline int GetType() { return GetContextType(); }
-
- // cast this context to the desired type - returns NULL if type is wrong
- spAttribute *CastToAttribute()
- {
- return GetContextType() == SP_CTX_ATTRIBUTE ? (spAttribute *)this
- : NULL;
- }
-
- // derived classes override this to invoke VisitXXX method
- // which corresponds to the class of specific context,
- // - this is what the "Visitor" pattern told us ^)
-
- // if method is not overriden, then it's probably user-defined
- // custom context
-
- virtual void AcceptVisitor( spVisitor& visitor )
-
- { visitor.VisitCustomContext( *this ); };
-
- // called by visitors, to remove given subcontext
- // of this context object
- void RemoveChild( spContext* pChild );
-
- void RemoveChildren();
-
- spContext* GetEnclosingContext( int mask = SP_CTX_ANY );
-
-#ifdef __WXDEBUG__
- virtual void Dump(const wxString& indent) const;
-#endif // __WXDEBUG__
-
- DECLARE_DUMP
-};
-
-// stores information about single argument of operation
-
-class spParameter : public spContext
-{
-public:
- // type of argument (parameter)
- wxString m_Type;
-
- // "stringified" initial value
- wxString m_InitVal;
-
-public:
- virtual int GetContextType() const { return SP_CTX_PARAMETER; }
-
- virtual void AcceptVisitor( spVisitor& visitor )
- { visitor.VisitParameter( *this ); }
-
- DECLARE_DUMP
-};
-
-
-// stores information about member(or global) variable
-
-class spAttribute : public spContext
-{
-public:
- // type of the attribute
- wxString m_Type;
-
- // it's initial value
- wxString m_InitVal;
-
- // constantness
- bool mIsConstant;
-public:
-
- virtual int GetContextType() const { return SP_CTX_ATTRIBUTE; }
-
- virtual void AcceptVisitor( spVisitor& visitor )
- { visitor.VisitAttribute( *this ); }
-
- DECLARE_DUMP
-};
-
-class spOperation : public spContext
-{
-public:
- // type of return value
- wxString m_RetType;
-
- // argument list
- //MParamListT mParams;
-
- // true, if operation does not modify
- // the content of the object
- bool mIsConstant;
-
- // flag, specific to C++
- bool mIsVirtual;
-
- // true, if definition follows the declaration immediatelly
- bool mHasDefinition;
-
- // scope if any (e.g. MyClass::MyFunction(), scope stirng is "MyClass" )
- // usually found along with implementation of the method, which is now skipped
-
- wxString mScope;
-
-public:
- spOperation();
-
- // returns full declaration of the operations
- // (ret val., identifier, arg. list),
-
- // arguments are marked up with italic,
- // default values marked up with bold-italic,
- // all the rest is marked as bold
-
- // NOTE:: this method may be overriden by class
- // specific to concrete parser, to provide
- // language-dependent reperesnetation of
- // operation and it's argumetn list
- //
- // the default implementation outputs name in
- // C++/Java syntax
-
- virtual wxString GetFullName(MarkupTagsT tags);
-
- virtual int GetContextType() const { return SP_CTX_OPERATION; }
-
- virtual void AcceptVisitor( spVisitor& visitor )
- { visitor.VisitOperation( *this ); }
-
- DECLARE_DUMP
-};
-
-// stores infromation about preprocessor directive
-
-class spPreprocessorLine : public spContext
-{
-
-public:
-
- // prepocessor statement including '#' and
- // attached multiple lines with '\' character
- wxString m_Line;
-
- int mDefType; // see SP_PREP_DEFINITION_TYPES enumeration
-
-public:
-
- virtual int GetContextType() const { return SP_CTX_PREPROCESSOR; }
-
- virtual int GetStatementType() const { return mDefType; }
-
- wxString CPP_GetIncludedFileNeme() const;
-
- virtual void AcceptVisitor( spVisitor& visitor )
- { visitor.VisitPreprocessorLine( *this ); }
-
- DECLARE_DUMP
-};
-
-// stores information about the class
-
-class spClass : public spContext
-{
-public:
- // list of superclasses/interfaces
- StrListT m_SuperClassNames;
-
- // see SP_CLASS_TYPES enumeration
- int mClassSubType;
-
- // see SP_INHERITANCE_TYPES enumeration
- int mInheritanceType;
-
- // valid if mClassSubType is SP_CLTYPE_TEMPLATE_CLASS
- wxString mTemplateTypes;
-
- // true, if it's and interface of abstract base class
- bool mIsAbstract;
-
-public:
- // sorts class members in the following order:
- //
- // (by "privacy level" - first private, than protected, public)
- //
- // within above set
- //
- // (by member type - attributes first, than methods, nested classes)
- //
- // within above set
- //
- // (by identifier of the member)
-
- virtual void SortMembers();
-
- virtual int GetContextType() const { return SP_CTX_CLASS; }
-
- virtual void AcceptVisitor( spVisitor& visitor )
- { visitor.VisitClass( *this ); }
-
- DECLARE_DUMP
-};
-
-// stores information about enum statement
-
-class spEnumeration : public spContext
-{
-public:
- wxString m_EnumContent; // full-text content of enumeration
-
-public:
- virtual int GetContextType() const { return SP_CTX_ENUMERATION; }
-
- virtual void AcceptVisitor( spVisitor& visitor )
- { visitor.VisitEnumeration( *this ); }
-
- DECLARE_DUMP
-};
-
-class spTypeDef : public spContext
-{
-public:
- // the original type which is redefined
- // by this type definition
- wxString m_OriginalType;
-
-public:
- virtual int GetContextType() const { return SP_CTX_TYPEDEF; }
-
- virtual void AcceptVisitor( spVisitor& visitor )
- { visitor.VisitTypeDef( *this ); }
-
- DECLARE_DUMP
-};
-
-// NOTE:: files context may be put to other
-// file context, resulting in a collection
-// of parsed file contexts, with a virtual "superfile"
-
-class spFile : public spContext
-{
-public:
- // since file name cannot be determined from
- // source code, filling in this field is optional
- wxString m_FileName;
-
-public:
- virtual int GetContextType() const { return SP_CTX_FILE; }
-
- virtual void AcceptVisitor( spVisitor& visitor )
- { visitor.VisitFile( *this ); }
-
- DECLARE_DUMP
-};
-
-//TODO:: comments.
-
-class SourceParserPlugin
-{
-public:
- virtual bool CanUnderstandContext( char* cur, char* end, spContext* pOuttterCtx ) = 0;
- virtual void ParseContext( char* start, char*& cur, char* end, spContext* pOuttterCtx ) = 0;
-
- virtual ~SourceParserPlugin() { }
-};
-
-// abstract interface for source parsers
-// which can output parsing results in the
-// form of context-tree, where each node
-// should be derivative of spContext, (see
-// above classes)
-
-class SourceParserBase
-{
-private:
- // auto-resizing file buffer, created in ParseFile()
- // to reuse large heap block for multiple parsings
-
- char* mpFileBuf;
- int mFileBufSz;
-
-protected:
- SourceParserPlugin* mpPlugin;
-
-protected:
- // value is set in the derived parser classes
- int mParserStatus;
-
-public:
- SourceParserBase();
- virtual ~SourceParserBase();
-
- // loads entier source file(as text) into memory,
- // and passes it's contents to ParseAll() method,
- // memory occupied by source text is released after
- // parsing is done
- //
- // (NOTE:: this is the default implementation),
-
- virtual spFile* ParseFile( const char* fname );
-
- // should returns the root-node of the created context tree
- // (user is responsible for releasing it from the heep)
- // "end" should point to the (last character + 1) of the
- // source text area
-
- virtual spFile* Parse( char* start, char* end ) = 0;
-
- // returns parser "status word" (specific to concrete parser)
- int GetParserStatus() { return mParserStatus; }
-
- void SetPlugin( SourceParserPlugin* pPlugin );
-};
-
-#endif
+++ /dev/null
-////////////////////
-//
-// craeted by Alex
-//
-////////////////////
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#include <memory.h>
-
-#ifndef WX_PRECOMP
- #include "wx/defs.h"
-#endif
-
-#ifdef __WXMSW__
-// from filefn.cpp
-void WXDLLEXPORT wxSplitPath(const char *pszFileName,
- wxString *pstrPath,
- wxString *pstrName,
- wxString *pstrExt)
-{
- wxCHECK_RET( pszFileName, _("NULL file name in wxSplitPath") );
-
- const char *pDot = strrchr(pszFileName, wxFILE_SEP_EXT);
- const char *pSepUnix = strrchr(pszFileName, wxFILE_SEP_PATH_UNIX);
- const char *pSepDos = strrchr(pszFileName, wxFILE_SEP_PATH_DOS);
-
- // take the last of the two
- size_t nPosUnix = pSepUnix ? pSepUnix - pszFileName : 0;
- size_t nPosDos = pSepDos ? pSepDos - pszFileName : 0;
- if ( nPosDos > nPosUnix )
- nPosUnix = nPosDos;
-// size_t nLen = Strlen(pszFileName);
-
- if ( pstrPath )
- *pstrPath = wxString(pszFileName, nPosUnix);
- if ( pDot ) {
- size_t nPosDot = pDot - pszFileName;
- if ( pstrName )
- *pstrName = wxString(pszFileName + nPosUnix + 1, nPosDot - nPosUnix);
- if ( pstrExt )
- *pstrExt = wxString(pszFileName + nPosDot + 1);
- }
- else {
- if ( pstrName )
- *pstrName = wxString(pszFileName + nPosUnix + 1);
- if ( pstrExt )
- pstrExt->Empty();
- }
-}
-
-wxLocale *wxGetLocale()
-{
- return NULL;
-}
-
-const char *wxLocale::GetString(const char *szOrigString,
- const char *) const
-{
- return szOrigString;
-}
-
-#endif // MSW
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 27/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef __WXSTLAC_G__
-#define __WXSTLAC_G__
-
-#ifdef new
-#undef new
-#endif
-
-#include <stddef.h>
-#if !defined(__WXMAC__) || defined(__DARWIN__)
-# include <sys/types.h>
-#endif
-#include <memory.h>
-#include <limits.h>
-/* #include <new.h> */
-
-// the below macro used internally (see actual interface after this macro)
-
-// arguments:
-//
-// ARG_IS_UNIQUE
-// ASSOC_CONT_CLASS_NAME
-//
-// ARG_VALUE_TYPE
-// ARG_KEY_TYPE
-// ARG_ACTUAL_VALUE_TYPE
-//
-// _KEY_NAME
-// _VALUE_NAME
-//
-// _X_KEY_NAME
-// _X_VALUE_NAME
-//
-// _INSERT_METHOD_DEFINITION
-
-#define __DEFINE_ASOC_CLASS( ARG_IS_UNIQUE, \
-FUNCTOR,\
-ASSOC_CONT_CLASS_NAME, \
-ARG_VALUE_TYPE, \
-ARG_KEY_TYPE, \
-ARG_ACTUAL_VALUE_TYPE, \
-_KEY_NAME, \
-_VALUE_NAME, \
-_X_KEY_NAME, \
-_X_VALUE_NAME, \
-_INSERT_METHOD_DEFINITION \
-) class \
-ASSOC_CONT_CLASS_NAME\
-{\
-protected:\
-\
-public:\
- typedef ARG_VALUE_TYPE value_type;\
- typedef ARG_KEY_TYPE key_type;\
- typedef ARG_ACTUAL_VALUE_TYPE actual_value_type;\
-\
- typedef value_type* pointer;\
- typedef value_type& reference;\
-\
- typedef const value_type& const_reference;\
-\
- typedef FUNCTOR key_compare;\
- typedef key_compare Compare;\
-\
-protected:\
-\
- struct tree_node \
- {\
- tree_node* m_pParent;\
- tree_node* mpLeft;\
- tree_node* mpRight;\
-\
- value_type mData;\
- };\
-\
-public:\
- typedef tree_node* node_ref_type;\
-protected:\
-\
- node_ref_type mpRoot;\
- node_ref_type mpLeftMost;\
- node_ref_type mpRightMost;\
-\
- node_ref_type mpFreeListHead;\
- int mKeyIsUnique;\
-\
- key_compare mCmpFunctorObj;\
-\
-public:\
-\
- static inline node_ref_type next( node_ref_type pNode )\
- {\
- if ( pNode->mpRight ) \
- {\
- pNode = pNode->mpRight;\
-\
- while ( pNode->mpLeft ) pNode = pNode->mpLeft;\
-\
- return pNode;\
- }\
- else\
- if ( pNode->m_pParent )\
- {\
- if ( pNode == pNode->m_pParent->mpLeft )\
-\
- return pNode->m_pParent;\
-\
- pNode = pNode->m_pParent;\
-\
- node_ref_type prevNode = pNode;\
- pNode = pNode->m_pParent;\
-\
- while(pNode)\
- {\
- if ( pNode->mpRight &&\
- pNode->mpRight != prevNode\
- ) return pNode;\
-\
- prevNode = pNode;\
- pNode= pNode->m_pParent;\
- }\
-\
- return 0;\
- }\
- else\
- return 0;\
- }\
-\
- static inline node_ref_type prev( node_ref_type pNode )\
- {\
- if ( pNode->mpLeft ) \
- {\
- pNode = pNode->mpLeft;\
-\
- while ( pNode->mpRight ) pNode = pNode->mpRight;\
-\
- return pNode;\
- }\
- else\
- if ( pNode->m_pParent )\
- {\
- if ( pNode == pNode->m_pParent->mpRight )\
- return pNode->m_pParent;\
-\
- pNode = pNode->m_pParent;\
-\
- node_ref_type prevNode = pNode;\
- pNode = pNode->m_pParent;\
-\
- while(pNode)\
- {\
- if ( pNode->mpLeft &&\
- pNode->mpLeft != prevNode\
- ) return pNode;\
-\
- prevNode = pNode;\
- pNode= pNode->m_pParent;\
- }\
-\
- return 0;\
- }\
- else \
- return 0;\
- }\
-\
-protected:\
-\
- inline int are_equel( const key_type& x, const key_type& y )\
- {\
- return ( !mCmpFunctorObj(x,y) && !mCmpFunctorObj(y,x) );\
- }\
-\
- inline int is_less( const key_type& x, const key_type& y )\
- {\
- return mCmpFunctorObj(x,y);\
- }\
-\
- static inline const actual_value_type& value( node_ref_type pNode )\
- {\
- return pNode->_VALUE_NAME;\
- }\
-\
- static inline const key_type& key( node_ref_type pNode )\
- {\
- return pNode->_KEY_NAME;\
- }\
-\
- inline node_ref_type AllocNode() \
- { \
- if ( mpFreeListHead ) \
- {\
- node_ref_type pFreeNode = mpFreeListHead;\
- mpFreeListHead = mpFreeListHead->mpLeft;\
-\
- return pFreeNode;\
- }\
- else\
- {\
- char* pHeapBlock = new char[sizeof(tree_node)];\
-\
- return (node_ref_type)pHeapBlock;\
- }\
- }\
-\
- inline void DestroyFreeList()\
- {\
- while ( mpFreeListHead )\
- {\
- node_ref_type tmp = mpFreeListHead;\
- mpFreeListHead = mpFreeListHead->mpLeft;\
-\
- delete [](char*)tmp;\
- }\
- }\
-\
- inline void RecycleNode( node_ref_type pNode ) \
- {\
- pNode->mpLeft = mpFreeListHead;\
- mpFreeListHead = pNode;\
- }\
-\
- inline node_ref_type do_insert(const value_type& x = value_type() )\
- {\
- node_ref_type pNewNode = AllocNode();\
-\
- pNewNode->m_pParent = \
- pNewNode->mpLeft =\
- pNewNode->mpRight = 0;\
-\
- node_ref_type pCurrent = mpRoot;\
- node_ref_type pParent = 0;\
- \
- while (pCurrent) \
- {\
- if ( mKeyIsUnique && are_equel( _X_KEY_NAME, value(pCurrent) ) )\
- {\
- RecycleNode(pNewNode);\
- return 0;\
- }\
-\
- pParent = pCurrent;\
-\
- pCurrent = is_less( _X_KEY_NAME, value(pCurrent) ) \
- ? pCurrent->mpLeft \
- : pCurrent->mpRight;\
- }\
- \
- pNewNode->m_pParent = pParent;\
-\
- if(pParent)\
-\
- if( is_less(_X_KEY_NAME, value(pParent) ) )\
- \
- pParent->mpLeft = pNewNode;\
- else\
- pParent->mpRight = pNewNode;\
- else\
- mpRoot = pNewNode;\
-\
- new ( &pNewNode->_KEY_NAME ) key_type(_X_KEY_NAME);\
- new ( &pNewNode->_VALUE_NAME ) actual_value_type(_X_VALUE_NAME);\
-\
- if ( prev(pNewNode) == 0 ) mpLeftMost = pNewNode;\
- if ( next(pNewNode) == 0 ) mpRightMost = pNewNode;\
-\
- return pNewNode;\
- }\
-\
- friend class iterator;\
-\
-public:\
-\
- class iterator;\
- class const_iterator;\
-\
- class iterator \
- {\
- public:\
- node_ref_type mpNode;\
- friend class CONT_CLASS_NAME;\
- friend class const_iterator;\
- friend class const_reverse_iterator;\
-\
- inline iterator( node_ref_type pNode )\
- {\
- mpNode = pNode;\
- }\
- \
- public:\
- inline iterator() {}\
- inline int operator==( const iterator& rhs ) const { return (mpNode == rhs.mpNode); }\
- inline int operator!=( const iterator& rhs ) const { return (mpNode != rhs.mpNode); }\
-\
- inline iterator( const iterator& other )\
- {\
- mpNode = other.mpNode;\
- }\
-\
- inline const iterator& operator=( const iterator& other )\
- {\
- mpNode = other.mpNode;\
- return *this;\
- }\
-\
- inline const iterator& operator--() \
- {\
- mpNode = ASSOC_CONT_CLASS_NAME::prev(mpNode);\
- return *this;\
- }\
-\
- inline iterator operator--(int)\
- {\
- iterator tmp = *this;\
- mpNode = ASSOC_CONT_CLASS_NAME::prev(mpNode);\
- return tmp;\
- }\
-\
- inline const iterator& operator++() \
- {\
- mpNode = ASSOC_CONT_CLASS_NAME::next(mpNode);\
- return *this;\
- }\
-\
- inline iterator operator++(int)\
- {\
- iterator tmp = *this;\
- mpNode = ASSOC_CONT_CLASS_NAME::next(mpNode);\
- return tmp;\
- }\
-\
- inline reference operator*() const { return mpNode->mData; }\
- };\
-\
-\
- class const_iterator \
- {\
- public:\
- node_ref_type mpNode;\
- friend class CONT_CLASS_NAME;\
- friend class const_reverse_iterator;\
-\
- inline const_iterator( node_ref_type pNode )\
- {\
- mpNode = pNode;\
- }\
- \
- public:\
- inline const_iterator() {}\
-\
- inline int operator==( const const_iterator& rhs ) const { return (mpNode == rhs.mpNode); }\
- inline int operator!=( const const_iterator& rhs ) const { return (mpNode != rhs.mpNode); }\
-\
- inline const_iterator( const iterator& other )\
- {\
- mpNode = other.mpNode;\
- }\
-\
- inline const_iterator( const const_iterator& other )\
- {\
- mpNode = other.mpNode;\
- }\
-\
- inline const const_iterator& operator=( const const_iterator& other )\
- {\
- mpNode = other.mpNode;\
- return *this;\
- }\
-\
- inline const const_iterator& operator--() \
- {\
- mpNode = ASSOC_CONT_CLASS_NAME::prev(mpNode);\
- return *this;\
- }\
-\
- inline const_iterator operator--(int)\
- {\
- const_iterator tmp = *this;\
- mpNode = ASSOC_CONT_CLASS_NAME::prev(mpNode);\
- return tmp;\
- }\
-\
- inline const const_iterator& operator++() \
- {\
- mpNode = ASSOC_CONT_CLASS_NAME::next(mpNode);\
- return *this;\
- }\
-\
- inline const_iterator operator++(int)\
- {\
- const_iterator tmp = *this;\
- mpNode = ASSOC_CONT_CLASS_NAME::next(mpNode);\
- return tmp;\
- }\
-\
- inline const_reference operator*() const { return mpNode->mData; }\
- };\
-\
-public:\
-\
- inline ASSOC_CONT_CLASS_NAME( key_compare cmpFunctorObj = key_compare(),\
- int keyIsUnique = ARG_IS_UNIQUE )\
- : mpFreeListHead( 0 ),\
- mKeyIsUnique( keyIsUnique ),\
- mCmpFunctorObj( cmpFunctorObj )\
- {\
- mpLeftMost = 0;\
- mpRightMost = 0;\
- mpRoot = 0;\
- }\
-\
- inline ~ASSOC_CONT_CLASS_NAME() \
- { \
- erase( begin(), end() ); \
-\
- DestroyFreeList();\
- }\
-\
- inline iterator begin() { return mpLeftMost; }\
- inline iterator end() { return 0; }\
-\
- inline const_iterator begin() const { return mpLeftMost; }\
- inline const_iterator end() const { return 0; }\
-\
- inline iterator lower_bound( const key_type& x )\
- { \
- node_ref_type pCurrent = mpRoot;\
- \
- while( pCurrent )\
- {\
- node_ref_type pParent = pCurrent;\
-\
- if( are_equel( x, key(pCurrent) ) )\
- \
- return (pCurrent);\
- else\
- pCurrent = is_less( x, key(pCurrent) ) \
- ? pCurrent->mpLeft \
- : pCurrent->mpRight;\
-\
- if ( !pCurrent ) return (pParent);\
- }\
-\
- return begin();\
- }\
-\
- inline const_iterator lower_bound( const key_type& x ) const\
-\
- { return const_iterator( lower_bound(x).mpNode ); }\
-\
- inline iterator upper_bound( const key_type& x )\
- {\
- node_ref_type pCurrent = mpRoot;\
- \
- while( pCurrent )\
- {\
- node_ref_type pParent = pCurrent;\
-\
- if( are_equel( x, key(pCurrent) ) )\
- \
- return (pCurrent);\
- else\
- pCurrent = is_less( x, key(pCurrent) ) \
- ? pCurrent->mpLeft \
- : pCurrent->mpRight;\
-\
- if ( !pCurrent ) return next(pParent);\
- }\
-\
- return end();\
- }\
-\
- inline const_iterator upper_bound( const key_type& x ) const\
-\
- { return const_iterator( upper_bound(x).mpNode ); }\
-\
- inline iterator find( const key_type& x )\
- {\
- node_ref_type pCurrent = mpRoot;\
- \
- while( pCurrent )\
- {\
- if( are_equel( x, key(pCurrent) ) )\
- \
- return (pCurrent);\
- else\
- pCurrent = is_less( x, key(pCurrent) ) \
- ? pCurrent->mpLeft \
- : pCurrent->mpRight;\
- }\
-\
- return end();\
- }\
-\
- inline const_iterator find( const key_type& x ) const\
-\
- { return const_iterator( find(x).mpNode ); }\
-\
- inline void erase(iterator first, iterator last)\
- {\
- if ( first.mpNode == 0 ) return;\
-\
- while( first != last ) \
- {\
- iterator next = first;\
- ++next;\
- erase( first );\
- first = next;\
- }\
- }\
-\
- inline void erase(iterator position)\
- {\
- if ( position.mpNode == 0 ) return;\
-\
- node_ref_type pZ = position.mpNode;\
- node_ref_type pX, pY;\
-\
- if ( pZ == mpLeftMost ) mpLeftMost = next(pZ);\
- if ( pZ == mpRightMost ) mpRightMost = prev( pZ );\
-\
- if ( !pZ->mpLeft || !pZ->mpRight )\
- \
- pY = pZ;\
- else \
- {\
- pY = pZ->mpRight;\
- \
- while (pY->mpLeft) \
- \
- pY = pY->mpLeft;\
- }\
- \
- if ( pY->mpLeft)\
- \
- pX = pY->mpLeft;\
- else\
- pX = pY->mpRight;\
- \
- if ( pX ) pX->m_pParent = pY->m_pParent;\
- \
- if (pY->m_pParent)\
- \
- if (pY == pY->m_pParent->mpLeft )\
- \
- pY->m_pParent->mpLeft = pX;\
- else\
- pY->m_pParent->mpRight = pX;\
- else\
- mpRoot = pX;\
- \
- node_ref_type toRemove = 0;\
- \
- if (pY != pZ) {\
- \
- pY->mpLeft = pZ->mpLeft;\
- \
- if (pY->mpLeft) pY->mpLeft->m_pParent = pY;\
- \
- pY->mpRight = pZ->mpRight;\
- \
- if ( pY->mpRight ) \
- \
- pY->mpRight->m_pParent = pY;\
- \
- pY->m_pParent = pZ->m_pParent;\
- \
- if (pZ->m_pParent)\
- \
- if (pZ == pZ->m_pParent->mpLeft)\
- \
- pZ->m_pParent->mpLeft = pY;\
- else\
- pZ->m_pParent->mpRight = pY;\
- else\
- mpRoot = pY;\
- \
- toRemove = pZ;\
- } \
- else \
- toRemove = pY;\
- \
- value(toRemove).~actual_value_type();\
- key(toRemove).~actual_value_type();\
-\
- RecycleNode( toRemove );\
- }\
-\
- _INSERT_METHOD_DEFINITION\
-}
-
-// do not undefine ___WXSTL_COMMA, where associated containers are defined!
-// (it is used as workaround for constraints of C-Preprocessor's nested macros)
-
-#define ___WXSTL_COMMA ,
-
-#define __DEFINE_MAP(ARG_IS_UNIQUE, KEY_TYPE, VAL_TYPE, FUNCTOR ) \
-__DEFINE_ASOC_CLASS( ARG_IS_UNIQUE,\
-FUNCTOR,\
-__WXSTLMAP_##KEY_TYPE##VAL_TYPE##ARG_IS_UNIQUE, \
-struct key_value_pair { KEY_TYPE first ; \
- VAL_TYPE second;\
- key_value_pair() {}\
- key_value_pair( const KEY_TYPE& key ___WXSTL_COMMA const VAL_TYPE& value ) \
- : first(key) ___WXSTL_COMMA second( value ) {} \
- } , \
-KEY_TYPE,\
-VAL_TYPE,\
-mData.first, mData.second, x.first, x.second, \
-struct insert_result_iterator\
-{\
- iterator first;\
- int second;\
-};\
-inline insert_result_iterator insert( const value_type& x )\
-{\
- insert_result_iterator result;\
-\
- result.first = do_insert(x);\
- result.second = ( result.first == end() ) ? 0 : 1;\
-\
- return result;\
-} )
-
-#define __DEFINE_SET(ARG_IS_UNIQUE, KEY_TYPE, FUNCTOR ) \
-__DEFINE_ASOC_CLASS( ARG_IS_UNIQUE,\
-FUNCTOR,\
-__WXSTLSET_##TYPE##ARG_IS_UNIQUE, \
-KEY_TYPE,\
-KEY_TYPE,\
-KEY_TYPE,\
-mData, mData, x, x, \
-struct insert_result_iterator\
-{\
- iterator first;\
- int second;\
-};\
-inline insert_result_iterator insert( const value_type& x )\
-{\
- insert_result_iterator result;\
-\
- result.first = do_insert(x);\
- result.second = ( result.first == end() ) ? 0 : 1;\
-\
- return result;\
-} )
-
-// helper macros to create functor objects for associative containers of the given type
-
-#define LESS_THEN_FUNCTOR(TYPE) struct \
-{ inline int operator()(const TYPE& x, const TYPE& y ) const { return x < y; } }
-
-#define GREATER_THEN_FUNCTOR(TYPE) struct \
-{ inline int operator()(const TYPE& x, const TYPE& y ) const { return x > y; } }
-
-// functor argument should be created using the two above macros
-// or passing own class with method "operator()(const TYPE&,cosnt TYPE&)" defined in it
-
-#define WXSTL_MAP( KEY_TYPE, VALUE_TYPE, FUNCTOR ) __DEFINE_MAP( 1 ,KEY_TYPE, VALUE_TYPE, FUNCTOR)
-#define WXSTL_MULTIMAP( KEY_TYPE, VALUE_TYPE, FUNCTOR ) __DEFINE_MAP( 0 ,KEY_TYPE, VALUE_TYPE, FUNCTOR)
-#define WXSTL_SET( KEY_TYPE, FUNCTOR ) __DEFINE_SET( 1 ,KEY_TYPE, FUNCTOR )
-#define WXSTL_MULTISET( KEY_TYPE, FUNCTOR ) __DEFINE_SET( 0 ,KEY_TYPE, FUNCTOR )
-
-#endif
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 27/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef __WXSTLLST_G__
-#define __WXSTLLST_G__
-
-#ifdef new
-#undef new
-#endif
-
-#include <stddef.h>
-#if !defined(__WXMAC__) || defined(__DARWIN__)
-# include <sys/types.h>
-#endif
-#include <memory.h>
-#include <limits.h>
-#include <new.h>
-
-// VERSION:: 0.2 (copy-constructor/assign-op added)
-
-// FOR NOW:: class-member operators "new" and "delete"
-// are ignored by list class, memory allocated
-// and freed using global operators
-
-typedef int Type;
-
-
-// the below macro used internally (see actual interface after this macro)
-
-#define __DEFINE_STL_LIST(listClass,Type) class \
- listClass \
-{\
-public:\
-\
- typedef Type value_type;\
- typedef value_type* pointer;\
- typedef const value_type* const_pointer;\
- typedef value_type& reference;\
- typedef const value_type& const_reference;\
- typedef size_t size_type;\
- typedef ptrdiff_t difference_type;\
-\
-protected:\
- struct list_node\
- {\
- list_node* mpNext;\
- list_node* mpPrev;\
- value_type mData;\
- };\
-\
- typedef list_node* node_ref_type;\
-\
- node_ref_type mpFreeListHead;\
- node_ref_type mpTerminator;\
- size_type m_Size;\
-\
- inline node_ref_type AllocNode() \
- { \
- if ( mpFreeListHead ) \
- {\
- node_ref_type pFreeNode = mpFreeListHead;\
- mpFreeListHead = mpFreeListHead->mpPrev;\
-\
- return pFreeNode;\
- }\
- else\
- {\
- char* pHeapBlock = new char[sizeof(list_node)];\
-\
- return (node_ref_type)pHeapBlock;\
- }\
- }\
-\
- inline void DestroyFreeList()\
- {\
- while ( mpFreeListHead )\
- {\
- node_ref_type tmp = mpFreeListHead;\
- mpFreeListHead = mpFreeListHead->mpPrev;\
-\
- delete [](char*)tmp;\
- }\
- }\
-\
- inline void RecycleNode( node_ref_type pNode ) \
- {\
- pNode->mpPrev = mpFreeListHead;\
- mpFreeListHead = pNode;\
- }\
-\
-public:\
-\
- class iterator \
- {\
- public:\
- node_ref_type mpNode;\
- friend class listClass;\
- friend class const_iterator;\
- friend class const_reverse_iterator;\
-\
- protected:\
- iterator( node_ref_type pNode )\
- {\
- mpNode = pNode;\
- }\
- \
- public:\
- iterator() {}\
- int operator==( const iterator& rhs ) const { return (mpNode == rhs.mpNode); }\
- int operator!=( const iterator& rhs ) const { return (mpNode != rhs.mpNode); }\
-\
- inline iterator( const iterator& other )\
- {\
- mpNode = other.mpNode;\
- }\
-\
- inline const iterator& operator--() \
- {\
- mpNode = mpNode->mpPrev;\
- return *this;\
- }\
-\
- inline iterator operator--(int)\
- {\
- iterator tmp = *this;\
- mpNode = mpNode->mpPrev;\
- return tmp;\
- }\
-\
- inline const iterator& operator++() \
- {\
- mpNode = mpNode->mpNext;\
- return *this;\
- }\
-\
- inline iterator operator++(int)\
- {\
- iterator tmp = *this;\
- mpNode = mpNode->mpNext;\
- return tmp;\
- }\
-\
- inline reference operator*() const { return mpNode->mData; }\
- };\
-\
-\
- class const_iterator \
- {\
- protected:\
- node_ref_type mpNode;\
- friend class listClass;\
-\
- protected:\
- const_iterator( node_ref_type pNode )\
- {\
- mpNode = pNode;\
- }\
- \
- public:\
- \
- const_iterator() {}\
- int operator==( const const_iterator& rhs ) const { return (mpNode == rhs.mpNode); }\
- int operator!=( const const_iterator& rhs ) const { return (mpNode != rhs.mpNode); }\
-\
-\
- inline const_iterator( const iterator& other )\
- {\
- mpNode = other.mpNode;\
- }\
-\
- inline const const_iterator& operator--() \
- {\
- mpNode = mpNode->mpPrev;\
- return *this;\
- }\
-\
- inline const_iterator operator--(int)\
- {\
- const_iterator tmp = *this;\
- mpNode = mpNode->mpPrev;\
- return tmp;\
- }\
-\
- inline const const_iterator& operator++() \
- {\
- mpNode = mpNode->mpNext;\
- return *this;\
- }\
-\
- inline const_iterator operator++(int)\
- {\
- const_iterator tmp = *this;\
- mpNode = mpNode->mpNext;\
- return tmp;\
- }\
-\
- inline const_reference operator*() const { return mpNode->mData; }\
- };\
-\
- typedef iterator OutputIterator;\
- typedef const_iterator InputIterator;\
-\
- class reverse_iterator \
- {\
- public:\
- node_ref_type mpNode;\
- friend class listClass;\
- friend class const_reverse_iterator;\
-\
- protected:\
- reverse_iterator ( node_ref_type pNode )\
- {\
- mpNode = pNode;\
- }\
- \
- public:\
-\
- reverse_iterator() {}\
- int operator==( const reverse_iterator& rhs ) const { return (mpNode == rhs.mpNode); }\
- int operator!=( const reverse_iterator& rhs ) const { return (mpNode != rhs.mpNode); }\
-\
- inline reverse_iterator( const reverse_iterator& other )\
- {\
- mpNode = other.mpNode;\
- }\
-\
- inline const reverse_iterator& operator--() \
- {\
- mpNode = mpNode->mpNext;\
- return *this;\
- }\
-\
- inline reverse_iterator operator--(int)\
- {\
- reverse_iterator tmp = *this;\
- mpNode = mpNode->mpPrev;\
- return tmp;\
- }\
-\
- inline const reverse_iterator & operator++() \
- {\
- mpNode = mpNode->mpNext;\
- return *this;\
- }\
-\
- inline reverse_iterator operator++(int)\
- {\
- reverse_iterator tmp = *this;\
- mpNode = mpNode->mpPrev;\
- return tmp;\
- }\
-\
- inline const_reference operator*() const { return mpNode->mData; }\
- };\
-\
-\
- class const_reverse_iterator \
- {\
- protected:\
- node_ref_type mpNode;\
- friend class listClass;\
-\
- protected:\
- const_reverse_iterator( node_ref_type pNode )\
- {\
- mpNode = pNode;\
- }\
- \
- public:\
-\
- const_reverse_iterator() {}\
- int operator==( const const_reverse_iterator& rhs ) const { return (mpNode == rhs.mpNode); }\
- int operator!=( const const_reverse_iterator& rhs ) const { return (mpNode != rhs.mpNode); }\
-\
- inline const_reverse_iterator( const reverse_iterator& other )\
- {\
- mpNode = other.mpNode;\
- }\
-\
- inline const const_reverse_iterator& operator--() \
- {\
- mpNode = mpNode->mpNext;\
- return *this;\
- }\
-\
- inline const_reverse_iterator operator--(int)\
- {\
- const_reverse_iterator tmp = *this;\
- mpNode = mpNode->mpNext;\
- return tmp;\
- }\
-\
- inline const const_reverse_iterator& operator++() \
- {\
- mpNode = mpNode->mpPrev;\
- return *this;\
- }\
-\
- inline const_reverse_iterator operator++(int)\
- {\
- const_reverse_iterator tmp = *this;\
- mpNode = mpNode->mpPrev;\
- return tmp;\
- }\
-\
- inline const_reference operator*() const { return mpNode->mData; }\
- };\
-\
-public:\
-\
- inline listClass()\
- : mpFreeListHead( 0 ),\
- m_Size(0)\
- {\
- mpTerminator = AllocNode();\
- mpTerminator->mpPrev = mpTerminator->mpNext = mpTerminator;\
- }\
-\
- listClass( const listClass& other )\
- {\
- mpTerminator = AllocNode();\
- mpTerminator->mpPrev = mpTerminator->mpNext = mpTerminator;\
-\
- for( listClass::const_iterator i = other.begin(); i != other.end(); ++i )\
-\
- push_back( (*i) );\
- }\
-\
- inline const listClass& operator=( const listClass& rhs ) \
- {\
- erase( begin(), end() );\
-\
- for( listClass::const_iterator i = rhs.begin(); i != rhs.end(); ++i )\
-\
- push_back( (*i) );\
-\
- return *this;\
- }\
-\
- inline listClass(const_iterator first, const_iterator last)\
- : mpFreeListHead( 0 ),\
- m_Size(0)\
- \
- { while( first != last ) push_back( *first++ ); }\
-\
- inline listClass( size_type n, const value_type& value = value_type() )\
- \
- { for( size_t i = 0; i != n; ++n ) push_back( value ); }\
-\
- inline ~listClass() \
- { \
- erase( begin(), end() ); \
-\
- RecycleNode( mpTerminator );\
- DestroyFreeList();\
- }\
-\
- inline iterator begin() { return iterator(mpTerminator->mpNext); }\
- \
- inline const_iterator begin() const \
- { return const_iterator(mpTerminator->mpNext); }\
- \
- inline iterator end() { return iterator(mpTerminator); }\
-\
- inline const_iterator end() const { return const_iterator(mpTerminator); }\
-\
- inline reverse_iterator rbegin() \
- { return reverse_iterator(mpTerminator->mpPrev); }\
-\
- inline reverse_iterator rend() \
- { return reverse_iterator(mpTerminator); }\
-\
- inline const_reverse_iterator rbegin() const\
- { return const_reverse_iterator(mpTerminator->mpPrev); }\
-\
- inline const_reverse_iterator rend() const\
- { return const_reverse_iterator(mpTerminator); }\
-\
- inline int empty() const { return (m_Size == 0); }\
-\
- inline size_type size() const { return m_Size; }\
-\
- inline size_type max_size() const { return UINT_MAX/sizeof(list_node); }\
-\
- inline reference front() { return mpTerminator->mData; }\
-\
- inline const_reference front() const { return mpTerminator->mData; }\
-\
- inline reference back() { return mpTerminator->mpPrev->mData; }\
-\
- inline const_reference back() const { return mpTerminator->mpPrev->mData; }\
-\
- inline void push_front(const value_type& x) { insert( begin(), x ); }\
-\
- inline void push_back(const value_type& x) { insert( end(), x ); }\
-\
- iterator insert(iterator position, const value_type& x = value_type())\
- {\
- node_ref_type pNew = AllocNode();\
-\
- node_ref_type pos = *((node_ref_type*)&position);\
-\
- pNew->mpNext = pos;\
- pNew->mpPrev = pos->mpPrev;\
- pos->mpPrev->mpNext = pNew;\
- pos->mpPrev = pNew;\
-\
- new (&pNew->mData) value_type(x);\
-\
- ++m_Size;\
-\
- return iterator(pNew);\
- }\
-\
- inline void insert(iterator position, const_iterator first, const_iterator last )\
- {\
- while( first != last ) insert( position, *first++ );\
- }\
-\
- inline void splice( iterator position, listClass& other )\
- {\
- if ( other.begin() == other.end() ) return;\
-\
- node_ref_type pTill = other.mpTerminator->mpPrev;\
- node_ref_type pFrom = other.begin().mpNode;\
-\
- mpTerminator->mpPrev->mpNext = pFrom;\
- pFrom->mpPrev = mpTerminator->mpPrev->mpNext;\
-\
- pTill->mpNext = mpTerminator;\
- mpTerminator->mpPrev = pTill;\
-\
- other.mpTerminator->mpNext = \
- other.mpTerminator->mpPrev = other.mpTerminator;\
-\
- m_Size += other.m_Size;\
- other.m_Size = 0;\
- }\
-\
- inline void splice( iterator position, listClass& other, iterator first, iterator last )\
- {\
- if ( first == last ) return;\
-\
- size_type sz = 0;\
- iterator tmp = first;\
- while( tmp != last ) \
- {\
- ++tmp;\
- ++sz;\
- }\
-\
- m_Size += sz;\
- other.m_Size -= sz;\
-\
- node_ref_type pPos = position.mpNode;\
- node_ref_type pFirst = first.mpNode;\
- node_ref_type pLast = last.mpNode;\
- node_ref_type pTill = last.mpNode->mpPrev;\
-\
- pPos->mpPrev->mpNext = pFirst;\
- pPos->mpPrev = pTill;\
-\
- pFirst->mpPrev->mpNext = last.mpNode;\
- pLast->mpPrev = pTill;\
-\
- pFirst->mpPrev = pPos->mpPrev;\
- pTill->mpNext = pPos;\
- }\
-\
- inline void pop_front() { erase( begin() ); }\
- inline void pop_back() { erase( --end() ); }\
- \
- inline void erase(iterator position)\
- {\
- erase( position, ++position );\
- }\
- \
- inline void erase(iterator first, iterator last)\
- {\
- node_ref_type firstNode = *((node_ref_type*)&first);\
- node_ref_type lastNode = *((node_ref_type*)&last);\
-\
- firstNode->mpPrev->mpNext = lastNode;\
- lastNode->mpPrev = firstNode->mpPrev;\
-\
- while( firstNode != lastNode )\
- {\
- node_ref_type next = firstNode->mpNext;\
-\
- typedef value_type value_type_local;\
- firstNode->mData.value_type_local::~value_type_local();\
-\
- RecycleNode( firstNode );\
-\
- firstNode = next;\
-\
- --m_Size;\
- }\
- }\
-\
- inline void remove(const value_type& value)\
- {\
- for( iterator i = begin(); i != end(); ++i )\
- \
- if ( (*i) == value ) \
- {\
- erase( i ); break;\
- }\
- }\
-\
- void sort()\
- {\
- if ( m_Size < 2 ) return;\
-\
- iterator from = begin();\
- iterator other_end = end();\
- --other_end;\
-\
- for( size_type i = 0; i != m_Size; ++i )\
- {\
- size_type nSwaps = 0;\
-\
- iterator next = begin();\
- ++next;\
-\
- for( iterator j = begin(); j != other_end; ++j )\
- {\
-\
- if ( (*next) < (*j) )\
- {\
- value_type tmp = (*j);\
- (*j) = (*next);\
- (*next) = tmp;\
-\
- ++nSwaps;\
- }\
-\
- ++next;\
- }\
-\
- if ( !nSwaps) break;\
-\
- --other_end;\
- }\
- }\
-}
-
-// defines list class with the given element type
-#define WXSTL_LIST(ELEMENT_CLASS) __DEFINE_STL_LIST(\
-\
-_WXSTL_LIST_##ELEMENT_CLASS, ELEMENT_CLASS )
-
-#endif
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: No names yet.
-// Purpose: Contrib. demo
-// Author: Aleksandras Gluchovas
-// Modified by:
-// Created: 27/09/98
-// RCS-ID: $Id$
-// Copyright: (c) Aleskandars Gluchovas
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef __WXSTLVEC_G__
-#define __WXSTLVEC_G__
-
-#ifdef new
-#undef new
-#endif
-
-#include <memory.h>
-#include <string.h> // imports memmove()
-#include <stddef.h>
-#if !defined(__WXMAC__) || defined(__DARWIN__)
-# include <sys/types.h>
-#endif
-#include <limits.h>
-#include <new>
-
-// the below macro used internally (see actual interface after this macro)
-
-#define __DEFINE_STL_VECTOR_DEEP( vectorClass, Type ) class vectorClass {\
-\
-public:\
- typedef Type value_type;\
- typedef value_type* iterator;\
- typedef const value_type* const_iterator;\
- typedef iterator pointer;\
- typedef const iterator const_pointer;\
- typedef value_type& reference;\
- typedef const value_type& const_reference;\
- typedef size_t size_type;\
- typedef ptrdiff_t difference_type;\
-\
- typedef iterator OutputIterator;\
- typedef const_iterator InputIterator;\
-\
-protected:\
-\
- inline void PlacementCopy( const_iterator first, const_iterator last, iterator result )\
- {\
- while ( first != last ) \
- new (result++) value_type(*first++);\
- }\
-\
- inline void ConstructObjects( iterator first, iterator last, const value_type& pattern )\
- {\
- while( first != last ) \
- new (first++) value_type(pattern);\
- }\
-\
- inline void CopyObjects( iterator first, iterator last, iterator result )\
- {\
- while( first != last ) \
- *result++ = *first++;\
- }\
-\
- inline void CopyObjectsBack( iterator first, iterator last, iterator result )\
- {\
- result += difference_type(last,first);\
-\
- while( first != last ) \
- *(--result) = *(--last);\
- }\
-\
-public:\
-\
- class reverse_iterator \
- {\
- friend class vectorClass;\
- friend class const_reverse_iterator;\
-\
- public:\
- iterator mpPos;\
-\
- public:\
-\
- reverse_iterator() {}\
-\
- reverse_iterator ( iterator pPos )\
- {\
- mpPos = pPos;\
- }\
- \
- int operator==( const reverse_iterator& rhs ) const { return (mpPos == rhs.mpPos); }\
- int operator!=( const reverse_iterator& rhs ) const { return (mpPos != rhs.mpPos); }\
-\
- inline reverse_iterator( const reverse_iterator& other )\
- {\
- mpPos = other.mpPos;\
- }\
-\
- inline const reverse_iterator& operator--() \
- {\
- --mpPos;\
- return *this;\
- }\
-\
- inline reverse_iterator operator--(int)\
- {\
- reverse_iterator tmp = *this;\
- --mpPos;\
- return tmp;\
- }\
-\
- inline const reverse_iterator & operator++() \
- {\
- ++mpPos;\
- return *this;\
- }\
-\
- inline reverse_iterator operator++(int)\
- {\
- reverse_iterator tmp = *this;\
- ++mpPos;\
- return tmp;\
- }\
-\
- inline const_reference operator*() const { return *mpPos; }\
- };\
-\
-\
- class const_reverse_iterator \
- {\
- protected:\
- iterator mpPos;\
- public:\
-\
- const_reverse_iterator() {}\
-\
- const_reverse_iterator( const iterator pPos )\
- {\
- mpPos = pPos;\
- }\
- \
- int operator==( const const_reverse_iterator& rhs ) const { return (mpPos == rhs.mpPos); }\
- int operator!=( const const_reverse_iterator& rhs ) const { return (mpPos != rhs.mpPos); }\
-\
- inline const_reverse_iterator( const reverse_iterator& other )\
- {\
- mpPos = other.mpPos;\
- }\
-\
- inline const const_reverse_iterator& operator--() \
- {\
- --mpPos;\
- return *this;\
- }\
-\
- inline const_reverse_iterator operator--(int)\
- {\
- const_reverse_iterator tmp = *this;\
- --mpPos;\
- return tmp;\
- }\
-\
- inline const const_reverse_iterator & operator++() \
- {\
- ++mpPos;\
- return *this;\
- }\
-\
- inline const_reverse_iterator operator++(int)\
- {\
- const_reverse_iterator tmp = *this;\
- ++mpPos;\
- return tmp;\
- }\
-\
- inline const_reference operator*() const { return *mpPos; }\
- };\
-\
-protected:\
- \
- pointer mpStart;\
- pointer mpEnd;\
- pointer mpEndOfBuf;\
-\
-protected:\
-\
- inline void quick_sort(int WXUNUSED(low), int WXUNUSED(hi)) \
- {\
- }\
-\
- inline void DestructRange( iterator first, iterator last )\
- {\
- typedef value_type value_type_local;\
-\
- while ( first != last ) \
- {\
- first->value_type_local::~value_type_local();\
- ++first;\
- }\
- }\
-\
- inline iterator DoInsert(iterator position, const value_type& x)\
- {\
- if ( mpEnd < mpEndOfBuf )\
- {\
- new (mpEnd) value_type(*(mpEnd-1) );\
- \
- CopyObjectsBack( position, mpEnd, position + 1 );\
- \
- *position = x;\
- \
- ++mpEnd;\
- \
- return position;\
- }\
- \
- size_type minBufLen = WXSTL_VECTOR_MIN_BUF_SIZE/sizeof(value_type);\
- \
- size_type doubledSize = size()*2;\
- \
- size_type newLen = ( doubledSize < minBufLen ) ? minBufLen : doubledSize;\
- \
- iterator pNewStart = (iterator)( new char[newLen*sizeof(value_type)] );\
- \
- PlacementCopy( mpStart, position, pNewStart );\
- \
- iterator atPosition = pNewStart + difference_type( position - mpStart );\
- \
- new (atPosition) value_type(x);\
- \
- iterator newPos = atPosition;\
- \
- ++atPosition;\
- \
- if ( mpStart ) \
- {\
- PlacementCopy( position, mpEnd, atPosition );\
- DestructRange( mpStart, mpEnd );\
- delete [](char*)mpStart;\
- }\
- \
- mpEnd = atPosition + difference_type( mpEnd - position );\
- \
- mpStart = pNewStart;\
- mpEndOfBuf = pNewStart + newLen;\
- \
- return newPos;\
- }\
-\
-public:\
-\
- inline vectorClass() : mpStart(0), \
- mpEnd(0),\
- mpEndOfBuf(0)\
- {}\
-\
- inline vectorClass( const_iterator first, const_iterator last )\
- : mpStart(0),\
- mpEnd(0),\
- mpEndOfBuf(0)\
- \
- { while( first != last ) push_back( *first++ ); }\
-\
- inline vectorClass( size_type n, const value_type& value = value_type() )\
- : mpStart(0),\
- mpEnd(0),\
- mpEndOfBuf(0)\
- \
- { for( size_type i = 0; i != n; ++i ) push_back( value ); }\
-\
- inline const vectorClass& operator=( const vectorClass& other )\
- {\
- if (mpStart) \
- {\
- DestructRange( begin(), end() );\
- delete [](char*)mpStart; \
- }\
-\
- size_t newLen = difference_type( other.mpEndOfBuf - other.mpStart );\
-\
- mpStart = (iterator)( new char[newLen*sizeof(value_type)] );\
-\
- PlacementCopy( other.begin(), other.end(), mpStart );\
-\
- mpEnd = mpStart + other.size();\
-\
- mpEndOfBuf = mpStart + newLen;\
-\
- return *this;\
- }\
-\
- inline vectorClass( const vectorClass& other )\
- : mpStart(0),\
- mpEnd(0),\
- mpEndOfBuf(0)\
- {\
- this->operator=( other );\
- }\
-\
- inline ~vectorClass() \
- { \
- if (mpStart) \
- {\
- DestructRange( begin(), end() );\
- delete [](char*)mpStart; \
- }\
- }\
-\
- inline iterator begin() { return mpStart; }\
-\
- inline const_iterator begin() const { return mpStart; }\
-\
- inline iterator end() { return mpEnd; }\
-\
- inline const_iterator end() const { return mpEnd; }\
-\
- inline size_type size() const { return (size_type)difference_type(mpEnd-mpStart); }\
-\
- inline size_type max_size() const { return UINT_MAX/sizeof(value_type); }\
-\
- inline size_type capacity() const \
- { return difference_type(mpEndOfBuf-mpStart)/sizeof(value_type); }\
-\
- inline int empty() const { return mpStart == mpEnd; }\
-\
- inline reference operator[](size_type n) { return *(mpStart+n); }\
-\
- inline const_reference operator[](size_type n) const { return *(mpStart+n); }\
-\
- inline reference front() { return (*mpStart); }\
- \
- inline const_reference front() const { return (*mpStart); }\
-\
- inline reference back() { return (*(mpEnd-1)); }\
-\
- inline const_reference back() const { return (*(mpEnd-1)); }\
-\
- inline void reserve(size_type WXUNUSED(n)) {}\
-\
- inline void push_back(const value_type& x)\
- {\
- if ( mpEnd != mpEndOfBuf ) \
- {\
- new (mpEnd) value_type(x);\
- ++mpEnd;\
- }\
- else\
- DoInsert( mpEnd, x );\
- }\
-\
- inline iterator insert(iterator position, const value_type& x = value_type())\
- {\
- if ( position == mpEnd && mpEnd != mpEndOfBuf )\
- {\
- new (mpEnd) value_type(x);\
- ++mpEnd;\
- return (mpEnd-1);\
- }\
- else return DoInsert( position, x );\
- }\
-\
- inline void pop_back()\
- {\
- DestructRange( mpEnd-1, mpEnd );\
-\
- --mpEnd;\
- }\
-\
- inline void erase(iterator first, iterator last)\
- {\
- if ( last == mpEnd )\
- {\
- DestructRange( first, last );\
- mpEnd = first;\
- return;\
- }\
- \
- CopyObjects( last, last + difference_type( mpEnd - last ), first );\
- \
- iterator newEnd = mpEnd - difference_type( last - first );\
- DestructRange( newEnd, mpEnd );\
- \
- mpEnd = newEnd;\
- }\
-\
- inline void erase( iterator position )\
- {\
- erase( position, position + 1 );\
- }\
-\
- inline void sort()\
- {\
- if ( size() < 2 ) return;\
- quick_sort( 0, size()-1 );\
- }\
-}
-
-/////////////////////////////// shallow-copy container ///////////////////////
-
-#define __DEFINE_STL_VECTOR_SHALLOW( vectorClass, Type ) class vectorClass {\
-\
-public:\
- typedef Type value_type;\
- typedef value_type* iterator;\
- typedef const value_type* const_iterator;\
- typedef iterator pointer;\
- typedef const iterator const_pointer;\
- typedef value_type& reference;\
- typedef const value_type& const_reference;\
- typedef size_t size_type;\
- typedef ptrdiff_t difference_type;\
-\
- typedef iterator OutputIterator;\
- typedef const_iterator InputIterator;\
-\
-protected:\
-\
- inline void PlacementCopy( const_iterator first, const_iterator last, iterator result )\
- {\
- memcpy(result, first, int(difference_type(last-first)*sizeof(value_type)) );\
- }\
-\
- inline void ConstructObjects( iterator first, iterator last, const value_type& pattern )\
- {\
- if ( sizeof(pattern) == 1 )\
- \
- memset( first, int(difference_type(last-first)/sizeof(value_type)), \
- int(*((char*)&pattern)) );\
- else\
- while( first != last ) \
- *first++ = pattern;\
- }\
-\
- inline void CopyObjects( iterator first, iterator last, iterator result )\
- {\
- memcpy(result, first, int(difference_type(last-first)*sizeof(value_type)) );\
- }\
-\
- inline void CopyObjectsBack( iterator first, iterator last, iterator result )\
- {\
- memmove(result, first, int(difference_type(last-first)*sizeof(value_type)) );\
- }\
-\
-public:\
-\
- class reverse_iterator \
- {\
- friend class vectorClass;\
- friend class const_reverse_iterator;\
-\
- public:\
- iterator mpPos;\
-\
- public:\
-\
- reverse_iterator() {}\
-\
- reverse_iterator ( iterator pPos )\
- {\
- mpPos = pPos;\
- }\
- \
- int operator==( const reverse_iterator& rhs ) const { return (mpPos == rhs.mpPos); }\
- int operator!=( const reverse_iterator& rhs ) const { return (mpPos != rhs.mpPos); }\
-\
- inline reverse_iterator( const reverse_iterator& other )\
- {\
- mpPos = other.mpPos;\
- }\
-\
- inline const reverse_iterator& operator--() \
- {\
- --mpPos;\
- return *this;\
- }\
-\
- inline reverse_iterator operator--(int)\
- {\
- reverse_iterator tmp = *this;\
- --mpPos;\
- return tmp;\
- }\
-\
- inline const reverse_iterator & operator++() \
- {\
- ++mpPos;\
- return *this;\
- }\
-\
- inline reverse_iterator operator++(int)\
- {\
- reverse_iterator tmp = *this;\
- ++mpPos;\
- return tmp;\
- }\
-\
- inline const_reference operator*() const { return *mpPos; }\
- };\
-\
-\
- class const_reverse_iterator \
- {\
- protected:\
- iterator mpPos;\
- public:\
-\
- const_reverse_iterator() {}\
-\
- const_reverse_iterator( const iterator pPos )\
- {\
- mpPos = pPos;\
- }\
- \
- int operator==( const const_reverse_iterator& rhs ) const { return (mpPos == rhs.mpPos); }\
- int operator!=( const const_reverse_iterator& rhs ) const { return (mpPos != rhs.mpPos); }\
-\
- inline const_reverse_iterator( const reverse_iterator& other )\
- {\
- mpPos = other.mpPos;\
- }\
-\
- inline const const_reverse_iterator& operator--() \
- {\
- --mpPos;\
- return *this;\
- }\
-\
- inline const_reverse_iterator operator--(int)\
- {\
- const_reverse_iterator tmp = *this;\
- --mpPos;\
- return tmp;\
- }\
-\
- inline const const_reverse_iterator & operator++() \
- {\
- ++mpPos;\
- return *this;\
- }\
-\
- inline const_reverse_iterator operator++(int)\
- {\
- const_reverse_iterator tmp = *this;\
- ++mpPos;\
- return tmp;\
- }\
-\
- inline const_reference operator*() const { return *mpPos; }\
- };\
-\
-protected:\
- \
- pointer mpStart;\
- pointer mpEnd;\
- pointer mpEndOfBuf;\
-\
-protected:\
-\
- inline void quick_sort(int WXUNUSED(low), int WXUNUSED(hi)) \
- {\
- }\
-\
- inline void DestructRange( iterator WXUNUSED(first), iterator WXUNUSED(last))\
- {\
- }\
-\
- inline iterator DoInsert(iterator position, const value_type& x)\
- {\
- if ( mpEnd < mpEndOfBuf )\
- {\
- new (mpEnd) value_type(*(mpEnd-1) );\
- \
- CopyObjectsBack( position, mpEnd, position + 1 );\
- \
- *position = x;\
- \
- ++mpEnd;\
- \
- return position;\
- }\
- \
- size_type minBufLen = WXSTL_VECTOR_MIN_BUF_SIZE/sizeof(value_type);\
- \
- size_type doubledSize = size()*2;\
- \
- size_type newLen = ( doubledSize < minBufLen ) ? minBufLen : doubledSize;\
- \
- iterator pNewStart = (iterator)( new char[newLen*sizeof(value_type)] );\
- \
- PlacementCopy( mpStart, position, pNewStart );\
- \
- iterator atPosition = pNewStart + difference_type( position - mpStart );\
- \
- new (atPosition) value_type(x);\
- \
- iterator newPos = atPosition;\
- \
- ++atPosition;\
- \
- if ( mpStart ) \
- {\
- PlacementCopy( position, mpEnd, atPosition );\
- DestructRange( mpStart, mpEnd );\
- delete [](char*)mpStart;\
- }\
- \
- mpEnd = atPosition + difference_type( mpEnd - position );\
- \
- mpStart = pNewStart;\
- mpEndOfBuf = pNewStart + newLen;\
- \
- return newPos;\
- }\
-\
-public:\
-\
- inline vectorClass() : mpStart(0), \
- mpEnd(0),\
- mpEndOfBuf(0)\
- {}\
-\
- inline vectorClass( const_iterator first, const_iterator last )\
- : mpStart(0),\
- mpEnd(0),\
- mpEndOfBuf(0)\
- \
- { while( first != last ) push_back( *first++ ); }\
-\
- inline vectorClass( size_type n, const value_type& value = value_type() )\
- : mpStart(0),\
- mpEnd(0),\
- mpEndOfBuf(0)\
- \
- { for( size_type i = 0; i != n; ++i ) push_back( value ); }\
-\
- inline const vectorClass& operator=( const vectorClass& other )\
- {\
- if (mpStart) \
- {\
- DestructRange( begin(), end() );\
- delete [](char*)mpStart; \
- }\
-\
- size_t newLen = difference_type( other.mpEndOfBuf - other.mpStart );\
-\
- mpStart = (iterator)( new char[newLen*sizeof(value_type)] );\
-\
- PlacementCopy( other.begin(), other.end(), mpStart );\
-\
- mpEnd = mpStart + other.size();\
-\
- mpEndOfBuf = mpStart + newLen;\
-\
- return *this;\
- }\
-\
- inline vectorClass( const vectorClass& other )\
- : mpStart(0),\
- mpEnd(0),\
- mpEndOfBuf(0)\
- {\
- this->operator=( other );\
- }\
-\
- inline ~vectorClass() \
- { \
- if (mpStart) \
- {\
- DestructRange( begin(), end() );\
- delete [](char*)mpStart; \
- }\
- }\
-\
- inline iterator begin() { return mpStart; }\
-\
- inline const_iterator begin() const { return mpStart; }\
-\
- inline iterator end() { return mpEnd; }\
-\
- inline const_iterator end() const { return mpEnd; }\
-\
- inline size_type size() const { return (size_type)difference_type(mpEnd-mpStart); }\
-\
- inline size_type max_size() const { return UINT_MAX/sizeof(value_type); }\
-\
- inline size_type capacity() const \
- { return difference_type(mpEndOfBuf-mpStart)/sizeof(value_type); }\
-\
- inline int empty() const { return mpStart == mpEnd; }\
-\
- inline reference operator[](size_type n) { return *(mpStart+n); }\
-\
- inline const_reference operator[](size_type n) const { return *(mpStart+n); }\
-\
- inline reference front() { return (*mpStart); }\
- \
- inline const_reference front() const { return (*mpStart); }\
-\
- inline reference back() { return (*(mpEnd-1)); }\
-\
- inline const_reference back() const { return (*(mpEnd-1)); }\
-\
- inline void reserve(size_type WXUNUSED(n)) {}\
-\
- inline void push_back(const value_type& x)\
- {\
- if ( mpEnd != mpEndOfBuf ) \
- {\
- new (mpEnd) value_type(x);\
- ++mpEnd;\
- }\
- else\
- DoInsert( mpEnd, x );\
- }\
-\
- inline iterator insert(iterator position, const value_type& x = value_type())\
- {\
- if ( position == mpEnd && mpEnd != mpEndOfBuf )\
- {\
- new (mpEnd) value_type(x);\
- ++mpEnd;\
- return (mpEnd-1);\
- }\
- else return DoInsert( position, x );\
- }\
-\
- inline void pop_back()\
- {\
- DestructRange( mpEnd-1, mpEnd );\
-\
- --mpEnd;\
- }\
-\
- inline void erase(iterator first, iterator last)\
- {\
- if ( last == mpEnd )\
- {\
- DestructRange( first, last );\
- mpEnd = first;\
- return;\
- }\
- \
- CopyObjects( last, last + difference_type( mpEnd - last ), first );\
- \
- iterator newEnd = mpEnd - difference_type( last - first );\
- DestructRange( newEnd, mpEnd );\
- \
- mpEnd = newEnd;\
- }\
-\
- inline void erase( iterator position )\
- {\
- erase( position, position + 1 );\
- }\
-\
- inline void sort()\
- {\
- if ( size() < 2 ) return;\
- quick_sort( 0, size()-1 );\
- }\
-}
-
-
-
-// redefine below symbol to change the default allocation unit of vector content buffer
-#define WXSTL_VECTOR_MIN_BUF_SIZE 64
-
-// defines vector class, where objects are copied
-// using "deep-copy" sematics (i.e. by calling their copy constructors)
-
-#define WXSTL_VECTOR(ELEMENT_CLASS) \
-__DEFINE_STL_VECTOR_DEEP(_WXSTL_VECTOR_##ELEMENT_CLASS, ELEMENT_CLASS)
-
-// defines vector class, where objects are copied
-// using "shallow-copy" sematics (i.e. instead of calling
-// their constructors, memcpy() and memmove() are used to copy their raw data)
-
-
-#define WXSTL_VECTOR_SHALLOW_COPY(ELEMENT_CLASS) __DEFINE_STL_VECTOR_SHALLOW(_WXSTL_VECTORSC_##ELEMENT_CLASS, ELEMENT_CLASS)
-
-#endif
+++ /dev/null
-
-HelpHTML : Support scripts for generating external HTML help files
-------------------------------------------------------------------
-
-The scripts in this directory can be used to generate external HTML
-help files for use with wxHTMLHelpControllerBase derived help implemen-
-tations. Currently the only implementation using this is the
-wxExtHelpController class, using an external HTML browser. I hope to
-add a class using a wxWindows-built-in HTML viewer soon.
-
-These viewers need a "wxhelp.map" file in the help directory which
-maps numeric help IDs to relative URLs, having entries like:
-
-1000 overview.html;Overview
-1010 mainmanu.html;Main Menu
-...
-
-The numeric help ids are used to refer to the help in the application,
-the URL specifies the file to be displayed, relative to the help base
-directory (extended by the locale name if that directory exists) and the
-text behind the semicolon is used to display and search a list of all help
-topics.
-
-html2wxhelp:
-------------
-The html2wxhelp script in this directory allow you to automatically generate
-this file from a set of HTML pages. All you need is to append the numeric ID
-to the section header in the HTML file like this:
-<H1>Overview_1000_</H1>
-
-html2wxhelp will scan all html files in the directory in which it is called
-and find these lines. It will create a wxhelp.map file and strip the help
-IDs from the HTML files. So you should have a backup of the files before
-running it, or a way to regenerate them.
-
-striphelpids:
--------------
-
-Called with the name of a .tex file, it will strip the help IDs from the file,
-so the IDs do not show up in the printed documentation.
-
-
-How to use them:
-----------------
-
-I use LyX to generate the docs, export the text as LaTeX. I then use
-latex2html to generate the set of HTML pages and html2wxhelp to generate
-the map file from them. Then I run striphelpids on the .tex file before
-generating PostScript documentation from that.
-The whole process can easily be automated with a Makefile. For an example
-of how to do this, see the source of my mail program, available from
-http://www.phy.hw.ac.uk/~karsten/M/
-
-
-Karsten Ballueder <Ballueder@usa.net>
-
-
-
+++ /dev/null
-#!/bin/sh
-#
-# $Id$
-#
-# html2wxhelp Creates a wxhelp.map file from a directory full of html files.
-# It takes header lines, extracts the NAME=xxx section for the URL and the help
-# id which must be added to the header using _ID_.
-#
-# It also removes all _ID_ tags from the html sources.
-
-
-make_map()
-{
- cat $1 | tr -d '\n' | \
- sed "1,$ s/^.*<[hH][0-9]\([^<].*\)<\/[hH][0-9]>.*$/
-#__#\1
-/g" | \
- fgrep \#__\# | tr '
-' '\n' | egrep -v '^$' | \
- sed "1,$ s/^.*NAME=\"\([^\"]*\)\".*>\([^>]*\)<.*$/$1#\1;\2/g" | \
- sed "1,$ s/^\#__\#[^>]*>\([^<>][^<>]*\)<.*$/;\1/g" | \
- sed "1,$ s/^\(.*\);\(.*\)_\(.*\)_.*$/\3 \1 ;\2/g" | \
- sed "1,$ s/^\([^+-0123456789]\)\(.*\);\(.*\)$/-1 \1\2 ;\3/g" | \
- fgrep -v \#__\#
-}
-
-remove_ids()
-{
- cat $1 | \
- sed "1,$ s/_[0-9][0-9]*_//g" > tmp$$ && mv tmp$$ $1
-# cat $1 | tr -d '\n' | \
-# sed "1,$ s/^\(.*<[hH][0-9]\)\([^<_][^_]*\)_.*_*\(<\/[hH][0-9]>.*\)$/\1\2\3
-/g" | \
-# tr '
-' '\n' > tmp$$ \
-# && mv tmp$$ $1
-}
-
-for i in *.html
-do
- make_map $i
- remove_ids $i
-done
-
+++ /dev/null
-#!/bin/sh
-# $Id$
-# small script to strip wxhelp IDs from latex source
-
-cat $1 | \
-sed '1,$ s/\(^.*\\part{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' | \
-sed '1,$ s/\(^.*\\chapter{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' | \
-sed '1,$ s/\(^.*\\section{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' | \
-sed '1,$ s/\(^.*\\subsection{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' | \
-sed '1,$ s/\(^.*\\subsubsection{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' | \
-sed '1,$ s/\(^.*\\paragraph{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' | \
-sed '1,$ s/\(^.*\\part\*{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' | \
-sed '1,$ s/\(^.*\\chapter\*{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' | \
-sed '1,$ s/\(^.*\\section\*{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' | \
-sed '1,$ s/\(^.*\\subsection\*{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' | \
-sed '1,$ s/\(^.*\\subsubsection\*{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' | \
-sed '1,$ s/\(^.*\\paragraph\*{.*\)\\_[0-9][0-9]*\\_\(.*$\)/\1\2/g' >/tmp/strip$$ && mv /tmp/strip$$ $1
### Targets: ###
-all: emulator helpview tex2rtf helpgen ifacecheck
+all: emulator helpview ifacecheck
-install: all install_tex2rtf install_helpgen install_ifacecheck
+install: all install_ifacecheck
-uninstall: uninstall_tex2rtf uninstall_helpgen uninstall_ifacecheck
+uninstall: uninstall_ifacecheck
-install-strip: install install-strip_tex2rtf install-strip_helpgen install-strip_ifacecheck
+install-strip: install install-strip_ifacecheck
clean:
rm -rf ./.deps ./.pch
rm -f ./*.o
-(cd emulator/src && $(MAKE) clean)
-(cd helpview/src && $(MAKE) clean)
- -(cd tex2rtf/src && $(MAKE) clean)
- -(cd HelpGen/src && $(MAKE) clean)
-(cd ifacecheck/src && $(MAKE) clean)
distclean: clean
rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
-(cd emulator/src && $(MAKE) distclean)
-(cd helpview/src && $(MAKE) distclean)
- -(cd tex2rtf/src && $(MAKE) distclean)
- -(cd HelpGen/src && $(MAKE) distclean)
-(cd ifacecheck/src && $(MAKE) distclean)
emulator:
helpview:
(cd helpview/src && $(MAKE) all)
-tex2rtf:
- (cd tex2rtf/src && $(MAKE) all)
-
-install_tex2rtf:
- (cd tex2rtf/src && $(MAKE) install)
-
-uninstall_tex2rtf:
- (cd tex2rtf/src && $(MAKE) uninstall)
-
-install-strip_tex2rtf:
- (cd tex2rtf/src && $(MAKE) install-strip)
-
-helpgen:
- (cd HelpGen/src && $(MAKE) all)
-
-install_helpgen:
- (cd HelpGen/src && $(MAKE) install)
-
-uninstall_helpgen:
- (cd HelpGen/src && $(MAKE) uninstall)
-
-install-strip_helpgen:
- (cd HelpGen/src && $(MAKE) install-strip)
-
ifacecheck:
(cd ifacecheck/src && $(MAKE) all)
# Include dependency info, if present:
@IF_GNU_MAKE@-include .deps/*.d
-.PHONY: all install uninstall clean distclean emulator helpview tex2rtf install_tex2rtf uninstall_tex2rtf install-strip_tex2rtf helpgen install_helpgen uninstall_helpgen install-strip_helpgen ifacecheck install_ifacecheck uninstall_ifacecheck install-strip_ifacecheck
+.PHONY: all install uninstall clean distclean emulator helpview ifacecheck install_ifacecheck uninstall_ifacecheck install-strip_ifacecheck
### Targets: ###
-all: emulator helpview tex2rtf helpgen ifacecheck
+all: emulator helpview ifacecheck
clean:
-if exist .\*.obj del .\*.obj
@echo $(MAKE) -f makefile.bcc $(MAKEARGS) clean >>helpview.bat
call helpview.bat
@del helpview.bat
- @echo cd tex2rtf\src >tex2rtf.bat
- @echo $(MAKE) -f makefile.bcc $(MAKEARGS) clean >>tex2rtf.bat
- call tex2rtf.bat
- @del tex2rtf.bat
- @echo cd HelpGen\src >helpgen.bat
- @echo $(MAKE) -f makefile.bcc $(MAKEARGS) clean >>helpgen.bat
- call helpgen.bat
- @del helpgen.bat
@echo cd ifacecheck\src >ifacecheck.bat
@echo $(MAKE) -f makefile.bcc $(MAKEARGS) clean >>ifacecheck.bat
call ifacecheck.bat
call helpview.bat
@del helpview.bat
-tex2rtf:
- @echo cd tex2rtf\src >tex2rtf.bat
- @echo $(MAKE) -f makefile.bcc $(MAKEARGS) all >>tex2rtf.bat
- call tex2rtf.bat
- @del tex2rtf.bat
-
-helpgen:
- @echo cd HelpGen\src >helpgen.bat
- @echo $(MAKE) -f makefile.bcc $(MAKEARGS) all >>helpgen.bat
- call helpgen.bat
- @del helpgen.bat
-
ifacecheck:
@echo cd ifacecheck\src >ifacecheck.bat
@echo $(MAKE) -f makefile.bcc $(MAKEARGS) all >>ifacecheck.bat
### Targets: ###
-all: emulator helpview tex2rtf helpgen ifacecheck
+all: emulator helpview ifacecheck
clean:
-if exist .\*.o del .\*.o
-if exist .\*.d del .\*.d
$(MAKE) -C emulator\src -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C helpview\src -f makefile.gcc $(MAKEARGS) clean
- $(MAKE) -C tex2rtf\src -f makefile.gcc $(MAKEARGS) clean
- $(MAKE) -C HelpGen\src -f makefile.gcc $(MAKEARGS) clean
$(MAKE) -C ifacecheck\src -f makefile.gcc $(MAKEARGS) clean
emulator:
helpview:
$(MAKE) -C helpview\src -f makefile.gcc $(MAKEARGS) all
-tex2rtf:
- $(MAKE) -C tex2rtf\src -f makefile.gcc $(MAKEARGS) all
-
-helpgen:
- $(MAKE) -C HelpGen\src -f makefile.gcc $(MAKEARGS) all
-
ifacecheck:
$(MAKE) -C ifacecheck\src -f makefile.gcc $(MAKEARGS) all
-.PHONY: all clean emulator helpview tex2rtf helpgen ifacecheck
+.PHONY: all clean emulator helpview ifacecheck
SHELL := $(COMSPEC)
### Targets: ###
-all: sub_emulator sub_helpview sub_tex2rtf sub_helpgen sub_ifacecheck
+all: sub_emulator sub_helpview sub_ifacecheck
clean:
-if exist .\*.obj del .\*.obj
cd helpview\src
$(MAKE) -f makefile.vc $(MAKEARGS) clean
cd "$(MAKEDIR)"
- cd tex2rtf\src
- $(MAKE) -f makefile.vc $(MAKEARGS) clean
- cd "$(MAKEDIR)"
- cd HelpGen\src
- $(MAKE) -f makefile.vc $(MAKEARGS) clean
- cd "$(MAKEDIR)"
cd ifacecheck\src
$(MAKE) -f makefile.vc $(MAKEARGS) clean
cd "$(MAKEDIR)"
$(MAKE) -f makefile.vc $(MAKEARGS) all
cd "$(MAKEDIR)"
-sub_tex2rtf:
- cd tex2rtf\src
- $(MAKE) -f makefile.vc $(MAKEARGS) all
- cd "$(MAKEDIR)"
-
-sub_helpgen:
- cd HelpGen\src
- $(MAKE) -f makefile.vc $(MAKEARGS) all
- cd "$(MAKEDIR)"
-
sub_ifacecheck:
cd ifacecheck\src
$(MAKE) -f makefile.vc $(MAKEARGS) all
### Targets: ###
-all : .SYMBOLIC emulator helpview tex2rtf helpgen ifacecheck
+all : .SYMBOLIC emulator helpview ifacecheck
clean : .SYMBOLIC
-if exist .\*.obj del .\*.obj
cd helpview\src
wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) clean
cd $(WATCOM_CWD)
- cd tex2rtf\src
- wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) clean
- cd $(WATCOM_CWD)
- cd HelpGen\src
- wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) clean
- cd $(WATCOM_CWD)
cd ifacecheck\src
wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) clean
cd $(WATCOM_CWD)
wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) all
cd $(WATCOM_CWD)
-tex2rtf : .SYMBOLIC
- cd tex2rtf\src
- wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) all
- cd $(WATCOM_CWD)
-
-helpgen : .SYMBOLIC
- cd HelpGen\src
- wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) all
- cd $(WATCOM_CWD)
-
ifacecheck : .SYMBOLIC
cd ifacecheck\src
wmake $(__MAKEOPTS__) -f makefile.wat $(MAKEARGS) all
+++ /dev/null
-Notes about plugins
-
-
- I have users that want to visit my pages with tclets, but they do not
- have the plugin. What can I do?
-
- Add a pluginspage=http://www.sunlabs.com/tcl/plugin/ name=value
- pair to the embed statement. This will cause Navigator to find
- the plugin for your user and suggest they install it. The user
- is then prompted to download and install the plugin, and then she
- has to restart the browser and revisit your page. Very inconvenient
- and only slightly better than giving your users the broken image
- icon. Netscape says they are working on a more automatic solution.
-
-
-
-
-14. Your demos work just fine, but when I visit my own pages with tclets in
- them, at http://www.myserver.com/~mypages/mypage.html, I still get the
- broken image icon. Why doesn't it work for me?
-
- This is likely because your web server -- the program that sends
- the pages to your browser when you click on a URL -- is not
- sending the right mime-type when it sends the '.tcl' file. You
- can work around this by adding a type=application/x-tcl name=value
- pair to the embed statement, which will cause Navigator to infer
- that it should use the Tcl plugin anyways. A better solution is
- to ask your system administrator to configure the web server to
- send the mime type application/x-tcl when it sends files with a
- '.tcl' extension. Nearly all web servers in the world nowadays
- are already configured to do this, the only ones we are aware of
- that do not are some older versions of Apache.
+++ /dev/null
-I'm just here to force the creation of a LIB directory.
+++ /dev/null
-#
-# File: makefile.nt
-# Author: Julian Smart
-# Created: 1993
-# Updated:
-# Copyright:
-#
-# "%W% %G%"
-#
-# Makefile : Builds utilities for Win95, VC++ 4.0
-# Use FINAL=1 argument to nmake to build final version with no debugging
-# info
-
-# Set WXDIR for your system
-WXDIR = $(WXWIN)
-
-THISDIR=$(WXDIR)\utils\nplugin
-
-!include $(WXDIR)\src\makevc.env
-
-DEBUG_FLAGS="/Zi /FR"
-LINK_DEBUG_FLAGS="/RELEASE"
-
-clean:
- cd $(WXDIR)\utils\nplugin\src
- nmake -f makefile.vc clean
- cd $(WXDIR)\utils\nplugin\samples\simple
- nmake -f makefile.vc clean
- cd $(WXDIR)\utils\nplugin\samples\gui
- nmake -f makefile.vc clean
- cd $(WXDIR)\utils\nplugin
-
+++ /dev/null
-/*
- * File: simple.cpp
- * Purpose: Minimal wxWidgets plugin
- * Author: Julian Smart
- * Created: 1997
- * Updated:
- * Copyright: (c) Julian Smart
- */
-
-/* static const char sccsid[] = "%W% %G%"; */
-
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-#include <fstream.h>
-
-#include "NPApp.h"
-#include "NPFrame.h"
-
-#define ID_HELLO 10
-
-// Define a new application type
-class MyApp: public wxPluginApp
-{ public:
- virtual wxFrame *OnInit(void);
- virtual wxPluginFrame* OnNewInstance(const wxPluginData& data);
-};
-
-// Define a new frame type
-class MyFrame: public wxPluginFrame
-{ public:
- MyFrame(const wxPluginData& data);
-
- public:
- // Let's paint directly onto the 'frame'; we don't need a subwindow
- void OnPaint(wxPaintEvent& event);
- void OnMouseEvent(wxMouseEvent& event);
- void OnHello(wxCommandEvent& event);
-
- // Called when the file has been downloaded
- virtual void OnNPNewFile(NPStream *stream, const wxString& fname);
-
- void CentreStrings(wxDC& dc);
-
- DECLARE_EVENT_TABLE()
-
- protected:
- wxStringList m_strings;
- float m_xpos;
- float m_ypos;
-};
-
-BEGIN_EVENT_TABLE(MyFrame, wxFrame)
- EVT_SIZE(MyFrame::OnSize)
- EVT_PAINT(MyFrame::OnPaint)
- EVT_MOUSE_EVENTS(MyFrame::OnMouseEvent)
- EVT_BUTTON(ID_HELLO, MyFrame::OnHello)
-END_EVENT_TABLE()
-
-IMPLEMENT_APP(MyApp)
-
-// No app initialisation necessary, and for a plugin there is no
-// top frame.
-wxFrame *MyApp::OnInit(void)
-{
- return NULL;
-}
-
-// Called whenever a new plugin instance is called. We could check
-// various things here in 'data' but we won't bother.
-wxPluginFrame* MyApp::OnNewInstance(const wxPluginData& data)
-{
- // Implicitly added to list of plugin frames
- return new MyFrame(data);
-}
-
-// My frame constructor
-MyFrame::MyFrame(const wxPluginData& data):
- wxPluginFrame(data)
-{
- m_xpos = -1;
- m_ypos = -1;
-
- wxMenuBar *menuBar = new wxMenuBar;
- wxMenu *menu = new wxMenu;
- menu->Append(1, "E&xit");
- menuBar->Append(menu, "&File");
-
- SetMenuBar(menuBar);
-
- new wxTextCtrl(this, -1, "", wxPoint(10, 30), wxSize(200, 25), wxSUNKEN_BORDER);
- new wxButton(this, ID_HELLO, "Hello", wxPoint(10, 70));
-}
-
-void MyFrame::OnPaint(wxPaintEvent& event)
-{
- wxPaintDC dc(this);
-
- dc.SetBrush(*wxCYAN_BRUSH);
- dc.SetPen(*wxRED_PEN);
-
- int w, h;
- GetClientSize(&w, &h);
-
- dc.DrawRectangle(0, 0, w, h);
-
- wxFont swissFont(10, wxSWISS, wxNORMAL, wxNORMAL);
- dc.SetFont(swissFont);
- dc.SetBackgroundMode(wxTRANSPARENT);
-
- CentreStrings(dc);
-}
-
-// Called when the file has been downloaded
-void MyFrame::OnNPNewFile(NPStream *stream, const wxString& fname)
-{
- ifstream str(fname);
- char buf[201];
-
- while ( !str.eof() )
- {
- buf[0] = 0;
- str.getline(buf, 200);
-
- if ( buf[0] != 0 )
- m_strings.Add(buf);
- }
- Refresh();
-}
-
-void MyFrame::CentreStrings(wxDC& dc)
-{
- int y = 5;
- int cw, ch;
- GetClientSize(&cw, &ch);
-
- wxNode *node = m_strings.First();
- while ( node )
- {
- char *s = (char *)node->Data();
- float w, h;
- dc.GetTextExtent(s, &w, &h);
-
- int x = wxMax(0, (cw - w)/2);
- dc.DrawText(s, x, y);
-
- y += h + (h/2);
-
- node = node->Next();
- }
-}
-
-// This implements a tiny doodling program. Drag the mouse using
-// the left button.
-void MyFrame::OnMouseEvent(wxMouseEvent& event)
-{
- float x, y;
- event.Position(&x, &y);
- wxClientDC dc(this);
-
- if (m_xpos > -1 && m_ypos > -1 && event.Dragging() && event.LeftIsDown())
- {
- dc.SetPen(wxBLACK_PEN);
- dc.SetBrush(wxTRANSPARENT_BRUSH);
- dc.DrawLine(m_xpos, m_ypos, x, y);
- }
- m_xpos = x;
- m_ypos = y;
-}
-
-void MyFrame::OnHello(wxCommandEvent& event)
-{
- wxMessageBox("Hello!");
-}
+++ /dev/null
-/*
- * File: gui.h
- * Purpose: wxWidgets plugin with a few GUI elements
- * Author: Julian Smart
- * Created: 1997
- * Updated:
- * Copyright: (c) Julian Smart
- */
-
-#ifndef __GUIH__
-#define __GUIH__
-
-// Define a new application type
-class MyApp: public wxPluginApp
-{ public:
- virtual wxFrame *OnInit(void);
- virtual wxPluginFrame* OnNewInstance(const wxPluginData& data);
-};
-
-class MyApp;
-class MyFrame;
-class MyCanvas;
-
-class MyFrame: public wxPluginFrame
-{
-public:
- MyFrame(const wxPluginData& data);
- virtual ~MyFrame();
-
- void OldOnMenuCommand(int id);
-
-private:
- wxMenu* fileMenu;
- wxMenuBar* menuBar;
- MyCanvas* leftCanvas;
- MyCanvas* rightCanvas;
- wxSplitterWindow* splitter;
-};
-
-class MyCanvas: public wxScrolledWindow
-{
-public:
- MyCanvas(wxWindow* parent, int x, int y, int w, int h);
- virtual ~MyCanvas();
-
- void OnPaint(wxPaintEvent& event);
-
-DECLARE_EVENT_TABLE()
-};
-
-// ID for the menu quit command
-#define SPLIT_QUIT 1
-#define SPLIT_HORIZONTAL 2
-#define SPLIT_VERTICAL 3
-#define SPLIT_UNSPLIT 4
-
-
-#endif
-
+++ /dev/null
-<HTML>
-<HEAD>
-<TITLE>GUI Plugin Demo</TITLE>
-</HEAD>
-
-<BODY>
-<H1>GUI Plugin Demo</H1>
-
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.<P>
-
-<EMBED ALIGN=RIGHT SRC="sample.gui" WIDTH=300 HEIGHT=200>
-
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.<P>
-
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.<P>
-
-</BODY>
-
-</HTML>
+++ /dev/null
-#
-# File: makefile.vc
-# Author: Julian Smart
-# Created: 1997
-# Updated:
-# Copyright: (c) 1997, Julian Smart
-#
-# "%W% %G%"
-#
-# Makefile : Builds gui plugin example (MS VC++).
-# Use FINAL=1 argument to nmake to build final version with no debugging
-# info
-
-# Set WXDIR for your system
-WXDIR = $(WXWIN)
-
-# Application is a DLL
-DLL=1
-
-EXTRAINC=/I$(WXDIR)\utils\nplugin\src
-
-!include $(WXDIR)\src\makevc.env
-
-THISDIR = $(WXDIR)\utils\nplugin\examples\gui
-PROGRAM=npgui32
-PLUGINLIB=$(WXDIR)\utils\nplugin\lib\nplugin.lib
-
-OBJECTS = gui.obj
-
-all: $(PROGRAM).dll
-
-$(PROGRAM): $(PROGRAM).exe
-
-wx:
- cd $(WXDIR)\src\msw
- nmake -f makefile.vc dllnp FINAL=$(FINAL)
- cd $(THISDIR)
-
-# Update the dynamic link library
-
-$(PROGRAM).dll: $(DUMMYOBJ) $(OBJECTS) $(WXLIB) $(PLUGINLIB) $(PROGRAM).res $(PROGRAM).def
- $(link) $(LINKFLAGS) \
- -out:$(PROGRAM).dll \
- -def:$(PROGRAM).def \
- $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res $(WXLIB) $(PLUGINLIB) \
- $(guilibsdll) shell32.lib comctl32.lib ctl3d32.lib
-
-gui.obj: gui.$(SRCSUFF) gui.h $(DUMMYOBJ)
- $(cc) @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
- $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
-
-copy:
- copy npgui32.dll "c:\program files\Netscape\Navigator\program\plugins"
- copy npgui32.dll "c:\program files\Internet Explorer\plugins"
-
-clean:
- -erase *.obj
- -erase *.exe
- -erase *.res
- -erase *.map
- -erase *.sbr
- -erase *.pdb
- -erase *.dll
- -erase *.exp
- -erase *.lib
- -erase *.ilk
+++ /dev/null
-#include "wx/msw/wx.rc"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,1
- PRODUCTVERSION 1,0,0,1
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904e4"
- BEGIN
- VALUE "CompanyName", "Julian Smart\0"
- VALUE "FileDescription", "wxWindows GUI example plugin file\0"
- VALUE "FileVersion", "0.0.0.1\0"
- VALUE "InternalName", "wxWindows GUI Plugin\0"
- VALUE "LegalCopyright", "Copyright Julian Smart 1997\0"
- VALUE "LegalTrademarks", "\0"
- VALUE "OriginalFilename","npgui32.dll\0"
- VALUE "ProductName", "wxWindows GUI Plugin Sample\0"
- VALUE "ProductVersion", "0.0.0.1\0"
- VALUE "MIMEType", "wxgui/mime-type\0"
- VALUE "FileExtents", "gui\0"
- VALUE "FileOpenName", "wxWindows GUI (*.gui)\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1252
- END
-END
-
+++ /dev/null
-<HTML>
-<HEAD>
-<TITLE>Simple Plugin Demo</TITLE>
-</HEAD>
-
-<BODY>
-<H1>Simple Plugin Demo</H1>
-
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.<P>
-
-<EMBED ALIGN=RIGHT SRC="sample.smp" WIDTH=300 HEIGHT=200>
-
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.<P>
-
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.
-This just demonstrates how to embed an object into an HTML file.<P>
-
-</BODY>
-
-</HTML>
+++ /dev/null
-#
-# File: makefile.vc
-# Author: Julian Smart
-# Created: 1997
-# Updated:
-# Copyright: (c) 1997, Julian Smart
-#
-# "%W% %G%"
-#
-# Makefile : Builds simple plugin example (MS VC++).
-# Use FINAL=1 argument to nmake to build final version with no debugging
-# info
-
-# Set WXDIR for your system
-WXDIR = $(WXWIN)
-
-# Application is a DLL
-DLL=1
-
-EXTRAINC=/I$(WXDIR)\utils\nplugin\src
-
-!include $(WXDIR)\src\makevc.env
-
-THISDIR = $(WXDIR)\utils\nplugin\smples\simple
-PROGRAM=npsimple32
-PLUGINLIB=$(WXDIR)\utils\nplugin\lib\nplugin.lib
-
-OBJECTS = simple.obj
-
-all: $(PROGRAM).dll
-
-$(PROGRAM): $(PROGRAM).exe
-
-wx:
- cd $(WXDIR)\src\msw
- nmake -f makefile.vc dllnp FINAL=$(FINAL)
- cd $(THISDIR)
-
-# Update the dynamic link library
-
-$(PROGRAM).dll: $(DUMMYOBJ) $(OBJECTS) $(WXLIB) $(PLUGINLIB) $(PROGRAM).res $(PROGRAM).def
- $(link) $(LINKFLAGS) \
- -out:$(PROGRAM).dll \
- -def:$(PROGRAM).def \
- $(DUMMYOBJ) $(OBJECTS) $(PROGRAM).res $(WXLIB) $(PLUGINLIB) \
- $(guilibsdll) lib shell32.lib comctl32.lib ctl3d32.lib ole32.lib
-
-simple.obj: simple.$(SRCSUFF) $(DUMMYOBJ)
- $(cc) @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-$(PROGRAM).res : $(PROGRAM).rc $(WXDIR)\include\wx\msw\wx.rc
- $(rc) -r /i$(WXDIR)\include -fo$@ $(PROGRAM).rc
-
-copy:
- copy npsimple32.dll "c:\program files\Netscape\Navigator\program\plugins"
- copy npsimple32.dll "c:\program files\Internet Explorer\plugins"
-
-clean:
- -erase *.obj
- -erase *.exe
- -erase *.res
- -erase *.map
- -erase *.sbr
- -erase *.pdb
- -erase *.dll
- -erase *.exp
- -erase *.lib
- -erase *.ilk
+++ /dev/null
-#include "wx/msw/wx.rc"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,1
- PRODUCTVERSION 1,0,0,1
- FILEFLAGSMASK 0x3fL
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904e4"
- BEGIN
- VALUE "CompanyName", "Julian Smart\0"
- VALUE "FileDescription", "wxWindows simple example plugin file\0"
- VALUE "FileVersion", "0.0.0.1\0"
- VALUE "InternalName", "wxWindows Simple Plugin\0"
- VALUE "LegalCopyright", "Copyright Julian Smart 1997\0"
- VALUE "LegalTrademarks", "\0"
- VALUE "OriginalFilename","npsimple32.dll\0"
- VALUE "ProductName", "wxWindows Simple Plugin Sample\0"
- VALUE "ProductVersion", "0.0.0.1\0"
- VALUE "MIMEType", "wxsimple/mime-type\0"
- VALUE "FileExtents", "smp\0"
- VALUE "FileOpenName", "wxWindows Simple (*.smp)\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1252
- END
-END
-
+++ /dev/null
-/*
- * File: simple.cpp
- * Purpose: Minimal wxWidgets plugin
- * Author: Julian Smart
- * Created: 1997
- * Updated:
- * Copyright: (c) Julian Smart
- */
-
-/* static const char sccsid[] = "%W% %G%"; */
-
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-#include <fstream.h>
-
-#include "NPApp.h"
-#include "NPFrame.h"
-
-// Define a new application type
-class MyApp: public wxPluginApp
-{ public:
- virtual bool OnInit(void);
- virtual wxPluginFrame* OnNewInstance(const wxPluginData& data);
-};
-
-// Define a new frame type
-class MyFrame: public wxPluginFrame
-{ public:
- MyFrame(const wxPluginData& data);
-
- public:
- // Let's paint directly onto the 'frame'; we don't need a subwindow
- void OnPaint(wxPaintEvent& event);
- void OnDraw(wxDC& dc);
- void OnMouseEvent(wxMouseEvent& event);
-
- // Called when the file has been downloaded
- virtual void OnNPNewFile(NPStream *stream, const wxString& fname);
-
- void CentreStrings(wxDC& dc);
-
- DECLARE_EVENT_TABLE()
-
- protected:
- wxStringList m_strings;
- long m_xpos;
- long m_ypos;
-};
-
-BEGIN_EVENT_TABLE(MyFrame, wxFrame)
- EVT_SIZE(MyFrame::OnSize)
- EVT_PAINT(MyFrame::OnPaint)
- EVT_MOUSE_EVENTS(MyFrame::OnMouseEvent)
-END_EVENT_TABLE()
-
-IMPLEMENT_APP(MyApp)
-
-// No app initialisation necessary, and for a plugin there is no
-// top frame.
-bool MyApp::OnInit(void)
-{
- return TRUE;
-}
-
-// Called whenever a new plugin instance is called. We could check
-// various things here in 'data' but we won't bother.
-wxPluginFrame* MyApp::OnNewInstance(const wxPluginData& data)
-{
- // Implicitly added to list of plugin frames
- return new MyFrame(data);
-}
-
-// My frame constructor
-MyFrame::MyFrame(const wxPluginData& data):
- wxPluginFrame(data)
-{
- m_xpos = -1;
- m_ypos = -1;
-}
-
-void MyFrame::OnPaint(wxPaintEvent& event)
-{
- wxPaintDC dc(this);
-
- OnDraw(dc);
-}
-
-void MyFrame::OnDraw(wxDC& dc)
-{
- dc.SetBrush(*wxCYAN_BRUSH);
- dc.SetPen(*wxRED_PEN);
-
- int w, h;
- GetClientSize(&w, &h);
-
- dc.DrawRectangle(0, 0, w, h);
-
- wxFont swissFont(10, wxSWISS, wxNORMAL, wxNORMAL);
- dc.SetFont(swissFont);
- dc.SetBackgroundMode(wxTRANSPARENT);
-
- CentreStrings(dc);
-}
-
-// Called when the file has been downloaded
-void MyFrame::OnNPNewFile(NPStream *stream, const wxString& fname)
-{
- ifstream str(fname);
- char buf[201];
-
- while ( !str.eof() )
- {
- buf[0] = 0;
- str.getline(buf, 200);
-
- if ( buf[0] != 0 )
- m_strings.Add(buf);
- }
- Refresh();
-}
-
-void MyFrame::CentreStrings(wxDC& dc)
-{
- int y = 5;
- int cw, ch;
- GetClientSize(&cw, &ch);
-
- wxNode *node = m_strings.First();
- while ( node )
- {
- char *s = (char *)node->Data();
- long w, h;
- dc.GetTextExtent(s, &w, &h);
-
- int x = wxMax(0, (cw - w)/2);
- dc.DrawText(s, x, y);
-
- y += h + (h/2);
-
- node = node->Next();
- }
-}
-
-// This implements a tiny doodling program. Drag the mouse using
-// the left button.
-void MyFrame::OnMouseEvent(wxMouseEvent& event)
-{
- long x, y;
- event.Position(&x, &y);
- wxClientDC dc(this);
-
- if (m_xpos > -1 && m_ypos > -1 && event.Dragging() && event.LeftIsDown())
- {
- dc.SetPen(wxBLACK_PEN);
- dc.SetBrush(wxTRANSPARENT_BRUSH);
- dc.DrawLine(m_xpos, m_ypos, x, y);
- }
- m_xpos = x;
- m_ypos = y;
-}
-
+++ /dev/null
-#
-# File: makefile.vc
-# Author: Julian Smart
-# Created: 1993
-# Updated:
-# Copyright:
-#
-# "%W% %G%"
-#
-# Makefile : Builds controls example (MS VC++).
-# Use FINAL=1 argument to nmake to build final version with no debugging
-# info
-
-# Set WXDIR for your system
-WXDIR = $(WXWIN)
-
-# Application is a DLL
-DLL=1
-
-!include $(WXDIR)\src\makevc.env
-
-PLUGINDIR = $(WXDIR)\utils\nplugin
-THISDIR = $(PLUGINDIR)\src
-LIBTARGET=$(PLUGINDIR)\lib\nplugin.lib
-
-OBJECTS = npwin.obj npshell.obj NPFrame.obj NPApp.obj
-
-all: $(LIBTARGET)
-
-wx:
- cd $(WXDIR)\src\msw
- nmake -f makefile.vc FINAL=$(FINAL)
- cd $(THISDIR)
-
-wxclean:
- cd $(WXDIR)\src\msw
- nmake -f makefile.vc clean
- cd $(THISDIR)
-
-$(LIBTARGET): $(OBJECTS)
- -erase $(LIBTARGET)
- $(implib) @<<
--out:$(LIBTARGET)
--machine:$(CPU)
-$(OBJECTS)
-<<
-
-npwin.obj: npwin.cpp npapi.h npupp.h
- $(cc) @<<
-$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF)
-<<
-
-npshell.obj: npshell.cpp npapi.h NPApp.h NPFrame.h
- $(cc) @<<
-$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF)
-<<
-
-NPFrame.obj: NPFrame.cpp NPFrame.h NPApp.h npapi.h
- $(cc) @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-NPApp.obj: NPApp.cpp NPApp.h NPFrame.h npapi.h
- $(cc) @<<
-$(CPPFLAGS) /c /Tp $*.$(SRCSUFF)
-<<
-
-clean:
- -erase *.obj
- -erase *.exe
- -erase *.res
- -erase *.map
- -erase *.sbr
- -erase *.pdb
- -erase *.dll
- -erase *.exp
- -erase *.ilk
- -erase $(LIBTARGET)
+++ /dev/null
-/*
- * npapi.h $Revision$
- * Netscape client plug-in API spec
- */
-
-#ifndef _NPAPI_H_
-#define _NPAPI_H_
-
-
-/* XXX this needs to get out of here */
-#if defined(__MWERKS__)
-#ifndef XP_MAC
-#define XP_MAC
-#endif
-#endif
-
-
-/*
- * Version constants
- */
-
-#define NP_VERSION_MAJOR 0
-#define NP_VERSION_MINOR 6
-
-
-
-/*
- * Basic types
- */
-
-#ifndef _UINT16
-typedef unsigned short uint16;
-#endif
-#ifndef _UINT32
-typedef unsigned long uint32;
-#endif
-#ifndef _INT16
-typedef short int16;
-#endif
-#ifndef _INT32
-typedef long int32;
-#endif
-
-#ifndef FALSE
-#define FALSE (0)
-#endif
-#ifndef TRUE
-#define TRUE (1)
-#endif
-#ifndef NULL
-#define NULL (0L)
-#endif
-
-typedef unsigned char NPBool;
-typedef void* NPEvent;
-typedef int16 NPError;
-typedef char* NPMIMEType;
-
-
-/*
- * NPP is a plug-in's opaque instance handle
- */
-typedef struct _NPP
-{
- void* pdata; /* plug-in private data */
- void* ndata; /* netscape private data */
-} NPP_t;
-
-typedef NPP_t* NPP;
-
-
-
-typedef struct _NPStream
-{
- void* pdata; /* plug-in private data */
- void* ndata; /* netscape private data */
- const char* url;
- uint32 end;
- uint32 lastmodified;
-} NPStream;
-
-typedef struct _NPByteRange
-{
- int32 offset; /* negative offset means from the end */
- uint32 length;
- struct _NPByteRange* next;
-} NPByteRange;
-
-
-typedef struct _NPSavedData
-{
- int32 len;
- void* buf;
-} NPSavedData;
-
-
-
-typedef struct _NPRect
-{
- uint16 top;
- uint16 left;
- uint16 bottom;
- uint16 right;
-} NPRect;
-
-typedef struct _NPWindow
-{
- void* window; /* platform specific window handle */
- uint32 x; /* position of top left corner relative to a netscape page */
- uint32 y;
- uint32 width; /* maximum window size */
- uint32 height;
- NPRect clipRect; /* clipping rectangle in port coordinates */
-} NPWindow;
-
-
-
-typedef struct _NPFullPrint
-{
- NPBool pluginPrinted; /* Set TRUE if plugin handled fullscreen printing */
- NPBool printOne; /* TRUE if plugin should print one copy to default printer */
- void* platformPrint; /* Platform-specific printing info */
-} NPFullPrint;
-
-typedef struct _NPEmbedPrint
-{
- NPWindow window;
- void* platformPrint; /* Platform-specific printing info */
-} NPEmbedPrint;
-
-typedef struct _NPPrint
-{
- uint16 mode; /* NP_FULL or NP_EMBED */
- union
- {
- NPFullPrint fullPrint; /* if mode is NP_FULL */
- NPEmbedPrint embedPrint; /* if mode is NP_EMBED */
- } print;
-} NPPrint;
-
-
-
-
-#ifdef XP_MAC
-
-/*
- * Mac-specific structures and definitions.
- */
-
-#include <Quickdraw.h>
-#include <Events.h>
-
-typedef struct NP_Port
-{
- CGrafPtr port; /* Grafport */
- int32 portx; /* position inside the topmost window */
- int32 porty;
-} NP_Port;
-
-/*
- * Non-standard event types that can be passed to HandleEvent
- */
-#define getFocusEvent (osEvt + 16)
-#define loseFocusEvent (osEvt + 17)
-#define adjustCursorEvent (osEvt + 18)
-
-#endif /* XP_MAC */
-
-
-
-
-#define NP_EMBED 1
-#define NP_FULL 2
-#define NP_BACKGROUND 3
-
-#define NP_NORMAL 1
-#define NP_SEEK 2
-#define NP_ASFILE 3
-
-#define NP_MAXREADY (((unsigned)(~0)<<1)>>1)
-
-
-/*
- * Error and reason code definitions.
- */
-
-#define NP_NOERR 0
-#define NP_EINVAL 1
-#define NP_EABORT 2
-
-#define NPERR_BASE 0
-#define NPERR_NO_ERROR (NPERR_BASE + 0)
-#define NPERR_GENERIC_ERROR (NPERR_BASE + 1)
-#define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2)
-#define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3)
-#define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4)
-#define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5)
-#define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6)
-#define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7)
-#define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8)
-
-#define NPRES_BASE 0
-#define NPRES_NETWORK_ERR (NPRES_BASE + 0)
-#define NPRES_USER_BREAK (NPRES_BASE + 1)
-#define NPRES_DONE (NPRES_BASE + 3)
-
-
-
-/*
- * Function prototypes.
- * Functions beginning with 'NPP' are functions provided by the plugin that Netscape will call.
- * Functions beginning with 'NPN' are functions provided by Netscape that the plugin will call.
- */
-
-#if defined(_WINDOWS) && !defined(__WIN32__)
-#define NP_LOADDS _loadds
-#else
-#define NP_LOADDS
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-NPError NPP_Initialize(void);
-void NPP_Shutdown(void);
-NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved);
-NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save);
-NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window);
-NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype);
-NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, NPError reason);
-int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream);
-int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer);
-void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
-void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint);
-int16 NPP_HandleEvent(NPP instance, void* event);
-
-void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor);
-NPError NPN_GetURL(NPP instance, const char* url, const char* window);
-NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file);
-NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList);
-NPError NPN_NewStream(NPP instance, NPMIMEType type, NPStream* stream);
-int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer);
-NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason);
-void NPN_Status(NPP instance, const char* message);
-const char* NPN_UserAgent(NPP instance);
-void* NPN_MemAlloc(uint32 size);
-void NPN_MemFree(void* ptr);
-uint32 NPN_MemFlush(uint32 size);
-void NPN_ReloadPlugins(NPBool reloadPages);
-
-#ifdef __cplusplus
-} /* end extern "C" */
-#endif
-
-
-#endif /* _NPAPI_H_ */
-
+++ /dev/null
-/*
- * File: NPApp.cc
- * Purpose: wxPluginApp implementation
- * Author: Julian Smart
- * Created: 1997
- * Updated:
- * Copyright: (c) Julian Smart
- */
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#include "NPApp.h"
-#include "NPFrame.h"
-
-#include <windows.h>
-
-IMPLEMENT_ABSTRACT_CLASS(wxPluginApp, wxApp)
-
-wxPluginApp *wxGetPluginApp(void)
-{
- if ( wxTheApp && wxTheApp->IsKindOf(CLASSINFO(wxPluginApp)))
- return (wxPluginApp *)wxTheApp;
- else
- return NULL;
-}
-
-wxPluginApp::wxPluginApp(void)
-{
- m_data.m_argc = NULL;
- m_data.m_argn = NULL;
- m_data.m_argv = NULL;
- m_data.m_type = 0;
- m_data.m_instance = 0;
- m_data.m_mode = 0;
- m_data.m_window = 0;
-}
-
-wxPluginApp::~wxPluginApp(void)
-{
- if ( m_data.m_argn )
- delete[] m_data.m_argn;
- if ( m_data.m_argv )
- delete[] m_data.m_argv;
-}
-
-// Add a frame
-void wxPluginApp::AddFrame(wxPluginFrame *frame)
-{
- m_frames.Append(frame);
-}
-
-// Remove a frame
-void wxPluginApp::RemoveFrame(wxPluginFrame *frame)
-{
- m_frames.DeleteObject(frame);
-}
-
-// Find a frame given a NP instance
-wxPluginFrame *wxPluginApp::FindFrame(NPP instance)
-{
- wxNode *node = m_frames.First();
- while ( node )
- {
- wxPluginFrame *frame = (wxPluginFrame *)node->Data();
- if ( frame->GetInstance() == instance )
- {
- return frame;
- }
- node = node->Next();
- }
- return NULL;
-}
-
-void wxPluginApp::SetAttributeValues(const int n, char *argn[], char *argv[])
-{
- if ( m_data.m_argn )
- delete[] m_data.m_argn;
- if ( m_data.m_argv )
- delete[] m_data.m_argv;
-
- m_data.m_argc = n;
-
- m_data.m_argn = new wxString[n];
- m_data.m_argv = new wxString[n];
- int i;
- for ( i = 0; i < n ; i ++)
- {
- m_data.m_argn[i] = argn[i];
- m_data.m_argv[i] = argv[i];
- }
-}
-
-///////////////////////////////////////////////////////////////
-// Netscape Plugin API calls routed via wxPluginApp
-
-NPError wxPluginApp::NPP_Destroy(NPP instance, NPSavedData** save)
-{
- wxPluginFrame *frame = FindFrame(instance);
- if ( frame )
- {
- frame->Close();
- }
- return NPERR_NO_ERROR;
-}
-
-NPError wxPluginApp::NPP_DestroyStream(NPP instance, NPStream* stream, NPError reason)
-{
- return NPERR_NO_ERROR;
-}
-
-/*
-jref wxPluginApp::NPP_GetJavaClass(void)
-{
- return 0;
-}
-*/
-
-// This can't work now because we don't have a global app until wxEntry is called.
-// We'll put the wxEntry call in npshell.cpp instead.
-NPError wxPluginApp::NPP_Initialize(void)
-{
- static int init = FALSE;
-
- if ( init == TRUE )
- MessageBox(NULL, "wxPluginApp::NPP_Initialize:\nabout to call wxEntry for 2nd time!!!", "wxPlugin", MB_OK);
-
- wxEntry((WXHINSTANCE) GetModuleHandle(NULL));
-
- init = TRUE;
-
-// MessageBox(NULL, "wxPluginApp::NPP_Initialize: have called wxEntry", "wxPlugin", MB_OK);
- return NPERR_NO_ERROR;
-}
-
-NPError wxPluginApp::NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode,
- int16 argc, char* argn[], char* argv[], NPSavedData* saved)
-{
-// MessageBox(NULL, "wxPluginApp::NPP_New", "wxPlugin", MB_OK);
-
- // Save values so frame can be created in first NPP_SetWindow
- if ( m_data.m_instance != 0 )
- {
- MessageBox(NULL, "wxPluginApp::NPP_New: whoops, 2 NPP_New calls in succession without NPP_SetWindow.\n Need to modify my code!", "wxPlugin", MB_OK);
- return NPERR_NO_ERROR;
- }
-
- m_data.m_instance = instance;
- m_data.m_type = pluginType;
- m_data.m_mode = mode;
-
- SetAttributeValues(argc, argn, argv);
-
- // Unfortunately, we may get a stream event before we've got a valid window
- // handle, so we just have to go ahead and create a new instance.
- wxPluginFrame *frame = OnNewInstance(m_data);
-
- m_data.m_instance = NULL;
- m_data.m_window = NULL;
- delete[] m_data.m_argv;
- delete[] m_data.m_argn;
- m_data.m_argv = NULL;
- m_data.m_argn = NULL;
-
- return NPERR_NO_ERROR;
-}
-
-NPError wxPluginApp::NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream,
- NPBool seekable, uint16* stype)
-{
- // By default, we want to receive a file instead of a stream.
- wxPluginFrame *frame = FindFrame(instance);
- if ( frame )
- {
- return frame->OnNPNewStream(type, stream, seekable, stype);
- }
- return NPERR_NO_ERROR;
-}
-
-void wxPluginApp::NPP_Print(NPP instance, NPPrint* printInfo)
-{
- if (instance == NULL)
- return;
-
- wxPluginFrame *frame = FindFrame(instance);
- if ( frame )
- {
- frame->OnNPPrint(printInfo);
- }
-}
-
-NPError wxPluginApp::NPP_SetWindow(NPP instance, NPWindow* window)
-{
-// MessageBox(NULL, "wxPluginApp::NPP_SetWindow", "wxPlugin", MB_OK);
-
- if ( window )
- wxDebugMsg("%d\n", (int) window->window);
-
- wxPluginFrame *frame = FindFrame(instance);
- if ( frame )
- {
- frame->SetNPWindow(window);
- }
- else
- {
-#if 0
- // No such frame: must make it.
- if ( m_data.m_instance == NULL )
- {
- MessageBox(NULL, "wxPluginApp::NPP_SetWindow: whoops, no data to create window. SetWindow called in funny order?", "wxPlugin", MB_OK);
- return NPERR_NO_ERROR;
- }
-
- if ( window->window == NULL )
- {
- // We're receiving a NULL window before we've even received
- // a valid window. Ignore this silly thing.
- return NPERR_NO_ERROR;
- }
-
- m_data.m_window = window;
- m_data.m_instance = instance;
-
-// wxPluginFrame *frame = OnNewInstance(m_data);
-
- m_data.m_instance = NULL;
- m_data.m_window = NULL;
- delete[] m_data.m_argv;
- delete[] m_data.m_argn;
- m_data.m_argv = NULL;
- m_data.m_argn = NULL;
-#endif
- }
- return NPERR_NO_ERROR;
-}
-
-void wxPluginApp::NPP_Shutdown(void)
-{
- // Clean up wxWidgets
- CleanUp();
-}
-
-void wxPluginApp::NPP_StreamAsFile(NPP instance, NPStream* stream, const char *fname)
-{
- wxPluginFrame *frame = FindFrame(instance);
- if ( frame )
- {
- wxString str(fname);
- frame->OnNPNewFile(stream, str);
- }
-}
-
-/*
-void wxPluginApp::NPP_URLNotify(NPP instance, const char* url, NPReason reason,
- void* notifyData)
-{
-}
-*/
-
-int32 wxPluginApp::NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len,
- void* buf)
-{
- return len; // The number of bytes accepted
-}
-
-static int32 STREAMBUFSIZE = 0X0FFFFFFF; // If we are reading from a file in NPAsFile
- // mode so we can take any size stream in our
- // write call (since we ignore it)
-
-int32 wxPluginApp::NPP_WriteReady(NPP instance, NPStream* stream)
-{
- return STREAMBUFSIZE; // Number of bytes ready to accept in NPP_Write()
-}
-
+++ /dev/null
-/*
- * File: NPApp.h
- * Purpose: wxPluginApp declaration
- * Author: Julian Smart
- * Created: 1997
- * Updated:
- * Copyright: (c) Julian Smart
- */
-
-#ifndef __PLUGINAPP__
-#define __PLUGINAPP__
-
-#include "wx/wx.h"
-#include "npapi.h"
-
-class wxPluginFrame;
-
-// Data passed to OnNewInstance
-class wxPluginData
-{
-public:
- NPP m_instance;
- NPMIMEType m_type;
- NPWindow* m_window;
- int m_mode;
- int m_argc;
- wxString* m_argn;
- wxString* m_argv;
-};
-
-class WXDLLEXPORT wxPluginApp: public wxApp
-{
- DECLARE_ABSTRACT_CLASS(wxPluginApp)
-
-public:
- wxPluginApp(void);
- virtual ~wxPluginApp(void);
-
- // Find a frame given a NP instance
- wxPluginFrame *FindFrame(NPP instance);
-
- // Add a frame
- void AddFrame(wxPluginFrame *frame);
-
- // Remove a frame
- void RemoveFrame(wxPluginFrame *frame);
-
- // Set attribute/values for the last instance
- void SetAttributeValues(const int n, char *argn[], char *argv[]);
-
- ///////////////////////////////////////////////////////////////
- // Higher-level API than NP API
- virtual wxPluginFrame *OnNewInstance(const wxPluginData& data) = 0;
-
- ///////////////////////////////////////////////////////////////
- // Netscape Plugin API calls routed via wxPluginApp
-
- virtual NPError NPP_Destroy(NPP instance, NPSavedData** save);
- virtual NPError NPP_DestroyStream(NPP instance, NPStream* stream, NPError reason);
-// virtual jref NPP_GetJavaClass(void);
- virtual NPError NPP_Initialize(void);
- virtual NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode,
- int16 argc, char* argn[], char* argv[], NPSavedData* saved);
- virtual NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream *stream,
- NPBool seekable, uint16* stype);
- virtual void NPP_Print(NPP instance, NPPrint* platformPrint);
- virtual NPError NPP_SetWindow(NPP instance, NPWindow* window);
- virtual void NPP_Shutdown(void);
- virtual void NPP_StreamAsFile(NPP instance, NPStream* stream, const char *fname);
-/*
- virtual void NPP_URLNotify(NPP instance, const char* url, NPReason reason,
- void* notifyData);
-*/
- virtual int32 NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len,
- void* buf);
- virtual int32 NPP_WriteReady(NPP instance, NPStream* stream);
-
-protected:
-
- // List of plugin frames
- wxList m_frames;
-
- // Temporary NPP_New arguments so we can wait until NPP_SetWindow is called
- // before creating a frame
- wxPluginData m_data;
-};
-
-wxPluginApp *wxGetPluginApp(void);
-
-#endif
-
+++ /dev/null
-/*
- * File: NPFrame.cc
- * Purpose: wxPluginFrame implementation
- * Author: Julian Smart
- * Created: 1997
- * Updated:
- * Copyright: (c) Julian Smart
- */
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/frame.h"
-#endif
-
-#include "wx/dcprint.h"
-
-#include "NPFrame.h"
-#include "NPApp.h"
-
-#include <windows.h>
-
-extern wxList wxModelessWindows;
-extern char wxFrameClassName[];
-
-IMPLEMENT_DYNAMIC_CLASS(wxPluginFrame, wxFrame)
-
-wxPluginFrame::wxPluginFrame(void)
-{
- m_npWindow = NULL;
- m_npInstance = NULL;
- m_nAttributes = 0;
- m_names = NULL;
- m_values = NULL;
-}
-
-bool wxPluginFrame::Create(const wxPluginData& data)
-{
- SetName("pluginFrame");
-
- m_npWindow = NULL;
- m_npInstance = NULL;
- m_nAttributes = 0;
- m_names = NULL;
- m_values = NULL;
- m_npWindow = data.m_window;
- m_npInstance = data.m_instance;
-
- SetAttributeValues(data.m_argc, data.m_argn, data.m_argv);
- SetNPWindow(data.m_window);
-
- wxModelessWindows.Append(this);
-
- if (wxTheApp->IsKindOf(CLASSINFO(wxPluginApp)))
- {
- ((wxPluginApp *)wxTheApp)->AddFrame(this);
- }
- return TRUE;
-}
-
-wxPluginFrame::~wxPluginFrame(void)
-{
- if (wxTheApp->IsKindOf(CLASSINFO(wxPluginApp)))
- {
- ((wxPluginApp *)wxTheApp)->RemoveFrame(this);
- }
-
- if ( GetHWND() )
- UnsubclassWin();
- m_hWnd = 0;
-
- if ( m_names )
- delete[] m_names;
- if ( m_values )
- delete[] m_values;
-}
-
-// Get size *available for subwindows* i.e. excluding menu bar etc.
-// For XView, this is the same as GetSize
-void wxPluginFrame::GetClientSize(int *x, int *y) const
-{
- if ( !m_hWnd )
- {
- *x = 0; *y = 0;
- return;
- }
- wxFrame::GetClientSize(x, y);
-}
-
-// Set the client size (i.e. leave the calculation of borders etc.
-// to wxWidgets)
-void wxPluginFrame::SetClientSize(const int width, const int height)
-{
- if ( !m_hWnd )
- return ;
-
- wxFrame::SetClientSize(width, height);
-}
-
-void wxPluginFrame::GetSize(int *width, int *height) const
-{
- if ( !m_hWnd )
- {
- *width = 0; *height = 0;
- return;
- }
- wxFrame::GetSize(width, height);
-}
-
-void wxPluginFrame::GetPosition(int *x, int *y) const
-{
- if ( !m_hWnd )
- {
- *x = 0; *y = 0;
- return;
- }
- wxFrame::GetPosition(x, y);
-}
-
-void wxPluginFrame::SetAttributeValues(const int n, const char *argn[], const char *argv[])
-{
- if ( m_names )
- delete[] m_names;
- if ( m_values )
- delete[] m_values;
-
- m_nAttributes = n;
-
- m_names = new wxString[n];
- m_values = new wxString[n];
- int i;
- for ( i = 0; i < n ; i ++)
- {
- m_names[i] = argn[i];
- m_values[i] = argv[i];
- }
-}
-
-void wxPluginFrame::SetAttributeValues(const int n, const wxString* argn, const wxString* argv)
-{
- if ( m_names )
- delete[] m_names;
- if ( m_values )
- delete[] m_values;
-
- m_nAttributes = n;
-
- m_names = new wxString[n];
- m_values = new wxString[n];
- int i;
- for ( i = 0; i < n ; i ++)
- {
- m_names[i] = argn[i];
- m_values[i] = argv[i];
- }
-}
-
-void wxPluginFrame::SetSize(const int x, const int y, const int width, const int height, const int sizeFlags)
-{
- // Can't allow app to set the size.
- return;
-}
-
-// Sets and subclasses the platform-specific window handle
-bool wxPluginFrame::SetNPWindow(NPWindow *window)
-{
- if ( !window || !window->window)
- {
- if ( m_hWnd )
- {
- wxMessageBox("Unsubclassing window prematurely");
- UnsubclassWin();
- m_hWnd = 0;
- }
- m_npWindow = NULL;
- }
- else
- {
- if ( m_hWnd )
- {
- if ( m_hWnd == (WXHWND) window->window )
- {
- // Does this mean a resize?
- return TRUE;
- }
- }
-
- m_npWindow = window;
- m_hWnd = (WXHWND) window->window;
- SubclassWin(m_hWnd);
- m_windowId = ::GetWindowLong((HWND) m_hWnd, GWL_ID);
- }
- return TRUE;
-}
-
-NPError wxPluginFrame::OnNPNewStream(NPMIMEType type, NPStream *stream, bool seekable, uint16* stype)
-{
- *stype = NP_ASFILE;
- return NPERR_NO_ERROR;
-}
-
-void wxPluginFrame::OnNPNewFile(NPStream *stream, const wxString& fname)
-{
-}
-
-void wxPluginFrame::OnNPPrint(NPPrint* printInfo)
-{
- if (printInfo->mode == NP_FULL)
- {
- //
- // *Developers*: If your plugin would like to take over
- // printing completely when it is in full-screen mode,
- // set printInfo->pluginPrinted to TRUE and print your
- // plugin as you see fit. If your plugin wants Netscape
- // to handle printing in this case, set printInfo->pluginPrinted
- // to FALSE (the default) and do nothing. If you do want
- // to handle printing yourself, printOne is true if the
- // print button (as opposed to the print menu) was clicked.
- // On the Macintosh, platformPrint is a THPrint; on Windows,
- // platformPrint is a structure (defined in npapi.h) containing
- // the printer name, port, etc.
- //
- void* platformPrint = printInfo->print.fullPrint.platformPrint;
- NPBool printOne = printInfo->print.fullPrint.printOne;
-
- printInfo->print.fullPrint.pluginPrinted = FALSE; // Do the default
-
- }
- else // If not fullscreen, we must be embedded
- {
- //
- // *Developers*: If your plugin is embedded, or is full-screen
- // but you returned false in pluginPrinted above, NPP_Print
- // will be called with mode == NP_EMBED. The NPWindow
- // in the printInfo gives the location and dimensions of
- // the embedded plugin on the printed page. On the Macintosh,
- // platformPrint is the printer port; on Windows, platformPrint
- // is the handle to the printing device context.
- //
- NPWindow* printWindow = &(printInfo->print.embedPrint.window);
- void* platformPrint = printInfo->print.embedPrint.platformPrint;
-
- HDC hDC = (HDC) platformPrint;
- wxRect rect;
- rect.x = printWindow->x;
- rect.y = printWindow->y;
- rect.width = printWindow->width;
- rect.height = printWindow->height;
-
- int saveIt = ::SaveDC(hDC);
-
- wxPrinterDC *printerDC = new wxPrinterDC((WXHDC) hDC);
-
- OnPrint(*printerDC, rect);
-
- printerDC->SetHDC(0);
- delete printerDC;
-
- ::RestoreDC(hDC, saveIt);
- }
- }
-
-void wxPluginFrame::OnPrint(wxPrinterDC& dc, wxRect& rect)
-{
- // We must do some transformations here
- RECT winRect;
-/*
- winRect.left = rect.x;
- winRect.top = rect.y;
- winRect.right = rect.x + rect.right;
- winRect.bottom = rect.y + rect.height;
-*/
- POINT winPoint[2];
- winPoint[0].x = rect.x;
- winPoint[0].y = rect.y;
- winPoint[1].x = rect.x + rect.width;
- winPoint[1].y = rect.y + rect.height;
-
- if (!LPtoDP((HDC) dc.GetHDC(), winPoint, 2))
- wxMessageBox("LPtoDP failed.");
-
- OnDraw(dc);
-}
-
-void wxPluginFrame::OnDraw(wxDC& dc)
-{
-}
-
+++ /dev/null
-/*
- * File: NPFrame.h
- * Purpose: wxPluginFrame declaration
- * Author: Julian Smart
- * Created: 1997
- * Updated:
- * Copyright: (c) Julian Smart
- */
-
-#ifndef __PLUGINFRAME__
-#define __PLUGINFRAME__
-
-#include "wx/frame.h"
-#include "NPApp.h"
-#include "npapi.h"
-
-WXDLLEXPORT extern const char *wxFrameNameStr;
-
-class wxPrinterDC;
-class WXDLLEXPORT wxPluginFrame: public wxFrame
-{
- DECLARE_DYNAMIC_CLASS(wxPluginFrame)
-
-public:
- wxPluginFrame(void);
- inline wxPluginFrame(const wxPluginData& data)
- {
- m_npWindow = NULL;
- m_npInstance = NULL;
- m_nAttributes = 0;
- m_names = NULL;
- m_values = NULL;
-
- Create(data);
- }
-
- virtual ~wxPluginFrame(void);
-
- bool Create(const wxPluginData& data);
-
- // Sets and subclasses the platform-specific window handle
- virtual bool SetNPWindow(NPWindow *window);
- inline NPWindow *GetNPWindow(void) { return m_npWindow; }
-
- void SetClientSize(const int width, const int height);
- void GetClientSize(int *width, int *height) const;
-
- void GetSize(int *width, int *height) const ;
- void GetPosition(int *x, int *y) const ;
- void SetSize(const int x, const int y, const int width, const int height, const int sizeFlags = wxSIZE_AUTO);
-
- // Accessors
- inline int GetAttributeCount(void) const { return m_nAttributes; }
- inline wxString GetAttributeName(const int n) { return m_names[n]; }
- inline wxString GetAttributeValue(const int n) { return m_values[n]; }
-
- void SetAttributeValues(const int n, const char* argn[], const char *argv[]);
- void SetAttributeValues(const int n, const wxString* argn, const wxString* argv);
- inline void SetInstance(const NPP instance) { m_npInstance = instance; };
- inline NPP GetInstance(void) { return m_npInstance; }
-
- // Overridables: low-level
- virtual NPError OnNPNewStream(NPMIMEType type, NPStream *stream, bool seekable, uint16* stype);
- virtual void OnNPNewFile(NPStream *stream, const wxString& fname);
- virtual void OnNPPrint(NPPrint* printInfo);
-
- // Overridables: high-level
- virtual void OnPrint(wxPrinterDC& dc, wxRect& rect);
- virtual void OnDraw(wxDC& dc);
-
-protected:
-
- wxString* m_names;
- wxString* m_values;
- int m_nAttributes;
- NPP m_npInstance;
- NPWindow* m_npWindow;
-};
-
-#endif
-
+++ /dev/null
-//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-//
-// npshell.cpp
-//
-// This file defines a "shell" plugin that plugin developers can use
-// as the basis for a real plugin. This shell just provides empty
-// implementations of all functions that the plugin can implement
-// that will be called by Netscape (the NPP_xxx methods defined in
-// npapi.h).
-//
-//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-
-#ifndef _NPAPI_H_
-#include "npapi.h"
-#endif
-
-#include <windows.h>
-#include <string.h>
-#include <stdio.h>
-
-#include "NPApp.h"
-
-//
-// Instance state information about the plugin.
-//
-// *Developers*: Use this struct to hold per-instance
-// information that you'll need in the
-// various functions in this file.
-//
-typedef struct _PluginInstance
-{
- NPWindow* fWindow;
- uint16 fMode;
-
-} PluginInstance;
-
-
-
-//------------------------------------------------------------------------------------
-// NPP_Initialize:
-//------------------------------------------------------------------------------------
-NPError NPP_Initialize(void)
-{
-// MessageBox(NULL, "NPP_Initialize", "NPTest", MB_OK);
-/*
- wxPluginApp *app = wxGetPluginApp();
- if ( app )
- return app->NPP_Initialize();
- else
- return NPERR_NO_ERROR;
-*/
- wxEntry((WXHINSTANCE) GetModuleHandle(NULL));
-
- return NPERR_NO_ERROR;
-}
-
-
-//------------------------------------------------------------------------------------
-// NPP_Shutdown:
-//------------------------------------------------------------------------------------
-void NPP_Shutdown(void)
-{
-// MessageBox(NULL, "NPP_Shutdown", "wxPlugin", MB_OK);
-
- wxPluginApp *app = wxGetPluginApp();
- if ( app )
- app->NPP_Shutdown();
-}
-
-
-//------------------------------------------------------------------------------------
-// NPP_New:
-//------------------------------------------------------------------------------------
-NPError NP_LOADDS
-NPP_New(NPMIMEType pluginType,
- NPP instance,
- uint16 mode,
- int16 argc,
- char* argn[],
- char* argv[],
- NPSavedData* saved)
-{
-// MessageBox(NULL, "NPP_New", "NPTest", MB_OK);
-
- if (instance == NULL)
- return NPERR_INVALID_INSTANCE_ERROR;
-
- wxPluginApp *app = wxGetPluginApp();
- if ( app )
- return app->NPP_New(pluginType, instance, mode, argc, argn, argv, saved);
- else
- return NPERR_NO_ERROR;
-}
-
-//------------------------------------------------------------------------------------
-// NPP_Destroy:
-//------------------------------------------------------------------------------------
-NPError NP_LOADDS
-NPP_Destroy(NPP instance, NPSavedData** save)
-{
-// MessageBox(NULL, "NPP_Destroy", "NPTest", MB_OK);
-
- if (instance == NULL)
- return NPERR_INVALID_INSTANCE_ERROR;
-
- wxPluginApp *app = wxGetPluginApp();
- if ( app )
- return app->NPP_Destroy(instance, save);
- else
- return NPERR_NO_ERROR;
-}
-
-
-//------------------------------------------------------------------------------------
-// NPP_SetWindow:
-//------------------------------------------------------------------------------------
-NPError NP_LOADDS
-NPP_SetWindow(NPP instance, NPWindow* window)
-{
-// MessageBox(NULL, "NPP_SetWindow", "NPTest", MB_OK);
-
- if (instance == NULL)
- return NPERR_INVALID_INSTANCE_ERROR;
-
- wxPluginApp *app = wxGetPluginApp();
- if ( app )
- return app->NPP_SetWindow(instance, window);
- else
- return NPERR_NO_ERROR;
-}
-
-
-//------------------------------------------------------------------------------------
-// NPP_NewStream:
-//------------------------------------------------------------------------------------
-NPError NP_LOADDS
-NPP_NewStream(NPP instance,
- NPMIMEType type,
- NPStream *stream,
- NPBool seekable,
- uint16 *stype)
-{
-// MessageBox(NULL, "NPP_NewStream", "NPTest", MB_OK);
-
- if (instance == NULL)
- return NPERR_INVALID_INSTANCE_ERROR;
-
- wxPluginApp *app = wxGetPluginApp();
- if ( app )
- return app->NPP_NewStream(instance, type, stream, seekable, stype);
- else
- return NPERR_NO_ERROR;
-}
-
-
-
-//
-// *Developers*:
-// These next 2 functions are directly relevant in a plug-in which handles the
-// data in a streaming manner. If you want zero bytes because no buffer space
-// is YET available, return 0. As long as the stream has not been written
-// to the plugin, Navigator will continue trying to send bytes. If the plugin
-// doesn't want them, just return some large number from NPP_WriteReady(), and
-// ignore them in NPP_Write(). For a NP_ASFILE stream, they are still called
-// but can safely be ignored using this strategy.
-//
-
-static int32 STREAMBUFSIZE = 0X0FFFFFFF; // If we are reading from a file in NPAsFile
- // mode so we can take any size stream in our
- // write call (since we ignore it)
-
-//------------------------------------------------------------------------------------
-// NPP_WriteReady:
-//------------------------------------------------------------------------------------
-int32 NP_LOADDS
-NPP_WriteReady(NPP instance, NPStream *stream)
-{
- wxPluginApp *app = wxGetPluginApp();
- if ( app )
- return app->NPP_WriteReady(instance, stream);
- else
- return STREAMBUFSIZE;
-
- return STREAMBUFSIZE; // Number of bytes ready to accept in NPP_Write()
-}
-
-
-
-//------------------------------------------------------------------------------------
-// NPP_Write:
-//------------------------------------------------------------------------------------
-int32 NP_LOADDS
-NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer)
-{
- wxPluginApp *app = wxGetPluginApp();
- if ( app )
- return app->NPP_Write(instance, stream, offset, len, buffer);
- else
- return len; // The number of bytes accepted
-}
-
-
-
-//------------------------------------------------------------------------------------
-// NPP_DestroyStream:
-//------------------------------------------------------------------------------------
-NPError NP_LOADDS
-NPP_DestroyStream(NPP instance, NPStream *stream, NPError reason)
-{
- if (instance == NULL)
- return NPERR_INVALID_INSTANCE_ERROR;
-
- wxPluginApp *app = wxGetPluginApp();
- if ( app )
- return app->NPP_DestroyStream(instance, stream, reason);
- else
- return NPERR_NO_ERROR;
-}
-
-
-//------------------------------------------------------------------------------------
-// NPP_StreamAsFile:
-//------------------------------------------------------------------------------------
-void NP_LOADDS
-NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname)
-{
- wxPluginApp *app = wxGetPluginApp();
- if ( app )
- app->NPP_StreamAsFile(instance, stream, fname);
-}
-
-
-
-//------------------------------------------------------------------------------------
-// NPP_Print:
-//------------------------------------------------------------------------------------
-void NP_LOADDS
-NPP_Print(NPP instance, NPPrint* printInfo)
-{
- if (printInfo == NULL) // trap invalid parm
- return;
- if ( instance == NULL )
- return;
-
- wxPluginApp *app = wxGetPluginApp();
- if ( app )
- app->NPP_Print(instance, printInfo);
-}
-
-
-//------------------------------------------------------------------------------------
-// NPP_HandleEvent:
-// Mac-only.
-//------------------------------------------------------------------------------------
-int16 NPP_HandleEvent(NPP instance, void* event)
-{
- NPBool eventHandled = FALSE;
- if (instance == NULL)
- return eventHandled;
-
- PluginInstance* This = (PluginInstance*) instance->pdata;
-
- //
- // *Developers*: The "event" passed in is a Macintosh
- // EventRecord*. The event.what field can be any of the
- // normal Mac event types, or one of the following additional
- // types defined in npapi.h: getFocusEvent, loseFocusEvent,
- // adjustCursorEvent. The focus events inform your plugin
- // that it will become, or is no longer, the recepient of
- // key events. If your plugin doesn't want to receive key
- // events, return false when passed at getFocusEvent. The
- // adjustCursorEvent is passed repeatedly when the mouse is
- // over your plugin; if your plugin doesn't want to set the
- // cursor, return false. Handle the standard Mac events as
- // normal. The return value for all standard events is currently
- // ignored except for the key event: for key events, only return
- // true if your plugin has handled that particular key event.
- //
-
- return eventHandled;
-}
-
+++ /dev/null
-/*
- * npupp.h $Revision$
- * function call mecahnics needed by platform specific glue code.
- */
-
-
-#ifndef _NPUPP_H_
-#define _NPUPP_H_
-
-#ifndef GENERATINGCFM
-#define GENERATINGCFM 0
-#endif
-
-#ifndef _NPAPI_H_
-#include "npapi.h"
-#endif
-
-/******************************************************************************************
- plug-in function table macros
- for each function in and out of the plugin API we define
- typedef NPP_FooUPP
- #define NewNPP_FooProc
- #define CallNPP_FooProc
- for mac, define the UPP magic for PPC/68K calling
- *******************************************************************************************/
-
-
-/* NPP_Initialize */
-
-#if GENERATINGCFM
-typedef UniversalProcPtr NPP_InitializeUPP;
-
-enum {
- uppNPP_InitializeProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0))
- | RESULT_SIZE(SIZE_CODE(0))
-};
-
-#define NewNPP_InitializeProc(FUNC) \
- (NPP_InitializeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_InitializeProcInfo, GetCurrentArchitecture())
-#define CallNPP_InitializeProc(FUNC) \
- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_InitializeProcInfo)
-
-#else
-
-typedef void (*NPP_InitializeUPP)(void);
-#define NewNPP_InitializeProc(FUNC) \
- ((NPP_InitializeUPP) (FUNC))
-#define CallNPP_InitializeProc(FUNC) \
- (*(FUNC))()
-
-#endif
-
-
-/* NPP_Shutdown */
-
-#if GENERATINGCFM
-typedef UniversalProcPtr NPP_ShutdownUPP;
-
-enum {
- uppNPP_ShutdownProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(0))
- | RESULT_SIZE(SIZE_CODE(0))
-};
-
-#define NewNPP_ShutdownProc(FUNC) \
- (NPP_ShutdownUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_ShutdownProcInfo, GetCurrentArchitecture())
-#define CallNPP_ShutdownProc(FUNC) \
- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_ShutdownProcInfo)
-
-#else
-
-typedef void (*NPP_ShutdownUPP)(void);
-#define NewNPP_ShutdownProc(FUNC) \
- ((NPP_ShutdownUPP) (FUNC))
-#define CallNPP_ShutdownProc(FUNC) \
- (*(FUNC))()
-
-#endif
-
-
-/* NPP_New */
-
-#if GENERATINGCFM
-typedef UniversalProcPtr NPP_NewUPP;
-
-enum {
- uppNPP_NewProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPMIMEType)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPP)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(uint16)))
- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int16)))
- | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(char **)))
- | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(char **)))
- | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(NPSavedData *)))
- | RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
-};
-
-#define NewNPP_NewProc(FUNC) \
- (NPP_NewUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewProcInfo, GetCurrentArchitecture())
-#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \
- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewProcInfo, \
- (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))
-#else
-
-typedef NPError (*NPP_NewUPP)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved);
-#define NewNPP_NewProc(FUNC) \
- ((NPP_NewUPP) (FUNC))
-#define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \
- (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7))
-
-#endif
-
-
-/* NPP_Destroy */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPP_DestroyUPP;
-enum {
- uppNPP_DestroyProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPSavedData **)))
- | RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
-};
-#define NewNPP_DestroyProc(FUNC) \
- (NPP_DestroyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyProcInfo, GetCurrentArchitecture())
-#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \
- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyProcInfo, (ARG1), (ARG2))
-#else
-
-typedef NPError (*NPP_DestroyUPP)(NPP instance, NPSavedData** save);
-#define NewNPP_DestroyProc(FUNC) \
- ((NPP_DestroyUPP) (FUNC))
-#define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \
- (*(FUNC))((ARG1), (ARG2))
-
-#endif
-
-
-/* NPP_SetWindow */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPP_SetWindowUPP;
-enum {
- uppNPP_SetWindowProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPWindow *)))
- | RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
-};
-#define NewNPP_SetWindowProc(FUNC) \
- (NPP_SetWindowUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_SetWindowProcInfo, GetCurrentArchitecture())
-#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \
- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_SetWindowProcInfo, (ARG1), (ARG2))
-
-#else
-
-typedef NPError (*NPP_SetWindowUPP)(NPP instance, NPWindow* window);
-#define NewNPP_SetWindowProc(FUNC) \
- ((NPP_SetWindowUPP) (FUNC))
-#define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \
- (*(FUNC))((ARG1), (ARG2))
-
-#endif
-
-
-/* NPP_NewStream */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPP_NewStreamUPP;
-enum {
- uppNPP_NewStreamProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPStream *)))
- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPBool)))
- | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint16 *)))
- | RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
-};
-#define NewNPP_NewStreamProc(FUNC) \
- (NPP_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_NewStreamProcInfo, GetCurrentArchitecture())
-#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \
- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_NewStreamProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5))
-#else
-
-typedef NPError (*NPP_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype);
-#define NewNPP_NewStreamProc(FUNC) \
- ((NPP_NewStreamUPP) (FUNC))
-#define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \
- (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5))
-#endif
-
-
-/* NPP_DestroyStream */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPP_DestroyStreamUPP;
-enum {
- uppNPP_DestroyStreamProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPError)))
- | RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
-};
-#define NewNPP_DestroyStreamProc(FUNC) \
- (NPP_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, GetCurrentArchitecture())
-#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPErrorArg) \
- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_DestroyStreamProcInfo, (NPParg), (NPStreamPtr), (NPErrorArg))
-
-#else
-
-typedef NPError (*NPP_DestroyStreamUPP)(NPP instance, NPStream* stream, NPError reason);
-#define NewNPP_DestroyStreamProc(FUNC) \
- ((NPP_DestroyStreamUPP) (FUNC))
-#define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPErrorArg) \
- (*(FUNC))((NPParg), (NPStreamPtr), (NPErrorArg))
-
-#endif
-
-
-/* NPP_WriteReady */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPP_WriteReadyUPP;
-enum {
- uppNPP_WriteReadyProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))
- | RESULT_SIZE(SIZE_CODE(sizeof(int32)))
-};
-#define NewNPP_WriteReadyProc(FUNC) \
- (NPP_WriteReadyUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, GetCurrentArchitecture())
-#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \
- (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteReadyProcInfo, (NPParg), (NPStreamPtr))
-
-#else
-
-typedef int32 (*NPP_WriteReadyUPP)(NPP instance, NPStream* stream);
-#define NewNPP_WriteReadyProc(FUNC) \
- ((NPP_WriteReadyUPP) (FUNC))
-#define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \
- (*(FUNC))((NPParg), (NPStreamPtr))
-
-#endif
-
-
-/* NPP_Write */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPP_WriteUPP;
-enum {
- uppNPP_WriteProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32)))
- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(int32)))
- | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(void*)))
- | RESULT_SIZE(SIZE_CODE(sizeof(int32)))
-};
-#define NewNPP_WriteProc(FUNC) \
- (NPP_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_WriteProcInfo, GetCurrentArchitecture())
-#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \
- (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_WriteProcInfo, (NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr))
-
-#else
-
-typedef int32 (*NPP_WriteUPP)(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer);
-#define NewNPP_WriteProc(FUNC) \
- ((NPP_WriteUPP) (FUNC))
-#define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \
- (*(FUNC))((NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr))
-
-#endif
-
-
-/* NPP_StreamAsFile */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPP_StreamAsFileUPP;
-enum {
- uppNPP_StreamAsFileProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char *)))
- | RESULT_SIZE(SIZE_CODE(0))
-};
-#define NewNPP_StreamAsFileProc(FUNC) \
- (NPP_StreamAsFileUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, GetCurrentArchitecture())
-#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \
- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_StreamAsFileProcInfo, (ARG1), (ARG2), (ARG3))
-
-#else
-
-typedef void (*NPP_StreamAsFileUPP)(NPP instance, NPStream* stream, const char* fname);
-#define NewNPP_StreamAsFileProc(FUNC) \
- ((NPP_StreamAsFileUPP) (FUNC))
-#define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \
- (*(FUNC))((ARG1), (ARG2), (ARG3))
-#endif
-
-
-/* NPP_Print */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPP_PrintUPP;
-enum {
- uppNPP_PrintProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPrint *)))
- | RESULT_SIZE(SIZE_CODE(0))
-};
-#define NewNPP_PrintProc(FUNC) \
- (NPP_PrintUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_PrintProcInfo, GetCurrentArchitecture())
-#define CallNPP_PrintProc(FUNC, NPParg, voidPtr) \
- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_PrintProcInfo, (NPParg), (voidPtr))
-
-#else
-
-typedef void (*NPP_PrintUPP)(NPP instance, NPPrint* platformPrint);
-#define NewNPP_PrintProc(FUNC) \
- ((NPP_PrintUPP) (FUNC))
-#define CallNPP_PrintProc(FUNC, NPParg, NPPrintArg) \
- (*(FUNC))((NPParg), (NPPrintArg))
-
-#endif
-
-
-/* NPP_HandleEvent */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPP_HandleEventUPP;
-enum {
- uppNPP_HandleEventProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *)))
- | RESULT_SIZE(SIZE_CODE(sizeof(int16)))
-};
-#define NewNPP_HandleEventProc(FUNC) \
- (NPP_HandleEventUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_HandleEventProcInfo, GetCurrentArchitecture())
-#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \
- (int16)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPP_HandleEventProcInfo, (NPParg), (voidPtr))
-
-#else
-
-typedef int16 (*NPP_HandleEventUPP)(NPP instance, void* event);
-#define NewNPP_HandleEventProc(FUNC) \
- ((NPP_HandleEventUPP) (FUNC))
-#define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \
- (*(FUNC))((NPParg), (voidPtr))
-
-#endif
-
-
-
-
-/*
- * Netscape entry points
- */
-
-
-/* NPN_GetUrl */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPN_GetURLUPP;
-enum {
- uppNPN_GetURLProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*)))
- | RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
-};
-#define NewNPN_GetURLProc(FUNC) \
- (NPN_GetURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_GetURLProcInfo, GetCurrentArchitecture())
-#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \
- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_GetURLProcInfo, (ARG1), (ARG2), (ARG3))
-#else
-
-typedef NPError (*NPN_GetURLUPP)(NPP instance, const char* url, const char* window);
-#define NewNPN_GetURLProc(FUNC) \
- ((NPN_GetURLUPP) (FUNC))
-#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \
- (*(FUNC))((ARG1), (ARG2), (ARG3))
-#endif
-
-
-/* NPN_PostUrl */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPN_PostURLUPP;
-enum {
- uppNPN_PostURLProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(const char*)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(const char*)))
- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(uint32)))
- | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(const char*)))
- | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(NPBool)))
- | RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
-};
-#define NewNPN_PostURLProc(FUNC) \
- (NPN_PostURLUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_PostURLProcInfo, GetCurrentArchitecture())
-#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \
- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_PostURLProcInfo, (ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6))
-#else
-
-typedef NPError (*NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file);
-#define NewNPN_PostURLProc(FUNC) \
- ((NPN_PostURLUPP) (FUNC))
-#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \
- (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6))
-#endif
-
-
-/* NPN_RequestRead */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPN_RequestReadUPP;
-enum {
- uppNPN_RequestReadProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPStream *)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPByteRange *)))
- | RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
-};
-#define NewNPN_RequestReadProc(FUNC) \
- (NPN_RequestReadUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_RequestReadProcInfo, GetCurrentArchitecture())
-#define CallNPN_RequestReadProc(FUNC, stream, range) \
- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_RequestReadProcInfo, (stream), (range))
-
-#else
-
-typedef NPError (*NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList);
-#define NewNPN_RequestReadProc(FUNC) \
- ((NPN_RequestReadUPP) (FUNC))
-#define CallNPN_RequestReadProc(FUNC, stream, range) \
- (*(FUNC))((stream), (range))
-
-#endif
-
-
-/* NPN_NewStream */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPN_NewStreamUPP;
-enum {
- uppNPN_NewStreamProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP )))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPMIMEType)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPStream *)))
- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(NPBool)))
- | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(uint16*)))
- | RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
-};
-#define NewNPN_NewStreamProc(FUNC) \
- (NPN_NewStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_NewStreamProcInfo, GetCurrentArchitecture())
-#define CallNPN_NewStreamProc(FUNC, npp, type, stream) \
- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_NewStreamProcInfo, (npp), (type), (stream))
-
-#else
-
-typedef NPError (*NPN_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream);
-#define NewNPN_NewStreamProc(FUNC) \
- ((NPN_NewStreamUPP) (FUNC))
-#define CallNPN_NewStreamProc(FUNC, npp, type, stream) \
- (*(FUNC))((npp), (type), (stream))
-
-#endif
-
-
-/* NPN_Write */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPN_WriteUPP;
-enum {
- uppNPN_WriteProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP )))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(int32)))
- | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void*)))
- | RESULT_SIZE(SIZE_CODE(sizeof(int32)))
-};
-#define NewNPN_WriteProc(FUNC) \
- (NPN_WriteUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_WriteProcInfo, GetCurrentArchitecture())
-#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \
- (int32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_WriteProcInfo, (npp), (stream), (len), (buffer))
-
-#else
-
-typedef int32 (*NPN_WriteUPP)(NPP instance, NPStream* stream, int32 len, void* buffer);
-#define NewNPN_WriteProc(FUNC) \
- ((NPN_WriteUPP) (FUNC))
-#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \
- (*(FUNC))((npp), (stream), (len), (buffer))
-
-#endif
-
-
-/* NPN_DestroyStream */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPN_DestroyStreamUPP;
-enum {
- uppNPN_DestroyStreamProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP )))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPStream *)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPError)))
- | RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
-};
-#define NewNPN_DestroyStreamProc(FUNC) \
- (NPN_DestroyStreamUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, GetCurrentArchitecture())
-#define CallNPN_DestroyStreamProc(FUNC, npp, stream, err) \
- (NPError)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_DestroyStreamProcInfo, (npp), (stream), (err))
-
-#else
-
-typedef NPError (*NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPError reason);
-#define NewNPN_DestroyStreamProc(FUNC) \
- ((NPN_DestroyStreamUPP) (FUNC))
-#define CallNPN_DestroyStreamProc(FUNC, npp, stream, err) \
- (*(FUNC))((npp), (stream), (err))
-
-#endif
-
-
-/* NPN_Status */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPN_StatusUPP;
-enum {
- uppNPN_StatusProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(char *)))
-};
-
-#define NewNPN_StatusProc(FUNC) \
- (NPN_StatusUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_StatusProcInfo, GetCurrentArchitecture())
-#define CallNPN_StatusProc(FUNC, npp, msg) \
- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_StatusProcInfo, (npp), (msg))
-
-#else
-
-typedef void (*NPN_StatusUPP)(NPP instance, const char* message);
-#define NewNPN_StatusProc(FUNC) \
- ((NPN_StatusUPP) (FUNC))
-#define CallNPN_StatusProc(FUNC, npp, msg) \
- (*(FUNC))((npp), (msg))
-
-#endif
-
-
-/* NPN_UserAgent */
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPN_UserAgentUPP;
-enum {
- uppNPN_UserAgentProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPP)))
- | RESULT_SIZE(SIZE_CODE(sizeof(const char *)))
-};
-
-#define NewNPN_UserAgentProc(FUNC) \
- (NPN_UserAgentUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_UserAgentProcInfo, GetCurrentArchitecture())
-#define CallNPN_UserAgentProc(FUNC, ARG1) \
- (const char*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_UserAgentProcInfo, (ARG1))
-
-#else
-
-typedef const char* (*NPN_UserAgentUPP)(NPP instance);
-#define NewNPN_UserAgentProc(FUNC) \
- ((NPN_UserAgentUPP) (FUNC))
-#define CallNPN_UserAgentProc(FUNC, ARG1) \
- (*(FUNC))((ARG1))
-
-#endif
-
-
-/* NPN_MemAlloc */
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPN_MemAllocUPP;
-enum {
- uppNPN_MemAllocProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32)))
- | RESULT_SIZE(SIZE_CODE(sizeof(void *)))
-};
-
-#define NewNPN_MemAllocProc(FUNC) \
- (NPN_MemAllocUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemAllocProcInfo, GetCurrentArchitecture())
-#define CallNPN_MemAllocProc(FUNC, ARG1) \
- (void*)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemAllocProcInfo, (ARG1))
-
-#else
-
-typedef void* (*NPN_MemAllocUPP)(uint32 size);
-#define NewNPN_MemAllocProc(FUNC) \
- ((NPN_MemAllocUPP) (FUNC))
-#define CallNPN_MemAllocProc(FUNC, ARG1) \
- (*(FUNC))((ARG1))
-
-#endif
-
-
-/* NPN__MemFree */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPN_MemFreeUPP;
-enum {
- uppNPN_MemFreeProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *)))
-};
-
-#define NewNPN_MemFreeProc(FUNC) \
- (NPN_MemFreeUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFreeProcInfo, GetCurrentArchitecture())
-#define CallNPN_MemFreeProc(FUNC, ARG1) \
- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFreeProcInfo, (ARG1))
-
-#else
-
-typedef void (*NPN_MemFreeUPP)(void* ptr);
-#define NewNPN_MemFreeProc(FUNC) \
- ((NPN_MemFreeUPP) (FUNC))
-#define CallNPN_MemFreeProc(FUNC, ARG1) \
- (*(FUNC))((ARG1))
-
-#endif
-
-
-/* NPN_MemFlush */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPN_MemFlushUPP;
-enum {
- uppNPN_MemFlushProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(uint32)))
- | RESULT_SIZE(SIZE_CODE(sizeof(uint32)))
-};
-
-#define NewNPN_MemFlushProc(FUNC) \
- (NPN_MemFlushUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_MemFlushProcInfo, GetCurrentArchitecture())
-#define CallNPN_MemFlushProc(FUNC, ARG1) \
- (uint32)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_MemFlushProcInfo, (ARG1))
-
-#else
-
-typedef uint32 (*NPN_MemFlushUPP)(uint32 size);
-#define NewNPN_MemFlushProc(FUNC) \
- ((NPN_MemFlushUPP) (FUNC))
-#define CallNPN_MemFlushProc(FUNC, ARG1) \
- (*(FUNC))((ARG1))
-
-#endif
-
-
-
-/* NPN_ReloadPlugins */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPN_ReloadPluginsUPP;
-enum {
- uppNPN_ReloadPluginsProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPBool)))
- | RESULT_SIZE(SIZE_CODE(0))
-};
-
-#define NewNPN_ReloadPluginsProc(FUNC) \
- (NPN_ReloadPluginsUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, GetCurrentArchitecture())
-#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \
- (void)CallUniversalProc((UniversalProcPtr)(FUNC), uppNPN_ReloadPluginsProcInfo, (ARG1))
-
-#else
-
-typedef void (*NPN_ReloadPluginsUPP)(NPBool reloadPages);
-#define NewNPN_ReloadPluginsProc(FUNC) \
- ((NPN_ReloadPluginsUPP) (FUNC))
-#define CallNPN_ReloadPluginsProc(FUNC, ARG1) \
- (*(FUNC))((ARG1))
-
-#endif
-
-
-
-
-/******************************************************************************************
- * The actual plugin function table definitions
- *******************************************************************************************/
-
-typedef struct _NPPluginFuncs {
- uint16 size;
- uint16 version;
- NPP_NewUPP newp;
- NPP_DestroyUPP destroy;
- NPP_SetWindowUPP setwindow;
- NPP_NewStreamUPP newstream;
- NPP_DestroyStreamUPP destroystream;
- NPP_StreamAsFileUPP asfile;
- NPP_WriteReadyUPP writeready;
- NPP_WriteUPP write;
- NPP_PrintUPP print;
- NPP_HandleEventUPP event;
-} NPPluginFuncs;
-
-typedef struct _NPNetscapeFuncs {
- uint16 size;
- uint16 version;
- NPN_GetURLUPP geturl;
- NPN_PostURLUPP posturl;
- NPN_RequestReadUPP requestread;
- NPN_NewStreamUPP newstream;
- NPN_WriteUPP write;
- NPN_DestroyStreamUPP destroystream;
- NPN_StatusUPP status;
- NPN_UserAgentUPP uagent;
- NPN_MemAllocUPP memalloc;
- NPN_MemFreeUPP memfree;
- NPN_MemFlushUPP memflush;
- NPN_ReloadPluginsUPP reloadplugins;
-} NPNetscapeFuncs;
-
-
-
-#ifdef XP_MAC
-/******************************************************************************************
- * Mac platform-specific plugin glue stuff
- *******************************************************************************************/
-
-/*
- * Main entry point of the plugin.
- * This routine will be called when the plugin is loaded. The function
- * tables are passed in and the plugin fills in the NPPluginFuncs table
- * and NPPShutdownUPP for Netscape's use.
- */
-
-#if GENERATINGCFM
-
-typedef UniversalProcPtr NPP_MainEntryUPP;
-enum {
- uppNPP_MainEntryProcInfo = kThinkCStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(NPNetscapeFuncs*)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(NPPluginFuncs*)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(NPP_ShutdownUPP*)))
- | RESULT_SIZE(SIZE_CODE(sizeof(NPError)))
-};
-#define NewNPP_MainEntryProc(FUNC) \
- (NPP_MainEntryUPP) NewRoutineDescriptor((ProcPtr)(FUNC), uppNPP_MainEntryProcInfo, GetCurrentArchitecture())
-#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \
- CallUniversalProc((UniversalProcPtr)(FUNC), (ProcInfoType)uppNPP_MainEntryProcInfo, (netscapeFunc), (pluginFunc), (shutdownUPP))
-
-#else
-
-typedef NPError (*NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownUPP*);
-#define NewNPP_MainEntryProc(FUNC) \
- ((NPP_MainEntryUPP) (FUNC))
-#define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \
- (*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP))
-
-#endif
-#endif /* MAC */
-
-
-#ifdef _WINDOWS
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* plugin meta member functions */
-
-NPError WINAPI NP_GetEntryPoints(NPPluginFuncs* pFuncs);
-
-NPError WINAPI NP_Initialize(NPNetscapeFuncs* pFuncs);
-
-NPError WINAPI NP_Shutdown();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _WINDOWS */
-
-
-#endif /* _NPUPP_H_ */
-
+++ /dev/null
-/* npwin.cpp */
-#include "windows.h"
-
-#include "npapi.h"
-#include "npupp.h"
-
-#ifdef __WIN32__
- #define NP_EXPORT
-#else
- #define NP_EXPORT _export
-#endif
-
-static NPNetscapeFuncs* g_pNavigatorFuncs = NULL;
-
-
-/* PLUGIN DLL entry points */
-/* These are the Windows specific DLL entry points, not the "normal" plugin
- entry points. The "normal" ones are in NPSHELL.CPP
-*/
-
-/* fills in the func table used by Navigator to call entry points in
- plugin DLL. Note that these entry points ensure that DS is loaded
- by using the NP_LOADDS macro, when compiling for Win16
-*/
-NPError WINAPI NP_EXPORT NP_GetEntryPoints(NPPluginFuncs* pFuncs)
-{
- /* trap a NULL ptr */
- if(pFuncs == NULL)
- return NPERR_INVALID_FUNCTABLE_ERROR;
-
- /* if the plugin's function table is smaller than the plugin expects,
- then they are incompatible, and should return an error */
- if(pFuncs->size < sizeof NPPluginFuncs)
- return NPERR_INVALID_FUNCTABLE_ERROR;
-
- pFuncs->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR;
- pFuncs->newp = NPP_New;
- pFuncs->destroy = NPP_Destroy;
- pFuncs->setwindow = NPP_SetWindow;
- pFuncs->newstream = NPP_NewStream;
- pFuncs->destroystream = NPP_DestroyStream;
- pFuncs->asfile = NPP_StreamAsFile;
- pFuncs->writeready = NPP_WriteReady;
- pFuncs->write = NPP_Write;
- pFuncs->print = NPP_Print;
- pFuncs->event = NULL; /* reserved */
-
- return NPERR_NO_ERROR;
-}
-
-/* called immediately after the plugin DLL is loaded
-*/
-NPError WINAPI NP_EXPORT NP_Initialize(NPNetscapeFuncs* pFuncs)
-{
- /* trap a NULL ptr */
- if(pFuncs == NULL)
- return NPERR_INVALID_FUNCTABLE_ERROR;
-
- g_pNavigatorFuncs = pFuncs; /* save it for future reference */
-
- /* if the plugin's major ver level is lower than the Navigator's,
- then they are incompatible, and should return an error */
- if(HIBYTE(pFuncs->version) > NP_VERSION_MAJOR)
- return NPERR_INCOMPATIBLE_VERSION_ERROR;
-
- /* if the Navigator's function table is smaller than the plugin expects,
- then they are incompatible, and should return an error */
- if(pFuncs->size < sizeof NPNetscapeFuncs)
- return NPERR_INVALID_FUNCTABLE_ERROR;
-
- return NPP_Initialize();
-}
-
-/* called immediately before the plugin DLL is unloaded
-*/
-NPError WINAPI NP_EXPORT NP_Shutdown()
-{
- NPP_Shutdown();
-
- g_pNavigatorFuncs = NULL;
-
- return NPERR_NO_ERROR;
-}
-
-
-/* NAVIGATOR Entry points */
-
-/* These entry points expect to be called from within the plugin. The
- noteworthy assumption is that DS has already been set to point to the
- plugin's DLL data segment. Don't call these functions from outside
- the plugin without ensuring DS is set to the DLLs data segment first,
- typically using the NP_LOADDS macro
-*/
-
-/* returns the major/minor version numbers of the Plugin API for the plugin
- and the Navigator
-*/
-void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor)
-{
- *plugin_major = NP_VERSION_MAJOR;
- *plugin_minor = NP_VERSION_MINOR;
- *netscape_major = HIBYTE(g_pNavigatorFuncs->version);
- *netscape_minor = LOBYTE(g_pNavigatorFuncs->version);
-}
-
-/* causes the specified URL to be fetched and streamed in
-*/
-NPError NPN_GetURL(NPP instance, const char *url, const char *window)
-{
- return g_pNavigatorFuncs->geturl(instance, url, window);
-}
-
-NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file)
-{
- return g_pNavigatorFuncs->posturl(instance, url, window, len, buf, file);
-}
-
-/* Requests that a number of bytes be provided on a stream. Typically
- this would be used if a stream was in "pull" mode. An optional
- position can be provided for streams which are seekable.
-*/
-NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)
-{
- return g_pNavigatorFuncs->requestread(stream, rangeList);
-}
-
-/* Creates a new stream of data from the plug-in to be interpreted
- by Netscape in the current window.
-*/
-NPError NPN_NewStream(NPP instance, NPMIMEType type, NPStream *stream)
-{
- return g_pNavigatorFuncs->newstream(instance, type, stream);
-}
-
-/* Provides len bytes of data.
-*/
-int32 NPN_Write(NPP instance, NPStream *stream,
- int32 len, void *buffer)
-{
- return g_pNavigatorFuncs->write(instance, stream, len, buffer);
-}
-
-/* Closes a stream object.
-reason indicates why the stream was closed.
-*/
-NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason)
-{
- return g_pNavigatorFuncs->destroystream(instance, stream, reason);
-}
-
-/* Provides a text status message in the Netscape client user interface
-*/
-void NPN_Status(NPP instance, const char *message)
-{
- g_pNavigatorFuncs->status(instance, message);
-}
-
-/* returns the user agent string of Navigator, which contains version info
-*/
-const char* NPN_UserAgent(NPP instance)
-{
- return g_pNavigatorFuncs->uagent(instance);
-}
-
-/* allocates memory from the Navigator's memory space. Necessary so that
- saved instance data may be freed by Navigator when exiting.
-*/
-void* NPN_MemAlloc(uint32 size)
-{
- return g_pNavigatorFuncs->memalloc(size);
-}
-
-/* reciprocal of MemAlloc() above
-*/
-void NPN_MemFree(void* ptr)
-{
- g_pNavigatorFuncs->memfree(ptr);
-}
-
-/* private function to Netscape. do not use!
-*/
-void NPN_ReloadPlugins(NPBool reloadPages)
-{
- g_pNavigatorFuncs->reloadplugins(reloadPages);
-}
-
+++ /dev/null
-
-all:
- cd src; $(MAKE)
-
-clean:
- cd src; $(MAKE) clean
-
+++ /dev/null
-docs/*.tex
-docs/*.sty
-docs/*.bib
-docs/*.hpj
-docs/*.ini
-docs/*.txt
-docs/*.cnt
-docs/*.eps
-docs/*.bmp
-docs/*.gif
-docs/*.wmf
-docs/*.shg
-docs/makefile.vc
-docs/Makefile
-
-tex2rtf.exe
-tex2rtf.chm
-lacheck.exe
-lacheck.txt
-readme.txt
-licence.txt
-lgpl.txt
-gpl.txt
-tex2rtf.exe.manifest
-tex2rtf_src.zip
-
+++ /dev/null
-How to make an RPM distribution of Tex2RTF
-==================================================
-
-You can make the RPM with standard commands: first make source tarball
-with zipsrc.sh and then run
-
- rpm -ta tex2rtf-2.01-source.tar.bz2
-
-to create both tex2rtf-2.01-1.src.rpm and tex2rtf-2.01-1.$(arch).rpm
-
-This builds the Tex2RTF binary using wxBase.
-
-Note that the 2.01 binaries have been built in completely
-different ways right now :-(
-
-The RPM has been built with wxBase, and the .tar.gz
-distribution has been built using wxGTK (but with no
-UI). All command-line versions should be built
-with wxBase in future, since the wxBase one is
-smaller.
-
-Julian Smart/Vaclav Slavik, August 2002
-
+++ /dev/null
-; For debug beta only
-; Source: c:\winnt\system32\msvcrtd.dll; DestDir: {sys}\; DestName: msvcrtd.dll; CopyMode: onlyifdoesntexist; Flags: uninsneveruninstall
-
-[Tasks]
-
- Name: desktopicon; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"
-
-[Icons]
- Name: {group}\Tex2RTF TEX2RTFVERSION; Filename: {app}\tex2rtf.exe; WorkingDir: {app}; IconFilename: {app}\tex2rtf.exe; IconIndex: 0
- Name: {group}\Tex2RTF Help; Filename: {app}\tex2rtf.chm; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
- Name: {group}\Tex2RTF Licence; Filename: {app}\licence.txt; WorkingDir: {app}; IconIndex: 0; Flags: useapppaths
- Name: {userdesktop}\Tex2RTF TEX2RTFVERSION; Filename: {app}\tex2rtf.exe; WorkingDir: {app}; IconFilename: {app}\tex2rtf.exe; IconIndex: 0; Tasks: desktopicon
-
-[Registry]
-
-[UninstallDelete]
-
-[InstallDelete]
-
-[Run]
- Filename: "{app}\tex2rtf.exe"; Description: "Launch Tex2RTF"; Flags: postinstall nowait skipifsilent
-
-[UninstallRun]
-
-
-; ==============================================
-; The lines below are used by ScriptMaker
-; They are not required by Inno Setup
-; DO NOT DELETE THEM or you may be unable to reload the script
-
-;[ScriptSetup]
-;VerNum=TEX2RTFVERSION
-;InnoVer=1.3
-;AddVerTo=AppVerName
-;SetupFilename=setup.exe
-;OutputFolder=C:\wx2dev\wxWidgets\deliver
-;CopyrightText=Copyright © Julian Smart, 2002
-
+++ /dev/null
-; Inno Setup Script
-; Created with ScriptMaker Version 1.3.22
-; 14 February 2001 at 10:38
-
-[Setup]
- MinVersion=4.0,4.0
- AppName=Tex2RTF TEX2RTFVERSION
- AppId=Tex2RTF
- CreateUninstallRegKey=1
- UsePreviousAppDir=1
- UsePreviousGroup=1
- AppVersion=TEX2RTFVERSION
- AppVerName=Tex2RTF TEX2RTFVERSION
- AppCopyright=Copyright © Julian Smart and others, 2002
-; BackColor=$FF0000
-; BackColor2=$000000
- BackColor=$800000
- BackColor2=$C71F1F
- BackColorDirection=toptobottom
- WindowShowCaption=1
- WindowStartMaximized=1
- WindowVisible=1
- WindowResizable=1
- UninstallLogMode=Append
- DirExistsWarning=auto
- UninstallFilesDir={app}
- DisableDirPage=0
- DisableStartupPrompt=1
- CreateAppDir=1
- DisableProgramGroupPage=0
- AlwaysCreateUninstallIcon=1
- Uninstallable=1
- UninstallIconName=Uninstall Tex2RTF TEX2RTFVERSION
- UninstallDisplayName=Tex2RTF TEX2RTFVERSION
- DefaultDirName={pf}\Tex2RTF
- DefaultGroupName=Tex2RTF TEX2RTFVERSION
- MessagesFile=compiler:default.isl
- DiskSpanning=0
- DiskSize=1457664
- DiskClusterSize=512
- ReserveBytes=0
- UseSetupLdr=1
- LicenseFile=c:\wx2dev\wxWidgets\utils\tex2rtf\docs\licence.txt
- InfoAfterFile=c:\wx2dev\wxWidgets\utils\tex2rtf\docs\readme.txt
- SourceDir=c:\wx2dev\wxWidgets\deliver\tex2rtf
- OutputDir=c:\wx2dev\wxWidgets\deliver
-
+++ /dev/null
-#!/bin/sh
-# Example script to call the maketarball.sh
-# script, for creating the Tex2RTF distribution.
-echo Make the Tex2RTF distribution
-
-WXWIN=/opt/julians/wx2dev/wxWindows
-VERSION=2.01
-TEX2RTFBIN=$WXWIN/utils/tex2rtf/deliver/tex2rtf
-DESTDIR=$WXWIN/utils/tex2rtf/deliver
-
-$WXWIN/utils/tex2rtf/distrib/maketarball.sh $WXWIN $TEX2RTFBIN $DESTDIR $VERSION
-sh zipsrc.sh $VERSION
+++ /dev/null
-@echo off
-Rem Make an Inno Setup distribution list, where files and dirs are represented by
-Rem sections like this:
-Rem [Dirs]
-Rem Name: {app}\backgrounds
-Rem
-Rem [Files]
-Rem Source: C:\dir\file.htm; DestDir: {app}\; DestName: file.htm
-
-set tex2rtf=%WXWIN%\utils\tex2rtf
-
-Rem Generate a list of all files in the distribution.
-Rem We have to be in the right directory already.
-dir /BS >& %TEMP%\files1.tmp
-
-Rem Now we iterate through the list of files, writing out the middle section of
-Rem the file.
-Rem We have to remove the first part of the path,
-Rem by truncating the start by the size of the current directory.
-
-set sz=%@EVAL[%@LEN[%_CWD]+1]
-set len=%@LINES[%TEMP\files1.tmp]
-
-erase /Y %TEMP\files2.tmp
-
-Rem Add directories
-echo. >> %temp\files2.tmp
-echo [Dirs] >> %temp\files2.tmp
-
-do i = 0 to %len by 1
- set line=%@LINE[%TEMP\files1.tmp,%i]
- Rem Skip files.
- if not isdir %line enddo
- set sz2=%@LEN[%line]
- set n=%@EVAL[%sz2-%sz]
- set line2=%@SUBSTR[%line,%sz,%n]
- if "%line2%" == "" enddo
-
- echo Name: {app}\%line2 >> %TEMP\files2.tmp
-enddo
-
-echo. >>%TEMP\files2.tmp
-
-Rem Add files
-
-echo. >> %temp\files2.tmp
-echo [Files] >> %temp\files2.tmp
-
-do i = 0 to %len by 1
- set line=%@LINE[%TEMP\files1.tmp,%i]
- Rem Skip directories.
- if isdir %line enddo
- set sz2=%@LEN[%line]
- set n=%@EVAL[%sz2-%sz]
- set line2=%@SUBSTR[%line,%sz,%n]
- set filename=%@FILENAME[%line2]
- set dirname=%@PATH[%line2]
-
- echo Source: %line; DestDir: {app}\%dirname; DestName: %filename >> %TEMP\files2.tmp
-enddo
-
-Rem Concatenate the 3 sections
-cat %tex2rtf%\distrib\innotop.txt %TEMP%\files2.tmp %tex2rtf%\distrib\innobott.txt > %tex2rtf%\distrib\tex2rtf.iss
-
-erase /Y %TEMP\files1.tmp
-rem erase /Y %TEMP\files2.tmp
-
-goto end
-
-:end
+++ /dev/null
-#!/bin/sh
-
-# Make a distribution of Tex2RTF for Unix
-# Julian Smart 2002-08-07
-# Usage: maketarball.sh wx-dir bin-file deliver-dir version-no [ options ]
-# For example: maketarball.sh ~/wx2dev/wxWindows /bin/tex2rtf /tmp/tex2rtf-deliver
-# Where:
-# wx-dir is the wxWindows source tree
-# bin-file is the Tex2RTF binary, already compiled
-# deliver-dir is the directory the distribution will be put in
-# version-no is the version, e.g. 2.01
-
-TEX2RTFDIR=$1/utils/tex2rtf
-SRC=$TEX2RTFDIR/src
-BINARYSRC=$2
-DEST=$3
-BUILD=0
-UPX=0
-PROGNAME=$0
-VERSION=$4
-
-dotar()
-{
- # Make the documentation first
- cd $TEX2RTFDIR/docs
- make htb
-
- rm -f -r $DEST/tex2rtf-*.*
-
- mkdir -p $DEST/tex2rtf-$VERSION
- mkdir -p $DEST/tex2rtf-$VERSION/tools
- mkdir -p $DEST/tex2rtf-$VERSION/docs
- mkdir -p $DEST/tex2rtf-$VERSION/html
-
- # Make the source archive
- cd $TEX2RTFDIR
- ls `cat $TEX2RTFDIR/distrib/src.rsp` > /tmp/tex2rtf.txt
- tar cvf $DEST/tex2rtf-$VERSION/tex2rtf-$VERSION-source.tar -T /tmp/tex2rtf.txt
- gzip $DEST/tex2rtf-$VERSION/tex2rtf-$VERSION-source.tar
- rm /tmp/tex2rtf.txt
-
- cd $DEST/tex2rtf-$VERSION
-
- # Copy the binary and other files
- cp $BINARYSRC tex2rtf
- cp $TEX2RTFDIR/docs/readme.txt readme.txt
- cp $TEX2RTFDIR/docs/licence.txt .
- cp $TEX2RTFDIR/docs/gpl.txt .
- cp $TEX2RTFDIR/docs/lgpl.txt .
- cp $TEX2RTFDIR/docs/*.html $TEX2RTFDIR/docs/*.gif html
- cp $TEX2RTFDIR/docs/tex2rtf.htb .
-
- # Copy all the doc sources, so that the user can experiment
- # on the Tex2RTF docs
- cp $TEX2RTFDIR/docs/*.tex $TEX2RTFDIR/docs/*.ini $TEX2RTFDIR/docs/*.sty $TEX2RTFDIR/docs/*.bib $TEX2RTFDIR/docs/*.gif $TEX2RTFDIR/docs/*.tex docs
-
- strip tex2rtf
-
- if [ "$UPX" != "0" ]; then
- upx tex2rtf
- fi
-
- cd ..
-
- tar cvf $DEST/tex2rtf-$VERSION-i386.tar tex2rtf-$VERSION/*
- gzip -c $DEST/tex2rtf-$VERSION-i386.tar > $DEST/tex2rtf-$VERSION-i386.tar.gz
- bzip2 -c $DEST/tex2rtf-$VERSION-i386.tar > $DEST/tex2rtf-$VERSION-i386.tar.bz2
-}
-
-usage()
-{
- echo Usage: $PROGNAME "wx-dir bin-file deliver-dir version-no [ options ]"
- echo Options:
- echo " --help Display this help message"
- echo " --upx Compress executable with UPX"
- echo For example: $PROGNAME ~/wx2dev/wxWindows /tmp/tex2rtf /tmp/tex2rtf-deliver 2.0
- exit 1
-}
-
-# Process command line options.
-shift 4
-for i in "$@"; do
- case "$i" in
- --upx) UPX=1 ;;
- *)
- usage
- exit
- ;;
- esac
-done
-
-if [ ! -d "$DEST" ]; then
- mkdir -p $DEST
-fi
-
-if [ ! -d "$SRC" ]; then
- echo Source directory $SRC not found.
- usage
- exit 1
-fi
-
-if [ ! -f "$BINARYSRC" ]; then
- echo tex2rtf binary $BINARYSRC not found.
- usage
- exit 1
-fi
-
-if [ "$VERSION" = "" ]; then
- echo Pass the version number as the fourth argument.
- usage
- exit 1
-fi
-
-echo Creating Version $VERSION distribution in $DEST, using source directory $SRC and tex2rtf binary $BINARYSRC.
-
-dotar
-
-echo Tex2RTF archived.
-
+++ /dev/null
-Makefile.in
-
-src/*.cpp
-src/*.h
-src/makefile.vc
-src/makefile.bcc
-src/makefile.dos
-src/makefile.b32
-src/makefile.wat
-src/makefile.unx
-src/makefile.g95
-src/makengui.nt
-src/Makefile.in
-src/*.dsp
-src/*.dsw
-src/*.xpm
-src/*.ini
-src/*.bmp
-src/*.ico
-src/*.def
-src/*.rc
-
-tools/*.*
-
-distrib/*.sh
-distrib/*.bat
-distrib/*.txt
-distrib/*.rsp
-distrib/tex2rtf.exe.manifest
-distrib/*.spec
-
-docs/*.tex
-docs/*.sty
-docs/*.bib
-docs/*.hpj
-docs/*.ini
-docs/*.txt
-docs/*.bmp
-docs/*.gif
-docs/*.wmf
-docs/*.shg
-docs/makefile.vc
-docs/Makefile
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly
- xmlns="urn:schemas-microsoft-com:asm.v1"
- manifestVersion="1.0">
-<assemblyIdentity
- processorArchitecture="x86"
- version="5.1.0.0"
- type="win32"
- name="tex2rtf.exe"/>
- <description>Foo program</description>
- <dependency>
- <dependentAssembly>
- <assemblyIdentity
- type="win32"
- name="Microsoft.Windows.Common-Controls"
- version="6.0.0.0"
- publicKeyToken="6595b64144ccf1df"
- language="*"
- processorArchitecture="x86"/>
- </dependentAssembly>
- </dependency>
-</assembly>
-
+++ /dev/null
-
-Name: tex2rtf
-Version: 2.01
-Release: 1
-Source: %{name}-%{version}-source.tar.bz2
-
-Prefix: /usr
-Summary: Program to convert from LaTeX to RTF and HTML
-Copyright: wxWindows Library License
-Group: Applications/Editors
-URL: http://www.wxwindows.org/tex2rtf
-Packager: Vaclav Slavik <vaclav.slavik@matfyz.cz>
-
-%define wxwin_version 2.3
-BuildRequires: wxBase-devel >= 2.3.2
-BuildRequires: wxBase-static >= 2.3.2
-BuildRoot: /var/tmp/%{name}-%{version}-root
-
-%description
-Tex2RTF is a program originally written by Julian Smart to convert
-from a LaTeX subset to four other formats:
-
-* Linear RTF, for importing into a wide range of word processors.
-* Windows Help hypertext RTF, for compilation with HC (Help Compiler).
-* HTML (Hypertext Markup Language), with ordinary HTML mode and
- Microsoft HTML Help/wxWindows HTML Help mode.
-* XLP wxHelp format, the original wxWindows toolkit help format.
- This format is now obsolete.
-
-Tex2RTF parses a 'reasonable' subset of LaTeX, notable blind spots being
-the tabbing environment and maths. However, don't expect to translate
-your LaTeX files immediately with no alteration of your source files, since
-the objective is more to have a portable document source language than to
-convert old LaTeX files.
-
-%prep
-%setup -n %{name}-%{version}-source
-
-%build
-
-# build tex2rtf binary:
-pushd `pwd`
-cd src
-make -f makefile.unx \
- "CXXFLAGS=$RPM_OPT_FLAGS `wxbase-%{wxwin_version}-config --static --cxxflags` -DNO_GUI" \
- "LDFLAGS=`wxbase-%{wxwin_version}-config --static --libs`"
-popd
-
-# and use it to generate documentation:
-mkdir -p html
-src/tex2rtf docs/tex2rtf.tex html/tex2rtf.html -html
-ln -sf tex2rtf_contents.html html/index.html
-cp -f docs/*.gif html
-cp -f docs/*.txt .
-
-%install
-rm -rf ${RPM_BUILD_ROOT}
-mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
-cp -f src/tex2rtf ${RPM_BUILD_ROOT}%{_bindir}
-
-%clean
-rm -Rf ${RPM_BUILD_ROOT}
-
-%files
-%defattr(-,root,root)
-%doc *.txt html/
-%{_bindir}/*
+++ /dev/null
-@echo off
-rem Zip up a distribution of Tex2RTF using Inno Setup.
-Rem This batch file requires the 4DOS/4NT command processor.
-set src=%WXWIN%\utils\tex2rtf
-set dest=%WXWIN%\deliver
-set inno=1
-set ReleaseDir=Release
-
-if "%src%" == "" goto usage
-if "%dest%" == "" goto usage
-
-if "%1" == "innoonly" set inno=1
-if "%1" == "innoonly" goto dounzip
-if "%1" == "inno" set inno=1
-
-echo About to archive Tex2RTF
-echo From %src%
-echo To %dest%
-echo CTRL-C if this is not correct.
-pause
-
-erase /E %dest%\tex2rtf.zip
-erase /E %dest%\tex2rtf_setup.exe
-erase /E %dest\tex2rtf_src.zip
-
-if direxist %dest%\tex2rtf erase /sxzy %dest%\tex2rtf\
-
-Rem *** First, determine version from symbols.h
-call ming2952
-echo `#include <stdio.h>` > tex2rtfver.c
-echo `#include "symbols.h"` >> tex2rtfver.c
-echo `int main() { printf("%.2f", TEX2RTF_VERSION_NUMBER); }` >> tex2rtfver.c
-gcc tex2rtfver.c -I%src%\src -o tex2rtfver.exe
-tex2rtfver.exe > tex2rtfversion.txt
-set ver=%@LINE[tex2rtfversion.txt,0]
-echo %ver%
-erase tex2rtfver.exe tex2rtfver.c
-set ver_filename=%ver%
-
-echo Updating docs...
-call msvc6
-
-pushd %src%\docs
-erase /Y tex2rtf_contents.html
-nmake -f makefile.vc htmlhelp htb
-popd
-
-cd %src%
-echo Zipping source...
-
-zip32 -@ %src%\tex2rtf_src.zip < %src%\distrib\src.rsp
-
-echo Adding files...
-
-copy %src%\src\%ReleaseDir%\tex2rtf.exe %src%
-copy %src%\docs\licence.txt %src%
-copy %src%\docs\lgpl.txt %src%
-copy %src%\docs\gpl.txt %src%
-copy %src%\docs\readme.txt %src%
-copy %src%\docs\tex2rtf.chm %src%
-copy %src%\distrib\tex2rtf.exe.manifest %src%
-copy %src%\tools\lacheck.exe %src%
-copy %src%\tools\lacheck.txt %src%
-Rem goto end
-
-upx %src%\tex2rtf.exe
-
-zip -@ %dest%\tex2rtf.zip < %src%\distrib\distrib.rsp
-zip -j -u %dest%\tex2rtf.zip %src%\tex2rtf.exe
-
-:dounzip
-
-cd %dest%
-
-mkdir tex2rtf
-cd tex2rtf
-unzip32 -o ..\tex2rtf.zip
-
-cd %dest%
-
-echo inno = %inno%
-
-Rem Skip Inno Setup setup if inno is 0.
-if "%inno%" == "0" goto end
-
-set tex2rtfver=%ver%
-
-echo ver is %ver%
-echo tex2rtfver is %tex2rtfver%
-
-echo Calling 'makeinno' to generate tex2rtf.iss...
-cd %dest%\tex2rtf
-call %src%\distrib\makeinno.bat
-
-sed -e "s/TEX2RTFVERSION/%tex2rtfver%/g" %src%\distrib\tex2rtf.iss > %TEMP%\tex2rtf.iss
-
-move %TEMP%\tex2rtf.iss %src%\distrib\tex2rtf.iss
-
-rem Now invoke Inno Setup install on the new tex2rtf.iss
-set innocmd="C:\Program Files\Inno Setup 2\compil32.exe" /cc %src%\distrib\tex2rtf.iss
-echo Invoking %innocmd%...
-cd %dest%
-start "Inno Setup" /w %innocmd%
-
-Rem Rename to give it a version
-move setup.exe tex2rtf_%ver_filename%_setup.exe
-
-Rem Copy the source
-move %src%\tex2rtf_src.zip %dest%\tex2rtf-source-%tex2rtfver%.zip
-
-Rem clean up files
-cd %src%
-erase /EFY *.bmp *.htm *.exe *.hlp *.cnt *.txt *.rtf *.doc *.gif *.jpg *.manifest *.chm
-
-cd %dest%
-
-echo Tex2RTF archived.
-goto end
-
-:usage
-echo Tex2RTF distribution.
-
-:end
+++ /dev/null
-@echo off
-rem Zip up a source distribution of Tex2RTF and associated apps.
-set src=c:\wx2dev\wxWindows\utils\tex2rtf
-set dest=%src\deliver
-if "%src" == "" goto usage
-if "%dest" == "" goto usage
-echo About to archive Tex2RTF
-echo From %src
-echo To %dest
-echo CTRL-C if this is not correct.
-pause
-
-erase %dest\tex2rtf_src.zip
-
-cd %src
-echo Zipping...
-
-zip32 -@ %dest\tex2rtf_src.zip < %src\tex2rtf\distrib\src.rsp
-
-cd %dest
-
-echo Tex2RTF source archived.
-goto end
-
-:usage
-echo Tex2RTF source distribution.
-
-:end
+++ /dev/null
-#!/bin/sh
-# Zip up Tex2RTF source
-
-VERSION=-$1
-if [ "$VERSION" = "-" ] ; then
- VERSION=""
-fi
-
-TEX2RTFDIR=`pwd`/..
-
-rm -f $TEX2RTFDIR/deliver/tex2rtf$VERSION-source.zip
-rm -f $TEX2RTFDIR/deliver/tex2rtf$VERSION-source.tar.gz
-
-mkdir $TEX2RTFDIR/tex2rtf$VERSION-source
-
-cd $TEX2RTFDIR
-tar -c `cat $TEX2RTFDIR/distrib/src.rsp` | (cd tex2rtf$VERSION-source ; tar -x)
-
-# Make a zip archive
-zip -9 -r $TEX2RTFDIR/deliver/tex2rtf$VERSION-source.zip tex2rtf$VERSION-source
-
-# Now make a tar archive
-tar cf $TEX2RTFDIR/deliver/tex2rtf$VERSION-source.tar tex2rtf$VERSION-source
-gzip -9 $TEX2RTFDIR/deliver/tex2rtf$VERSION-source.tar
-tar cf $TEX2RTFDIR/deliver/tex2rtf$VERSION-source.tar tex2rtf$VERSION-source
-bzip2 -9 $TEX2RTFDIR/deliver/tex2rtf$VERSION-source.tar
-
-
-rm -rf $TEX2RTFDIR/tex2rtf$VERSION-source
+++ /dev/null
-#
-# File: Makefile
-# Author: Julian Smart
-# Created: 1999
-#
-# Makefile : Builds Tex2RTF manual
-#
-
-DOCDIR=..
-LOCALDOCDIR=.
-
-DOCSOURCES=tex2rtf.tex
-
-all: tex2rtf.htb
-
-hlp: tex2rtf.hlp
-htb: tex2rtf.htb
-html: tex2rtf.html
-htmlhelp: tex2rtf.chm
-pdfrtf: tex2rtf_rtf.rtf
-
-tex2rtf_rtf.rtf: $(DOCSOURCES) tex2rtf.ini
- tex2rtf tex2rtf.tex tex2rtf_rtf.rtf -twice -rtf
-
-tex2rtf.rtf: $(DOCSOURCES) tex2rtf.ini
- tex2rtf tex2rtf.tex tex2rtf.rtf -twice -winhelp
-
-tex2rtf_contents.html: $(DOCSOURCES) tex2rtf.ini
- tex2rtf tex2rtf.tex tex2rtf.html -twice -html
- rm -f *.con
- rm -f *.ref
- rm -f *.con
- rm -f *.ref
-
-tex2rtf.htb: tex2rtf_contents.html
- zip tex2rtf.htb tex2rtf*.html *.hhp *.hhk *.hhc *.gif
+++ /dev/null
-% fancyheadings.sty version 1.92
-% Fancy headers and footers.
-% Piet van Oostrum, Dept of Computer Science, University of Utrecht
-% Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands
-% Telephone: +31-30-531806. piet@cs.ruu.nl (mcvax!sun4nl!ruuinf!piet)
-% Sep 16, 1994
-% version 1.4: Correction for use with \reversemargin
-% Sep 29, 1994:
-% version 1.5: Added the \iftopfloat, \ifbotfloat and \iffloatpage commands
-% Oct 4, 1994:
-% version 1.6: Reset single spacing in headers/footers for use with
-% setspace.sty or doublespace.sty
-% Oct 4, 1994:
-% version 1.7: changed \let\@mkboth\markboth to
-% \def\@mkboth{\protect\markboth} to make it more robust
-% Dec 5, 1994:
-% version 1.8: corrections for amsbook/amsart: define \@chapapp and (more
-% importantly) use the \chapter/sectionmark definitions from ps@headings if
-% they exist (which should be true for all standard classes).
-% May 31, 1995:
-% version 1.9: The proposed \renewcommand{\headrulewidth}{\iffloatpage...
-% construction in the doc did not work properly with the fancyplain style.
-% June 1, 1995:
-% version 1.91: The definition of \@mkboth wasn't restored on subsequent
-% \pagestyle{fancy}'s.
-% June 1, 1995:
-% version 1.92: The sequence \pagestyle{fancyplain} \pagestyle{plain}
-% \pagestyle{fancy} would erroneously select the plain version.
-
-\def\lhead{\@ifnextchar[{\@xlhead}{\@ylhead}}
-\def\@xlhead[#1]#2{\gdef\@elhead{#1}\gdef\@olhead{#2}}
-\def\@ylhead#1{\gdef\@elhead{#1}\gdef\@olhead{#1}}
-
-\def\chead{\@ifnextchar[{\@xchead}{\@ychead}}
-\def\@xchead[#1]#2{\gdef\@echead{#1}\gdef\@ochead{#2}}
-\def\@ychead#1{\gdef\@echead{#1}\gdef\@ochead{#1}}
-
-\def\rhead{\@ifnextchar[{\@xrhead}{\@yrhead}}
-\def\@xrhead[#1]#2{\gdef\@erhead{#1}\gdef\@orhead{#2}}
-\def\@yrhead#1{\gdef\@erhead{#1}\gdef\@orhead{#1}}
-
-\def\lfoot{\@ifnextchar[{\@xlfoot}{\@ylfoot}}
-\def\@xlfoot[#1]#2{\gdef\@elfoot{#1}\gdef\@olfoot{#2}}
-\def\@ylfoot#1{\gdef\@elfoot{#1}\gdef\@olfoot{#1}}
-
-\def\cfoot{\@ifnextchar[{\@xcfoot}{\@ycfoot}}
-\def\@xcfoot[#1]#2{\gdef\@ecfoot{#1}\gdef\@ocfoot{#2}}
-\def\@ycfoot#1{\gdef\@ecfoot{#1}\gdef\@ocfoot{#1}}
-
-\def\rfoot{\@ifnextchar[{\@xrfoot}{\@yrfoot}}
-\def\@xrfoot[#1]#2{\gdef\@erfoot{#1}\gdef\@orfoot{#2}}
-\def\@yrfoot#1{\gdef\@erfoot{#1}\gdef\@orfoot{#1}}
-
-\newdimen\headrulewidth
-\newdimen\footrulewidth
-\newdimen\plainheadrulewidth
-\newdimen\plainfootrulewidth
-\newdimen\headwidth
-\newif\if@fancyplain
-\def\fancyplain#1#2{\if@fancyplain#1\else#2\fi}
-
-% Command to reset various things in the headers:
-% a.o. single spacing (taken from setspace.sty)
-% and the catcode of ^^M (so that epsf files in the header work if a
-% verbatim crosses a page boundary)
-\def\fancy@reset{\restorecr
- \def\baselinestretch{1}%
- \ifx\undefined\@newbaseline% NFSS not present; 2.09 or 2e
- \ifx\@currsize\normalsize\@normalsize\else\@currsize\fi%
- \else% NFSS (2.09) present
- \@newbaseline%
- \fi}
-
-% Initialization of the head and foot text.
-
-\headrulewidth 0.4pt
-\footrulewidth\z@
-\plainheadrulewidth\z@
-\plainfootrulewidth\z@
-
-\lhead[\fancyplain{}{\sl\rightmark}]{\fancyplain{}{\sl\leftmark}}
-% i.e. empty on ``plain'' pages, \rightmark on even, \leftmark on odd pages
-\chead{}
-\rhead[\fancyplain{}{\sl\leftmark}]{\fancyplain{}{\sl\rightmark}}
-% i.e. empty on ``plain'' pages, \leftmark on even, \rightmark on odd pages
-\lfoot{}
-\cfoot{\rm\thepage} % page number
-\rfoot{}
-
-% Put together a header or footer given the left, center and
-% right text, fillers at left and right and a rule.
-% The \lap commands put the text into an hbox of zero size,
-% so overlapping text does not generate an errormessage.
-
-\def\@fancyhead#1#2#3#4#5{#1\hbox to\headwidth{\fancy@reset\vbox{\hbox
-{\rlap{\parbox[b]{\headwidth}{\raggedright#2\strut}}\hfill
-\parbox[b]{\headwidth}{\centering#3\strut}\hfill
-\llap{\parbox[b]{\headwidth}{\raggedleft#4\strut}}}\headrule}}#5}
-
-
-\def\@fancyfoot#1#2#3#4#5{#1\hbox to\headwidth{\fancy@reset\vbox{\footrule
-\hbox{\rlap{\parbox[t]{\headwidth}{\raggedright#2\strut}}\hfill
-\parbox[t]{\headwidth}{\centering#3\strut}\hfill
-\llap{\parbox[t]{\headwidth}{\raggedleft#4\strut}}}}}#5}
-
-\def\headrule{{\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi
-\hrule\@height\headrulewidth\@width\headwidth \vskip-\headrulewidth}}
-
-\def\footrule{{\if@fancyplain\let\footrulewidth\plainfootrulewidth\fi
-\vskip-0.3\normalbaselineskip\vskip-\footrulewidth
-\hrule\@width\headwidth\@height\footrulewidth\vskip0.3\normalbaselineskip}}
-
-\def\ps@fancy{%
-\@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}%for amsbook
-\@ifundefined{chapter}{\def\sectionmark##1{\markboth
-{\uppercase{\ifnum \c@secnumdepth>\z@
- \thesection\hskip 1em\relax \fi ##1}}{}}%
-\def\subsectionmark##1{\markright {\ifnum \c@secnumdepth >\@ne
- \thesubsection\hskip 1em\relax \fi ##1}}}%
-{\def\chaptermark##1{\markboth {\uppercase{\ifnum \c@secnumdepth>\m@ne
- \@chapapp\ \thechapter. \ \fi ##1}}{}}
-\def\sectionmark##1{\markright{\uppercase{\ifnum \c@secnumdepth >\z@
- \thesection. \ \fi ##1}}}}%
-\csname ps@headings\endcsname % use \ps@headings defaults if they exist
-\ps@@fancy
-\gdef\ps@fancy{\@fancyplainfalse\ps@@fancy}%
-\headwidth\textwidth}
-\def\ps@fancyplain{\ps@fancy \let\ps@plain\ps@plain@fancy}
-\def\ps@plain@fancy{\@fancyplaintrue\ps@@fancy}
-\def\ps@@fancy{%
-\def\@mkboth{\protect\markboth}%
-\def\@oddhead{\@fancyhead\@lodd\@olhead\@ochead\@orhead\@rodd}%
-\def\@oddfoot{\@fancyfoot\@lodd\@olfoot\@ocfoot\@orfoot\@rodd}%
-\def\@evenhead{\@fancyhead\@rodd\@elhead\@echead\@erhead\@lodd}%
-\def\@evenfoot{\@fancyfoot\@rodd\@elfoot\@ecfoot\@erfoot\@lodd}%
-}
-\def\@lodd{\if@reversemargin\hss\else\relax\fi}
-\def\@rodd{\if@reversemargin\relax\else\hss\fi}
-
-\let\latex@makecol\@makecol
-\def\@makecol{\let\topfloat\@toplist\let\botfloat\@botlist\latex@makecol}
-\def\iftopfloat#1#2{\ifx\topfloat\empty #2\else #1\fi}
-\def\ifbotfloat#1#2{\ifx\botfloat\empty #2\else #1\fi}
-\def\iffloatpage#1#2{\if@fcolmade #1\else #2\fi}
-
+++ /dev/null
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- Appendix: How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
+++ /dev/null
-Installation Instructions for Tex2RTF
--------------------------------------
-
-Binaries are supplied for Windows 3.1 and for Sun workstations.
-
-If these don't work for you, or you are using a different system, you
-will need to compile Tex2RTF. There are several options for doing this.
-
-(1) GUI version
-
-If you want to have a graphical interface for Tex2RTF
-(not essential for a conversion utility!) then you
-will need to download wxWidgets from skye.aiai.ed.ac.uk
-(192.41.104.6) in the directory /pub/wxwin/beta, files
-wx150?_*.tar.Z (or .gz) where ? is the latest beta letter,
-currently i.
-
-On UNIX, you will then need to decide whether you want to produce
-an XView or Motif version (provided you have one of these
-toolkits), and change the makefiles in accordingly,
-in wx/src/x, wx/src/base and wx/utils/tex2rtf/src.
-
-Use the makefile target 'xview' or 'motif' from each of the directories
-wx/src/x and wx/utils/tex2rtf/src.
-
-Under Windows, just type 'nmake -f makefile.vc' if you're
-using a Microsoft-compatible compiler (you'll need to
-change the makefiles or build project files for other compilers.)
-
-(2) Non-GUI version
-
-Under UNIX, simply use the target 'nogui'. The supplied files in the
-src/wxwin directory supply the essential utilities from wxWidgets, and
-Tex2RTF will be built as a command-line program.
-
-On a PC, add 'NOGUI=1' to the makefile command line. Note that the small
-amount of memory available under DOS can cause catastrophic crashes for
-large input files, due to the lack of memory checking, so be warned! The
-Windows version is a more sensible choice.
-
--------------------------------------------------------------------------
-Julian Smart, February 1993
-J.Smart@ed.ac.uk
+++ /dev/null
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- ==================================
- Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
- Preamble
-
-The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General
-Public Licenses are intended to guarantee your freedom to share
-and change free software--to make sure the software is free for
-all its users.
-
-This license, the Library General Public License, applies to
-some specially designated Free Software Foundation software, and
-to any other libraries whose authors decide to use it. You can
-use it for your libraries, too.
-
-When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure
-that you have the freedom to distribute copies of free software
-(and charge for this service if you wish), that you receive
-source code or can get it if you want it, that you can change
-the software or use pieces of it in new free programs; and that
-you know you can do these things.
-
-To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the
-rights. These restrictions translate to certain responsibilities
-for you if you distribute copies of the library, or if you
-modify it.
-
-For example, if you distribute copies of the library, whether
-gratis or for a fee, you must give the recipients all the rights
-that we gave you. You must make sure that they, too, receive or
-can get the source code. If you link a program with the
-library, you must provide complete object files to the
-recipients so that they can relink them with the library, after
-making changes to the library and recompiling it. And you must
-show them these terms so they know their rights.
-
-Our method of protecting your rights has two steps: (1)
-copyright the library, and (2) offer you this license which
-gives you legal permission to copy, distribute and/or modify the
-library.
-
-Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this
-free library. If the library is modified by someone else and
-passed on, we want its recipients to know that what they have is
-not the original version, so that any problems introduced by
-others will not reflect on the original authors' reputations.
-
-Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies
-distributing free software will individually obtain patent
-licenses, thus in effect transforming the program into
-proprietary software. To prevent this, we have made it clear
-that any patent must be licensed for everyone's free use or not
-licensed at all.
-
-Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License, which was designed for
-utility programs. This license, the GNU Library General Public
-License, applies to certain designated libraries. This license
-is quite different from the ordinary one; be sure to read it in
-full, and don't assume that anything in it is the same as in the
-ordinary license.
-
-The reason we have a separate public license for some libraries
-is that they blur the distinction we usually make between
-modifying or adding to a program and simply using it. Linking a
-program with a library, without changing the library, is in some
-sense simply using the library, and is analogous to running a
-utility program or application program. However, in a textual
-and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General
-Public License treats it as such.
-
-Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote
-software sharing, because most developers did not use the
-libraries. We concluded that weaker conditions might promote
-sharing better.
-
-However, unrestricted linking of non-free programs would deprive
-the users of those programs of all benefit from the free status
-of the libraries themselves. This Library General Public
-License is intended to permit developers of non-free programs to
-use free libraries, while preserving your freedom as a user of
-such programs to change the free libraries that are incorporated
-in them. (We have not seen how to achieve this as regards
-changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is
-that this will lead to faster development of free libraries.
-
-The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference
-between a "work based on the library" and a "work that uses the
-library". The former contains code derived from the library,
-while the latter only works together with the library.
-
-Note that it is possible for a library to be covered by the
-ordinary General Public License rather than by this special one.
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other
-authorized party saying it may be distributed under the terms of
-this Library General Public License (also called "this
-License"). Each licensee is addressed as "you".
-
-A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application
-programs (which use some of those functions and data) to form
-executables.
-
-The "Library", below, refers to any such software library or
-work which has been distributed under these terms. A "work
-based on the Library" means either the Library or any derivative
-work under copyright law: that is to say, a work containing the
-Library or a portion of it, either verbatim or with
-modifications and/or translated straightforwardly into another
-language. (Hereinafter, translation is included without
-limitation in the term "modification".)
-
-"Source code" for a work means the preferred form of the work
-for making modifications to it. For a library, complete source
-code means all the source code for all modules it contains, plus
-any associated interface definition files, plus the scripts used
-to control compilation and installation of the library.
-
-Activities other than copying, distribution and modification are
-not covered by this License; they are outside its scope. The
-act of running a program using the Library is not restricted,
-and output from such a program is covered only if its contents
-constitute a work based on the Library (independent of the use
-of the Library in a tool for writing it). Whether that is true
-depends on what the Library does and what the program that uses
-the Library does.
-
-1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided
-that you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep
-intact all the notices that refer to this License and to the
-absence of any warranty; and distribute a copy of this License
-along with the Library.
-
-You may charge a fee for the physical act of transferring a
-copy, and you may at your option offer warranty protection in
-exchange for a fee.
-
-2. You may modify your copy or copies of the Library or any
-portion of it, thus forming a work based on the Library, and
-copy and distribute such modifications or work under the terms
-of Section 1 above, provided that you also meet all of these
-conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the
-Library, and can be reasonably considered independent and
-separate works in themselves, then this License, and its terms,
-do not apply to those sections when you distribute them as
-separate works. But when you distribute the same sections as
-part of a whole which is a work based on the Library, the
-distribution of the whole must be on the terms of this License,
-whose permissions for other licensees extend to the entire
-whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or
-contest your rights to work written entirely by you; rather, the
-intent is to exercise the right to control the distribution of
-derivative or collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the
-Library with the Library (or with a work based on the Library)
-on a volume of a storage or distribution medium does not bring
-the other work under the scope of this License.
-
-3. You may opt to apply the terms of the ordinary GNU General
-Public License instead of this License to a given copy of the
-Library. To do this, you must alter all the notices that refer
-to this License, so that they refer to the ordinary GNU General
-Public License, version 2, instead of to this License. (If a
-newer version than version 2 of the ordinary GNU General Public
-License has appeared, then you can specify that version instead
-if you wish.) Do not make any other change in these notices.
-
-Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to
-all subsequent copies and derivative works made from that copy.
-
-This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable
-form under the terms of Sections 1 and 2 above provided that you
-accompany it with the complete corresponding machine-readable
-source code, which must be distributed under the terms of
-Sections 1 and 2 above on a medium customarily used for software
-interchange.
-
-If distribution of object code is made by offering access to
-copy from a designated place, then offering equivalent access to
-copy the source code from the same place satisfies the
-requirement to distribute the source code, even though third
-parties are not compelled to copy the source along with the
-object code.
-
-5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being
-compiled or linked with it, is called a "work that uses the
-Library". Such a work, in isolation, is not a derivative work
-of the Library, and therefore falls outside the scope of this
-License.
-
-However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library
-(because it contains portions of the Library), rather than a
-"work that uses the library". The executable is therefore
-covered by this License. Section 6 states terms for distribution
-of such executables.
-
-When a "work that uses the Library" uses material from a header
-file that is part of the Library, the object code for the work
-may be a derivative work of the Library even though the source
-code is not. Whether this is true is especially significant if
-the work can be linked without the Library, or if the work is
-itself a library. The threshold for this to be true is not
-precisely defined by law.
-
-If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small
-inline functions (ten lines or less in length), then the use of
-the object file is unrestricted, regardless of whether it is
-legally a derivative work. (Executables containing this object
-code plus portions of the Library will still fall under Section
-6.)
-
-Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of
-Section 6. Any executables containing that work also fall under
-Section 6, whether or not they are linked directly with the
-Library itself.
-
-6. As an exception to the Sections above, you may also compile
-or link a "work that uses the Library" with the Library to
-produce a work containing portions of the Library, and
-distribute that work under terms of your choice, provided that
-the terms permit modification of the work for the customer's own
-use and reverse engineering for debugging such modifications.
-
-You must give prominent notice with each copy of the work that
-the Library is used in it and that the Library and its use are
-covered by this License. You must supply a copy of this
-License. If the work during execution displays copyright
-notices, you must include the copyright notice for the Library
-among them, as well as a reference directing the user to the
-copy of this License. Also, you must do one of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- c) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- d) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
-For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special
-exception, the source code distributed need not include anything
-that is normally distributed (in either source or binary form)
-with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that
-component itself accompanies the executable.
-
-It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you
-cannot use both them and the Library together in an executable
-that you distribute.
-
-7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other
-library facilities not covered by this License, and distribute
-such a combined library, provided that the separate distribution
-of the work based on the Library and of the other library
-facilities is otherwise permitted, and provided that you do
-these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
-8. You may not copy, modify, sublicense, link with, or
-distribute the Library except as expressly provided under this
-License. Any attempt otherwise to copy, modify, sublicense,
-link with, or distribute the Library is void, and will
-automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you
-under this License will not have their licenses terminated so
-long as such parties remain in full compliance.
-
-9. You are not required to accept this License, since you have
-not signed it. However, nothing else grants you permission to
-modify or distribute the Library or its derivative works. These
-actions are prohibited by law if you do not accept this
-License. Therefore, by modifying or distributing the Library
-(or any work based on the Library), you indicate your acceptance
-of this License to do so, and all its terms and conditions for
-copying, distributing or modifying the Library or works based on
-it.
-
-10. Each time you redistribute the Library (or any work based on
-the Library), the recipient automatically receives a license
-from the original licensor to copy, distribute, link with or
-modify the Library subject to these terms and conditions. You
-may not impose any further restrictions on the recipients'
-exercise of the rights granted herein. You are not responsible
-for enforcing compliance by third parties to this License.
-
-11. If, as a consequence of a court judgment or allegation of
-patent infringement or for any other reason (not limited to
-patent issues), conditions are imposed on you (whether by court
-order, agreement or otherwise) that contradict the conditions of
-this License, they do not excuse you from the conditions of this
-License. If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other
-pertinent obligations, then as a consequence you may not
-distribute the Library at all. For example, if a patent license
-would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you,
-then the only way you could satisfy both it and this License
-would be to refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable
-under any particular circumstance, the balance of the section is
-intended to apply, and the section as a whole is intended to
-apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe
-any patents or other property right claims or to contest
-validity of any such claims; this section has the sole purpose
-of protecting the integrity of the free software distribution
-system which is implemented by public license practices. Many
-people have made generous contributions to the wide range of
-software distributed through that system in reliance on
-consistent application of that system; it is up to the
-author/donor to decide if he or she is willing to distribute
-software through any other system and a licensee cannot impose
-that choice.
-
-This section is intended to make thoroughly clear what is
-believed to be a consequence of the rest of this License.
-
-12. If the distribution and/or use of the Library is restricted
-in certain countries either by patents or by copyrighted
-interfaces, the original copyright holder who places the Library
-under this License may add an explicit geographical distribution
-limitation excluding those countries, so that distribution is
-permitted only in or among countries not thus excluded. In such
-case, this License incorporates the limitation as if written in
-the body of this License.
-
-13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to
-time. Such new versions will be similar in spirit to the present
-version, but may differ in detail to address new problems or
-concerns.
-
-Each version is given a distinguishing version number. If the
-Library specifies a version number of this License which applies
-to it and "any later version", you have the option of following
-the terms and conditions either of that version or of any later
-version published by the Free Software Foundation. If the
-Library does not specify a license version number, you may
-choose any version ever published by the Free Software
-Foundation.
-
-14. If you wish to incorporate parts of the Library into other
-free programs whose distribution conditions are incompatible
-with these, write to the author to ask for permission. For
-software which is copyrighted by the Free Software Foundation,
-write to the Free Software Foundation; we sometimes make
-exceptions for this. Our decision will be guided by the two
-goals of preserving the free status of all derivatives of our
-free software and of promoting the sharing and reuse of software
-generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND,
-EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
-DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- Appendix: How to Apply These Terms to Your New Libraries
-
-If you develop a new library, and you want it to be of the
-greatest possible use to the public, we recommend making it free
-software that everyone can redistribute and change. You can do
-so by permitting redistribution under these terms (or,
-alternatively, under the terms of the ordinary General Public
-License).
-
-To apply these terms, attach the following notices to the
-library. It is safest to attach them to the start of each
-source file to most effectively convey the exclusion of
-warranty; and each file should have at least the "copyright"
-line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
+++ /dev/null
- wxWindows Library Licence, Version 3
- ====================================
-
- Copyright (c) 1998 Julian Smart, Robert Roebling et al
-
- Everyone is permitted to copy and distribute verbatim copies
- of this licence document, but changing it is not allowed.
-
- WXWINDOWS LIBRARY LICENCE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public Licence as published by
- the Free Software Foundation; either version 2 of the Licence, or (at
- your option) any later version.
-
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
- General Public Licence for more details.
-
- You should have received a copy of the GNU Library General Public Licence
- along with this software, usually in a file named COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- Boston, MA 02111-1307 USA.
-
- EXCEPTION NOTICE
-
- 1. As a special exception, the copyright holders of this library give
- permission for additional uses of the text contained in this release of
- the library as licenced under the wxWindows Library Licence, applying
- either version 3 of the Licence, or (at your option) any later version of
- the Licence as published by the copyright holders of version 3 of the
- Licence document.
-
- 2. The exception is that you may use, copy, link, modify and distribute
- under the user's own terms, binary object code versions of works based
- on the Library.
-
- 3. If you copy code from files distributed under the terms of the GNU
- General Public Licence or the GNU Library General Public Licence into a
- copy of this library, as this licence permits, the exception does not
- apply to the code that you add in this way. To avoid misleading anyone as
- to the status of such modified files, you must delete this exception
- notice from such code and/or adjust the licensing conditions notice
- accordingly.
-
- 4. If you write modifications of your own for this library, it is your
- choice whether to permit this exception to apply to your modifications.
- If you do not wish that, you must delete the exception notice from such
- code and/or adjust the licensing conditions notice accordingly.
-
-
+++ /dev/null
-#
-# File: Makefile
-# Author: Julian Smart
-# Created: 1999
-#
-# Makefile : Builds Tex2RTF manual
-#
-
-DOCDIR=..
-LOCALDOCDIR=.
-
-DOCSOURCES=tex2rtf.tex
-
-all: chm htb hlp html htmlhelp pdfrtf
-
-chm: tex2rtf.chm
-hlp: tex2rtf.hlp
-htb: tex2rtf.htb
-html: tex2rtf.html
-htmlhelp: tex2rtf.chm
-pdfrtf: tex2rtf_rtf.rtf
-
-tex2rtf.hlp: tex2rtf.rtf tex2rtf.hpj
- -erase tex2rtf.ph
- hcw /E /C tex2rtf.hpj
-
-tex2rtf.chm : tex2rtf.html tex2rtf.hhp
- -hhc tex2rtf.hhp
-
-tex2rtf_rtf.rtf: $(DOCSOURCES) tex2rtf.ini
- -start /w tex2rtf tex2rtf.tex tex2rtf_rtf.rtf -twice -rtf
-
-tex2rtf.rtf: $(DOCSOURCES) tex2rtf.ini
- -start /w tex2rtf tex2rtf.tex tex2rtf.rtf -twice -winhelp
-
-tex2rtf.html: $(DOCSOURCES) tex2rtf.ini
- -start /w tex2rtf tex2rtf.tex tex2rtf.html -twice -html
- -erase *.con
- -erase *.ref
- -erase *.con
- -erase *.ref
- -mkdir html
- -copy *.html html
- -copy *.gif html
-
-tex2rtf.htb: tex2rtf_contents.html
- -zip tex2rtf.htb tex2rtf*.html *.hhp *.hhk *.hhc *.gif
-
+++ /dev/null
-% makeidx.sty 20-Jan-87 modified for international usage
-%
-% Modified by J.Schrod (TeXsys).
-% according to the suggestion of H.Partl (TU Wien) in german.sty
-% to make caption names adaptable to other languages.
-
-\@ifundefined{seeterm}{\def\seeterm{see}}{} % <-----------
-
-\def\see#1#2{{\em \seeterm\/} #1}
-\def\printindex{\@input{\jobname.ind}}
-
+++ /dev/null
-% SOBER.STY van Nico Poppelier
-% Adapted by Julian Smart for his own
-% nefarious purposes
-% --------------------------------------
-% Koppen van secties, subsecties, ...
-% --------------------------------------
-%
-% --------------------------------------
-% fontgrootte en regelafstand
-% (met de notatie X/Y wordt bedoeld
-% 'letter X op regelafstand Y')
-% --------------------------------------
-%
-% 10pt 11pt 12pt
-% \scriptsize 7/ 8 8/ 9.5 8/ 9.5
-% \tiny 5/ 6 6/ 7 6/ 7
-% \small 9/11 10/12 11/13.6
-% \footnotesize 8/ 9.5 9/11 10/12
-% \@normalsize 10/12 11/13.6 12/15
-% \large 12/14 12/14 14/18
-% \Large 14/18 14/18 17/22
-% \LARGE 17/22 17/22 20/25
-% \huge 20/25 20/25 25/30
-% \Huge 25/30 25/30 25/30
-%
-% de syntax van \@startsection is:
-% \@startsection
-% {Name}{Level}{Indent}{Before_skip}{After_Skip}{Type_face}
-% Indent : inspring van kop vanaf linkermarge
-% Before_skip: wit boven kopje
-% (< 0 geeft aan dat eerste alinea niet inspringt)
-% After_skip : wit onder kopje indien >= 0
-% horizontaal wit na kopje,
-% met kopje op de regel indien < 0
-%
-% notatie voor <glue>: <dimen>(<stretch>)(<shrink>)
-%
-% in LaTeX's standaard-stijlen (onafhankelijk van \@ptsize):
-%
-% Indent Before_skip After_skip Type_face
-% section 0 -3.5ex (-1ex)(-0.2ex) 2.3ex(0.2ex) \Large\bf
-% subsection 0 -3.25ex(-1ex)(-0.2ex) 1.5ex(0.2ex) \large\bf
-% subsubsection 0 -3.25ex(-1ex)(-0.2ex) 1.5ex(0.2ex) \normalsize\bf
-% paragraph 0 3.25ex( 1ex)( 0.2ex) -1em()() \normalsize\bf
-% subparagraph \parindent 3.25ex( 1ex)( 0.2ex) -1em()() \normalsize\bf
-%
-%
-% in een soberder uitvoering (onafhankelijk van \@ptsize):
-%
-\def\section{\@startsection{section}{1}
-%{\z@}{-2.5ex plus -0.5ex minus -0.1ex}{0.5ex plus 0.1ex}{\large\bf}}
-{\z@}{-2.5ex plus -0.5ex minus -0.1ex}{0.5ex plus 0.1ex}{\large\bf}}
-\def\subsection{\@startsection{subsection}{2}
-{\z@}{-2.25ex plus -0.3ex minus -0.2ex}{0.05ex plus 0.05ex}{\normalsize\bf}}
-\def\subsubsection{\@startsection{subsubsection}{3}
-{\z@}{-2.25ex plus -0.3ex minus -0.2ex}{0.05ex plus 0.05ex}{\normalsize\sc}}
-\def\paragraph{\@startsection{paragraph}{4}
-{\z@}{2ex plus 0.5ex minus 0.1ex}{-0.7em}{\normalsize\it}}
-\def\subparagraph{\@startsection{subparagraph}{4}
-{\parindent}{2ex plus 0.5ex minus 0.1ex}{-0.7em}{\normalsize\it}}
-%
-% --------------------------------------
-% Hoofdstuk-koppen
-% --------------------------------------
-%
-% LaTeX's book style (standaard documentstijl) definieert
-% de hoofdstuk-koppen onafhankelijk van \@ptsize
-%
-
-\def\@makechapterhead#1{\vspace*{20pt}%
-% Next line repaired by Piet van Oostrum - June 14, 1991.
-%{\parindent 0pt\Large\bf \ifnum\c@secnumdepth>\m@ne\thechapter \fi
-{\parindent 0pt\LARGE\bf \ifnum\c@secnumdepth>\m@ne\thechapter. \hskip 1em \fi%
-{\raggedright\LARGE\bf #1}\\\rule[10pt]{\textwidth}{0.3mm}\par\nobreak \vskip25pt} }
-
-\def\@makeschapterhead#1{
- \vspace*{20pt} { \parindent 0pt \raggedright
- \LARGE\bf#1\par\nobreak\vskip25pt } }
-%
-% --------------------------------------
-% List-omgevingen (itemize en enumerate)
-% --------------------------------------
-%
-% De volgende parameters zijn relevant in een list-omgeving:
-%
-% \labelsep : afstand tussen label en item
-% \labelwidth : breedte van label
-% \leftmargin : afstand tussen linkermarge en item
-% \rightmargin : afstand tussen item en rechtermarge
-% \listparindent: indentatie voor vervolg-alinea's in item
-% \parsep : verticaal wit tussen vervolg-alinea's in item
-% \itemsep : verticaal wit tussen opeenvolgende item's
-% \topsep,
-% \partopsep : wit boven item 1 = \topsep + \parskip
-% (geen alinea-overgang boven lijst)
-% wit boven item 1 = \topsep + \parskip + \partopsep
-% (alinea-overgang boven lijst)
-%
-% zie verder LaTeX-boek 5.7.1 en C.5.3
-% --------------------------------------
-%
-% De parameters voor niveau 1 worden gedefinieerd op top-niveau en
-% \@listi definieert uitsluitend \leftmargin
-%
-% size = small (9pt, 10pt, 11pt)
-\def\@listi{\topsep 0.4ex \parsep 0pt \itemsep \parsep}
-% \topsep 4pt(2pt)(2pt) 6pt(2pt)(2pt) 9pt(3pt)(5pt)
-% \parsep 2pt(1pt)(1pt) 3pt(2pt)(1pt) 4.5pt(2pt)(1pt)
-%
-% size = footnotesize (8pt, 9pt, 10pt)
-\def\@listi{\topsep 0.4ex \parsep 0pt \itemsep \parsep}
-% \topsep 3pt(1pt)(1pt) 4pt(2pt)(2pt) 6pt(2pt)(2pt)
-% \parsep 2pt(1pt)(1pt) 2pt(1pt)(1pt) 3pt(2pt)(1pt)
-%
-% size = normalsize (and bigger)
-% \parskip 0pt(1pt) 0pt(1pt) 0pt(1pt)
-% \parindent 15pt 17pt 1.5em
-% \topsep 8pt(2pt)(4pt) 9pt(3pt)(5pt) 10pt(4pt)(6pt)
-% \partopsep 2pt(1pt)(1pt) 3pt(1pt)(2pt) 3pt(2pt)(2pt)
-% \itemsep 4pt(2pt)(1pt) 4.5pt(2pt)(1pt) 5pt(2.5pt)(1pt
-% \parsep 4pt(2pt)(1pt) 4.5pt(2pt)(1pt) 5pt(2.5pt)(1pt)
-\topsep 0.4ex \partopsep 0pt \itemsep 0pt \parsep 0pt
-%
-% \leftmargini 2.5em \leftmarginii 2.2em \leftmarginiii 1.87em
-% \leftmarginiv 1.7em \leftmarginv 1.0em \leftmarginvi 1.0em
-%
-% \leftmargin\leftmargini
-% \labelwidth\leftmargini\advance\labelwidth-\labelsep
-% \labelsep 0.5em
-%
-% \def\@listi{\leftmargin\leftmargini}
-%
-\def\@listii{\leftmargin\leftmarginii
- \labelwidth\leftmarginii\advance\labelwidth-\labelsep
-% \topsep 4pt(2pt)(1pt) 4.5pt(2pt)(1pt) 5pt(2.5pt)(1pt)
-% \parsep 2pt(1pt)(1pt) 2pt(1pt)(1pt) 2.5pt(1pt)(1pt)
- \topsep 0pt \parsep 0pt \itemsep \parsep}
-%
-\def\@listiii{\leftmargin\leftmarginiii
- \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
-% \topsep 2pt(1pt)(1pt) 2pt(1pt)(1pt) 2.5pt(1pt)(1pt)
-% \partopsep 1pt(0pt)(1pt) 1pt(0pt)(1pt) 1pt(0pt)(1pt)
- \parsep \z@ \topsep 0pt \partopsep 0pt \itemsep \topsep}
-%
-% \def\@listiv{\leftmargin\leftmarginiv
-% \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
-%
-% \def\@listv{ \leftmargin\leftmarginv
-% \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
-%
-% \def\@listvi{\leftmargin\leftmarginvi
-% \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
-
-
+++ /dev/null
-% mytitle.sty
-% Julian Smart's Enhanced Titlepage
-
-\def\maketitle{\begin{titlepage}
-\let\footnotesize\small \let\footnoterule\relax \setcounter{page}{0}
-%\null
-%\vfil
-\vspace*{2cm}\begin{flushleft}
-{\huge \sf\@title\\\rule{\textwidth}{0.5mm}} \vskip 3em {\large \lineskip .75em
-{\sf\@author}
-\par}
-\vskip 1.5em {\large\sf \@date \par} \end{flushleft} \par
-\@thanks
-\vfill
-{\sf\small\begin{flushright}%
-Artificial Intelligence Applications Institute\\
-University of Edinburgh\\
-80 South Bridge\\
-EH1 1HN\\
-Tel. 0131-650-2746
-\end{flushright}}
-\null
-\end{titlepage}
-\setcounter{footnote}{0} \let\thanks\relax
-\gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\maketitle\relax}
-\def\abstractname{Abstract} % <----------
-\def\abstract{\titlepage
-\null\vfil
-\begin{center}
-{\bf \abstractname} % <----------
-% {\bf Abstract}
-\end{center}}
-\def\endabstract{\par\vfil\null\endtitlepage}
+++ /dev/null
-Implementation notes
---------------------
-
-Files
------
-
-The library tex2any.lib contains the generic Latex parser.
-It comprises tex2any.cc, tex2any.h and texutils.cc.
-
-The executable Tex2RTF is made up of tex2any.lib,
-tex2rtf.cc (main driver and user interface), and specific
-drivers for generating output: rtfutils.cc, htmlutil.cc
-and xlputils.cc.
-
-Data structures
----------------
-
-Class declarations are found in tex2any.h.
-
-TexMacroDef holds a macro (Latex command) definition: name, identifier,
-number of arguments, whether it should be ignored, etc. Integer
-identifiers are used for each Latex command for efficiency when
-generating output. A hash table MacroDefs stores all the TexMacroDefs,
-indexed on command name.
-
-Each unit of a Latex file is stored in a TexChunk. A TexChunk can be
-a macro, argument or just a string: a TexChunk macro has child
-chunks for the arguments, and each argument will have one or more
-children for representing another command or a simple string.
-
-Parsing
--------
-
-Parsing is relatively add hoc. read_a_line reads in a line at a time,
-doing some processing for file commands (e.g. input, verbatiminclude).
-File handles are stored in a stack so file input commands may be nested.
-
-ParseArg parses an argument (which might be the whole Latex input,
-which is treated as an argument) or a single command, or a command
-argument. The parsing gets a little hairy because an environment,
-a normal command and bracketed commands (e.g. {\bf thing}) all get
-parsed into the same format. An environment, for example,
-is usually a one-argument command, as is {\bf thing}. It also
-deals with user-defined macros.
-
-Whilst parsing, the function MatchMacro gets called to
-attempt to find a command following a backslash (or the
-start of an environment). ParseMacroBody parses the
-arguments of a command when one is found.
-
-Generation
-----------
-
-The upshot of parsing is a hierarchy of TexChunks.
-TraverseFromDocument calls the recursive TraverseFromChunk,
-and is called by the 'client' converter application to
-start the generation process. TraverseFromChunk
-calls the two functions OnMacro and OnArgument,
-twice for each chunk to allow for preprocessing
-and postprocessing of each macro or argument.
-
-The client defines OnMacro and OnArgument to test
-the command identifier, and output the appropriate
-code. To help do this, the function TexOutput
-outputs to the current stream(s), and
-SetCurrentOutput(s) allows the setting of one
-or two output streams for the output to be sent to.
-Usually two outputs at a time are sufficient for
-hypertext applications where a title is likely
-to appear in an index and as a section header.
-
-There are support functions for getting the string
-data for the current chunk (GetArgData) and the
-current chunk (GetArgChunk). If you have a handle
-on a chunk, you can output it several times by calling
-TraverseChildrenFromChunk (not TraverseFromChunk because
-that causes infinite recursion).
-
-The client (here, Tex2RTF) also defines OnError and OnInform output
-functions appropriate to the desired user interface.
-
-References
-----------
-
-Adding, finding and resolving references are supported
-with functions from texutils.cc. WriteTexReferences
-and ReadTexReferences allow saving and reading references
-between conversion processes, rather like real LaTeX.
-
-Bibliography
-------------
-
-Again texutils.cc provides functions for reading in .bib files and
-resolving references. The function OutputBibItem gives a generic way
-outputting bibliography items, by 'faking' calls to OnMacro and
-OnArgument, allowing the existing low-level client code to take care of
-formatting.
-
-Units
------
-
-Unit parsing code is in texutils.cc as ParseUnitArgument. It converts
-units to points.
-
-Common errors
--------------
-
-1) Macro not found: \end{center} ...
-
-Rewrite:
-
-\begin{center}
-{\large{\underline{A}}}
-\end{center}
-
-as:
-
-\begin{center}
-{\large \underline{A}}
-\end{center}
-
-2) Tables crash RTF. Set 'compatibility ' to TRUE in .ini file; also
-check for \\ end of row characters on their own on a line, insert
-correct number of ampersands for the number of columns. E.g.
-
-hello & world\\
-\\
-
-becomes
-
-hello & world\\
-&\\
-
-3) If list items indent erratically, try increasing
-listItemIndent to give more space between label and following text.
-A global replace of '\item [' to '\item[' may also be helpful to remove
-unnecessary space before the item label.
-
-4) Missing figure or section references: ensure all labels _directly_ follow captions
-or sections (no intervening white space).
+++ /dev/null
-%
-% %%%%%%% %%%%% %%%%%% %%%%% % %
-% % % % % % % % % %
-% % % % % % % % % %
-% %%%%%%% %%%%% %%%%%% % % %
-% % % % % % % % %
-% % % % % % % % %
-% % %%%%%% %%%%%% %%%%% % %
-%
-% By Jean Orloff
-% Comments & suggestions by e-mail: ORLOFF@surya11.cern.ch
-% No modification of this file allowed if not e-sent to me.
-%
-% A simple way to measure the size of encapsulated postscript figures
-% from inside TeX, and to use it for automatically formatting texts
-% with inserted figures. Works both under Plain TeX-based macros
-% (Phyzzx, Harvmac, Psizzl, ...) and LaTeX environment.
-% Provides exactly the same result on any PostScript printer provided
-% the single instruction \psfor... is changed to fit the needs of the
-% particular dvi->ps translator used.
-% History:
-% 1.31: adds \psforDVIALW(?)
-% 1.30: adds \splitfile & \joinfiles for multi-file management
-% 1.24: fix error handling & add \psonlyboxes
-% 1.23: adds \putsp@ce for OzTeX fix
-% 1.22: makes \drawingBox \global for use in Phyzzx
-% 1.21: accepts %%BoundingBox: (atend)
-% 1.20: tries to add \psfordvitps for the TeXPS package.
-% 1.10: adds \psforoztex, error handling...
-%2345678 1 2345678 2 2345678 3 2345678 4 2345678 5 2345678 6 2345678 7 23456789
-%
-\def\temp{1.31}
-\let\tempp=\relax
-\expandafter\ifx\csname psboxversion\endcsname\relax
- \message{version: \temp}
-\else
- \ifdim\temp cm>\psboxversion cm
- \message{version: \temp}
- \else
- \message{psbox(\psboxversion) is already loaded: I won't load
- psbox(\temp)!}
- \let\temp=\psboxversion
- \let\tempp=\endinput
- \fi
-\fi
-\tempp
-\let\psboxversion=\temp
-\catcode`\@=11
-% Every macro likes a little privacy...
-%
-% Some common defs
-%
-\def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution
-\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
-\def\executeinspecs#1{%
-\execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}}
-%
-%Trying to tame the variety of \special commands for Postscript: the
-% universal internal command \PSspeci@l##1##2 takes ##1 to be the
-% filename and ##2 to be the integer scale factor*1000 (as for usual
-% TeX \scale commands)
-%
-\def\psfortextures{% For TeXtures on the Macintosh
-%-----------------
-\def\PSspeci@l##1##2{%
-\special{illustration ##1\space scaled ##2}%
-}}
-%
-\def\psfordvitops{% For the DVItoPS converter on IBM mainframes
-%----------------
-\def\PSspeci@l##1##2{%
-\special{dvitops: import ##1\space \the\drawingwd \the\drawinght}%
-}}
-%
-\def\psfordvips{% For DVIPS converter on VAX, UNIX and PC's
-%--------------
-\def\PSspeci@l##1##2{%
-% \special{/@scaleunit 1000 def}% never read dox without trying!
-\d@my=0.1bp \d@mx=\drawingwd \divide\d@mx by\d@my%
-\special{PSfile=##1\space llx=\psllx\space lly=\pslly\space%
-urx=\psurx\space ury=\psury\space rwi=\number\d@mx}%
-}}
-%
-\def\psforoztex{% For the OzTeX shareware on the Macintosh
-%--------------
-\def\PSspeci@l##1##2{%
-\special{##1 \space
- ##2 1000 div dup scale
- \putsp@ce{\number-\psllx} \putsp@ce{\number-\pslly} translate
-}%
-}}
-\def\putsp@ce#1{#1 }
-%
-\def\psfordvitps{% From the UNIX TeXPS package, vers.>3.12
-%---------------
-% Convert a dimension into the number \psn@sp (in scaled points)
-\def\psdimt@n@sp##1{\d@mx=##1\relax\edef\psn@sp{\number\d@mx}}
-\def\PSspeci@l##1##2{%
-% psfig.psr contains the def of "startTexFig": if you can locate it
-% and include the correct pathname, it should work
-\special{dvitps: Include0 "psfig.psr"}% contains def of "startTexFig"
-\psdimt@n@sp{\drawingwd}
-\special{dvitps: Literal "\psn@sp\space"}
-\psdimt@n@sp{\drawinght}
-\special{dvitps: Literal "\psn@sp\space"}
-\psdimt@n@sp{\psllx bp}
-\special{dvitps: Literal "\psn@sp\space"}
-\psdimt@n@sp{\pslly bp}
-\special{dvitps: Literal "\psn@sp\space"}
-\psdimt@n@sp{\psurx bp}
-\special{dvitps: Literal "\psn@sp\space"}
-\psdimt@n@sp{\psury bp}
-\special{dvitps: Literal "\psn@sp\space startTexFig\space"}
-\special{dvitps: Include1 "##1"}
-\special{dvitps: Literal "endTexFig\space"}
-}}
-\def\psforDVIALW{% Try for dvialw, a UNIX public domain
-%---------------
-\def\PSspeci@l##1##2{
-\special{language "PS"
-literal "##2 1000 div dup scale"
-include "##1"}}}
-\def\psonlyboxes{% Draft-like behaviour if none of the others works
-%---------------
-\def\PSspeci@l##1##2{%
-\at(0cm;0cm){\boxit{\vbox to\drawinght
- {\vss
- \hbox to\drawingwd{\at(0cm;0cm){\hbox{(##1)}}\hss}
- }}}
-}%
-}
-%
-\def\psloc@lerr#1{%
-\let\savedPSspeci@l=\PSspeci@l%
-\def\PSspeci@l##1##2{%
-\at(0cm;0cm){\boxit{\vbox to\drawinght
- {\vss
- \hbox to\drawingwd{\at(0cm;0cm){\hbox{(##1) #1}}\hss}
- }}}
-\let\PSspeci@l=\savedPSspeci@l% restore normal output for other figs!
-}%
-}
-%
-%\def\psfor... add your own!
-%
-% \ReadPSize{PSfilename} reads the dimensions of a PostScript drawing
-% and stores it in \drawinght(wd)
-\newread\pst@mpin
-\newdimen\drawinght\newdimen\drawingwd
-\newdimen\psxoffset\newdimen\psyoffset
-\newbox\drawingBox
-\newif\ifNotB@undingBox
-\newhelp\PShelp{Proceed: you'll have a 5cm square blank box instead of
-your graphics (Jean Orloff).}
-\def\@mpty{}
-\def\s@tsize#1 #2 #3 #4\@ndsize{
- \def\psllx{#1}\def\pslly{#2}%
- \def\psurx{#3}\def\psury{#4}% needed by a crazyness of dvips!
- \ifx\psurx\@mpty\NotB@undingBoxtrue% this is not a valid one!
- \else
- \drawinght=#4bp\advance\drawinght by-#2bp
- \drawingwd=#3bp\advance\drawingwd by-#1bp
-% !Units related by crazy factors as bp/pt=72.27/72 should be BANNED!
- \fi
- }
-\def\sc@nline#1:#2\@ndline{\edef\p@rameter{#1}\edef\v@lue{#2}}
-\def\g@bblefirstblank#1#2:{\ifx#1 \else#1\fi#2}
-\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
-\def\execute#1{#1}% Seems stupid, but cs are identified BEFORE execution
-{\catcode`\%=12
-\xdef\B@undingBox{%%BoundingBox}
-} %% is not a true comment in PostScript, even if % is!
-\def\ReadPSize#1{
- \edef\PSfilename{#1}
- \openin\pst@mpin=#1\relax
- \ifeof\pst@mpin \errhelp=\PShelp
- \errmessage{I haven't found your postscript file (\PSfilename)}
- \psloc@lerr{was not found}
- \s@tsize 0 0 142 142\@ndsize
- \closein\pst@mpin
- \else
- \immediate\write\psbj@inaux{#1,}
- \loop
- \executeinspecs{\catcode`\ =10\global\read\pst@mpin to\n@xtline}
- \ifeof\pst@mpin
- \errhelp=\PShelp
- \errmessage{(\PSfilename) is not an Encapsulated PostScript File:
- I could not find any \B@undingBox: line.}
- \edef\v@lue{0 0 142 142:}
- \psloc@lerr{is not an EPSFile}
- \NotB@undingBoxfalse
- \else
- \expandafter\sc@nline\n@xtline:\@ndline
- \ifx\p@rameter\B@undingBox\NotB@undingBoxfalse
- \edef\t@mp{%
- \expandafter\g@bblefirstblank\v@lue\space\space\space}
- \expandafter\s@tsize\t@mp\@ndsize
- \else\NotB@undingBoxtrue
- \fi
- \fi
- \ifNotB@undingBox\repeat
- \closein\pst@mpin
- \fi
-\message{#1}
-}
-%
-% \psboxto(xdim;ydim){psfilename}: you specify the dimensions and
-% TeX uniformly scales to fit the largest one. If xdim=0pt, the
-% scale is fully determined by ydim and vice versa.
-% Notice: psboxes are a real vboxes; couldn't take hbox otherwise all
-% indentation and all cr's would be interpreted as spaces (hugh!).
-%
-\newcount\xscale \newcount\yscale \newdimen\pscm\pscm=1cm
-\newdimen\d@mx \newdimen\d@my
-\let\ps@nnotation=\relax
-\def\psboxto(#1;#2)#3{\vbox{
- \ReadPSize{#3}
- \divide\drawingwd by 1000
- \divide\drawinght by 1000
- \d@mx=#1
- \ifdim\d@mx=0pt\xscale=1000
- \else \xscale=\d@mx \divide \xscale by \drawingwd\fi
- \d@my=#2
- \ifdim\d@my=0pt\yscale=1000
- \else \yscale=\d@my \divide \yscale by \drawinght\fi
- \ifnum\yscale=1000
- \else\ifnum\xscale=1000\xscale=\yscale
- \else\ifnum\yscale<\xscale\xscale=\yscale\fi
- \fi
- \fi
- \divide \psxoffset by 1000\multiply\psxoffset by \xscale
- \divide \psyoffset by 1000\multiply\psyoffset by \xscale
- \global\divide\pscm by 1000
- \global\multiply\pscm by\xscale
- \multiply\drawingwd by\xscale \multiply\drawinght by\xscale
- \ifdim\d@mx=0pt\d@mx=\drawingwd\fi
- \ifdim\d@my=0pt\d@my=\drawinght\fi
- \message{scaled \the\xscale}
- \hbox to\d@mx{\hss\vbox to\d@my{\vss
- \global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{
- \kern-\psyoffset
- \PSspeci@l{\PSfilename}{\the\xscale}
- \vss}\hss\ps@nnotation}
- \global\ht\drawingBox=\the\drawinght
- \global\wd\drawingBox=\the\drawingwd
- \baselineskip=0pt
- \copy\drawingBox
- \vss}\hss}
- \global\psxoffset=0pt
- \global\psyoffset=0pt% These are local to one figure
- \global\pscm=1cm
- \global\drawingwd=\drawingwd
- \global\drawinght=\drawinght
-}}
-%
-% \psboxscaled{scalefactor*1000}{PSfilename} allows to bypass the
-% rounding errors of TeX integer divisions for situations where the
-% TeX box should fit the original BoundingBox with a precision better
-% than 1/1000.
-%
-\def\psboxscaled#1#2{\vbox{
- \ReadPSize{#2}
- \xscale=#1
- \message{scaled \the\xscale}
- \divide\drawingwd by 1000\multiply\drawingwd by\xscale
- \divide\drawinght by 1000\multiply\drawinght by\xscale
- \divide \psxoffset by 1000\multiply\psxoffset by \xscale
- \divide \psyoffset by 1000\multiply\psyoffset by \xscale
- \global\divide\pscm by 1000
- \global\multiply\pscm by\xscale
- \global\setbox\drawingBox=\hbox to 0pt{\kern\psxoffset\vbox to 0pt{
- \kern-\psyoffset
- \PSspeci@l{\PSfilename}{\the\xscale}
- \vss}\hss\ps@nnotation}
- \global\ht\drawingBox=\the\drawinght
- \global\wd\drawingBox=\the\drawingwd
- \baselineskip=0pt
- \copy\drawingBox
- \global\psxoffset=0pt
- \global\psyoffset=0pt% These are local to one figure
- \global\pscm=1cm
- \global\drawingwd=\drawingwd
- \global\drawinght=\drawinght
-}}
-%
-% \psbox{PSfilename} makes a TeX box having the minimal size to
-% enclose the picture
-\def\psbox#1{\psboxscaled{1000}{#1}}
-%
-%
-% \joinfiles file1, file2, ...n \into joinedfilename .
-% makes one file out of many
-% \splitfile joinedfilename
-% the opposite
-%
-%\def\execute#1{#1}% NOT stupid: cs in #1 are then identified BEFORE execution
-%\def\psm@keother#1{\catcode`#112\relax}% borrowed from latex
-%\def\executeinspecs#1{%
-%\execute{\begingroup\let\do\psm@keother\dospecials\catcode`\^^M=9#1\endgroup}}
-%\newread\pst@mpin
-\newif\ifn@teof\n@teoftrue
-\newif\ifc@ntrolline
-\newif\ifmatch
-\newread\j@insplitin
-\newwrite\j@insplitout
-\newwrite\psbj@inaux
-\immediate\openout\psbj@inaux=psbjoin.aux
-\immediate\write\psbj@inaux{\string\joinfiles}
-\immediate\write\psbj@inaux{\jobname,}
-%
-% We redefine input to keep track of the various files inputted
-%
-\immediate\let\oldinput=\input
-\def\input#1 {
- \immediate\write\psbj@inaux{#1,}
- \oldinput #1 }
-\def\empty{}
-\def\setmatchif#1\contains#2{
- \def\match##1#2##2\endmatch{
- \def\tmp{##2}
- \ifx\empty\tmp
- \matchfalse
- \else
- \matchtrue
- \fi}
- \match#1#2\endmatch}
-\def\warnopenout#1#2{
- \setmatchif{TrashMe,psbjoin.aux,psbjoin.all}\contains{#2}
- \ifmatch
- \else
- \immediate\openin\pst@mpin=#2
- \ifeof\pst@mpin
- \else
- \errhelp{If the content of this file is so precious to you, abort (ie
-press x or e) and rename it before retrying.}
- \errmessage{I'm just about to replace your file named #2}
- \fi
- \immediate\closein\pst@mpin
- \fi
- \message{#2}
- \immediate\openout#1=#2}
-% No comments allowed below: % will have an unusual catcode
-{
-\catcode`\%=12
-\gdef\splitfile#1 {
- \immediate\openin\j@insplitin=#1
- \message{Splitting file #1 into:}
- \warnopenout\j@insplitout{TrashMe}
- \loop
- \ifeof
- \j@insplitin\immediate\closein\j@insplitin\n@teoffalse
- \else
- \n@teoftrue
- \executeinspecs{\global\read\j@insplitin to\spl@tinline\expandafter
- \ch@ckbeginnewfile\spl@tinline%Beginning-Of-File-Named:%\endcheck}
- \ifc@ntrolline
- \else
- \toks0=\expandafter{\spl@tinline}
- \immediate\write\j@insplitout{\the\toks0}
- \fi
- \fi
- \ifn@teof\repeat
- \immediate\closeout\j@insplitout}
-\gdef\ch@ckbeginnewfile#1%Beginning-Of-File-Named:#2%#3\endcheck{
- \def\t@mp{#1}
- \ifx\empty\t@mp
- \def\t@mp{#3}
- \ifx\empty\t@mp
- \global\c@ntrollinefalse
- \else
- \immediate\closeout\j@insplitout
- \warnopenout\j@insplitout{#2}
- \global\c@ntrollinetrue
- \fi
- \else
- \global\c@ntrollinefalse
- \fi}
-\gdef\joinfiles#1\into#2 {
- \message{Joining following files into}
- \warnopenout\j@insplitout{#2}
- \message{:}
- {
- \edef\w@##1{\immediate\write\j@insplitout{##1}}
- \w@{% This text was produced with psbox's \string\joinfiles.}
- \w@{% To decompose and tex it:}
- \w@{%-save this with a filename CONTAINING ONLY LETTERS, and no extensions}
- \w@{% (say, JOINTFIL), in some uncrowded directory;}
- \w@{%-make sure you can \string\input\space psbox.tex (version>=1.3);}
- \w@{%-tex JOINTFIL using Plain, or LaTeX, or whatever is needed by}
- \w@{% the first part in the joining (after splitting JOINTFIL into}
- \w@{% it's constituents, TeX will try to process it as it stands).}
- \w@{\string\input\space psbox.tex}
- \w@{\string\splitfile{\string\jobname}}
- }
- \tre@tfilelist#1, \endtre@t
- \immediate\closeout\j@insplitout}
-\gdef\tre@tfilelist#1, #2\endtre@t{
- \def\t@mp{#1}
- \ifx\empty\t@mp
- \else
- \llj@in{#1}
- \tre@tfilelist#2, \endtre@t
- \fi}
-\gdef\llj@in#1{
- \immediate\openin\j@insplitin=#1
- \ifeof\j@insplitin
- \errmessage{I couldn't find file #1.}
- \else
- \message{#1}
- \toks0={%Beginning-Of-File-Named:#1}
- \immediate\write\j@insplitout{\the\toks0}
- \executeinspecs{\global\read\j@insplitin to\oldj@ininline}
- \loop
- \ifeof\j@insplitin\immediate\closein\j@insplitin\n@teoffalse
- \else\n@teoftrue
- \executeinspecs{\global\read\j@insplitin to\j@ininline}
- \toks0=\expandafter{\oldj@ininline}
- \let\oldj@ininline=\j@ininline
- \immediate\write\j@insplitout{\the\toks0}
- \fi
- \ifn@teof
- \repeat
- \immediate\closein\j@insplitin
- \fi}
-}
-% To be put at the end of a file, for making an tar-like file containing
-% everything it used.
-\def\autojoin{
- \immediate\write\psbj@inaux{\string\into\space psbjoin.all}
- \immediate\closeout\psbj@inaux
- \input psbjoin.aux
-}
-%
-% Annotations & Captions etc...
-%
-%
-% \centinsert{anybox} is just a centered \midinsert, but is included as
-% people barely use the original inserts from TeX.
-%
-\def\centinsert#1{\midinsert\line{\hss#1\hss}\endinsert}
-\def\psannotate#1#2{\def\ps@nnotation{#2\global\let\ps@nnotation=\relax}#1}
-\def\pscaption#1#2{\vbox{
- \setbox\drawingBox=#1
- \copy\drawingBox
- \vskip\baselineskip
- \vbox{\hsize=\wd\drawingBox\setbox0=\hbox{#2}
- \ifdim\wd0>\hsize
- \noindent\unhbox0\tolerance=5000
- \else\centerline{\box0}
- \fi
-}}}
-% for compatibility with older versions
-\def\psfig#1#2#3{\pscaption{\psannotate{#1}{#2}}{#3}}
-\def\psfigurebox#1#2#3{\pscaption{\psannotate{\psbox{#1}}{#2}}{#3}}
-%
-% \at(#1;#2)#3 puts #3 at #1-higher and #2-right of the current
-% position without moving it (to be used in annotations).
-\def\at(#1;#2)#3{\setbox0=\hbox{#3}\ht0=0pt\dp0=0pt
- \rlap{\kern#1\vbox to0pt{\kern-#2\box0\vss}}}
-%
-% \gridfill(ht;wd) makes a 1cm*1cm grid of ht by wd whose lower-left
-% corner is the current point
-\newdimen\gridht \newdimen\gridwd
-\def\gridfill(#1;#2){
- \setbox0=\hbox to 1\pscm
- {\vrule height1\pscm width.4pt\leaders\hrule\hfill}
- \gridht=#1
- \divide\gridht by \ht0
- \multiply\gridht by \ht0
- \gridwd=#2
- \divide\gridwd by \wd0
- \multiply\gridwd by \wd0
- \advance \gridwd by \wd0
- \vbox to \gridht{\leaders\hbox to\gridwd{\leaders\box0\hfill}\vfill}}
-%
-% Useful to measure where to put annotations
-\def\fillinggrid{\at(0cm;0cm){\vbox{
- \gridfill(\drawinght;\drawingwd)}}}
-%
-% \textleftof\anybox: Sample text\endtext
-% inserts "Sample text" on the left of \anybox ie \vbox, \psbox.
-% \textrightof is the symmetric (not documented, too uggly)
-% Welcome any suggestion about clean wraparound macros from
-% TeXhackers reading this
-%
-\def\textleftof#1:{
- \setbox1=#1
- \setbox0=\vbox\bgroup
- \advance\hsize by -\wd1 \advance\hsize by -2em}
-\def\textrightof#1:{
- \setbox0=#1
- \setbox1=\vbox\bgroup
- \advance\hsize by -\wd0 \advance\hsize by -2em}
-\def\endtext{
- \egroup
- \hbox to \hsize{\valign{\vfil##\vfil\cr%
-\box0\cr%
-\noalign{\hss}\box1\cr}}}
-%
-% \frameit{\thick}{\skip}{\anybox}
-% draws with thickness \thick a box around \anybox, leaving \skip of
-% blank around it. eg \frameit{0.5pt}{1pt}{\hbox{hello}}
-% \boxit{\anybox} is a shortcut.
-\def\frameit#1#2#3{\hbox{\vrule width#1\vbox{
- \hrule height#1\vskip#2\hbox{\hskip#2\vbox{#3}\hskip#2}%
- \vskip#2\hrule height#1}\vrule width#1}}
-\def\boxit#1{\frameit{0.4pt}{0pt}{#1}}
-%
-%
-\catcode`\@=12 % cs containing @ are unreachable
-%
-% CUSTOMIZE YOUR DEFAULT DRIVER:
-% Uncomment the line corresponding to your TeX system:
-%\psfortextures% For TeXtures on the Macintosh
-%\psforoztex % For OzTeX shareware on the Macintosh
-%\psfordvitops % For the DVItoPS converter for TeX on IBM mainframes
- \psfordvips % For DVIPS converter on VAX and UNIX
-%\psfordvitps % For dvitps from TeXPS package under UNIX
-%\psforDVIALW % For DVIALW, UNIX public domain
-%\psonlyboxes % Blank Boxes (when all else fails).
+++ /dev/null
-
-+++++ Announcing Tex2RTF +++++
-+++++ A Free LaTeX to RTF, Windows Help RTF, and HTML converter +++++
-
-Purpose
-=======
-
- * Allows you to maintain manuals in printed and hypertext formats.
-
- * Allows conversion of existing LaTeX documents to word processor
- formats (usually some 'tweaking' is required to conform to
- Tex2RTF restrictions).
-
-Input
-=====
-
-A LaTeX subset with some additional hypertext macros; no maths,
-minimal table support.
-
-Caveat: Please do not expect to convert arbitrary LaTex files without
-editing: this is not the primary intention of Tex2RTF. Success converting
-existing LaTeX depends on your expectations and the style in which
-the LaTeX was written. Tex2RTF does not accept pure TeX (non-LaTeX)
-documents.
-
-Output
-======
-
- * ordinary RTF
-
- * Windows Help hypertext RTF
-
- * HTML (the World Wide Web hypertext format)
-
- * wxHTML Help (the wxWidgets GUI library help file format)
-
-Installation
-============
-
-Under Windows, please run the supplied install.exe program. The Tex2RTF
-manual itself serves as an example input file, in the docs subdirectory
-with various .sty, .ini, and .gif files that you may need for your
-own documents. See the online manual for further details.
-
-Platforms supported
-===================
-
- * Windows (all 32-bit desktop versions)
-
- * Any Unix supporting wxWidgets
-
- * Mac OS X
-
-Where to get it
-===============
-
-The latest version of Tex2RTF can be accessed by anonymous ftp
-from:
-
- ftp://biolpc22.york.ac.uk/pub/tex2rtf
-
-The WWW pages are at:
-
- http://www.wxwidgets.org/tex2rtf
-
-Tex2RTF was developed using the free, cross-platform GUI toolkit
-wxWidgets, at http://www.wxwidgets.org. To compile Tex2RTF
-for platforms for which there are no Tex2RTF binaries,
-you need to download an appropriate version of wxWidgets,
-configure and compile the library, then compile Tex2RTF
-in utils/tex2rtf/src.
-
-------------------------------------------------------------------
-Julian Smart, August 2002
-julian.smart@btopenworld.com
-
-
-
+++ /dev/null
-@techreport{robins87,
-author = {Robins, Gabriel},
-title = {The {ISI} grapher: a portable tool for displaying graphs pictorially (ISI/RS-87-196)},
-institution = {University of South California},
-year = {1987},
-month = {September}
-}
-@book{helpbook,
-author = {Boggan, Scott and Fakas, David and Welinske, Joe}
-, title = {Developing on-line help for {W}indows}
-, publisher = {Sams Publishing}
-, address = {11711 North College, Carmel, Indiana 46032, USA}
-, year = {1993}
-}
-@book{kopka,
-author = {Kopka, Helmut and Daly, Patrick W.}
-, title = {A Guide to LaTeX}
-, publisher = {Addison-Wesley}
-, year = {1993}
-}
-@book{pfeiffer,
-author = {Pfeiffer, Katherine Shelly}
-, title = {Word for Windows Design Companion}
-, publisher = {Ventana Press}
-, year = {1994}
-}
-@manual{smart93a,
-author = {Smart, Julian}
-, title = {wxWindows 1.50 User Manual}
-, publisher = {Artificial Intelligence Applications Institute}
-, organization = {University of Edinburgh}
-, address = {80 South Bridge, Edinburgh, EH1 1HN}
-, year = {1993}
-}
-
+++ /dev/null
-[OPTIONS]
-BMROOT=. ; Assume that bitmaps are where the source is
-TITLE=Tex2RTF
-CONTENTS=Contents
-COMPRESS=HIGH
-
-[FILES]
-tex2rtf.rtf
-
-[CONFIG]
-CreateButton("Up", "&Up", "JumpId(`tex2rtf.hlp', `Contents')")
-BrowseButtons()
-
-[MAP]
-
-[BITMAPS]
-
+++ /dev/null
-; Tex2RTF initialisation file for 16-bit WinHelp
-runTwice = yes
-titleFontSize = 12
-authorFontSize = 10
-chapterFontSize = 12
-sectionFontSize = 12
-subsectionFontSize = 12
-headerRule = yes
-footerRule = yes
-useHeadingStyles = yes
-contentsDepth = 2
-listItemIndent=40
-winHelpContents = yes
-winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95
-generateHPJ = yes
-;;
-;; These two are for generating MS HTML Help project, contents and index files.
-;;
-htmlWorkshopFiles = true
-htmlIndex = true
-
-; Finally, a way to specify face names
-htmlFaceName = "Arial, Lucida, Helvetica"
-
-htmlBrowseButtons = bitmap
-winHelpTitle = "Tex2RTF"
-truncateFilenames = no
-combineSubSections = yes
-htmlIndex = yes
-htmlFrameContents = no
+++ /dev/null
-\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}%
-%\input{psbox.tex}
-\newcommand{\commandref}[2]{\helpref{{\tt $\backslash$#1}}{#2}}%
-\newcommand{\commandrefn}[2]{\helprefn{{\tt $\backslash$#1}}{#2}\index{#1}}%
-\newcommand{\commandpageref}[2]{\latexignore{\helprefn{{\tt $\backslash$#1}}{#2}}\latexonly{{\tt $\backslash$#1} {\it page \pageref{#2}}}\index{#1}}%
-\newcommand{\indexit}[1]{#1\index{#1}}%
-\newcommand{\inioption}[1]{{\bf {\tt #1}}\index{#1}}%
-\parskip=10pt%
-\parindent=0pt%
-%\backgroundcolour{255;255;255}\textcolour{0;0;0}% Has an effect in HTML only
-\winhelpignore{\title{Manual for Tex2RTF 2.0: A \LaTeX\ to RTF and HTML converter}%
-\author{Julian Smart}%
-\date{November 1999}%
-}%
-\winhelponly{\title{Manual for Tex2RTF 2.0}%
-\author{by Julian Smart\\$$\image{1cm;0cm}{tex2rtf.wmf}$$}%
-}%
-\makeindex%
-\begin{document}%
-\maketitle%
-\pagestyle{fancyplain}%
-\bibliographystyle{plain}%
-\pagenumbering{roman}%
-\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-\tableofcontents%
-
-\chapter*{Copyright notice}%
-\setheader{{\it COPYRIGHT}}{}{}{}{}{{\it COPYRIGHT}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-Copyright (c) 1997 Julian Smart.
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose is hereby granted without fee, provided that the
-above copyright notice, author statement and this permission notice appear in
-all copies of this software and related documentation.
-
-THE SOFTWARE IS PROVIDED ``AS-IS'' AND WITHOUT WARRANTY OF ANY KIND, EXPRESS,
-IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
-IN NO EVENT SHALL JULIAN SMART OR THE ARTIFICIAL INTELLIGENCE
-APPLICATIONS INSTITUTE OR UNIVERSITY OF EDINBURGH BE LIABLE FOR ANY
-SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY
-OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
-
-\chapter{Introduction}%
-\pagenumbering{arabic}%
-\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-This document describes a utility for converting \popref{\LaTeX}{latexgloss}\ files into
-several other formats.
-
-Only a subset of \LaTeX\ can be processed by this utility, especially
-since the target document language will never perfectly match \LaTeX.
-Whether the quality of the results is good enough will depend upon the
-application and your own expectations. {\it This caveat is worth emphasizing}, because
-many people assume that any old \LaTeX\ document will go through without modification: it might,
-but the chances are you'll need to modify it a bit for Tex2RTF. Tex2RTF was written with
-portable document maintenance and generation in mind, with less emphasis on accepting all \LaTeX\ syntax.
-You have been warned!
-
-Tex2RTF is heavily biased towards making on-line, hypertext versions of
-\rtfsp\LaTeX\ documents, but the \popref{RTF}{rtf} converter can be used to generate linear,
-paper-based documents too.
-
-The latest version of Tex2RTF, plus source code, can be accessedfrom:
-
-\begin{verbatim}
-http://web.ukonline.co.uk/julian.smart/tex2rtf
-ftp://www.remstar.com/pub/wxwin/tex2rtf
-\end{verbatim}
-
-It is available in Sun Open Look, Motif, Windows 3.1, Windows 95/NT, and
-non-GUI UNIX versions.
-
-Tex2RTF was developed using the free Open Look, Motif and Windows 3.1
-C++ class library \popref{wxWidgets}{wxwidgets}.
-
-\section{Status of Tex2RTF}\index{status of Tex2RTF}%
-
-Windows HTML help, and wxWidgets 2 wxHTML help, are now catered for using
-the htmlWorkshopFiles setting.
-
-Tex2RTF is very rarely updated these days: it would be nice to
-rewrite the parser (and indeed the rest of it) at some point,
-to improve error reporting, space handling and ability to
-handle more advanced Tex/Latex commands.
-
-\section{Acknowledgements}\index{acknowledgements}%
-
-Thanks are due to the many people in AIAI and on the Internet at large
-who have pointed out bugs or shortcomings in Tex2RTF. Michel Lavaud has been
-a great help in giving advice for improvements to the manual.
-
-\section{Change log}\index{change log}%
-
-Version 2.0, August 24th 1999
-
-\begin{itemize}\itemsep=0pt
-\item Added htmlWorkshopFiles setting, to output .hpp, .hhc
-and .hhk (HTML Workshop) files, for generating MS HTML Help or wxHTML Help.
-\end{itemize}
-
-Version 1.64, October 20th 1998
-
-\begin{itemize}\itemsep=0pt
-\item Added \verb$\insertatlevel$ command.
-\end{itemize}
-
-Version 1.63, October 21st 1997
-
-\begin{itemize}\itemsep=0pt
-\item Debugged problem with Word bookmarks not being inserted for unnumbered
-sections.
-\end{itemize}
-
-Version 1.62, August 18th 1997
-
-\begin{itemize}\itemsep=0pt
-\item Added contributed changes by Andreas Münzenmaier to support German
-accents by allowing the characters to be placed in input files, and also
-converting them back to character codes in the WinHelp {\tt .cnt} file.
-\item Now \verb$\helpref$ causes page references to be inserted in linear RTF,
-or section references if not on Word mode.
-\item WinHelp table caption bug fixed.
-\end{itemize}
-
-Version 1.61, June 11th 1997
-
-\begin{itemize}\itemsep=0pt
-\item \verb$\fcol$ now works in HTML using the FONT tag.
-\item \verb$\twocollist$ works in indented paragraphs, and is now
-implemented properly using tables in HTML.
-\item New boolean option {\bf combineSubSections} added, which switches off
-the generation of separate HTML files below section level. This can reduce the
-number of HTML files substantially.
-\end{itemize}
-
-Version 1.60, February 18th 1997
-
-\begin{itemize}\itemsep=0pt
-\item The index command now allows complex LaTeX instead of inserting the
-first argument verbatim.
-\end{itemize}
-
-Version 1.59, February 14th 1997
-
-\begin{itemize}\itemsep=0pt
-\item Added special processing for a chapter called Popups.
-\end{itemize}
-
-Version 1.58, August 1st 1996
-
-\begin{itemize}\itemsep=0pt
-\item Added HTML settings: backgroundImage, backgroundColour, textColour,
-linkColour, followedLinkColour.
-\item Added \verb$\backgroundimage$, \verb$\backgroundcolour$, \verb$\linkcolour$,
-\verb$followedLinkColour$. \verb$\background$ now obsolete (but behaviour is
-backward compatible).
-\item The default background colour is now white.
-\item Debugged HTML \verb$\ss$ (put in wrong place in code).
-\end{itemize}
-
-Version 1.57, July 27th 1996
-
-\begin{itemize}\itemsep=0pt
-\item Added upperCaseNames setting; now all links in HTML files are in lower
-case unless specified otherwise.
-\end{itemize}
-
-Version 1.56, May 25th 1996
-
-\begin{itemize}\itemsep=0pt
-\item Debugged \verb$\special$ processing for HTML (escaped characters such ampersand).
-\item Added contentsDepth for Word RTF contents page.
-\item Removed overlapping href in HTML pages.
-\end{itemize}
-
-Version 1.55, May 6th 1996
-
-\begin{itemize}\itemsep=0pt
-\item \verb$\verb$ support corrected for HTML.
-\item Added {\it abstractName} setting.
-\item Debugged incorrect centring for HTML buttons.
-\end{itemize}
-
-Version 1.54, Feburary 28th 1996
-
-\begin{itemize}\itemsep=0pt
-\item Bug fix for 24-bit bitmap inclusion when generating RTF:
-caused a floating point error.
-\item Added htmlIndex setting, to generate an {\tt .htx} index file of an HTML document for
-use in wxHelp version 2 or other programs.
-\item Fixed header/footer bug.
-\item Change colons to spaces for WinHelp RTF keywords, since the colon has a specific meaning in WinHelp.
-\end{itemize}
-
-Version 1.53, January 1995
-
-\begin{itemize}\itemsep=0pt
-\item Now stores paths from file inclusions, so that if you include
-a file A from a separate directory, which then includes a file B
-relative to that directory, Tex2RTF will search in the path
-of A to find file B.
-\end{itemize}
-
-Version 1.52, December 1995
-
-\begin{itemize}\itemsep=0pt
-\item \verb$\helpref$ and related commands now generate italicized instead
-of bold `anchor' text for linear formats.
-\item Cured bug where Tex2RTF could hang on start up, while reading
-the {\tt tex2rtf.ini} file. This occurred when a comment finished with
-the end of file.
-\item Split the commands reference in two (\LaTeX\ and Tex2RTF commands),
-and added a {\it Commands by category} section.
-\item Removed a bug that caused HTML output to be garbled on the
-second pass.
-\end{itemize}
-
-Version 1.51: Windows 95 enhancements.
-
-\begin{itemize}\itemsep=0pt
-\item Added settings winHelpContents (for generating {\tt .cnt} file), winHelpVersion (for specifying
-target version of WinHelp).
-\item Added space to non-scrolling region of topic.
-\item If winHelpVersion is 4, makes non-scrolling region grey and the rest yellow.
-\item Added \verb$\settransparency$ command for WinHelp 4 transparent bitmaps.
-\end{itemize}
-
-Version 1.50:
-
-\begin{itemize}\itemsep=0pt
-\item Tidied up HTML generation (headers and bodies in the right places).
-\item Eliminated extra space after verbatim in HTML.
-\item Added support for simple tables in HTML.
-\item Added \verb$\textcolour$, \verb$\background$ for colouring text and background in HTML.
-\item Added \verb$\copyright$, \verb$\registered$ symbols in HTML.
-\item Added \verb$\imagel$, \verb$\imager$ for left and right aligned images
-in HTML.
-\item Added \verb$\brclear$ for clearing image alignment in HTML.
-\item Added \LaTeX\ font size support in HTML (\verb$\small$, \verb$\large$ etc.) using Netscape font extensions.
-\item HTML button-bar change: always shows the same buttons, but may make one or more insensitive. Changing button positions
-could be very annoying.
-\item Tidied up RTF generation for non-Word viewers ({\it useWord} set to {\it false}). Will now look reasonable using
-Windows 95 Quick View and WordPad: WordPad doesn't do tables but does bitmaps, and QuickView does tables but not
-bitmaps. Such is life.
-\end{itemize}
-
-Version 1.49:
-
-\begin{itemize}\itemsep=0pt
-\item Cured some bugs (char used for fgetc instead of int) so now compiles for
-WIN32s.
-\end{itemize}
-
-Version 1.48:
-
-\begin{itemize}\itemsep=0pt
-\item Added some LaTeX2e fonts commands such as \verb$\rmfamily$, \verb$\textrm$, \verb$\emph$.
-Most of these are aliases for other commands.
-\end{itemize}
-
-Up to version 1.47:
-
-\begin{itemize}\itemsep=0pt
-\item Added \verb$\backslashraw$, \verb$\rbraceraw$ and \verb$\lbraceraw$ commands
-to help output arbitrary RTF.
-\item Added \verb$\sethotspotcolour$, \verb$\sethotspotunderline$ commands for controlling
-WinHelp hotspot appearance.
-\item Added truncateFilenames option.
-\item Improved HTML inline image handling.
-\end{itemize}
-
-Up to version 1.46:
-
-\begin{itemize}
-\itemsep=0pt
-\item Added \verb$\urlref$ command for specifying HTML URLs.
-\item Started support for translating .SHG files to HTML .map files
-(this works if compiled under Borland, not MS VC++ for some reason!)
-\item Fixed nasty memory bug in HTML code (thanks Petr).
-\end{itemize}
-
-Version 1.40:
-
-\begin{itemize}
-\itemsep=0pt
-\item Added {\it generateHPJ} option for generating the .HPJ WinHelp project file
-\item Added support for DDE via a small command set
-\end{itemize}
-
-Version 1.39:
-
-\begin{itemize}
-\itemsep=0pt
-\item Option for using Word's INCLUDEPICTURE or IMPORT field, since the method that
-works for Works, doesn't work for Word! See {\it bitmapMethod} in the
-settings section.
-\end{itemize}
-
-Version 1.37-1.38:
-
-\begin{itemize}
-\itemsep=0pt
-\item Improved bibliography reading and cured some minor bugs
-\item Added \verb$\ss$ German sharp s
-\item Added rudimentary \verb$\special$ command (simply copies the argument
-to the output)
-\item Added missing '.' in subsubsection reference
-\item Added primitive internationalisation support with contentsName, tablesName etc.
-\end{itemize}
-
-Version 1.36:
-
-\begin{itemize}
-\itemsep=0pt
-\item All HTML special characters now correctly delimited by a semicolon.
-\item Cured HTML section-duplicating bug I introduced in 1.35.
-\item Cured too much spacing after sections in RTF, introduced in 1.35.
-\end{itemize}
-
-Version 1.35:
-
-\begin{itemize}
-\itemsep=0pt
-\item Added TCHECK tool, to help track down common Tex2RTF syntax problems.
-\item Included Kresten Thorup's LACHECK \LaTeX\ checking tool with DOS executable.
-\item Now ignores \verb|\@| command.
-\item Table of contents now includes numbered subsubsections.
-\end{itemize}
-
-Version 1.34:
-
-\begin{itemize}
-\itemsep=0pt
-\item Added \verb$\multicolumn$ `support' to stop RTF readers crashing.
-\item Added {\it useWord, defaultColumnWidth, compatibility} options to {\tt .ini} file.
-\item \verb$\comment$ environment now doesn't complain about unknown syntax.
-\item Added \verb$\toocomplex$ environment that treats its contents as
-verbatim in output, treated as normal output in true \LaTeX.
-\item End-of-line comments allowed in in {\tt .ini} files, using semicolon,
-percent or hash characters to denote a comment.
-\item For linear RTF, Word for Windows support for \verb$\printindex$,\rtfsp
-\verb$\index$, \verb$\pageref$, \verb$\listoftables$, \verb$\listoffigures$, contents page.
-\item Added RTF support for various symbols.
-\item Added colour support, with \verb$\definecolour$, \verb$\fcol$ and \verb$\bcol$ commands.
-\item Fixed some bugs: page numbering problems, macros deleted after first pass.
-\end{itemize}
-
-Version 1.33:
-
-\begin{itemize}
-\itemsep=0pt
-\item Added -charset command-line switch.
-\item Added \verb$\itemsep$, \verb$\twocolumn$, \verb$\onecolumn$, \verb$\setfooter$, \verb$\setheader$, \verb$\pagestyle$,
-\verb$\pagenumbering$, \verb$\thechapter$, \verb$\thesection$, \verb$\thepage$, \verb$\thebibliography$, \verb$\bibitem$ commands.
-\item New environment called \verb$\twocollist$ for making two-column lists,
-with formatting optimized for target file format.
-\item New \verb$\indented$ environment for controlling indentation.
-\item List indentation and bulleting improved.
-\item Added commands \verb$\normalbox$, \verb$\normalboxd$ for putting borders around text.
-\item Many options can now be specified in the {\tt .ini} file along with custom macros.
-\item Cured bug that put too much vertical space after some commands.
-\item Improved table formatting.
-\item Optional `Up' button in WinHelp files for easier navigation.
-\item Verbatim lines followed by \verb$\par$ in RTF, to improve WinHelp wrapping.
-\item Conversion may now be aborted under Windows by attempting to close the application.
-\item Added conditional output for all formats: \verb$\latexignore$, \verb$\latexonly$, \verb$\rtfignore$, \verb$\rtfonly$,
-\verb$\winhelpignore$, \verb$\winhelponly$, \verb$\htmlignore$, \verb$\htmlonly$, \verb$\xlpignore$, \verb$\xlponly$.
-\item HTML generator can now add Contents, Up, $<<$ and $>>$ buttons (text or bitmap) to
-each page except titlepage.
-\end{itemize}
-
-Version 1.32:
-
-\begin{itemize}
-\itemsep=0pt
-\item \verb$\footnote$ command now supported in WinHelp RTF, and \verb$\footnotepopup$\rtfsp
-added.
-\end{itemize}
-
-Version 1.31:
-
-\begin{itemize}
-\itemsep=0pt
-\item \verb$\footnote$ command now supported, in linear RTF only.
-\item Added {\tt -bufsize} option, for converting large documents.
-\end{itemize}
-
-Version 1.30:
-
-\begin{itemize}
-\itemsep=0pt
-\item \verb$\image$ command now scales metafiles (but not bitmaps).
-\item Fixed macro loading bug, now informs the user of the found macro filename.
-\item Now supports paragraph and subparagraph commands.
-\item Support for some accents added.
-\item \verb$\verb$ command now supported.
-\item Bug in subsubsection handling fixed.
-\item Can save conversion log in a text file.
-\end{itemize}
-
-Version 1.22:
-
-\begin{itemize}
-\itemsep=0pt
-\item More informative, warns against use of some commands.
-\item Added compile-time support for non-GUI environments (such as plain UNIX).
-\item Improved HTML support.
-\end{itemize}
-
-\chapter{Running Tex2RTF}\index{running Tex2RTF}%
-\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-Tex2RTF may be run in a number of ways: with or without command line arguments,
-interactively or in batch mode, and with an optional initialisation file
-for specifying \LaTeX\ macros and detailed options.
-
-Tex2RTF accepts two arguments (input and output filenames) and trailing
-(optional) switches. If both filenames are given, the utility will work
-in batch mode. Otherwise, if Tex2RTF has been compiled for GUI
-operation, a main window will be shown, with appropriate menu items for
-selecting input and output filenames, starting off the conversion
-process, and so on.
-
-Note that if the file {\tt bullet.bmp}\index{bullets} is found by Tex2RTF, this bitmap
-will be used as the bullet for items in \verb$\itemize$ lists, for WinHelp
-output. Otherwise, a symbol will be inserted (linear RTF) or bold `o'
-will be used instead (all other formats).
-
-Syntax error reporting is fairly minimal. Unrecognised macro errors may
-actually be produced by an unbalanced brace or passing the wrong number of
-arguments to a command, so look in the vicinity of the error for the
-real cause.
-
-\normalbox{Some of the syntax that is OK for true \LaTeX\ but which trips up
-Tex2RTF, may be detected by the TCHECK\index{TCHECK} program included in the tools
-directory of the Tex2RTF distribution. Some \LaTeX\ errors may be picked up
-by the LACHECK\index{LACHECK} program, also found in the tools directory.}
-
-It is recommended that you run Tex2RTF twice in order to be sure of
-resolving all references and including an up-to-date contents page.
-
-If importing RTF files into Word for Windows\index{Microsoft Word}, you may need to reformat
-the document. The easiest way to do this is to select all text with
-CTRL-A, then reformat with F9. Reformat again to ensure all references
-are resolved. For the second format, respond with {\it Update Entire
-Table} to prompts.
-
-\winhelponly{
-\section{Tex2RTF Interface}
-
-This is the Tex2RTF interface under Windows. Click on an area of the
-picture for more information.
-
-$$\imagemap{1cm;0cm}{screen}{mapref}$$
-
-\subsection{Menu bar}\label{menubar}
-
-Use the menubar for interactive operations.
-
-\subsection{Message area}\label{messagearea}
-
-Tex2RTF writes warning and error messages on this window.
-
-\subsection{Status line}\label{statusline}
-
-Displays help on menu items as the user drags the cursor over the menus.
-
-\subsection{Mode indicator}\label{modeindicator}
-
-Displays the output mode Tex2RTF is currently in.
-}
-
-\section{Command line arguments}\index{command line arguments}%
-
-These are the optional arguments you may give Tex2RTF on the command line.
-
-\twocolwidtha{5cm}
-\begin{twocollist}
-\twocolitem{{\bf -bufsize}}{Specifies buffer size in K (default 60 under Windows,
-500 under UNIX). Large files (particularly large verbatim environments)
-may require a large buffer size, equal to the largest argument of a \LaTeX\ command.
-Note that this value may not be larger than 64 under Windows.}
-\twocolitem{{\bf -html}}{Specifies HTML (World Wide Web) output.}
-\twocolitem{{\bf -interactive}}{Forces interactive mode even if both
-filenames are given.}
-\twocolitem{{\bf -charset charset}}{Specifies a character set for
-RTF production. This can be one of ansi, mac, pc, and pca.
-The default is ansi.}
-\twocolitem{{\bf -macros filename}}{Specifies a file for the custom macro
-file -- see \helpref{Macro not found error}{macronotfound}.}
-\twocolitem{{\bf -rtf}}{Specifies linear RTF output.}
-\twocolitem{{\bf -sync}}{Forces synchronous mode (no yielding to other
-processes) -- usually use this in non-interactive mode.}
-\twocolitem{{\bf -twice}}{Tells Tex2RTF to run the conversion twice to ensure all
-references and citations are resolved and the contents page included.}
-\twocolitem{{\bf -winhelp}}{Specifies Windows Help RTF output.}
-\end{twocollist}
-
-\section{Initialisation file syntax}\label{inifile}\index{initialisation file}%
-
-The initialisation file contains further detailed options for
-customising Tex2RTF's behaviour. A file may be specified
-with the {\tt -macros} command line switch, otherwise Tex2RTF
-looks for the file {\tt tex2rtf.ini} in the working directory
-or input file directory.
-
-The file may comprise macro\index{macros} (command) definitions or option settings.
-
-The syntax for a macro definition is:
-
-\begin{verbatim}
- \name [number of args] {...LaTeX code...}
-\end{verbatim}
-
-For example:
-
-\begin{verbatim}
- \crazy [2]{{\bf #2} is crazy but #1 is not}
- \something [0]{}
- \julian [0]{Julian Smart}
-\end{verbatim}
-
-The syntax for an option setting is:
-
-\begin{verbatim}
- name = value
-\end{verbatim}
-
-or
-
-\begin{verbatim}
- name = "value"
-\end{verbatim}
-
-For example:
-
-\begin{verbatim}
- conversionMode = RTF
- runTwice = true
- titleFontSize = 12
- authorFontSize = 10
- headerRule = yes
- footerRule = yes
-\end{verbatim}
-
-Options expecting boolean values accept {\it 1, 0, true, false, yes, no} in any combination of upper or
-lower case.
-
-End-of-line comments are allowed in an initialisation file, using the
-hash, semicolon or percent signs to denote the start of a comment, which runs
-until the end of the line.
-
-\subsection{Tex2RTF options}\index{options in initialisation file}\index{tex2rtf.ini}\index{initialisation file}\index{macros}%
-
-These are the allowable options in an initialisation file.
-
-\subsubsection{General options}\label{generaloptions}
-
-\twocolwidtha{5cm}
-\begin{twocollist}
-\htmlignore{\twocolitemruled{Option}{Description}}
-\twocolitem{\inioption{compatibility}}{Set to true for maximum \LaTeX\ compatibility, e.g. if
-tables crash RTF readers. Should be false (default) if the Tex2RTF guidelines
-are followed, e.g. use of $\backslash${\tt row} command in tabular environment.}
-\twocolitem{\inioption{conversionMode}}{One of RTF, WinHelp, XLP (or wxHelp), and HTML.}
-\twocolitem{\inioption{ignoreInput}}{Adds the filename to the list of files ignored by the $\backslash${\tt input} command.
-The only default filename in the list is {\tt psbox.tex}.}
-\twocolitem{\inioption{isInteractive}}{If true, runs in interactive mode (the default).}
-\twocolitem{\inioption{runTwice}}{If true, runs the converter twice.}
-\twocolitem{\inioption{ignoreBadRefs}}{If true (or yes), ignores bad helpref references
-and simply writes the text in the first argument. Useful when a program such as HelpGen
-generates references to classes documented in another manual.}
-\end{twocollist}
-
-\subsubsection{Presentation options}\index{options, presentation}%
-
-\begin{twocollist}
-\htmlignore{\twocolitemruled{Option}{Description}}
-\twocolitem{\inioption{authorFontSize}}{Specifies the point size for the author and date (RTF only).}
-\twocolitem{\inioption{chapterFontSize}}{Specifies the point size for chapter headings (RTF only).}
-\twocolitem{\inioption{documentFontSize}}{One of 10, 11 and 12, to specify the main font size
-independently of the \LaTeX\ document style command.}
-\twocolitem{\inioption{sectionFontSize}}{Specifies the point size for section headings (RTF only).}
-\twocolitem{\inioption{subsectionFontSize}}{Specifies the point size for subsection headings (RTF only).}
-\twocolitem{\inioption{titleFontSize}}{Specifies the point size for the title (RTF only).}
-\twocolitem{\inioption{chapterName}}{The string used when referencing chapters. The default is ``chapter".}
-\twocolitem{\inioption{sectionName}}{The string used when referencing sections. The default is ``section".}
-\twocolitem{\inioption{subsectionName}}{The string used when referencing subsections. The default is ``subsection".}
-\twocolitem{\inioption{subsubsectionName}}{The string used when referencing subsubsections. The default is ``subsubsection".}
-\twocolitem{\inioption{indexName}}{The string used for printing the index heading. The default is ``Index".}
-\twocolitem{\inioption{contentsName}}{The string used for printing the contents heading. The default is ``Contents".}
-\twocolitem{\inioption{abstractName}}{The string used for printing the abstract heading. The default is ``Abstract".}
-\twocolitem{\inioption{tablesName}}{The string used for printing the list of tables heading. The default is ``List of Tables".}
-\twocolitem{\inioption{tableName}}{The string used when referencing a table. The default is ``table".}
-\twocolitem{\inioption{figuresName}}{The string used for printing the list of figures heading. The default is ``List of Figures".}
-\twocolitem{\inioption{figureName}}{The string used when referencing a figure. The default is ``figure".}
-\twocolitem{\inioption{glossaryName}}{The string used for printing the glossary heading. The default is ``Glossary".}
-\twocolitem{\inioption{referencesName}}{The string used for printing the references heading. The default is ``References".}
-\end{twocollist}
-
-\subsubsection{RTF and WinHelp options}\label{rtfwinhelpoptions}\index{options, RTF}\index{RTF}%
-
-\begin{twocollist}
-\htmlignore{\twocolitemruled{Option}{Description}}
-\twocolitem{\inioption{bitmapMethod}}{Can be ``hex'' (embed the hex data in the file with a $\backslash$dibitmap keyword),
-``includepicture'' (use the MS Word 6.0 INCLUDEPICTURE field) or ``import'' (an earlier name
-for INCLUDEPICTURE). ``hex'' may be used for importing into MS Works, but this doesn't work
-for Word 6.0. The default is ``includepicture''.}
-\twocolitem{\inioption{contentsDepth}}{The depth of headings that is displayed in the table of contents. The default
-is 4 but you may wish to reduce this, for example for manuals that document C++ and have a large number of
-headings for member functions.}
-\twocolitem{\inioption{defaultColumnWidth}}{The width in points for columns in tables
-where the width of the column is not set by using {\it p} in the tabular
-argument. The default is 100.}
-\twocolitem{\inioption{footerRule}}{If true, draws a rule above footers (linear RTF only).}
-\twocolitem{\inioption{generateHPJ}}{If true, generates a .HPJ project file (WinHelp mode only).}
-\twocolitem{\inioption{headerRule}}{If true, draws a rule below headers (linear RTF only).}
-\twocolitem{\inioption{listLabelIndent}}{Specifies the size of list item label indentation, in points.
-The default is 18.}
-\twocolitem{\inioption{listItemIndent}}{Specifies the size of list item indentation, in points. The default
-is 40.}
-\twocolitem{\inioption{indexSubsections}}{If true (the default), subsection and subsubsection
-titles are indexed in RTF mode.}
-\twocolitem{\inioption{mirrorMargins}}{If true, margins are mirrored in twosided documents (linear RTF only).}
-\twocolitem{\inioption{useWord}}{If true (the default), Word for Windows RTF
-formatting is used where possibly, e.g. for the table of contents, list of
-tables, and list of figures.}
-\twocolitem{\inioption{useHeadingStyles}}{If true (the default), sections are marked with
-appropriate heading styles for generating the table of contents in RTF.}
-\twocolitem{\inioption{useUpButton}}{If true (the default), WinHelp files will be generated with an {\bf Up}\rtfsp
-button to make browsing easier. Note that you need to put an extra line in the CONFIG section
-of your .HPJ file:
-
-{\tt CreateButton("Up", "\&Up", "JumpId(`name.hlp', `Contents')")}
-
-where {\tt name.hlp} is the name of your help file.}
-%%% NEED TO BREAK THE LIST AT THE PAGE BREAK BECAUSE LATEX IS STUPID
-%%% UNFORTUNATELY, Tex2RTF IS STUPIDER SO NEED TO COMMENT OUT THIS
-%%% LINE WHEN MAKING HTML, RTF, XLP
-%\latexonly{\end{twocollist}\newpage\begin{twocollist}}
-\twocolitem{\inioption{winHelpContents}}{If yes, ok or true, a WinHelp {\tt .cnt} file will be generated (used in Windows 95 for either old WinHelp
-files or new WinHelp 4 files).}
-\twocolitem{\inioption{winHelpVersion}}{The version of WinHelp being targetted. This affects the generated {\tt .hpj} file and features
-such as transparent bitmaps which are new to version 4 or later. The default is 3.}
-\twocolitem{\inioption{winHelpTitle}}{Windows Help file title, inserted into the project file if {\it generateHPJ} is true.}
-\end{twocollist}
-
-\subsubsection{HTML options}\label{htmloptions}\index{options, HTML}\index{HTML}%
-
-\begin{twocollist}
-\htmlignore{\twocolitemruled{Option}{Description}}
-\twocolitem{\inioption{htmlBrowseButtons}}{Allows generation of Contents, Up, browse back and browse forward
-buttons on each HTML page except title page. Specify none, text or bitmap. If you specify
-bitmap, make sure that the files {\tt contents.gif}, {\tt up.gif}, {\tt back.gif} and {\tt forward.gif} are in the
-directory where the HTML files will reside: samples are given in the docs directory.}
-\twocolitem{\inioption{truncateFilenames}}{If true, uses {\tt .htm} suffix instead of {\tt .html},
-and truncates filenames within HTML documents.}
-\twocolitem{\inioption{htmlIndex}}{If true, specifies generation of an {\tt .htx} index file for an HTML document.
-This file can be used in wxHelp version 2 or other programs. The file consists of a number of lines,
-each line with three fields separated by bar characters: the indexed phrase, the file, and a label in the file.}
-
-\twocolitem{\inioption{htmlWorkshopFiles}}{If true, specifies generation of {\tt .hpp, .hhc} and {\tt .hhk} files
-which can be used to create both MS HTML Help and wxHTML Help files. wxHTML Help
-is the HTML help facility that can be used by wxWidgets 2 applications (see the wxWidgets manual
-and the wxWidgets HTML sample).}
-\twocolitem{\inioption{upperCaseNames}}{If true, filenames in links are in upper case. By default
-filenames are in lower case.}
-\twocolitem{\inioption{backgroundColour}}{Specifies the RGB background colour for the document, e.g. {\tt 255;255;255} for white.
-The default is white.}
-\twocolitem{\inioption{backgroundImage}}{Specifies the RGB background image for the document, e.g. {\tt tile.gif}.}
-\twocolitem{\inioption{textColour}}{Specifies the RGB text colour for the document, e.g. {\tt 0;0;0} for black.}
-\twocolitem{\inioption{linkColour}}{Specifies the RGB link colour for the document, e.g. {\tt 0;0;255} for blue.}
-\twocolitem{\inioption{followedLinkColour}}{Specifies the RGB followed link colour for the document, e.g. {\tt 0;0;255} for blue.}
-\twocolitem{\inioption{combineSubSections}}{If true (or yes), switches off
-the generation of separate HTML files below section level. This can reduce the
-number of HTML files substantially. A subsection contents list is inserted before
-the first subsection.}
-\twocolitem{\inioption{htmlFaceName}}{A string specifying the overall font face, such as ``"Arial, Lucida, Helvetica".}
-\end{twocollist}
-
-\section{DDE commands}\index{DDE}%
-
-A Windows program can hold a conversation with Tex2RTF using DDE. The Tex2RTF server name is
-``TEX2RTF'', and the topic name to use is also ``TEX2RTF''.
-
-Tex2RTF functionality is accessed using the DDE {\it Execute} message.
-The {\it Execute} data should consist of a command name and possibly one
-argument, e.g.
-
-\begin{verbatim}
- INPUT c:\docs\mine.tex
-\end{verbatim}
-
-If the command is not recognised, a standard TEX2RTF.INI option is assumed.
-
-The {\it Request} DDE message can be used to query the return status of an {\it Execute}
-command, and will be one of {\it OK} (no error), {\it CONVERSION ERROR}, or a more
-specific error string.
-
-The following DDE commands may be used:
-
-\begin{twocollist}
-\htmlignore{\twocolitemruled{Command}{Description}}
-\twocolitem{\inioption{EXIT}}{Takes no argument, and exits Tex2RTF.}
-\twocolitem{\inioption{GO}}{Takes no argument, and initiates the conversion.}
-\twocolitem{\inioption{INPUT}}{Takes a file name as the argument, and sets the input file to be this name.}
-\twocolitem{\inioption{MINIMIZE}}{Takes no argument, and minimizes Tex2RTF.}
-\twocolitem{\inioption{OUTPUT}}{Takes a file name as the argument, and sets the input file to be this name.}
-\twocolitem{\inioption{RESTORE}}{The same as SHOW.}
-\twocolitem{\inioption{SHOW}}{Takes no argument, and unminimizes Tex2RTF.}
-\end{twocollist}
-
-\section{Performance issues}\index{performance}%
-
-Since Tex2RTF reads the whole file into memory, a lot of memory is needed.
-For very large documents, 16MB of RAM is adviseable.
-
-I tested conversion of the wxWidgets 1.63 manual on both VC++ 1.5 and
-Watcom WIN32s versions of Tex2RTF, both running under Windows 3.11 on a
-Gateway P60 with 16MB of RAM and a 2MB disk cache. Two passes were
-made, with 1.5MB of WinHelp RTF being generated. The unoptimized 16-bit
-version took 169 seconds. The optimized WIN32s version took 126 seconds,
-a significant improvement. Systems with faster disk subsystems should see
-an even better relative performance of the 32-bit version.
-
-\chapter{Writing documents with Tex2RTF}\index{LaTeX}%
-\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-\section{Why use \LaTeX?}
-
-\LaTeX\ happens to be a very convenient format if you need to produce
-documents (such as manuals, help facilities, up-to-date information) in
-both printed and on-line media. Being a language rather than a WYSIWYG system,
-it allows explicit specification of layout and document structure, lending
-itself well to hypertext applications and automatic document generation.
-Many people also prefer to use \LaTeX\ for ordinary use since it encourages
-a logical document structure and the user is not distracted by having to perfect
-the appearance; many layout decisions are taken by \LaTeX\ automatically.
-
-Although \LaTeX\ is not as fancy as modern word processors and desk-top
-publishing packages, it is for many purposes quite adequate, and sometimes
-more flexible than its modern counterparts.
-
-The conversion utility gives \LaTeX\ a new lease of life by allowing
-virtually all other wordprocessor formats to be generated from documents
-containing a reasonable subset of \LaTeX\ syntax. From the same \LaTeX\
-sources, we can now generate printed manuals, Windows Help files, \popref{wxHelp}{wxhelp}\rtfsp
-files, RTF-compatible word processor formats such as MS Word, and \popref{HTML}{html}\rtfsp
-files for use in the World Wide Web. Since the conversion tool is
-free, as are \LaTeX, HTML viewers, wxHelp and (effectively) Windows
-Help, there are no financial or time penalties for providing
-documentation in a wide range of printed and hypertext formats.
-
-\section{Help versus the printed page}\index{on-line help}%
-
-The purist may argue, quite rightly, that on-line help systems and
-printed manuals have different characteristics; help windows tend to be
-much smaller than pages, help topics should be more stand-alone than
-pages in a manual, navigation methods are very different, etc. Therefore,
-help systems should be {\it based} on printed documentation but
-separately hand-crafted into hypertext help, preferably by an
-independent person or team.
-
-This might be the ideal, but many organisations or individuals simply
-do not have the time: on-line help wouldn't get done if the
-documentation effort had to be doubled. However, Tex2RTF does provide
-some commands to allow tailoring the documentation to printed or
-on-line form, such as \verb$\helponly$ and \verb$\helpignore$. An awareness
-of the design issues should go a long way to making the compromise
-a good one, so a book such as {\it Developing On-line Help for Windows} \cite{helpbook} is highly recommended.
-
-\section{Output Formats}\index{output formats}%
-
-At present the following output formats are supported:
-
-\begin{itemize}
-\itemsep=0pt
-\item RTF (Rich Text Format)\index{RTF}. This is the most well developed
-converter. RTF is commonly used as a document exchange format amongst
-Windows-based applications, and is the input for the Windows Help
-Compiler. Tex2RTF supports both linear documents and Windows Help
-hypertext format.
-\item HTML (Hypertext Markup Language)\index{HTML}. This an SGML-based format
-commonly used by documents in the World Wide Web distributed hypertext
-system, and formats text dynamically rather like Windows Help.
-\item wxHelp\index{wxHelp}. This is the platform-independent help system for
-the class library wxWidgets (see the wxWidgets User Manual \cite{smart93a}).
-It can display ASCII files with embedded codes
-for changing font styles, but no formatting is done by wxHelp.
-\end{itemize}
-
-\section{What compromises must I make?}\index{compromises}\index{LaTeX}%
-
-As a \LaTeX\ user, you need to be aware that some commands or facilities
-don't transfer to other formats, either because they are not supported
-by the target format or because the converter does not support them.
-Maths formatting is a good example of an unsupported feature.
-
-Sometimes \LaTeX\ facilities must be accessed in a slightly different
-way to support the variety of formats, particularly hypertext formats
-where \LaTeX\ references are often replaced by hypertext jumps (but must
-still look right in printed documentation). Tables don't transfer well
-to RTF and HTML (and not at all to wxHelp) but an attempt is made
-to approximate tables so long as special row commands are used, instead
-of the usual end of row delimiter.
-
-Bibliographies are handled quite well since the utilities can read in\rtfsp
-{\tt .bib} files and resolve citations. Numbers are used in citations;
-the references are not yet sorted alphabetically.
-
-Pictures\index{pictures} are handled in a limited way: if the PSBOX\index{PSBOX} macro package is
-used, an \verb$\image$ command can be used to place Encapsulated PostScript
-files in \LaTeX, and Windows RGB-encoded bitmap files or placeable
-metafiles when converting to RTF.
-
-Nested file inclusion\index{file inclusion} is handled with \verb$\input$, \verb$\include$ and \verb$\verbatiminput$,
-and the comment environment is supported. However, using \verb$\input$\rtfsp
-to include macro packages is not advisable. If you do this,
-make sure you add a line in the Tex2RTF initialisation file to ignore
-this file, unless it's a simple \LaTeX\ file that conforms to Tex2RTF
-restrictions. The file {\tt psbox.tex} is the only file ignored
-by Tex2RTF by default.
-
-Because of the way \LaTeX\ is parsed, some syntax\index{syntax restrictions} has to conform to a
-few simple rules. Commands such as \verb$\bf$ and \verb$\it$ need to occur
-immediately after a left brace, and have a block of their own, since
-the text within their scope is regarded as its argument. This syntax
-means the same thing as using \verb$\begin ... \end$, which is usually
-a one argument command (the argument is the text between the \verb$\begin$\rtfsp
-and \verb$\end$). See \helpref{Space}{space}.
-
-As a Windows hypertext help writer\index{on-line help}, you don't have access to all RTF
-commands but you'll be able to get most of what you want. In particular,
-any \LaTeX\ document you write will automatically be a hypertext
-document, because the converter takes advantage of the hierarchy of
-sections. Further jumps can be placed using the commands
-\rtfsp\commandrefn{label}{label}, \commandrefn{helpref}{helpref},
-\rtfsp\commandrefn{helprefn}{helprefn}, and \commandrefn{popref}{popref}.
-Tex2RTF outputs help files that may be read linearly using the
-\rtfsp$<<$ and $>>$ buttons, with an additional Up button for
-ease of navigation.
-
-When writing HTML, multiple files are generated from one \LaTeX\ file
-since browsing HTML works best with many small files rather than a few
-large ones.
-
-wxHelp files are least well supported since there is no formatting
-support, only font style, sizes and colours. Still, some hypertext help
-support on UNIX/X platforms is better than none. wxHelp is now being rewritten (March 1996)
-to use HTML files.
-
-Sometimes you will use a local macro package that is unrecognised by
-the converters. In this case, you may define a custom macro file
-where macros are defined in terms of supported \LaTeX\ commands
-and text. Even if the result is not the same as in \LaTeX, you
-can probably end up with something adequate, and at least avoid
-undefined macro errors. See \helpref{Initialisation file syntax}{inifile} for
-further information.
-
-\section{Changes to LaTeX syntax}
-
-Here are the conventions you need to observe to satisfy the Tex2RTF
-parser.
-
-\subsection{Space}\label{space}\index{space}%
-
-Tex2RTF attempts to insert spaces where \LaTeX\ assumes whitespace.
-However, for the benefit of RTF conversion, you need to use the \commandrefn{rtfsp}{rtfsp} command
-where a command or brace within a paragraph begins or ends with a macro. For example:
-
-\begin{verbatim}
- Within a paragraph, you need to be careful about commands
- \rtfsp{\it that begin at the start of a line.}
-\end{verbatim}
-
-As normal with \LaTeX, two newlines represents a paragraph break,
-although \commandrefn{par}{par} can also be used at the end of a paragraph.
-
-You need to have a blank line between section and some environment
-commands and the first paragraph or your document will look rather
-weird, e.g. headings running into paragraphs.
-
-wxHelp is more fussy than \LaTeX\ or RTF: you need to use percent
-characters at line ends liberally to eliminate newlines after commands
-on single lines.
-
-\subsection{Command arguments}\index{LaTeX commands}%
-
-Commands that have one or more arguments can be used in the following
-three ways:
-
-\begin{verbatim}
- \bf{Some text.}
-
- \begin{bf}
- Some text.
- \end{bf}
-
- {\bf Some text.}
-\end{verbatim}
-
-The first method is a normal \LaTeX\ command.
-
-The second method is called an {\it environment}; \LaTeX\ has specific
-environments that do not always correspond to normal commands, but
-Tex2RTF recognizes environments and normal commands interchangeably, so
-long as the command has no more than two arguments.
-
-With the third method, it is important that the command has its own
-pair of braces, and that the command immediately follows the first brace.
-Otherwise, the parser cannot parse the argument(s) properly.
-With multiple arguments, each should be enclosed in braces.
-
-Optional arguments are specified using square brackets or parentheses.
-
-The braces that start command arguments must not be separated from
-the other arguments by whitespace. For example, the following produces
-an error:
-
-\begin{verbatim}
- \image{5cm;0cm}
- {picture.eps}
-\end{verbatim}
-
-and should be replaced by
-
-\begin{verbatim}
- \image{5cm;0cm}{picture.eps}
-\end{verbatim}
-
-\subsection{Avoid the setlength command}
-
-Using the $\backslash$setlength command doesn't work, since its first
-argument looks like a command with the wrong number of arguments. Use an
-alternative form instead, e.g.
-
-\begin{verbatim}
- \parindent 0pt
-\end{verbatim}
-
-instead of
-
-\begin{verbatim}
- \setlength{\parindent}{0pt}
-\end{verbatim}
-
-\subsection{Units}\index{units}%
-
-Only a subset of \LaTeX\ units may be used for specifying dimensions.
-Valid units are {\tt pt, mm, cm} and {\tt in}. Units should usually
-be specified for dimensions or the results may be unexpected.
-
-\subsection{Labels}\index{labels}%
-
-The \verb$\label$ command may be used for sections and figure captions,
-but must come immediately after the section or caption commands with no
-intervening whitespace.
-
-\subsection{Tables}\label{tables}\index{tables}%
-
-For best layout, table rows should be enclosed in a \verb$\row$\rtfsp
-or \verb$\ruledrow$ command, since Tex2RTF can't cope with parsing
-the \LaTeX\ tabular syntax unaided. However, if you really don't want
-to go through \LaTeX\ files inserting new syntax, set the {\it compatibility}\rtfsp
-flag to TRUE in your {\tt tex2rtf.ini} file. In this mode, Tex2RTF tries to make
-the best of a bad job, but the results won't be optimal (e.g., no table
-borders). Without this flag set, normal \LaTeX\ tables can crash RTF readers
-such as Word for Windows.
-
-\section{Tex2RTF for non-LaTeX users}\index{LaTeX}%
-
-You don't need to have \LaTeX\ installed to use Tex2RTF. You
-can still output RTF files to be imported into your favourite
-word processor, and hypertext files for on-line help.
-
-This chapter gives a very brief introduction to \LaTeX. For further
-information, Kopka and Daly's {\it A Guide to \LaTeX} \cite{kopka} is
-recommended.
-
-\subsection{What is \LaTeX?}
-
-\LaTeX\ is a macro package built on top of the typesetting package,
-\TeX. \TeX\ was written by Donald Knuth in the 1970s, and Leslie
-Lamport wrote \LaTeX\ as a higher-level, easier way to write \TeX.
-
-\TeX\ was quite advanced for its day, and is still used (particularly by
-academics) because of its free availability and its flexibility in
-typesetting maths and other symbols. It's more like a programming
-language than a word processor, with embedded commands prefixed by a
-backslash and block structure. Like programs, \TeX\ documents are
-processed by a `compiler', outputting a .dvi file, which is a device
-independent file which can be read by many converters for output
-onto physical devices, such as screens and printers.
-
-A reason for its longevity is the ability to add facilities to
-\TeX, using macro packages that define new commands.
-
-\LaTeX\ is the most popular way to write \TeX. Although WYSIWYG
-word processors and DTP packages are outstripping \LaTeX, the increasing
-interest in hypertext and mark-up languages makes \LaTeX\ relevant as
-a similar language to SGML documents (such as World Wide Web HTML files).
-
-Also, languages such as \LaTeX\ (and Rich Text Format, which it resembles
-in many ways) are {\it complementary} to WYSIWYG packages. These languages
-allow automatic production and translation of documents, where manual
-mark-up is impractical or undesirable.
-
-Since the source code of \TeX\ and \LaTeX\ is in the public domain,
-there are many free and commercial implementations of \LaTeX\ for almost
-every computer in existance. Of PC implementations, EmTeX is arguably
-the best and most complete. You can download it from various FTP sites.
-
-If you don't want to use \LaTeX\ itself, you may wish to use a program
-called lacheck to check your documents before using Tex2RTF, since it
-catches some mistakes that Tex2RTF doesn't.
-
-\subsection{Document structure}
-
-Here is a sample of a typical \LaTeX\ document:
-
-\begin{verbatim}
- \documentstyle[a4,texhelp]{report}
- \title{A title}
- \author{Julian Smart}
- \date{October 1993}
- \begin{document}
- \maketitle
-
- \chapter{Introduction}
-
- ...
-
- \section{A section}
-
- ...
-
- \end{document}
-\end{verbatim}
-
-The first line is always a \verb$\documentstyle$ command. The square brackets
-enclose optional {\it style} files (suffix {\tt .sty}) that alter the appearance
-of the document or provide new commands, and the curly brackets enclose
-the mandatory style, in this case `report'.
-
-Before the document begins properly with \verb$\begin{document}$,
-you can write various commands that have an effect on the appearance of the
-document or define title page information. The \verb$\maketitle$ command
-writes the title page using information defined previously (title, author,
-date).
-
-A report has chapters, which are divided into sections, and can be further
-divided into subsections and subsubsections. To start a new section, you
-write the appropriate section command with the section heading; there is
-no specific end section command, since a new section heading or the end
-of the document will indicate the end of the previous section.
-
-An article is divided into sections, subsections and subsubsections, but
-has no chapters. This is so an article can be included in a report as a chapter.
-
-Tex2RTF is written to deal with reports best, so stick with the report
-style if you can.
-
-\subsection{Command syntax}
-
-There are several kinds of commands in \LaTeX. Most involve a keyword
-prefixed with a backslash. Here are some examples:
-
-\begin{verbatim}
- \titlepage
-
- \centerline{This is a centred line}
-
- \begin{center}
- This is a centred
- paragraph
- \end{center}
-
- {\bf This is bold font}
-\end{verbatim}
-
-The first example has no arguments. The second has one argument. The third
-example is an {\it environment} which uses the begin and end keywords instead
-of a pair of braces to enclose an argument (usually one). The fourth is an example
-of using a command within a pair of braces: the command applies to the scope within
-the braces. Tex2RTF treats this form as if it were a command with one argument,
-with the right brace delimiting the argument. In this case, the command must
-immediately follow a left brace as shown.
-
-Commands may be nested, but not overlapped.
-
-\subsection{Space}\index{space}%
-
-In \LaTeX, white space is mostly ignored, line breaks make no difference.
-However, \LaTeX\ interprets two successive newlines (a blank line) as
-denoting a paragraph break. You may also use the \verb$\par$ command to end
-a paragraph.
-
-\section{Hypertext features}\index{hypertext}%
-
-\LaTeX\ is inherently suitable for specifying hypertext documents since
-it encourages description of the logical structure of a document using
-section commands. Therefore, a \LaTeX\ document is automatically
-a hypertext document, without any further editing.
-
-For Windows Help, a single RTF file is generated with topics
-corresponding to sections. A top level contents page shows each chapter
-or top-level section, and each chapter or section ends with a list of
-further sections or subsections. Tex2RTF outputs help files that may be
-read linearly using the \rtfsp$<<$ and $>>$ buttons.
-
-Similarly, a single wxHelp XLP file is generated.
-
-For HTML, a different file is generated for each section, since the
-XMOSAIC browser works best with a large number of small files. The files
-are named automatically based on the name of the output file, with the
-contents page filename being formed from the output filename with {\tt
-\_contents} appended to the name. If the truncateFilenames option is
-begin used, then the contents page is just the root name, with a .htm
-suffix. The conversion may result in the generation of several hundred
-files for a large \LaTeX\ input file.
-
-To specify explicit jumps around a hypertext file, the \commandrefn{helpref}{helpref} command is
-used. The first argument is the text to be displayed at the point of reference,
-which will be highlighted in a hypertext file to allow jumping to a reference.
-The second argument is the reference label (there should be a corresponding
-\rtfsp\commandrefn{label}{label} command in the file, following a section or figure).
-
-To use extra Tex2RTF features in proper \LaTeX, such as \verb$\helpref$\rtfsp
-and the C++ and CLIPS class reference documentation features, include
-the style file {\tt texhelp.sty}.
-
-\section{Special sections}\index{special sections}%
-
-The treatment of bibliography, glossary and index are worth special mention.
-
-\subsection{Bibliography}\label{bibsection}\index{bibliography}%
-
-Tex2RTF recognises standard \LaTeX\ bibliography files (usually with {\tt .bib} extension)
-and resolves citations. The \commandrefn{bibliography}{bibliographycmd}\rtfsp
-command reads the given {\tt .bib} file and includes a list of
-references at that point in the input. Only numbered, unsorted
-references are catered for at the moment, with no variation in
-bibliography style. A {\bf References} heading is placed in the contents
-section. Note that Tex2RTF must be run twice to ensure the citations are
-resolved properly.
-
-Tex2RTF can also cope with the \verb$\thebibliography$ environment, with \rtfsp
-\verb$\bibitem$ commands, so long as the text following the first \verb$\bibitem$\rtfsp
-argument is enclosed in braces as if it were a second argument.
-
-\subsection{Glossary}\label{glossarysection}\index{glossary}%
-
-Glossaries are formatted according to the following scheme.
-The \commandrefn{helpglossary}{helpglossary} environment is used together with
-the \commandrefn{gloss}{gloss} command for glossary entries. In \LaTeX\ this
-is interpreted as a description list, and each glossary entry is an item.
-In on-line help, each glossary entry is a section.
-
-A labelled glossary entry command may be referenced by \commandrefn{popref}{popref}\rtfsp
-to provide a quick popup explanation of a term.
-
-\subsection{Index}\index{index}%
-
-The explicit index is assumed to be redundant in on-line help, since
-search facilities are provided. Therefore the \verb$\printindex$ command
-does nothing in on-line versions. In linear RTF an index field is
-added, and \commandrefn{index}{index} marks words for inserting in the index.
-
-In Windows Help, all section headings and C++ function names are treated
-as keywords. A keyword may be ambiguous, that is, refer to more than one
-section in the help file. This automatic indexing may not always be
-adequate, so the \LaTeX\ \commandrefn{index}{index} command may be used
-to add keywords.
-
-In wxHelp, all section headings are indexed.
-
-\section{Authoring HTML documents}
-
-When an HTML document is generated, the suffix `\_contents' is appended
-to the input file root. This will be the contents page for the document.
-A number of further HTML files will be generated, possibly a large number
-for a document with a large number of sections. If you are running
-a 16-bit Windows version of Tex2RTF, you may wish to use
-the {\it truncateFilenames} option to generate DOS filenames with
-appropriately truncated references inside the HTML files.
-
-\normalbox{Tip: to reduce the number of sections generated and make
-the document more linear, you could define new chapter and section
-commands. Alias them to the normal commands in real LaTeX (edit {\tt texhelp.sty}), and
-to appropriate bold/large headings (but not section commands) in
-the Tex2RTF initialisation file.}
-
-Each HTML section file (except for the contents page) is given browse
-buttons, similar to a Windows Help file: Contents, Up, Down, Back, Forward.
-You can set {\it htmlBrowseButtons} to specify whether bitmaps or text should
-be used for these buttons. On a text-only browser, the buttons will show
-as text even if images have been specified.
-
-As well as the usual jumps within a document, you can use the \commandref{urlref}{urlref} command to jump
-to other documents. `Advanced features' which are implemented for HTML include:
-
-\begin{itemize}\itemsep=0pt
-\item Simple tables: \commandref{tabular}{tabular} command
-\item Background colour/bitmap: \commandref{backgroundcolour}{backgroundcolour} and
-\rtfsp\commandref{backgroundimage}{backgroundimage}
-\item Text colour: \commandref{textcolour}{textcolour} command
-\end{itemize}
-
-See \helpref{HTML options}{htmloptions} for relevant initialisation file
-switches.
-
-\section{Authoring Windows Help documents}\index{WinHelp files}%
-
-To produce a Windows Help file, you need to generate a WinHelp RTF file
-with Tex2RTF and then invoke a Windows Help compiler (such as hc505.exe)
-to translate this to a .hlp file.
-
-WinHelp support has split into two streams, Windows 3.1 help format
-and Windows 95 (WinHelp 4) format. You control this with the {\it winHelpVersion} option,
-setting it to 3 for Windows 3.1, and 4 for Windows 95. In the latter case,
-you also need the Help Compiler for Windows (hcw.exe and associated components)
-which are available in the WIN32 SDK and with Windows 95 compilers.
-
-Tex2RTF can produce a Windows 95 {\tt .cnt} file if {\it winHelpContents}\index{CNT file} is switched
-on. This file is used to generate the new-style contents page, allowing
-hierarchical browsing of the topic contents. In fact this file can be used
-with ordinary Windows 3.1 files on Windows 95: so to hedge your bets,
-generate a Windows 3.1 help file along with {\tt .cnt} file.
-
-Tex2RTF also generates (optionally) a {\tt .hpj} (Help Project) file\index{HPJ file} which is
-fed to the help compiler and specifies the RTF file being used amongst
-other things. In WinHelp 4 mode, Tex2RTF adds entries to the project
-to enhance the appearance of the help file. In particular, the
-non-scrolling (topic title) region is coloured grey, and the rest
-is coloured a light yellow in keeping with other Windows 95 help
-files.
-
-\normalbox{Tip: you can maintain two versions of a help file
-by specifying an alternative {\tt .ini} file on the command
-line when invoking Tex2RTF, and compiling to a different directory.
-Tex2RTF instructs the help compiler to use the input file directory
-to find bitmaps and metafiles, so using a different output directory
-is not a problem.}
-
-There is a slight wrinkle with generation of the {\tt .cnt} file:
-to work around a `feature' in the Windows 95 help compiler, Tex2RTF may insert
-extra book icons in the contents page. So your contents page
-may not exactly match the structure in your LaTeX file.
-
-`Advanced features' which are implemented for WinHelp include:
-
-\begin{itemize}\itemsep=0pt
-\item Transparency: \commandref{settransparency}{settransparency} command
-\item Colour: \commandref{definecolour}{definecolour}, \commandref{fcol}{fcol}, \commandref{bcol}{bcol} commands
-\item Hot spot appearance: \commandref{sethotspotcolour}{sethotspotcolour}, \commandref{sethotspotunderline}{sethotspotunderline} commands
-\end{itemize}
-
-Tex2RTF automatically generates browse buttons for jumping to the
-above, previous and next topics.
-
-See \helpref{RTF/WinHelp options}{rtfwinhelpoptions} for
-relevant initialisation file switches.
-
-\section{Authoring linear RTF documents}\index{RTF}%
-
-Linear RTF documents come in two main flavours. It can produce simple
-RTF that can be read by a wide variety of readers, such as
-Windows 95 WordPad, the Windows 95 viewer, and most word processors.
-Tex2RTF can also output MS Word compatible RTF which has special
-fields for contents page and index formatting, headings, and
-other enhancements.
-
-Use the {\it useWord} initialisation file flag to switch Word mode
-on or off.
-Hypertext links (using \verb$\helpref$ and other commands) will be formatted as
-bold `anchor' text plus a section or figure number in parentheses.
-
-In Word mode, using an index section generates a proper Word index.
-Similarly, a Word table of contents, list of figures, list of tables
-and page reference may be generated.
-
-See \helpref{RTF/WinHelp options}{rtfwinhelpoptions} for
-relevant initialisation file switches.
-
-\section{Authoring wxHelp documents}\index{wxHelp}%
-
-The wxHelp (.xlp) file is the most basic kind of file that Tex2RTF
-can handle. Since spacing is passed through to the output, you need to
-format your input document appropriately, with lines of reasonable length.
-
-The generated xlp file is an ASCII file that can be read directly by
-wxHelp, the generic wxWidgets help viewer.
-
-\chapter{Command reference}\index{command reference}%
-\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-The following lists commands which are recognised by the converters. The reader
-can assume that commands not mentioned here are unrecognised or ignored.
-
-Each command is listed with its name, the number of arguments it takes
-(excluding optional arguments), and a description. Note that if the
-command is used as an environment (using \verb$\begin$ and \verb$\end$) then
-the number of arguments must be either one or two. For example, the\rtfsp
-\verb$\tabular$ environment takes two arguments: a first argument for
-specifying the formatting, and the second argument for the body of the
-environment.
-
-\begin{verbatim}
- \begin{tabular}{|l|l|}
- \row{One&Two}
- \row{Three&Four}
- \end{tabular}
-\end{verbatim}
-
-\section{\LaTeX\ Commands}
-
-\subsection*{abstract:1}\label{abstract}
-
-This standard \LaTeX\ environment prepares an abstract page, and is
-treated as an ordinary chapter or section in on-line help.
-
-\subsection*{addcontentsline:3}\label{addcontentsline}
-
-Adds a chapter title to the contents page. Linear RTF. Rarely required.
-
-%\subsection*{appendix}
-%\subsection*{arabic}
-%\subsection*{array}
-\subsection*{author:1}\label{author}
-
-Defines the author, for output when \verb$\maketitle$ is used.
-
-\subsection*{backslash:0}\label{backslash}
-
-Outputs a backslash in math mode (should be enclosed by two dollar symbols).
-
-\subsection*{bf:1}\label{bf}
-
-Specifies bold font.
-
-\subsection*{bffamily:1}\label{bffamily}
-
-Specifies bold font.
-
-\subsection*{bibitem:2}\label{bibitem}
-
-For parsing convenience, \verb$\bibitem$ requires two arguments: a cite key and item.
-\rtfsp\LaTeX\ syntax permits writing this as if it were two arguments,
-even though it is in fact only one. This command is used within
-a \commandrefn{thebibliography}{thebibliography} environment. The preferred
-method is to store references in {\tt .bib} files and use the \commandrefn{bibliography}{bibliographycmd}\rtfsp
-command to generate a bibliography section automatically.
-
-\subsection*{bibliographystyle:1}\label{bibliographystyle}
-
-Currently doesn't affect the style of bibliography, but probably will
-in the future.
-
-\subsection*{bibliography:0}\label{bibliographycmd}
-
-Includes the bibliography at this point in the document. See the section
-on \helpref{bibliographies}{bibsection}.
-
-%\subsection*{caption*}
-\subsection*{caption:1}\label{caption}
-
-Specifies a caption (within a \commandrefn{figure}{figure} or \commandrefn{table}{table} environment). This may
-be followed immediately by a \commandrefn{label}{label} command.
-
-\subsection*{cdots:0}\label{cdots}
-
-Outputs three dots.
-
-\subsection*{centerline:1}\label{centerline}
-
-Centres (or centers!) a line of text.
-
-%\subsection*{centering}
-\subsection*{center:1}\label{center}
-
-Centres a block of text.
-
-\subsection*{chapter:1}\label{chapter}
-
-Outputs a chapter heading. If the chapter's name is Popups\index{popups}, the chapter title will not be
-put in the contents, to allow popups to be placed in a document without the popup
-sections being directly accessible.
-
-\subsection*{chapter*:1}\label{chaptersX}
-
-Outputs a chapter heading with no contents entry.
-
-\subsection*{cite:1}\label{cite}
-
-Cite a reference. The argument is a reference key as defined in a \LaTeX\ {\tt .bib}\rtfsp
-file.
-
-\subsection*{comment:1}\label{comment}
-
-An environment that allows large comments in \LaTeX\ files: the argument
-is ignored in all formats. Useful for commenting out parts of files that
-cannot be handled by \LaTeX, such as the picture environment. See also\rtfsp
-\commandrefn{toocomplex}{toocomplex}.
-
-\subsection*{date:1}\label{date}
-
-Specifies the date of a document; only output by \commandrefn{maketitle}{maketitle}.
-
-\subsection*{description:1}\label{description}
-
-A list environment, where each \commandrefn{item}{item} command must be
-followed by optional square-bracketed text which will be highlighted.
-
-%\subsection*{destruct:1}\label{destruct}
-
-\subsection*{document:1}\label{document}
-
-This environment should enclose the body of a document.
-
-\subsection*{documentstyle:1}\label{documentstyle}
-
-Specifies the main style (report, article etc.) and, optionally, style files
-such as {\tt texhelp.sty}. A report has \commandrefn{chapters}{chapter}, while an article's top-level
-sections are specified using \commandrefn{section}{section}.
-
-%\subsection*{doublespace}\label{doublespace}
-\subsection*{em:1}\label{em}
-
-Emphasizes text (italic in RTF).
-
-\subsection*{emph:1}\label{emph}
-
-Same as \commandrefn{em}{em}.
-
-\subsection*{enumerate:1}\label{enumerate}
-
-Enumerate list environment: numbers the \commandrefn{items}{item}.
-
-%\subsection*{equation}\label{equation}
-%\subsection*{evensidemargin}
-%\subsection*{fbox:1}\label{fbox}
-
-\subsection*{figure:1}\label{figure}
-
-A figure environment: does nothing special, except allows interpretation of
-embedded \helpref{caption}{caption} commands as figures rather than (say) tables.
-
-\subsection*{flushleft:1}\label{flushleft}
-
-Flushes the given text to the left margin.
-
-\subsection*{flushright:1}\label{flushright}
-
-Flushes the given text to the right margin.
-
-%\subsection*{footheight}\label{footheight}
-\subsection*{footnote:1}\label{footnote}
-
-In linear RTF, a footnote is created. Whether this appears at the end of
-the section or the bottom of the page appears to depend on the current
-document style, at least for MS Word 6.0 for Windows. The default seems
-to be to put the footnotes at the end of the section, which is probably
-not the best assumption.
-
-In WinHelp RTF, a bracketed number is generated for the footnote
-and the footnote becomes a popup topic. It is probably preferable
-to change footnote commands to \commandref{footnotepopup}{footnotepopup},
-or \commandref{popref}{popref} references to glossary entries.
-
-This command is not supported for formats other than \LaTeX,
-linear RTF and WinHelp RTF.
-
-\subsection*{hline:0}\label{hline}
-
-Within a \commandrefn{tabular}{tabular} environment, draws a horizontal
-rule below the current row. Note that this does not work in RTF for the
-last row of a table, in which case the command \commandrefn{ruledrow}{ruledrow}\rtfsp
-should be used instead.
-
-\subsection*{hrule:0}\label{hrule}
-
-Draws a horizontal line below the current paragraph. For example:
-
-\begin{verbatim}
- This paragraph should have a horizontal rule following it.\hrule
-\end{verbatim}
-
-gives:
-
-This paragraph should have a horizontal rule following it.\hrule
-
-%\subsection*{hspace*}\label{hspaceX}
-%\subsection*{hspace}\label{hspace}
-%\subsection*{hskip*}\label{hskipX}
-%\subsection*{hskip}\label{hskip}
-
-\subsection*{huge:1}\label{huge1}
-
-Outputs the argument in huge text.
-
-\subsection*{Huge:1}\label{Huge2}
-
-Outputs the argument in huger text than \commandrefn{huge}{huge1}.
-
-\subsection*{HUGE:1}\label{HUGE3}
-
-Outputs the argument in huger text than \commandrefn{Huge}{Huge2}.
-
-\subsection*{include:1}\label{include}
-
-Include the given file. The command must not be preceded by any whitespace,
-and spurious whitespace between elements of the command will also
-trip up Tex2RTF.
-
-\subsection*{index:1}\label{index}
-
-In WinHelp mode, adds a keyword to the keyword list for the current
-topic. This keyword must currently be straight text, with no embedded
-commands. The conversion process must be run twice (without quitting
-Tex2RTF inbetween) to resolve the keyword references.
-
-\subsection*{input:1}\label{input}
-
-Include the given file. The command must not be preceded by any whitespace,
-and spurious whitespace between elements of the command will also
-trip up Tex2RTF.
-
-\subsection*{insertatlevel:2}\label{insertatlevel}
-
-Insert some text at a particular level of the document. For example,
-
-\begin{verbatim}
- \insertatlevel{2}{Some text}
-\end{verbatim}
-
-inserts "Some text" at level 2 (for a report, the current section). This
-allows you to insert headings into an automatically-generated section contents,
-for example.
-
-\subsection*{it:1}\label{it}
-
-Marks the argument in italic.
-
-\subsection*{itemize:1}\label{itemize}
-
-Indents each \commandrefn{item}{item} of a list and precedes with a bullet.
-If the file {\tt bullet.bmp} is found by Tex2RTF, this bitmap will be
-used as the bullet (WinHelp RTF); otherwise, a symbol or bold `o' will be used instead,
-depending on output format.
-
-Use \commandrefn{itemsep}{itemsep} to specify the separation between
-list items. Currently this only works for linear or WinHelp RTF output.
-If the value is more than zero, an extra paragraph is inserted.
-
-\subsection*{item:0}\label{item}
-
-Marks an item of a \commandrefn{itemize}{itemize}, \commandrefn{description}{description} or \commandrefn{enumerate}{enumerate}
-list. Items within a description environment should have an `optional' argument
-in square brackets which will be highlighted.
-
-\subsection*{itemsep:0}\label{itemsep}
-
-Use this command to specify the separation between
-list items. Currently this only works for linear or WinHelp RTF output.
-If the value is zero, no extra paragraph is inserted; if the value
-is more than zero, an extra paragraph is inserted.
-
-\subsection*{itshape:1}\label{itshape}
-
-Marks the argument in italic.
-
-%\subsection*{kill}\label{kill}
-\subsection*{label:1}\label{label}
-
-Labels the chapter, section, subsection, subsubsection or figure caption
-with the given label. This must be an ASCII string, and duplicate items
-with different case letters are not allowed.
-
-The command must follow immediately after the section or caption command,
-with no intervening whitespace.
-
-\subsection*{large:1}\label{large1}
-
-Marks the argument in large text.
-
-\subsection*{Large:1}\label{Large2}
-
-Makes the argument display in larger text than \commandrefn{large}{large1}.
-
-\subsection*{LARGE:1}\label{LARGE3}
-
-Makes the argument display in larger text than \commandrefn{Large}{Large2}.
-
-\subsection*{LaTeX:0}\label{LaTeX}
-
-Outputs the annoying \LaTeX\ upper and lower case name.
-
-\subsection*{ldots:0}\label{ldots}
-
-Outputs three dots.
-
-%\subsection*{linebreak}\label{linebreak}
-%\subsection*{listoffigures}\label{listoffigures}
-%\subsection*{listoftables}\label{listoftables}
-%\subsection*{makeglossary}\label{makeglossary}
-%\subsection*{makeindex}\label{makeindex}
-\subsection*{maketitle:0}\label{maketitle}
-
-Makes the article or report title by outputting the \commandrefn{title}{title},
-\rtfsp\commandrefn{author}{author} and optionally \commandrefn{date}{date}.
-
-%\subsection*{markright}\label{markright}
-%\subsection*{markboth}\label{markboth}
-
-\subsection*{marginparwidth:1}\label{marginparwidth}
-
-Specifies the width of a margin paragraph.
-
-\subsection*{marginpar:1}\label{marginpar}
-
-Inserts a marginal note. It is best to use the Tex2RTF extensions \rtfsp
-\commandrefn{marginparodd}{marginparodd} and \commandrefn{marginpareven}{marginpareven} \rtfsp
-for best results.
-
-\subsection*{marginpareven:1}\label{marginpareven}
-
-Inserts a marginal note on even pages. This is required for RTF generation since
-it is impossible for Tex2RTF to know in advance which side of paper the marginal note
-will fall upon, and the text has to be positioned using absolute dimensions.
-If only one sided output is required, use \commandrefn{marginparodd}{marginparodd} \rtfsp
-instead.
-
-\subsection*{marginparodd:1}\label{marginparodd}
-
-Inserts a marginal note on odd pages. This is required for RTF generation since
-it is impossible for Tex2RTF to know in advance which side of paper the marginal note
-will fall upon, and the text has to be positioned using absolute dimensions.
-
-Also, even if one-sided output is required, this command should be used instead
-of \verb$\marginpar$ because the \LaTeX\ command allows it to be used
-just before a paragraph. Normally, if this were done, the marginal note would
-not be aligned with the paragraph succeeding it. For example:
-
-\begin{verbatim}
- \marginparodd{{\it Note:} if nothing happens, perhaps you
- have not plugged your computer in at the mains.}%
- To start using your computer, push the Power button
- and wait for text to appear on the screen.
-\end{verbatim}
-
-Note the percent sign after the \verb$\marginparodd$ command: without it,
-\LaTeX\ refuses to believe that the following text is part of the
-same paragraph, and will print the note at the wrong place.
-
-You should use \commandrefn{textwidth}{textwidth} to allow space for marginal
-notes, and also \commandrefn{marginparwidth}{marginparwidth} to specify the size of
-the marginal note.
-
-In WinHelp, HTML and wxHelp, marginal notes are treated as normal text delineated
-with horizontal rules above and below.
-
-%\subsection*{mbox:1}\label{mbox}
-
-\subsection*{mdseries:1}\label{mdseries}
-
-Changes to a medium-weight font. Un-emboldens in RTF mode, no effect in other modes.
-
-\subsection*{multicolumn:3}\label{multicolumn}
-
-Used in \commandrefn{tabular}{tabular} environment to denote a cell that
-spans more than one column. Only supplied for compatibility with
-existing \LaTeX\ files, since all it does in RTF is output the correct
-number of cell commands, with the multicolumn text squashed into one cell.
-
-\subsection*{newcommand:3}\label{newcommand}
-
-Define a new command; arguments are the command, the number of
-arguments, and the command body. For example:
-
-\begin{verbatim}
- \newcommand{\crazy}[2]{{\bf #1} is crazy but {\bf #2} is not.}
-\end{verbatim}
-
-The command must have no whitespace at the start of the line or between
-the three arguments.
-
-New commands may also be defined in the {\tt tex2rtf.ini} file using
-slightly different syntax (see \helpref{Macro not found error}{macronotfound}).
-
-%\subsection*{newcounter}\label{newcounter}
-%\subsection*{newline}\label{newline}
-\subsection*{newpage:0}\label{newpage}
-
-Inserts a page break.
-
-\subsection*{nocite:1}\label{nocite}
-
-Specifies that this reference should appear in the bibliography,
-but the citation should not appear in the text.
-
-See also \commandrefn{cite}{cite}.
-
-\subsection*{noindent:0}\label{noindent}
-
-Sets paragraph indentation to zero. See also \commandrefn{parindent}{parindent}.
-
-%\subsection*{nolinebreak}\label{nolinebreak}
-%\subsection*{nopagebreak}\label{nopagebreak}
-
-\subsection*{normalsize:1}\label{normalsize}
-
-Sets the font size back to normal.
-
-\subsection*{onecolumn:0}\label{onecolumn}
-
-Sets the number of columns to one. \LaTeX\ and linear RTF only.
-
-%\subsection*{oddsidemargin}\label{oddsidemargin}
-%\subsection*{pagebreak}\label{pagebreak}
-\subsection*{pageref:1}\label{pageref}
-
-In linear RTF, generates a page reference to the given label.
-
-\subsection*{pagestyle:1}\label{pagestyle}
-
-If argument is {\tt fancyplain} or {\tt fancy}, Tex2RTF
-separates the header from the rest of the page with a rule.
-This command must be defined for headers and footers to
-work properly. See also \commandrefn{setheader}{setheader},
-\commandrefn{setfooter}{setfooter}.
-
-\LaTeX\ and linear RTF only.
-
-\subsection*{pagenumbering:1}\label{pagenumbering}
-
-The argument may be one of:
-
-\begin{description}
-\itemsep=0pt
-\item[alph] a, b, ...
-\item[Alph] A, B, ...
-\item[arabic] 1, 2, ...
-\item[roman] i, ii, ...
-\item[Roman] I, II, ...
-\end{description}
-
-\LaTeX\ and linear RTF only.
-
-\subsection*{paragraph:0}\label{paragraph}
-
-Behaves as for a subsubsection.
-
-\subsection*{paragraph*:0}\label{paragraphX}
-
-Behaves as for a subsubsection.
-
-\subsection*{parindent:1}\label{parindent}
-
-Indents the first line of succeeding paragraphs by the given amount.
-
-\subsection*{parskip:1}\label{parskip}
-
-Changes the spacing between paragraphs. In fact, in RTF this will cause
-two \commandrefn{par}{par} commands to be output if parskip is greater
-than zero.
-
-%\subsection*{part*}\label{partX}
-%\subsection*{part}\label{part}
-\subsection*{par:0}\label{par}
-
-Causes the paragraph to end at this point. \LaTeX\ and Tex2RTF also
-treat two consecutive newlines as a paragraph break.
-
-%\subsection*{pfunc}\label{pfunc}
-%\subsection*{picture}\label{picture}
-\subsection*{printindex:0}\label{printindex}
-
-In linear RTF, inserts an index.
-
-\subsection*{quote:1}\label{quote}
-
-Indents a short quotation.
-
-\subsection*{quotation:1}\label{quotation}
-
-Indents a long quotation.
-
-%\subsection*{raggedbottom}\label{raggedbottom}
-%\subsection*{raggedleft}\label{raggedleft}
-%\subsection*{raggedright}\label{raggedright}
-
-\subsection*{ref:1}\label{ref}
-
-In \LaTeX\ and linear RTF, refers to a \commandrefn{label}{label} and
-causes the number of that section or figure to be printed.
-
-\subsection*{rm:1}\label{rm}
-
-Causes the argument to be formatted in a plain, roman font.
-In fact, does nothing in RTF, HTML and XLP modes.
-
-\subsection*{rmfamily:1}\label{rmfamily}
-
-Causes the argument to be formatted in a plain, roman font.
-In fact, does nothing in RTF, HTML and XLP modes.
-
-%\subsection*{roman}\label{roman1}
-%\subsection*{Roman}\label{Roman2}
-
-\subsection*{sc:1}\label{sc}
-
-Prints the output in small capitals.
-
-\subsection*{scshape:1}\label{scshape}
-
-Prints the output in small capitals.
-
-\subsection*{section:1}\label{section}
-
-Section header, with an entry in the contents page.
-
-\subsection*{section*:1}\label{sectionX}
-
-Section header, with no entry in the contents page.
-
-%\subsection*{setcounter}\label{setcounter}
-\subsection*{sf:1}\label{sf}
-
-Should format in a sans-serif font. Does nothing in Tex2RTF.
-
-\subsection*{sffamily:1}\label{sffamily}
-
-Should format in a sans-serif font. Does nothing in Tex2RTF.
-
-\subsection*{shortcite:1}\label{shortcite}
-
-The same as \commandrefn{cite}{cite}.
-
-%\subsection*{singlespace}\label{singlespace}
-%\subsection*{sloppypar}\label{sloppypar}
-%\subsection*{sloppy}\label{sloppy}
-
-\subsection*{sl:1}\label{sl}
-
-In Tex2RTF, the same as \commandrefn{it}{it}. The LaTeX interpretation is `slanted text'.
-
-\subsection*{slshape:1}\label{slshape}
-
-In Tex2RTF, the same as \commandrefn{itshape}{itshape}. The LaTeX interpretation is `slanted text'.
-
-\subsection*{small:1}\label{small}
-
-Prints the argument in a small font.
-
-\subsection*{special:1}\label{special}
-
-Simply copies the argument to the output file without processing
-(except \verb$\}$ is translated to \verb$}$, and \verb$\{$ is
-translated to \verb${$, to allow for insertion of braces).
-
-\subsection*{ss:0}\label{ss}
-
-Outputs the German sharp S character \ss.
-
-%\subsection*{subitem}\label{subitem}
-\subsection*{subparagraph:1}\label{subparagraph}
-
-Behaves as for a subsubsection.
-
-\subsection*{subparagraph*:1}\label{subparagraphX}
-
-Behaves as for a subsubsection.
-
-\subsection*{subsection:1}\label{subsection}
-
-Subsection header, with an entry in the contents page.
-
-\subsection*{subsection*:1}\label{subsectionX}
-
-Subsection header, with no entry in the contents page.
-
-\subsection*{subsubsection:1}\label{subsubsection}
-
-Subsubsection header, with an entry in the contents page.
-
-\subsection*{subsubsection*:1}\label{subsubsectionX}
-
-Subsubsection header, with no entry in the contents page.
-
-\subsection*{tabbing:1}\label{tabbing}
-
-Tabbing environment: doesn't work properly in RTF.
-
-\subsection*{table:1}\label{table}
-
-An environment for tables. The only thing that Tex2RTF does with this
-is to interpret an embedded \helpref{caption}{caption} command differently
-from figures.
-
-\subsection*{tableofcontents:0}\label{tableofcontents}
-
-Inserts the table of contents at this point. In linear RTF mode, a
-proper Word for Windows table of contents will be inserted unless either
-of the variables {\it insertTOC} or {\it useWord} is set to {\it false}.
-
-\subsection*{tabular:2}\label{tabular}
-
-Tabular environment: an attempt is made to output something
-reasonable in RTF and HTML formats, although currently only simple
-tables will work. The first argument specifies the column formatting.
-a pipe symbol (\verb$|$) denotes a vertical border, one of {\tt l, r, c}\rtfsp
-signifies a normal column of default width, and {\tt p} followed by
-a dimension specifies a column of given width. It is recommended that
-the {\tt p} is used since Tex2RTF cannot deduce a column width in the
-same way that \LaTeX\ can.
-
-Horizontal rules are achieved with \commandrefn{hline}{hline}; two together
-signify a double rule. Note that in HTML, all rows and the table itself are bordered
-automatically.
-
-Use the Tex2RTF \commandrefn{row}{row} and \commandrefn{ruledrow}{ruledrow} commands
-for best effect.
-
-For two-column tables that work in WinHelp files, use \commandrefn{twocollist}{twocollist} instead.
-
-Example:
-
-\begin{verbatim}
- \begin{tabular}{|l|p{8.5cm}|}\hline
- \row{{\bf A.I.}&{\bf Simulation}}\hline\hline
- \row{rules&constraints/methods}
- \row{planning&design of experiments}
- \row{diagnosis&analysis of results}
- \ruledrow{learning&detection of connections}
- \end{tabular}
-\end{verbatim}
-
-This produces:
-
-\begin{tabular}{|l|p{8.5cm}|}\hline
-\row{{\bf A.I.}&{\bf Simulation}}\hline\hline
-\row{rules&constraints/methods}
-\row{planning&design of experiments}
-\row{diagnosis&analysis of results}
-\ruledrow{learning&detection of connections}
-\end{tabular}
-
-%\subsection*{tab:1}\label{tab}
-\subsection*{TeX:0}\label{TeX}
-
-Outputs the annoying \TeX\ upper and lower case name.
-
-\subsection*{textbf:1}\label{textbf}
-
-Same as \commandrefn{bf}{bf}.
-
-\subsection*{textit:1}\label{textit}
-
-Same as \commandrefn{it}{it}.
-
-\subsection*{textrm:1}\label{textrm}
-
-Same as \commandrefn{rm}{rm}.
-
-\subsection*{textsf:1}\label{textsf}
-
-Same as \commandrefn{sf}{sf}.
-
-\subsection*{textsc:1}\label{textsc}
-
-Same as \commandrefn{sc}{sc}.
-
-\subsection*{textsl:1}\label{textsl}
-
-Same as \commandrefn{sl}{sl}.
-
-\subsection*{texttt:1}\label{texttt}
-
-Same as \commandrefn{tt}{tt}.
-
-
-\subsection*{textwidth:1}\label{textwidth}
-
-Sets the text width (valid for RTF only). This might be used
-in conjunction with \commandrefn{marginpar}{marginpar}, for example,
-to leave space for marginal notes.
-
-%\subsection*{textheight}\label{textheight}
-\subsection*{thebibliography:1}\label{thebibliography}
-
-An environment for specifying the bibliography as a series of\rtfsp
-\commandrefn{bibitem}{bibitem} commands; the preferred method is to use
-\rtfsp{\tt .bib} files and \commandrefn{bibliography}{bibliographycmd} instead.
-
-%\subsection*{titlepage:0}\label{titlepage}
-
-\subsection*{title:1}\label{title}
-
-Sets the title, to be output when the command \commandrefn{maketitle}{maketitle}\rtfsp
-is used.
-
-\subsection*{tiny:1}\label{tiny}
-
-Prints the argument in a very small font.
-
-\subsection*{today:0}\label{today}
-
-Outputs today's date.
-
-%\subsection*{topmargin}\label{topmargin}
-%\subsection*{topskip}\label{topskip}
-\subsection*{tt:1}\label{tt}
-
-Outputs the argument in teletype font.
-
-\subsection*{ttfamily:1}\label{ttfamily}
-
-Outputs the argument in teletype font.
-
-%\subsection*{typein}\label{typein}
-\subsection*{typeout:1}\label{typeout}
-
-Outputs the text on the Tex2RTF text window.
-
-\subsection*{twocolumn:0}\label{twocolumn}
-
-Sets the number of columns to two. \LaTeX\ and linear RTF only.
-
-\subsection*{underline:1}\label{underline}
-
-Underlines the argument.
-
-\subsection*{upshape:1}\label{upshape}
-
-Changes to an upright font. Un-italicizes in RTF mode, no effect in other modes.
-
-\subsection*{verbatiminput:1}\label{verbatiminput}
-
-Include the given file as if it were within a \commandrefn{verbatim}{verbatim}\rtfsp
-environment. The command must not be preceded by any whitespace,
-and spurious whitespace between elements of the command will also
-trip up Tex2RTF.
-
-\subsection*{verbatim:1}\label{verbatim}
-
-Uses a fixed-width font to format the argument without interpreting
-any \LaTeX\ commands.
-
-\subsection*{verb}\label{verb}
-
-The \verb$\verb$ command is like the \commandref{verbatim}{verbatim} environment,
-but for small amounts of text. The syntax is:
-
-\begin{verbatim}
- \verb<char><text><char>
-\end{verbatim}
-
-The character {\it char} is used as a delimiter; it may be any character
-not ocurring in the following text, except asterisk.
-
-For example, \verb@\verb$\thing%^&$@ produces \verb$\thing%^&$.
-
-%\subsection*{verse}\label{verse}
-%\subsection*{vfill}\label{vfill}
-%\subsection*{vline}\label{vline}
-%\subsection*{void}\label{void}
-%\subsection*{vrule}\label{vrule}
-%\subsection*{vspace*}\label{vspaceX}
-%\subsection*{vskip*}\label{vskipX}
-%\subsection*{vspace}\label{vspace}
-%\subsection*{vskip}\label{vskip}
-
-
-\section{Tex2RTF Commands}
-
-\subsection*{backgroundcolour:1}\label{backgroundcolour}
-
-Specifies the page background colour, in HTML only. The argument consists
-of three numbers from 0 to 255 separated by semicolons, for red, green and blue values respectively.
-
-\begin{verbatim}
- \backgroundcolour{255;255;255}
- \backgroundcolour{0;0;255}
-\end{verbatim}
-
-The first example sets the background to white, the second sets the background to blue.
-
-Instead of using a LaTeX command, you may find it more convenient to use the equivalent {\tt .ini} file
-setting, {\it backgroundColour}.
-
-\subsection*{backgroundimage:1}\label{backgroundimage}
-
-Specifies the page background image, in HTML only. The argument
-is a URL for the GIF file to be used as the background.
-
-For example:
-
-\begin{verbatim}
- \backgroundimage{tile.gif}
-\end{verbatim}
-
-This sets the background to a tile file.
-
-Instead of using a LaTeX command, you may find it more convenient to use the equivalent {\tt .ini} file
-setting, {\it backgroundImage}.
-
-\subsection*{backslashraw:0}\label{backslashraw}
-
-Outputs a raw backslash into the output (not LaTeX). Useful when
-inserting RTF (for example) that cannot be dealt with by Tex2RTF.
-E.g.
-
-\begin{verbatim}
- \backslashraw{'e3}
-\end{verbatim}
-
-inserts the text \verb$\'e3$ into the RTF file.
-
-\subsection*{bcol:2}\label{bcol}
-
-Sets the background colour for a block of text (RTF only). Has no known effect
-in the RTF readers currently tried (Word for Window and Windows Help).
-
-See also \commandrefn{definecolour}{definecolour}, \commandrefn{fcol}{fcol}.
-
-%\subsection*{baselineskip}
-%\subsection*{boxit:1}\label{boxit}
-
-\subsection*{brclear:0}\label{brclear}
-
-Stops aligning content following a left or right-aligned image in HTML only.
-
-See also \commandrefn{imagel}{imagel}, \commandrefn{imager}{imager}.
-
-\subsection*{cextract:0}\label{cextract}
-
-Prints a C++ extraction operator (\cextract).
-
-\subsection*{chapterheading:1}\label{chapterheading}
-
-Like \commandrefn{chapter}{chapter}, but does not increment the chapter
-number and does not print a chapter number in the printed documentation
-contents page, or in the chapter heading. Used to implement \helpref{glossaries}{glossarysection} and
-other sections that are not real chapters.
-
-\subsection*{cinsert:0}\label{cinsert}
-
-Prints a C++ insertion operator (\cinsert).
-
-\subsection*{class:1}\label{class}
-
-Outputs the argument, an index entry (\LaTeX\ only) and a keyword entry (WinHelp only).
-Used in class reference documentation.
-
-%\subsection*{cleardoublepage}
-%\subsection*{clearpage}
-%\subsection*{cline}
-\subsection*{clipsfunc:3}\label{clipsfunc}
-
-Formats a CLIPS function, given the return value, function name, and
-arguments.
-
-%\subsection*{columnsep}
-\subsection*{copyright:0}\label{copyright}
-
-Outputs the copyright symbol.
-
-\subsection*{cparam:2}\label{cparam}
-
-Formats a CLIPS type and argument. Used within the third argument of
-a \commandrefn{clipsfunc}{clipsfunc} command.
-
-\subsection*{definecolour:4}\label{definecolour}
-
-Defines a new colour that can be used in the document (RTF only). This
-command can also be spelt \verb$\definecolor$.
-
-The first argument is the lower-case name of the colour, and the following
-three arguments specify the red, green and blue intensities, in the range 0 to 255.
-
-The default colours are equivalent to the following definitions:
-
-\begin{verbatim}
- \definecolour{black}{0}{0}{0}
- \definecolour{cyan}{0}{255}{255}
- \definecolour{green}{0}{255}{0}
- \definecolour{magenta}{255}{0}{255}
- \definecolour{red}{255}{0}{0}
- \definecolour{yellow}{255}{255}{0}
- \definecolour{white}{255}{255}{255}
-\end{verbatim}
-
-To use colours in a document, use the \commandrefn{fcol}{fcol} and \commandrefn{bcol}{bcol} commands.
-
-Note that a document that defines its own colours should be converted twice within
-the same Tex2RTF session.
-
-\subsection*{fcol:2}\label{fcol}
-
-Sets the foreground colour for a block of text (RTF and HTML).
-
-For example:
-
-\begin{verbatim}
- This sentence is brightened up by some \fcol{red}{red text}.
-\end{verbatim}
-
-gives:
-
-This sentence is brightened up by some \fcol{red}{red text}.
-
-See also \commandrefn{definecolour}{definecolour}, \commandrefn{bcol}{bcol}.
-
-\subsection*{followedlinkcolour:1}\label{followedlinkcolour}
-
-Specifies the followed link colour for the whole page, HTML only. The argument consists
-of three numbers from 0 to 255 separated by semicolons, for red, green and blue values respectively.
-
-For example:
-
-\begin{verbatim}
- \followedlinkcolour{255;255;255}
- \followedlinkcolour{0;0;255}
-\end{verbatim}
-
-The first example sets the followed link text to white, and the second sets the followed link text to blue.
-
-See also \commandrefn{backgroundcolour}{backgroundcolour}, \commandrefn{textcolour}{textcolour},
-\rtfsp\commandrefn{linkcolour}{linkcolour}.
-
-Instead of using a LaTeX command, you may find it more convenient to use the equivalent {\tt .ini} file
-setting, {\it followedLinkColour}.
-
-\subsection*{footnotepopup:2}\label{footnotepopup}
-
-In linear RTF, a footnote is created following the first argument, as with
-\commandref{footnote}{footnote}.
-
-In WinHelp RTF, a the first argument is highlighted and becomes
-a popup reference to the second argument. See also \commandref{footnote}{footnote}\rtfsp
-and \commandref{popref}{popref}.
-
-This command is not supported for formats other than \LaTeX,
-linear RTF and WinHelp RTF.
-
-%\subsection*{footskip}\label{footskip}
-%\subsection*{framebox:1}\label{framebox}
-
-\subsection*{functionsection:1}\label{functionsection}
-
-Defines a subsection, adding the C++ function name to the \LaTeX\ index or the
-WinHelp keyword list.
-
-Should be followed by a \commandrefn{func}{func} command to specify function
-details.
-
-\subsection*{func:3}\label{func}
-
-Defines a C++ function, given the return type, function name, and parameter list.
-
-Should occur after a \commandrefn{functionsection}{functionsection} command.
-
-%\subsection*{glossary:}\label{glossary}
-\subsection*{gloss:1}\label{gloss}
-
-Marks a glossary entry. In \LaTeX, this is a synonym for an \commandrefn{item}{item}
-with an optional argument, within a \commandrefn{description}{description} environment,
-and the argument is added to the index.
-
-In Windows Help, this is identical to a \commandrefn{section*}{sectionX} in a report.
-
-If labels are associated with the glossary entries, they can be referenced by
-\commandref{helpref}{helpref} or \commandref{popref}{popref} jumps. A glossary entry is
-currently the only type of destination that popref may refer to.
-
-This is an example of making a glossary in a report:
-
-\begin{verbatim}
- \begin{helpglossary}
-
- \gloss{API}\label{api}
-
- Application Programmer's Interface - a set of calls and
- classes defining how a library (in this case, wxWidgets)
- can be used.
-
- \gloss{Canvas}\label{canvas}
-
- A canvas in XView and wxWidgets is a subwindow...
-
- \gloss{DDE}\label{dde}
-
- Dynamic Data Exchange - Microsoft's interprocess
- communication protocol. wxWidgets provides an abstraction
- of DDE under both Windows and UNIX.
-
- \end{helpglossary}
-\end{verbatim}
-
-%\subsection*{headheight}\label{headheight}
-\subsection*{helpglossary:1}\label{helpglossary}
-
-An environment for making a glossary (not standard \LaTeX). See \commandrefn{gloss}{gloss} for
-usage.
-
-\subsection*{helpignore:1}\label{helpignore}
-
-Ignores the argument in Tex2RTF generated files, but not \LaTeX.
-
-\subsection*{helponly:1}\label{helponly}
-
-Only outputs the argument in Tex2RTF generated files.
-
-\subsection*{helpinput:1}\label{helpinput}
-
-Only includes the given file in Tex2RTF generated files.
-
-\subsection*{helpfontfamily:1}\label{helpfontfamily}
-
-Specifies the font family for Tex2RTF generated files. The argument
-may be Swiss or Times.
-
-\subsection*{helpfontsize:1}\label{helpfontsize}
-
-Specifies the font size for Tex2RTF generated files.
-
-\subsection*{helpref:2}\label{helpref}
-
-Specifies a jump to a labelled chapter, section, subsection subsubsection
-or figure.
-
-The first argument is text to be highlighted (mouseable in help systems)
-and the second is the reference label. In linear documents, the section number
-is given following the text, unless the \commandrefn{helprefn}{helprefn} command
-is used instead, where the section number is suppressed.
-
-Note that when generating HTML, the label {\it contents} is automatically defined,
-and may be referenced using \verb$\helpref$.
-
-\subsection*{helprefn:2}\label{helprefn}
-
-Specifies a jump to a labelled chapter, section, subsection subsubsection
-or figure.
-
-The first argument is text to be highlighted (mouseable in help systems)
-and the second is the reference label. See \commandrefn{helpref}{helpref} for
-the form where the section number is printed in linear documents.
-
-%\subsection*{hfill}\label{hfill}
-\subsection*{htmlignore:1}\label{htmlignore}
-
-Ignores the argument in HTML.
-
-\subsection*{htmlonly:1}\label{htmlonly}
-
-Only outputs the argument in HTML.
-
-\subsection*{image:2}\label{image}
-
-This is translated to a PSBOX macro package \verb$\psboxto$ command in \LaTeX,
-the first argument being a sizing command and the second a filename.
-
-In HTML mode, the second argument is used to generate a PostScript file reference.
-
-In RTF mode, the second argument is tried with first a BMP extension and
-then a WMF extension to find a suitable Windows bitmap file, placeable
-metafile, or segmented hypergraphics file (.SHG). If a suitable file is
-found, in Windows Help mode a {\tt bmc}\rtfsp command is inserted into
-the RTF file with a reference to the file. In linear RTF mode, the
-bitmap or metafile is converted into hex and inserted into the RTF
-document.
-
-Note that only RGB-encoded Windows bitmaps, or placeable metafiles, are
-valid for input to Tex2RTF. You can convert a RLE (run length encoded)
-bitmap file into a (bigger) RGB file using a program such as Paintshop
-Pro. A placeable metafile has a special header with dimension
-information. One may be constructed by a wxWidgets program by calling
-the function wxMakeMetafilePlaceable. The Microsoft Windows SDK has a
-sample program that loads and steps through placeable and ordinary
-metafiles.
-
-Another wrinkle is that programs differ in the methods they
-use to recognise pictures in RTF files. You may need to use the {\it bitmapMethod} setting,
-which can be ``hex'' (embed the hex data in the file with a \verb$\dibitmap$ keyword),
-``includepicture'' (use the MS Word 6.0 INCLUDEPICTURE field) or ``import''
-(an earlier name for INCLUDEPICTURE).
-
-Here is an example of using the \verb$\image$ command.
-
-\begin{verbatim}
- \begin{figure}
- $$\image{5cm;0cm}{heart.ps}$$
-
- \caption{My picture}\label{piccy}
- \end{figure}
-\end{verbatim}
-
-The dollars centre the image in the horizontal plane. The syntax
-of the first argument to \verb$\image$ is taken from syntax used by the \verb$\psbox$\rtfsp
-package: it allows specification of the horizontal and vertical
-dimensions of the image. Scaling will take place for PostScript
-and metafile images. A value of zero indicates that the image should
-be scaled in proportion to the non-zero dimension. Zeros for both
-dimensions will leave the image unscaled in the case of metafiles,
-or scaled to fit the page in the case of PostScript.
-
-See also \commandrefn{imagel}{imagel}, \commandrefn{imager}{imager} for aligned images in
-HTML.
-
-\subsection*{imagel:2}\label{imagel}
-
-Similar to \commandrefn{image}{image}, but left-aligns the image with respect to the following
-content. Use \commandrefn{brclear}{brclear} to stop aligning the content to the right of the image.
-
-See also \commandrefn{imager}{imager}.
-
-\subsection*{imagemap:3}\label{imagemap}
-
-This is translated to an HTML image map reference, or (in LaTeX) a PostScript psbox
-command. This allows images in HTML to have hotspots, where the user clicks on a
-part of the image and the browser jumps to a particular file.
-
-The first argument is the same as the first argument to the \commandref{image}{image}\rtfsp
-command (ignored in HTML). The second argument must be the name of the
-image map entry, and the second is the filename to be displayed inline.
-
-\begin{verbatim}
- \imagemap{}{tree.gif}{myname}
-\end{verbatim}
-
-translates to:
-
-\begin{verbatim}
- <a href="/cgi-bin/imagemap/mymap">
- <img src="tree.gif" ismap></a><p>
-\end{verbatim}
-
-The snag with this is that, apart from the inconvenience of having to
-register a map file with the server, the map file will also have
-references to particular HTML files. If they exist in the current
-document, these names are not known until the file is generated. In which case, the
-map entries should probably refer to symbolic links that can be easily
-changed later.
-
-\subsection*{imager:2}\label{imager}
-
-Similar to \commandrefn{image}{image}, but right-aligns the image with respect to the following
-content. Use \commandrefn{brclear}{brclear} to stop aligning the content to the left of the image.
-
-See also \commandrefn{imagel}{imagel}.
-
-%\subsection*{includeonly}\label{includeonly}
-\subsection*{indented:2}\label{indented}
-
-Environment supplied by Tex2RTF to allow (possibly nested) indentation of
-\LaTeX\ and RTF text. The first argument is the amount to be indented.
-
-For example:
-
-\begin{verbatim}
- \begin{indented}{2cm}
- This text should be indented by a couple of centimetres.
- This can be useful to highlight paragraphs.
- \end{indented}
-\end{verbatim}
-
-produces:
-
-\begin{indented}{2cm}
-This text should be indented by a couple of centimetres. This can be
-useful to highlight paragraphs.
-\end{indented}
-
-\subsection*{latexignore:1}\label{latexignore}
-
-Ignores the argument in \LaTeX.
-
-\subsection*{latexonly:1}\label{latexonly}
-
-Only prints the argument in \LaTeX.
-
-%\subsection*{lbox}\label{lbox}
-
-\subsection*{lbraceraw:0}\label{lbraceraw}
-
-Outputs a raw left brace into the output (not LaTeX). Useful when
-inserting RTF (for example) that cannot be dealt with by Tex2RTF.
-
-\subsection*{linkcolour:1}\label{linkcolour}
-
-Specifies the link colour for the whole page, HTML only. The argument consists
-of three numbers from 0 to 255 separated by semicolons, for red, green and blue values respectively.
-
-For example:
-
-\begin{verbatim}
- \linkcolour{255;255;255}
- \linkcolour{0;0;255}
-\end{verbatim}
-
-The first example sets the link text to white, and the second sets the link text to blue.
-
-See also \commandrefn{backgroundcolour}{backgroundcolour}, \commandrefn{textcolour}{textcolour},
-\rtfsp\commandrefn{followedlinkcolour}{followedlinkcolour}.
-
-Instead of using a LaTeX command, you may find it more convenient to use the equivalent {\tt .ini} file
-setting, {\it linkColour}.
-
-\subsection*{membersection:1}\label{membersection}
-
-Used when formatting C++ classes to print a subsection for the member name.
-
-\subsection*{member:1}\label{member}
-
-Used to format a C++ member variable name.
-
-\subsection*{normalbox:1}\label{normalbox}
-
-Draws a box around the given paragraph in \LaTeX\ and RTF. In HTML
-and XLP formats, horizontal rules are drawn before and after the text.
-
-For example:
-
-\begin{verbatim}
- \normalbox{This should be a boxed paragraph for highlighting
- important information, such as information for registering
- a shareware program.}
-\end{verbatim}
-
-gives:
-
-\normalbox{This should be a boxed paragraph for highlighting important
-information, such as information for registering a shareware program.}
-
-See also \commandrefn{normalboxd}{normalboxd} for double-bordered text.
-
-\subsection*{normalboxd:1}\label{normalboxd}
-
-Draws a double border around the given paragraph in \LaTeX\ and RTF. In
-HTML and XLP formats, horizontal rules are drawn before and after the
-text.
-
-For example:
-
-\begin{verbatim}
- \normalboxd{This should be a boxed paragraph for
- highlighting important information, such as information
- for registering a shareware program.}
-\end{verbatim}
-
-gives:
-
-\normalboxd{This should be a boxed paragraph for highlighting important
-information,such as information for registering a shareware program.}
-
-See also \commandrefn{normalbox}{normalbox} for single-bordered text.
-
-\subsection*{param:1}\label{param}
-
-Formats a C++ type and argument pair. Should be used within the third argument
-of a a \commandrefn{func}{func} command.
-
-\subsection*{popref:2}\label{popref}
-
-Similar to \commandrefn{helprefn}{helprefn}, except that in Windows Help,
-the destination text is popped up in a small window to be dismissed with
-a mouse click, instead of going to a separate section.
-
-Currently this command can only refer to a labelled glossary entry; see
-\commandrefn{gloss}{gloss}.
-
-\subsection*{psboxto:2}\label{psboxto}
-
-Identical to \commandrefn{image}{image}.
-
-%\subsection*{psbox}\label{psbox}
-\subsection*{rbraceraw:0}\label{rbraceraw}
-
-Outputs a raw right brace into the output (not LaTeX). Useful when
-inserting RTF (for example) that cannot be dealt with by Tex2RTF.
-
-\subsection*{registered:0}\label{registered}
-
-Outputs the `registered' symbol in HTML, and (r) in other formats.
-
-\subsection*{row:1}\label{row}
-
-A Tex2RTF command signifying the row of a table within the \commandrefn{tabular}{tabular}\rtfsp
-environment. See also \commandrefn{ruledrow}{ruledrow}.
-
-\subsection*{ruledrow:1}\label{ruledrow}
-
-A Tex2RTF command signifying a ruled row of a table within the \commandrefn{tabular}{tabular}\rtfsp
-environment. See also \commandrefn{row}{row}.
-
-\subsection*{rtfignore:1}\label{rtfignore}
-
-Ignores the argument in linear RTF.
-
-\subsection*{rtfonly:1}\label{rtfonly}
-
-Only outputs the argument in linear RTF.
-
-\subsection*{rtfsp:0}\label{rtfsp}
-
-Outputs a space in RTF. Tex2RTF tries to insert a space where one is implied
-by a newline, but cannot cope where a line starts or ends with a command,
-in the middle of a paragraph. Use this command to insert a space explicitly.
-
-\subsection*{sectionheading:1}\label{sectionheading}
-
-Like \commandrefn{section}{section}, but does not increment the section
-number and does not print a section number in the printed documentation
-contents page, or in the section heading.
-
-\subsection*{setfooter:6}\label{setfooter}
-
-Tex2RTF has a non-standard way of setting headers and footers,
-but the default macro definitions in {\tt texhelp.sty} may be altered
-to your current method.
-
-The arguments are as follows:
-
-\begin{enumerate}
-\itemsep=0pt
-\item Left footer, even pages
-\item Centre footer, even pages
-\item Right footer, even pages
-\item Left footer, odd pages
-\item Centre footer, odd pages
-\item Right footer, odd pages
-\end{enumerate}
-
-For many documents, the first three arguments will be left empty.
-
-The behaviour for first pages of a chapter, section or document
-is to have a blank header, but print the footer.
-
-For best results, define headers and footers for {\it each chapter or
-section}.
-
-Note that this command works only for \LaTeX\ and linear RTF. See also\rtfsp
-\commandrefn{setheader}{setheader}.
-
-\subsection*{setheader:6}\label{setheader}
-
-Tex2RTF has a non-standard way of setting headers and footers,
-but the default macro definitions in {\tt texhelp.sty} may be altered
-to your current method.
-
-The arguments are as follows:
-
-\begin{enumerate}
-\itemsep=0pt
-\item Left header, even pages
-\item Centre header, even pages
-\item Right header, even pages
-\item Left header, odd pages
-\item Centre header, odd pages
-\item Right header, odd pages
-\end{enumerate}
-
-For many documents, the first three arguments will be left empty.
-If \commandrefn{pagestyle}{pagestyle} is not plain or empty, the
-header will separated from the rest of the page by a rule.
-
-The behaviour for first pages of a chapter, section or document
-is to have a blank header, but print the footer.
-
-For best results, define headers and footers for {\it each chapter or
-section}.
-
-Note that this command works only for \LaTeX\ and linear RTF. See also\rtfsp
-\commandrefn{setfooter}{setfooter}.
-
-\subsection*{sethotspotcolour:1}\label{sethotspotcolour}
-
-If the argument is yes, on or ok, subsequent WinHelp hotspots will be green.
-If any other value, the hotspots will be the normal text colour. Note that this
-doesn't apply to section hotspots, only to helpref hotspots.
-
-\subsection*{sethotspotunderline:1}\label{sethotspotunderline}
-
-If the argument is yes, on or ok, subsequent WinHelp hotspots will be
-underlined (the default). If any other value, the hotspots will not be
-underlined. Note that this doesn't apply to section hotspots, only to
-helpref hotspots.
-
-\subsection*{settransparency:1}\label{settransparency}
-
-WinHelp mode only (version 4 of WinHelp). If the argument is yes, on or ok, subsequent bitmaps
-will be inserted in transparent mode: areas of white will be made transparent.
-If the argument is any other value (such as no, ok or false), the bitmaps will not be transparent.
-
-\subsection*{textcolour:1}\label{textcolour}
-
-Specifies the text foreground colour for the whole page, HTML only. The argument consists
-of three numbers from 0 to 255 separated by semicolons, for red, green and blue values respectively.
-
-For example:
-
-\begin{verbatim}
- \textcolour{255;255;255}
- \textcolour{0;0;255}
-\end{verbatim}
-
-The first example sets the text to white, and the second sets the text to blue.
-
-See also \commandrefn{backgroundcolour}{backgroundcolour}, \commandrefn{linkcolour}{linkcolour},
-\rtfsp\commandrefn{followedlinkcolour}{followedlinkcolour}.
-
-Instead of using a LaTeX command, you may find it more convenient to use the equivalent {\tt .ini} file
-setting, {\it textColour}.
-
-\subsection*{toocomplex:1}\label{toocomplex}
-
-An environment for dealing with complex \LaTeX\ commands that
-Tex2RTF cannot handle. In normal \LaTeX, the argument will be output
-as normal. In Tex2RTF output, the argument will be output as verbatim text,
-for the user to hand-translate into the desired output format.
-
-See also \commandrefn{comment}{comment}.
-
-\subsection*{twocolitem:2}\label{twocolitem}
-
-Used to specify a row for a two column list, a Tex2RTF
-extension to optimize two-column lists for different
-file formats. See \commandrefn{twocollist}{twocollist},
-\rtfsp\commandrefn{twocolitemruled}{twocolitemruled}.
-
-\subsection*{twocolitemruled:2}\label{twocolitemruled}
-
-Used to specify a ruled row for a two column list, a Tex2RTF
-extension to optimize two-column lists for different
-file formats. See \commandrefn{twocollist}{twocollist},
-\rtfsp\commandrefn{twocolitem}{twocolitem}.
-
-\subsection*{twocollist:1}\label{twocollist}
-
-A Tex2RTF environment for specifying a table of two columns, often
-used in manuals and help files (for example, for listing commands and
-their meanings). The first column should be one line only, and
-the second can be an arbitrary number of paragraphs.
-
-The reason that a normal tabular environment cannot be used is that
-WinHelp does not allow borders in table cells, so a different method
-must be employed if any of the rows are to be ruled. In \LaTeX, a table
-is used to implement this environment. In RTF, indentation is used instead.
-
-Use this environment in conjunction with \commandrefn{twocolitem}{twocolitem} and\rtfsp
-\commandrefn{twocolitemruled}{twocolitemruled}. To set the widths of the first
-and second column, use \commandrefn{twocolwidtha}{twocolwidtha} and\rtfsp
-\commandrefn{twocolwidthb}{twocolwidthb}.
-
-Example:
-
-\begin{verbatim}
- \htmlignore{\begin{twocollist}}
- \twocolitemruled{{\bf Command}}{{\bf Description}}
- \twocolitem{File}{The file menu is used to select various
- file-related operations, such as saving and loading.}
- \twocolitem{Edit}{The Edit menu is used for
- selection, copying, pasting, etc.}
- \end{twocollist}
-\end{verbatim}
-
-This produces:
-
-\begin{twocollist}
-\twocolitemruled{{\bf Command}}{{\bf Description}}
-\twocolitem{File}{The file menu is used to select various file-related
-operations, such as saving and loading.}
-\twocolitem{Edit}{The Edit menu is used for selection, copying, pasting, etc.}
-\end{twocollist}
-
-\subsection*{twocolwidtha:1}\label{twocolwidtha}
-
-Sets the width of the first column in a two column list to the given
-dimension. See also \commandrefn{twocollist}{twocollist} and \commandrefn{twocolwidthb}{twocolwidthb}.
-
-\subsection*{twocolwidthb:1}\label{twocolwidthb}
-
-Sets the width of the second column in a two column list to the given
-dimension. See also \commandrefn{twocollist}{twocollist} and \commandrefn{twocolwidtha}{twocolwidtha}.
-
-\subsection*{urlref:2}\label{urlref}
-
-Specifies a jump to a URL (univeral resource location).
-
-The first argument is text to be highlighted (mouseable in HTML browsers)
-and the second is the URL. In linear documents, the URL
-is given following the text.
-
-Example:
-
-\begin{verbatim}
- See also the \urlref{wxWidgets manual}
- {http://www.aiai.ed.ac.uk/~jacs.html}.
-\end{verbatim}
-
-(the line is broken only to keep to this manual's page width).
-
-\subsection*{winhelpignore:1}\label{winhelpignore}
-
-Ignores the argument in WinHelp RTF.
-
-\subsection*{winhelponly:1}\label{winhelponly}
-
-Only outputs the argument in WinHelp RTF.
-
-\subsection*{xlpignore:1}\label{xlpignore}
-
-Ignores the argument in XLP mode (wxHelp files).
-
-\subsection*{xlponly:1}\label{xlponly}
-
-Only outputs the argument in XLP mode (wxHelp files).
-
-\section{Accents}\label{accents}
-
-The following \LaTeX\ accents work for RTF and HTML production:
-
-\begin{itemize}%
-\itemsep=0pt
-\item \verb$\'{a}$ produces \'{a}. Valid for a, e, i, o, u, A, E, I, O, U
-\item \verb$\`{a}$ produces \`{a}. Valid for a, e, i, o, u, y, A, E, I, O, U, Y
-\item \verb$\^{a}$ produces \^{a}. Valid for a, e, i, o, u, A, E, I, O, U
-\item \verb$\~{a}$ produces \~{a}. Valid for a, n, o, A, N, O
-\item \verb$\"{a}$ produces \"{a}. Valid for a, e, i, o, u, y, A, E, I, O, U, Y
-\item \verb$\.{a}$ produces \.{a}. Valid for a, A
-\end{itemize}
-
-\section{Commands by category}\index{commands}%
-
-Below are categories of \LaTeX\ commands, to help you find the right
-command for a particular purpose.
-
-\subsection{Font commands}
-
-\begin{itemize}\itemsep=0pt
-\item \commandpageref{bf}{bf}
-\item \commandpageref{bffamily}{bffamily}
-\item \commandpageref{em}{em}
-\item \commandpageref{emph}{emph}
-\item \commandpageref{huge}{huge1}
-\item \commandpageref{Huge}{Huge2}
-\item \commandpageref{HUGE}{HUGE3}
-\item \commandpageref{it}{it}
-\item \commandpageref{itshape}{itshape}
-\item \commandpageref{large}{large1}
-\item \commandpageref{Large}{Large2}
-\item \commandpageref{LARGE}{LARGE3}
-\item \commandpageref{mdseries}{mdseries}
-\item \commandpageref{normalsize}{normalsize}
-\item \commandpageref{rm}{rm}
-\item \commandpageref{rmfamily}{rmfamily}
-\item \commandpageref{sc}{sc}
-\item \commandpageref{scshape}{scshape}
-\item \commandpageref{sf}{sf}
-\item \commandpageref{sffamily}{sffamily}
-\item \commandpageref{sl}{sl}
-\item \commandpageref{slshape}{slshape}
-\item \commandpageref{small}{small}
-\item \commandpageref{textbf}{textbf}
-\item \commandpageref{textit}{textit}
-\item \commandpageref{textrm}{textrm}
-\item \commandpageref{textsf}{textsf}
-\item \commandpageref{textsc}{textsc}
-\item \commandpageref{textsl}{textsl}
-\item \commandpageref{texttt}{texttt}
-\item \commandpageref{tiny}{tiny}
-\item \commandpageref{tt}{tt}
-\item \commandpageref{ttfamily}{ttfamily}
-\item \commandpageref{underline}{underline}
-\item \commandpageref{upshape}{upshape}
-\end{itemize}
-
-\subsection{Paragraph formatting}
-
-\begin{itemize}\itemsep=0pt
-\item \commandpageref{centerline}{centerline}
-\item \commandpageref{comment}{comment}
-\item \commandpageref{flushleft}{flushleft}
-\item \commandpageref{footnote}{footnote}
-\item \commandpageref{indented}{indented}
-\item \commandpageref{marginparwidth}{marginparwidth}
-\item \commandpageref{marginpar}{marginpar}
-\item \commandpageref{marginpareven}{marginpareven}
-\item \commandpageref{marginparodd}{marginparodd}
-\item \commandpageref{multicolumn}{multicolumn}
-\item \commandpageref{newpage}{newpage}
-\item \commandpageref{noindent}{noindent}
-\item \commandpageref{onecolumn}{onecolumn}
-\item \commandpageref{parindent}{parindent}
-\item \commandpageref{parskip}{parskip}
-\item \commandpageref{par}{par}
-\item \commandpageref{quote}{quote}
-\item \commandpageref{quotation}{quotation}
-\item \commandpageref{textwidth}{textwidth}
-\item \commandpageref{twocolumn}{twocolumn}
-\item \commandpageref{verbatim}{verbatim}
-\item \commandpageref{verb}{verb}
-\end{itemize}
-
-\subsection{Special effects}
-
-\begin{itemize}\itemsep=0pt
-\item \commandpageref{backgroundcolour}{backgroundcolour}
-\item \commandpageref{backgroundimage}{backgroundimage}
-\item \commandpageref{backslashraw}{backslashraw}
-\item \commandpageref{bcol}{bcol}
-\item \commandpageref{definecolour}{definecolour}
-\item \commandpageref{fcol}{fcol}
-\item \commandpageref{followedlinkcolour}{followedlinkcolour}
-\item \commandpageref{helpfontfamily}{helpfontfamily}
-\item \commandpageref{helpfontsize}{helpfontsize}
-\item \commandpageref{hrule}{hrule}
-\item \commandpageref{linkcolour}{linkcolour}
-\item \commandpageref{normalbox}{normalbox}
-\item \commandpageref{normalboxd}{normalboxd}
-\item \commandpageref{sethotspotcolour}{sethotspotcolour}
-\item \commandpageref{sethotspotunderline}{sethotspotunderline}
-\item \commandpageref{settransparency}{settransparency}
-\item \commandpageref{textcolour}{textcolour}
-\item \commandpageref{typeout}{typeout}
-\end{itemize}
-
-\subsection{Lists}
-
-\begin{itemize}\itemsep=0pt
-\item \commandpageref{description}{description}
-\item \commandpageref{enumerate}{enumerate}
-\item \commandpageref{itemize}{itemize}
-\item \commandpageref{item}{item}
-\item \commandpageref{itemsep}{itemsep}
-\item \commandpageref{twocolitem}{twocolitem}
-\item \commandpageref{twocolitemruled}{twocolitemruled}
-\item \commandpageref{twocollist}{twocollist}
-\item \commandpageref{twocolwidtha}{twocolwidtha}
-\item \commandpageref{twocolwidthb}{twocolwidthb}
-\end{itemize}
-
-\subsection{Sectioning}
-
-\begin{itemize}\itemsep=0pt
-\item \commandpageref{chapter}{chapter}
-\item \commandpageref{chapter*}{chaptersX}
-\item \commandpageref{chapterheading}{chapterheading}
-\item \commandpageref{insertatlevel}{insertatlevel}
-\item \commandpageref{paragraph}{paragraph}
-\item \commandpageref{paragraph*}{paragraphX}
-\item \commandpageref{section}{section}
-\item \commandpageref{section*}{sectionX}
-\item \commandpageref{sectionheading}{sectionheading}
-\item \commandpageref{subparagraph}{subparagraph}
-\item \commandpageref{subparagraph*}{subparagraphX}
-\item \commandpageref{subsection}{subsection}
-\item \commandpageref{subsection*}{subsectionX}
-\item \commandpageref{subsubsection}{subsubsection}
-\item \commandpageref{subsubsection*}{subsubsectionX}
-\end{itemize}
-
-\subsection{Pictures}
-
-\begin{itemize}\itemsep=0pt
-\item \commandpageref{brclear}{brclear}
-\item \commandpageref{image}{image}
-\item \commandpageref{imagel}{imagel}
-\item \commandpageref{imagemap}{imagemap}
-\item \commandpageref{imager}{imager}
-\item \commandpageref{psboxto}{psboxto}
-\end{itemize}
-
-\subsection{References and jumps}
-
-\begin{itemize}\itemsep=0pt
-\item \commandpageref{footnotepopup}{footnotepopup}
-\item \commandpageref{helpref}{helpref}
-\item \commandpageref{helprefn}{helprefn}
-\item \commandpageref{label}{label}
-\item \commandpageref{pageref}{pageref}
-\item \commandpageref{popref}{popref}
-\item \commandpageref{ref}{ref}
-\item \commandpageref{urlref}{urlref}
-\end{itemize}
-
-\subsection{Tables and figures}
-
-\begin{itemize}\itemsep=0pt
-\item \commandpageref{caption}{caption}
-\item \commandpageref{figure}{figure}
-\item \commandpageref{hline}{hline}
-\item \commandpageref{ruledrow}{ruledrow}
-\item \commandpageref{tabbing}{tabbing}
-\item \commandpageref{tabular}{tabular}
-\end{itemize}
-
-\subsection{Table of contents}
-
-\begin{itemize}\itemsep=0pt
-\item \commandpageref{addcontentsline}{addcontentsline}
-\item \commandpageref{author}{author}
-\item \commandpageref{date}{date}
-\item \commandpageref{maketitle}{maketitle}
-\item \commandpageref{tableofcontents}{tableofcontents}
-\item \commandpageref{title}{title}
-\end{itemize}
-
-\subsection{Special sections}
-
-\begin{itemize}\itemsep=0pt
-\item \commandpageref{bibitem}{bibitem}
-\item \commandpageref{bibliographystyle}{bibliographystyle}
-\item \commandpageref{bibliography}{bibliographycmd}
-\item \commandpageref{cite}{cite}
-\item \commandpageref{gloss}{gloss}
-\item \commandpageref{helpglossary}{helpglossary}
-\item \commandpageref{index}{index}
-\item \commandpageref{nocite}{nocite}
-\item \commandpageref{printindex}{printindex}
-\item \commandpageref{shortcite}{shortcite}
-\item \commandpageref{thebibliography}{thebibliography}
-\end{itemize}
-
-
-\subsection{Symbols}
-
-\begin{itemize}\itemsep=0pt
-\item \commandpageref{backslash}{backslash}
-\item \commandpageref{cdots}{cdots}
-\item \commandpageref{cextract}{cextract}
-\item \commandpageref{cinsert}{cinsert}
-\item \commandpageref{copyright}{copyright}
-\item \commandpageref{LaTeX}{LaTeX}
-\item \commandpageref{lbraceraw}{lbraceraw}
-\item \commandpageref{ldots}{ldots}
-\item \commandpageref{rbraceraw}{rbraceraw}
-\item \commandpageref{registered}{registered}
-\item \commandpageref{rtfsp}{rtfsp}
-\item \commandpageref{ss}{ss}
-\item \commandpageref{TeX}{TeX}
-\item \commandpageref{today}{today}
-\end{itemize}
-
-\subsection{Document organisation}
-
-\begin{itemize}\itemsep=0pt
-\item \commandpageref{document}{document}
-\item \commandpageref{documentstyle}{documentstyle}
-\item \commandpageref{helpignore}{helpignore}
-\item \commandpageref{helponly}{helponly}
-\item \commandpageref{helpinput}{helpinput}
-\item \commandpageref{htmlignore}{htmlignore}
-\item \commandpageref{htmlonly}{htmlonly}
-\item \commandpageref{include}{include}
-\item \commandpageref{input}{input}
-\item \commandpageref{latexignore}{latexignore}
-\item \commandpageref{latexonly}{latexonly}
-\item \commandpageref{newcommand}{newcommand}
-\item \commandpageref{pagestyle}{pagestyle}
-\item \commandpageref{pagenumbering}{pagenumbering}
-\item \commandpageref{rtfignore}{rtfignore}
-\item \commandpageref{rtfonly}{rtfonly}
-\item \commandpageref{setfooter}{setfooter}
-\item \commandpageref{setheader}{setheader}
-\item \commandpageref{special}{special}
-\item \commandpageref{toocomplex}{toocomplex}
-\item \commandpageref{verbatiminput}{verbatiminput}
-\item \commandpageref{winhelpignore}{winhelpignore}
-\item \commandpageref{winhelponly}{winhelponly}
-\item \commandpageref{xlpignore}{xlpignore}
-\item \commandpageref{xlponly}{xlponly}
-\end{itemize}
-
-\chapter{Bugs and troubleshooting}\label{errors}\index{bugs}\index{errors}\index{troubleshooting}%
-\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-\section{Bugs}
-
-\begin{description}
-\item[Command parsing.] If a command is used followed by inappropriate
-argument syntax, Tex2RTF can crash. This an occur when a command is
-used in an asterisk form that is only formed in the non-asterisk
-variety. The non-asterisk form is assumed, which makes the following
-asterisk trip up the parser.
-\item[Setlength.] Using the $\backslash$setlength command doesn't work,
-since its first argument looks like a command with the wrong number
-of arguments. Use an alternative form instead, e.g. \verb$\parindent 0pt$ instead
-of \verb$\setlength{parindent}{0pt}$.
-\item[Newcommand bug.] Environments in a command definition confuse
-Tex2RTF. Use the command form instead (e.g. $\backslash$flushleft\{...\} instead
-of $\backslash$begin\{flushleft\} ... $\backslash$end\{flushleft\}.
-\item[Bibliography.] There's no flexibility in the way references
-are output: I expect I'll get round to doing something better,
-but only if people tell me they need it!
-\item[Tables.] Tables can't handle all \LaTeX\ syntax, and require
-the Tex2RTF \verb$\row$ commands for decent formatting. Still, it's
-better than it was (RTF only).
-\item[Indexes and glossaries.] Not completely supported.
-\item[Crashes.] Crashes may be due to an input file exceeding the fixed-size
-buffer used for converting command arguments, especially for the \verb$\verbatim$\rtfsp
-command. Use the {\tt -bufsize} switch to increase the buffer size.
-\item[Verbatiminput.] Verbatiminput files which do not end with a blank line
-can trip up following commands.
-\end{description}
-
-\section{Troubleshooting}
-
-Below are some common problems and possible solutions.
-
-\normalbox{Some of the syntax that is OK for true \LaTeX\ but which trips up
-Tex2RTF, may be detected by the TCHECK program included in the tools
-directory of the Tex2RTF distribution. Some \LaTeX\ errors may be picked up
-by the LACHECK program, also found in the tools directory.}
-
-\subsection{Macro not found}\label{macronotfound}\index{macro not found error}%
-
-This error may indicate that Tex2RTF has not implemented a standard
-\rtfsp\LaTeX\ command, or that a local macro package is being used that
-Tex2RTF does not know about. It can cause spurious secondary
-errors, such as not recognising the end document command.
-
-You can get round this by defining a macro file (default name {\tt tex2rtf.ini})
-containing command definitions, such as:
-
-\begin{verbatim}
- \crazy [2]{{\bf #2} is crazy but #1 is not}
- \something [0]{}
- \julian [0]{Julian Smart}
-\end{verbatim}
-
-New commands may be defined in \LaTeX\ files, but custom macro files
-will have to be defined when local style files are being used. See\rtfsp
-\helpref{Initialisation file syntax}{inifile} for further details.
-
-The `Macro not found' error can also be caused by a syntax error such as
-an unbalanced brace or passing the wrong number of arguments to a command,
-so look in the vicinity of the reported error for the real cause.
-
-Here is one obscure situation that causes this error:
-
-\begin{verbatim}
- \begin{center}
- {\large{\underline{A}}}
- \end{center}
-\end{verbatim}
-
-The problem is too many curly brackets. This should be rewritten as:
-
-\begin{verbatim}
- \begin{center}
- {\large \underline{A}}
- \end{center}
-\end{verbatim}
-
-Often you get a `Macro not found' error for \verb$\end{document}$. This
-is a spurious side-effect of an earlier error, usually an incorrect number
-of arguments to a command. The location of the true error is then anywhere
-in the document. To home in on the error, try putting a verbatim environment
-\rtfsp\verb$\begin{comment}...\end{comment}$ around much of the document,
-and then move the \verb$\begin{comment}$ line down until the error
-manifests itself.
-
-\subsection{Unresolved reference}\index{references, unresolved}%
-
-References and citations are usually resolved on a second pass of
-Tex2RTF. If this doesn't work, then a missing label or bibliographical
-entry is to blame.
-
-\subsection{Output crashes the RTF reader}
-
-This could be due to confusing table syntax. Set {\it compatibility} to\rtfsp
-{\it TRUE} in {\tt .ini} file; also check for end of row characters backslash characters
-on their own on a line, and insert correct number of ampersands for the number of
-columns. E.g.
-
-\begin{verbatim}
- hello & world\\
- \\
-\end{verbatim}
-
-becomes
-
-\begin{verbatim}
- hello & world\\
- &\\
-\end{verbatim}
-
-\subsection{Erratic list indentation}
-
-Try increasing the value of the variable {\it listItemIndent} (default 40
-points) to give more space between label and following text. A global
-replacement of \verb$\item [$ with \verb$\item[$ may also be helpful to remove
-unnecessary space before the item label.
-
-\subsection{Missing figure or section reference}
-
-Ensure all labels {\it directly} follow captions or sections (no intervening
-white space).
-
-\subsection{Linear RTF looks odd}
-
-For viewing by programs other than MS Word, you should set the variable {\it useWord} to {\it false}. This
-will turn off some of the special RTF keywords recognised by Word (and possibly other advanced RTF readers).
-
-\subsection{Paragraphs preceding lists are formatted weirdly.}
-
-If a list has spurious spacing in it, e.g. before a \verb$\item$ command, the preceding
-paragraph can take on some of the list's indentation. This may be a WinHelp bug, or an aspect
-of RTF I don't fully understand. The solution is to remove unnecessary space.
-
-\subsection{Unresolved references in Word for Windows}\index{Microsoft Word}%
-
-If question marks appear instead of numbers for figures and tables,
-select all (e.g. CTRL-A), then press F9 {\it twice} to reformat the
-document twice. For the second format, respond with {\it Update Entire
-Table} to any prompts.
-
-\subsection{The Windows 95 help file contents hierarchy looks wrong}\index{WinHelp files}%
-
-WinHelp version 4 (or the WIN32 Help Compiler) does not allow a
-book in the contents list to be followed by a page at the same level.
-A book must be followed by a book, for some strange reason, otherwise
-the page will be tacked on to the pages of the book above it, i.e. placed
-at the wrong level.
-
-To get around this, Tex2RTF inserts a book in some places, if there
-was a book preceding it on the same level. This results in more
-navigation than necessary, but is better than a wrong contents page.
-
-\newpage
-
-% Puts books in the bibliography without needing to cite them in the
-% text
-\nocite{smart93a}%
-\nocite{kopka}%
-\nocite{pfeiffer}%
-
-\bibliography{refs}
-\addcontentsline{toc}{chapter}{Bibliography}
-\setheader{{\it REFERENCES}}{}{}{}{}{{\it REFERENCES}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-\begin{helpglossary}
-\setheader{{\it GLOSSARY}}{}{}{}{}{{\it GLOSSARY}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-
-\gloss{GUI}
-
-Graphical User Interface, such as Windows 3 or X.
-
-\gloss{HTML}\label{html}
-
-Hypertext Markup Language; an SGML document type, used for providing
-hypertext information on the World Wide Web, a distributed hypertext
-system on the Internet.
-
-\gloss{LaTeX}\label{latexgloss}
-
-A typesetting language implemented as a set of \TeX\ macros. It is
-distinguished for allowing specification of the document structure,
-while taking care of most layout concerns. It represents the opposite
-end of the spectrum from WYSIWYG word processors.
-
-\gloss{RTF}\label{rtf}
-
-Rich Text Format: an interchange format for word processor files,
-used for importing and exporting formatted documents, and as the
-input to the Windows Help compiler.
-
-\gloss{wxHelp}\label{wxhelp}
-
-wxHelp is the hypertext help facility used to provide on-line
-documentation for UNIX-based wxWidgets applications. Under Windows 3.1,
-Windows Help is used instead.
-
-\gloss{wxWidgets}\label{wxwidgets}
-
-wxWidgets is a free C++ toolkit for writing applications that are
-portable across several platforms. Currently these are Motif, Open Look,
-Windows 3.1 and Windows NT. Tex2RTF is written using wxWidgets.
-
-\end{helpglossary}
-
-\addcontentsline{toc}{chapter}{Index}
-\setheader{{\it INDEX}}{}{}{}{}{{\it INDEX}}%
-\setfooter{\thepage}{}{}{}{}{\thepage}%
-\printindex%
-
-\end{document}
+++ /dev/null
-% LaTeX style file
-% Name: texhelp.sty
-% Author: Julian Smart
-%
-% Purpose
-% -------
-% Style file to enable the simultaneous preparation of printed LaTeX and on-line
-% hypertext manuals.
-% Use in conjunction with Tex2RTF (see Tex2RTF documentation).
-%
-% Note that if a non-ASCII character starts a newline and there should be a space
-% between the last word on the previous line and the first word on this line,
-% you need to use \rtfsp to generate a space in Windows Help. \rtfsp is ignored
-% in all other formats.
-%
-% Julian Smart
-% Artificial Intelligence Applications Institute
-%
-%
-% ============== C++/CLIPS Documentation Facilities ==============
-%
-% Each class definition should be typeset with e.g.
-%
-% \section{\class{Name}: Parent}
-%
-% followed by a description of the class.
-% Each member should follow:
-%
-% \membersection{wxName::Member}
-%
-% with a description of what this member does.
-% Then, one (or more if overloaded) member (function) in detail:
-%
-% \func{return type}{name}{args}
-% or
-% \member{type}{name}
-%
-% where args is a list of \param{type}{name}, ...
-
-% Function, e.g.
-% e.g. to typeset
-%
-% void DoIt(char *string);
-%
-% write:
-%
-% \func{void}{DoIt}{\param{char *}{string}}
-%
-
-\newcommand{\func}[3]{\hangafter=1\noindent\hangindent=10mm
-{{\it #1} {\bf #2}\index{#2}}(#3)}
-
-% For function/type definition where the name is a pointer,
-% e.g. to typeset
-%
-% typedef void (*wxFunction)(wxObject&)
-%
-% write:
-%
-% \pfunc{typedef void}{wxFunction}{param{wxObject&}}
-
-\newcommand{\pfunc}[3]{\hangafter=1\noindent\hangindent=10mm
-{{\it #1} ({\bf *#2})\index{#2}}(#3)}
-
-% Use an ordinary \section command for class name definitions.
-
-% This is used for a member, such as wxBitmap: GetDepth
-\newcommand{\membersection}[1]{\subsection*{#1}\index{#1}}
-
-% CLIPS function
-\newcommand{\clipsfunc}[3]{\hangafter=1\noindent\hangindent=10mm
-{{\bf #1} ({\bf #2}\index{#2}}#3)}
-
-\newcommand{\clipssection}[1]{\chapter{#1}}
-
-% This is used for a CLIPS function name
-\newcommand{\functionsection}[1]{\subsection*{#1}}
-
-% Member: a type and a name
-\newcommand{\member}[2]{{\bf #1 \it #2}}
-
-% C++ Parameter: a type and a name (no intervening space)
-\newcommand{\param}[2]{{\it #1}{\bf #2}}
-
-% CLIPS Parameter: a type and a name (one intervening space)
-\newcommand{\cparam}[2]{{\bf #1} {\it #2}}
-
-% Class: puts in index
-\newcommand{\class}[1]{#1\index{#1}}
-
-% Void type
-\newcommand{\void}{{\it void}}
-
-% Typeset destructor
-\newcommand{\destruct}[1]{{$\sim$}#1}
-
-% Typeset insert/extract operators
-\newcommand{\cinsert}{$<<$}
-\newcommand{\cextract}{$>>$}
-
-
-% =================== Hypertext facilities ===================
-%
-% To insert hyperlinks (or references, in Latex), \label the sections
-% or membersections \label{ref-label} immediately after the section, on the same line,
-% and use \helpref{text-to-show}{ref-label} to make a reference.
-%
-
-% Type text with section reference
-\newcommand{\helpref}[2]{{\it #1} (section \ref{#2}) }
-
-% Type text with URL in verbatim mode
-\newcommand{\urlref}[2]{#1 (\verb$#2$)}
-
-% Don't typeset section number in LaTeX
-\newcommand{\helprefn}[2]{{\it #1}}
-
-% Like helpref, but popup text in WinHelp instead of hyperlinked
-\newcommand{\popref}[2]{{\it #1}}
-
-% Like footnote, but popup text.
-\newcommand{\footnotepopup}[2]{{\it #1}\footnote{#2}}
-
-% =================== On-line help specific macros ===================
-%
-
-% Global document font size/family, help only.
-\newcommand{\helpfontsize}[1]{}
-\newcommand{\helpfontfamily}[1]{}
-
-% Ignore in all on-line help
-\newcommand{\helpignore}[1]{#1}
-% Only print in all on-line help
-\newcommand{\helponly}[1]{}
-
-% Ignore in LaTeX
-\newcommand{\latexignore}[1]{}
-% Only print in LaTeX
-\newcommand{\latexonly}[1]{#1}
-
-% Ignore in linear RTF
-\newcommand{\rtfignore}[1]{#1}
-% Only print in linear RTF
-\newcommand{\rtfonly}[1]{}
-
-% Ignore in WinHelp RTF
-\newcommand{\winhelpignore}[1]{#1}
-% Only print in WinHelp RTF
-\newcommand{\winhelponly}[1]{}
-
-% Ignore in wxHelp
-\newcommand{\xlpignore}[1]{#1}
-% Only print in wxHelp
-\newcommand{\xlponly}[1]{}
-
-% Ignore in HTML
-\newcommand{\htmlignore}[1]{#1}
-% Only print in HTML
-\newcommand{\htmlonly}[1]{}
-
-% Input a file only for help system (binder thickness is not a limitation
-% in help systems!)
-\newcommand{\helpinput}[1]{}
-
-\newcommand{\rtfsp}{ } % Force a space in RTF, ignore in Latex
-
-% =================== Miscellaneous macros ===================
-%
-% Headings consistent with generated ones
-\newcommand{\myheading}[1]{\vspace*{25pt}
-\begin{flushleft}
-{\LARGE \bf #1}
-\end{flushleft}
-\vskip 20pt
-}
-
-% Heading with entry in contents page.
-\newcommand{\chapterheading}[1]{\myheading{#1}
-\addcontentsline{toc}{chapter}{#1}}
-
-\newcommand{\sectionheading}[1]{\myheading{#1}
-\addcontentsline{toc}{section}{#1}}
-
-% Glossary environment
-\newenvironment{helpglossary}{\newpage\chapterheading{Glossary}\begin{description}}{\end{description}}
-
-% Glossary entry
-\newcommand{\gloss}[1]{\item[#1]\index{#1}}
-
-% Image: EPS in Latex, BMP or MF (whatever's available) in RTF. Requires psbox.
-\newcommand{\image}[2]{\psboxto(#1){#2}}
-
-% Image, left aligned (HTML)
-\newcommand{\imager}[2]{\psboxto(#1){#2}}
-
-% Image, right aligned (HTML)
-\newcommand{\imagel}[2]{\psboxto(#1){#2}}
-
-% Imagemap: principally for HTML only. In Latex,
-% acts like \image.
-\newcommand{\imagemap}[3]{\psboxto(#1){#2}}
-
-% Headers and footers
-% \setheader{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
-% {OddPageLeft}{OddPageCentre}{OddPageRight}
-\newcommand{\setheader}[6]{
-\lhead[\fancyplain{}{#1}]{\fancyplain{}{#4}}
-\chead[\fancyplain{}{#2}]{\fancyplain{}{#5}}
-\rhead[\fancyplain{}{#3}]{\fancyplain{}{#6}}
-}
-
-% \setfooter{EvenPageLeft}{EvenPageCentre}{EvenPageRight}
-% {OddPageLeft}{OddPageCentre}{OddPageRight}
-\newcommand{\setfooter}[6]{
-\lfoot[\fancyplain{#1}{#1}]{\fancyplain{#4}{#4}}
-\cfoot[\fancyplain{#2}{#2}]{\fancyplain{#5}{#5}}
-\rfoot[\fancyplain{#3}{#3}]{\fancyplain{#6}{#6}}
-}
-
-% Needed for telling RTF where margin paragraph should go
-% in mirrored margins mode.
-\newcommand{\marginpareven}[1]{\hspace*{0pt}\marginpar{#1}}
-\newcommand{\marginparodd}[1]{\hspace*{0pt}\marginpar{#1}}
-
-% Environment for two-column table popular in WinHelp and manuals.
-\newcommand{\twocolwidtha}[1]{\def\twocolwidthaval{#1}}
-\newcommand{\twocolwidthb}[1]{\def\twocolwidthbval{#1}}
-\newcommand{\twocolspacing}[1]{\def\twocolspacingval{#1}}
-
-\twocolwidtha{3cm}
-\twocolwidthb{8.5cm}
-\twocolspacing{2}
-
-\newcommand{\twocolitem}[2]{#1 & #2\\}
-\newcommand{\twocolitemruled}[2]{#1 & #2\\\hline}
-
-\newenvironment{twocollist}{\renewcommand{\arraystretch}{\twocolspacingval}\begin{tabular}{lp{\twocolwidthbval}}}%
-{\end{tabular}\renewcommand{\arraystretch}{1}}
-
-% Specifying table rows for RTF compatibility
-\newcommand{\row}[1]{#1\\}
-
-% Use for the last ruled row for correct RTF generation.
-\newcommand{\ruledrow}[1]{#1\\\hline}
-
-% Indentation environment. Arg1 is left margin size
-\newenvironment{indented}[1]{\begin{list}{}{\leftmargin=#1}\item[]}%
-{\end{list}}
-
-% Framed box of text, normal formatting.
-\newcommand{\normalbox}[1]{\fbox{\vbox{#1}}}
-% Double-framed box of text.
-\newcommand{\normalboxd}[1]{\fbox{\fbox{\vbox{#1}}}}
-
-% WITHDRAWN -- can't do in RTF, easily.
-% Framed box of text, horizontally centred. Ragged right within box.
-% \newcommand{\centeredbox}[2]{\begin{center}\fbox{\parbox{#1}{\raggedright#2}}\end{center}}
-% Double-framed box of text, horizontally centred. Ragged right within box.
-% \newcommand{\centeredboxd}[2]{\begin{center}\fbox{\fbox{\parbox{#1}{\raggedright#2}}}\end{center}}
-
-% toocomplex environment: simply prints the argument in LaTeX,
-% comes out verbatim in all generated formats.
-\newenvironment{toocomplex}{}{}
-
-% Colour: dummy commands since LaTeX doesn't support colour.
-% \definecolour{name}{red}{blue}{green}
-% \fcol{name}{text} ; Foreground
-% \bcol{name}{text} ; Background
-\newcommand{\definecolour}[4]{}
-\newcommand{\definecolor}[4]{}
-\newcommand{\fcol}[2]{#2}
-\newcommand{\bcol}[2]{#2}
-\newcommand{\sethotspotcolour}[1]{}
-\newcommand{\sethotspotunderline}[1]{}
-\newcommand{\settransparency}[1]{}
-\newcommand{\backslashraw}[0]{}
-\newcommand{\lbraceraw}[0]{}
-\newcommand{\rbraceraw}[0]{}
-\newcommand{\registered}[0]{(r)}
-\newcommand{\background}[1]{}
-\newcommand{\textcolour}[1]{}
-\newcommand{\overview}[2]{See \helpref{#1}{#2}.}
+++ /dev/null
-# =========================================================================
-# This makefile was generated by
-# Bakefile 0.2.3 (http://www.bakefile.org)
-# Do not modify, all changes will be overwritten!
-# =========================================================================
-
-
-@MAKE_SET@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-datarootdir = @datarootdir@
-INSTALL = @INSTALL@
-EXEEXT = @EXEEXT@
-WINDRES = @WINDRES@
-REZ = @REZ@
-SETFILE = @SETFILE@
-STRIP = @STRIP@
-NM = @NM@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DIR = @INSTALL_DIR@
-BK_DEPS = @BK_DEPS@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-bindir = @bindir@
-LIBS = @LIBS@
-LDFLAGS_GUI = @LDFLAGS_GUI@
-CXX = @CXX@
-CXXFLAGS = @CXXFLAGS@
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-WX_LIB_FLAVOUR = @WX_LIB_FLAVOUR@
-TOOLKIT = @TOOLKIT@
-TOOLKIT_LOWERCASE = @TOOLKIT_LOWERCASE@
-TOOLKIT_VERSION = @TOOLKIT_VERSION@
-TOOLCHAIN_FULLNAME = @TOOLCHAIN_FULLNAME@
-EXTRALIBS = @EXTRALIBS@
-EXTRALIBS_HTML = @EXTRALIBS_HTML@
-EXTRALIBS_GUI = @EXTRALIBS_GUI@
-CXXWARNINGS = @CXXWARNINGS@
-HOST_SUFFIX = @HOST_SUFFIX@
-wx_top_builddir = @wx_top_builddir@
-
-### Variables: ###
-
-DESTDIR =
-WX_RELEASE = 2.9
-LIBDIRNAME = $(wx_top_builddir)/lib
-TEX2RTF_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
- $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
- -I$(srcdir) $(__DLLFLAG_p) -DwxUSE_GUI=0 -DNO_GUI $(CXXWARNINGS) $(CPPFLAGS) \
- $(CXXFLAGS)
-TEX2RTF_OBJECTS = \
- tex2rtf_tex2rtf.o \
- tex2rtf_tex2any.o \
- tex2rtf_texutils.o \
- tex2rtf_rtfutils.o \
- tex2rtf_xlputils.o \
- tex2rtf_htmlutil.o \
- tex2rtf_readshg.o \
- tex2rtf_table.o
-TEX2RTF_GUI_CXXFLAGS = -D__WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p) \
- $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
- -I$(srcdir) $(__DLLFLAG_p) -I$(srcdir)/../../../samples $(CXXWARNINGS) \
- $(CPPFLAGS) $(CXXFLAGS)
-TEX2RTF_GUI_OBJECTS = \
- $(__tex2rtf_gui___win32rc) \
- $(__tex2rtf_gui_os2_lib_res) \
- tex2rtf_gui_tex2rtf.o \
- tex2rtf_gui_tex2any.o \
- tex2rtf_gui_texutils.o \
- tex2rtf_gui_rtfutils.o \
- tex2rtf_gui_xlputils.o \
- tex2rtf_gui_htmlutil.o \
- tex2rtf_gui_readshg.o \
- tex2rtf_gui_table.o
-
-### Conditionally set variables: ###
-
-@COND_DEPS_TRACKING_0@CXXC = $(CXX)
-@COND_DEPS_TRACKING_1@CXXC = $(BK_DEPS) $(CXX)
-@COND_USE_GUI_0@PORTNAME = base
-@COND_USE_GUI_1@PORTNAME = $(TOOLKIT_LOWERCASE)$(TOOLKIT_VERSION)
-@COND_TOOLKIT_MAC@WXBASEPORT = _carbon
-@COND_BUILD_DEBUG_DEBUG_FLAG_DEFAULT@WXDEBUGFLAG = d
-@COND_DEBUG_FLAG_1@WXDEBUGFLAG = d
-@COND_UNICODE_1@WXUNICODEFLAG = u
-@COND_WXUNIV_1@WXUNIVNAME = univ
-@COND_MONOLITHIC_0@EXTRALIBS_FOR_BASE = $(EXTRALIBS)
-@COND_MONOLITHIC_1@EXTRALIBS_FOR_BASE = $(EXTRALIBS) $(EXTRALIBS_GUI)
-@COND_MONOLITHIC_0@EXTRALIBS_FOR_GUI = $(EXTRALIBS_GUI)
-@COND_MONOLITHIC_1@EXTRALIBS_FOR_GUI =
-@COND_PLATFORM_MAC_0@__tex2rtf___mac_setfilecmd = @true
-@COND_PLATFORM_MAC_1@__tex2rtf___mac_setfilecmd = \
-@COND_PLATFORM_MAC_1@ $(SETFILE) -t APPL tex2rtf$(EXEEXT)
-@COND_USE_GUI_1@__tex2rtf_gui___depname = tex2rtf_gui$(EXEEXT)
-@COND_PLATFORM_MAC_0@__tex2rtf_gui___mac_setfilecmd = @true
-@COND_PLATFORM_MAC_1@__tex2rtf_gui___mac_setfilecmd = \
-@COND_PLATFORM_MAC_1@ $(SETFILE) -a C tex2rtf_gui$(EXEEXT)
-@COND_PLATFORM_MAC_1@__tex2rtf_gui___mac_rezcmd = $(__MACOSX_RESOURCES_p_1)
-@COND_WXUNIV_1@__WXUNIV_DEFINE_p_4 = -d __WXUNIVERSAL__
-@COND_WXUNIV_1@__WXUNIV_DEFINE_p_5 = --define __WXUNIVERSAL__
-@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_4 = -d wxNO_EXCEPTIONS
-@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p_5 = --define wxNO_EXCEPTIONS
-@COND_USE_RTTI_0@__RTTI_DEFINE_p_4 = -d wxNO_RTTI
-@COND_USE_RTTI_0@__RTTI_DEFINE_p_5 = --define wxNO_RTTI
-@COND_USE_THREADS_0@__THREAD_DEFINE_p_4 = -d wxNO_THREADS
-@COND_USE_THREADS_0@__THREAD_DEFINE_p_5 = --define wxNO_THREADS
-@COND_SHARED_1@__DLLFLAG_p_4 = -d WXUSINGDLL
-@COND_SHARED_1@__DLLFLAG_p_5 = --define WXUSINGDLL
-COND_PLATFORM_OS2_1___tex2rtf_gui___os2_emxbindcmd = $(NM) \
- tex2rtf_gui$(EXEEXT) | if grep -q pmwin.763 ; then emxbind -ep \
- tex2rtf_gui$(EXEEXT) ; fi
-@COND_PLATFORM_OS2_1@__tex2rtf_gui___os2_emxbindcmd = $(COND_PLATFORM_OS2_1___tex2rtf_gui___os2_emxbindcmd)
-@COND_TOOLKIT_MSW@__RCDEFDIR_p = -i \
-@COND_TOOLKIT_MSW@ $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME)
-@COND_TOOLKIT_MSW@__RCDEFDIR_p_1 = --include-dir \
-@COND_TOOLKIT_MSW@ $(LIBDIRNAME)/wx/include/$(TOOLCHAIN_FULLNAME)
-@COND_PLATFORM_WIN32_1@__tex2rtf_gui___win32rc = tex2rtf_gui_sample_rc.o
-@COND_PLATFORM_OS2_1@__tex2rtf_gui_os2_lib_res = \
-@COND_PLATFORM_OS2_1@ $(top_srcdir)/include/wx/os2/wx.res
-COND_MONOLITHIC_0___WXLIB_HTML_p = \
- -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html-$(WX_RELEASE)$(HOST_SUFFIX)
-@COND_MONOLITHIC_0@__WXLIB_HTML_p = $(COND_MONOLITHIC_0___WXLIB_HTML_p)
-COND_MONOLITHIC_0___WXLIB_CORE_p = \
- -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core-$(WX_RELEASE)$(HOST_SUFFIX)
-@COND_MONOLITHIC_0@__WXLIB_CORE_p = $(COND_MONOLITHIC_0___WXLIB_CORE_p)
-@COND_USE_GUI_1@__install_tex2rtf_gui___depname = install_tex2rtf_gui
-@COND_USE_GUI_1@__uninstall_tex2rtf_gui___depname = uninstall_tex2rtf_gui
-@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@__LIB_TIFF_p \
-@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ = \
-@COND_USE_GUI_1_WXUSE_LIBTIFF_BUILTIN@ -lwxtiff$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
-@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@__LIB_JPEG_p \
-@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ = \
-@COND_USE_GUI_1_WXUSE_LIBJPEG_BUILTIN@ -lwxjpeg$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
-@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@__LIB_PNG_p \
-@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ = \
-@COND_USE_GUI_1_WXUSE_LIBPNG_BUILTIN@ -lwxpng$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
-COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1 = $(REZ) -d __DARWIN__ -t APPL -d \
- __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_4) $(__EXCEPTIONS_DEFINE_p_4) \
- $(__RTTI_DEFINE_p_4) $(__THREAD_DEFINE_p_4) -i $(srcdir) $(__DLLFLAG_p_4) -i \
- $(srcdir)/../../../samples $(__RCDEFDIR_p) -i $(top_srcdir)/include -o \
- tex2rtf_gui$(EXEEXT) Carbon.r sample.r
-@COND_TOOLKIT_MAC@__MACOSX_RESOURCES_p_1 = $(COND_TOOLKIT_MAC___MACOSX_RESOURCES_p_1)
-@COND_WXUNIV_1@__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
-@COND_USE_EXCEPTIONS_0@__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
-@COND_USE_RTTI_0@__RTTI_DEFINE_p = -DwxNO_RTTI
-@COND_USE_THREADS_0@__THREAD_DEFINE_p = -DwxNO_THREADS
-@COND_SHARED_1@__DLLFLAG_p = -DWXUSINGDLL
-COND_MONOLITHIC_0___WXLIB_BASE_p = \
- -lwx_base$(WXBASEPORT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
-@COND_MONOLITHIC_0@__WXLIB_BASE_p = $(COND_MONOLITHIC_0___WXLIB_BASE_p)
-COND_MONOLITHIC_1___WXLIB_MONO_p = \
- -lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
-@COND_MONOLITHIC_1@__WXLIB_MONO_p = $(COND_MONOLITHIC_1___WXLIB_MONO_p)
-@COND_WXUSE_ZLIB_BUILTIN@__LIB_ZLIB_p = \
-@COND_WXUSE_ZLIB_BUILTIN@ -lwxzlib$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
-COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p = \
- -lwxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
-@COND_WXUSE_REGEX_BUILTIN@__LIB_REGEX_p = $(COND_WXUSE_REGEX_BUILTIN___LIB_REGEX_p)
-@COND_WXUSE_EXPAT_BUILTIN@__LIB_EXPAT_p = \
-@COND_WXUSE_EXPAT_BUILTIN@ -lwxexpat$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)-$(WX_RELEASE)$(HOST_SUFFIX)
-
-### Targets: ###
-
-all: tex2rtf$(EXEEXT) $(__tex2rtf_gui___depname)
-
-install: all install_tex2rtf $(__install_tex2rtf_gui___depname)
-
-uninstall: uninstall_tex2rtf $(__uninstall_tex2rtf_gui___depname)
-
-install-strip: install
- $(STRIP) $(DESTDIR)$(bindir)/tex2rtf$(EXEEXT)
- $(STRIP) $(DESTDIR)$(bindir)/tex2rtf_gui$(EXEEXT)
-
-clean:
- rm -rf ./.deps ./.pch
- rm -f ./*.o
- rm -f tex2rtf$(EXEEXT)
- rm -f tex2rtf_gui$(EXEEXT)
-
-distclean: clean
- rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
-
-tex2rtf$(EXEEXT): $(TEX2RTF_OBJECTS)
- $(CXX) -o $@ $(TEX2RTF_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LIBS) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE)
-
- $(__tex2rtf___mac_setfilecmd)
-
-install_tex2rtf:
- $(INSTALL_DIR) $(DESTDIR)$(bindir)
- $(INSTALL_PROGRAM) tex2rtf$(EXEEXT) $(DESTDIR)$(bindir)
-
-uninstall_tex2rtf:
- rm -f $(DESTDIR)$(bindir)/tex2rtf$(EXEEXT)
-
-@COND_USE_GUI_1@tex2rtf_gui$(EXEEXT): $(TEX2RTF_GUI_OBJECTS) $(__tex2rtf_gui___win32rc)
-@COND_USE_GUI_1@ $(CXX) -o $@ $(TEX2RTF_GUI_OBJECTS) $(LDFLAGS) -L$(LIBDIRNAME) $(LDFLAGS_GUI) $(LIBS) $(__WXLIB_HTML_p) $(EXTRALIBS_HTML) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) $(EXTRALIBS_FOR_GUI) $(__LIB_ZLIB_p) $(__LIB_REGEX_p) $(__LIB_EXPAT_p) $(EXTRALIBS_FOR_BASE)
-@COND_USE_GUI_1@ $(__tex2rtf_gui___mac_rezcmd)
-@COND_USE_GUI_1@ $(__tex2rtf_gui___mac_setfilecmd)
-@COND_USE_GUI_1@ $(__tex2rtf_gui___os2_emxbindcmd)
-
-@COND_USE_GUI_1@install_tex2rtf_gui:
-@COND_USE_GUI_1@ $(INSTALL_DIR) $(DESTDIR)$(bindir)
-@COND_USE_GUI_1@ $(INSTALL_PROGRAM) tex2rtf_gui$(EXEEXT) $(DESTDIR)$(bindir)
-
-@COND_USE_GUI_1@uninstall_tex2rtf_gui:
-@COND_USE_GUI_1@ rm -f $(DESTDIR)$(bindir)/tex2rtf_gui$(EXEEXT)
-
-tex2rtf_tex2rtf.o: $(srcdir)/tex2rtf.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_CXXFLAGS) $(srcdir)/tex2rtf.cpp
-
-tex2rtf_tex2any.o: $(srcdir)/tex2any.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_CXXFLAGS) $(srcdir)/tex2any.cpp
-
-tex2rtf_texutils.o: $(srcdir)/texutils.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_CXXFLAGS) $(srcdir)/texutils.cpp
-
-tex2rtf_rtfutils.o: $(srcdir)/rtfutils.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_CXXFLAGS) $(srcdir)/rtfutils.cpp
-
-tex2rtf_xlputils.o: $(srcdir)/xlputils.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_CXXFLAGS) $(srcdir)/xlputils.cpp
-
-tex2rtf_htmlutil.o: $(srcdir)/htmlutil.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_CXXFLAGS) $(srcdir)/htmlutil.cpp
-
-tex2rtf_readshg.o: $(srcdir)/readshg.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_CXXFLAGS) $(srcdir)/readshg.cpp
-
-tex2rtf_table.o: $(srcdir)/table.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_CXXFLAGS) $(srcdir)/table.cpp
-
-tex2rtf_gui_sample_rc.o: $(srcdir)/../../../samples/sample.rc
- $(WINDRES) -i$< -o$@ --define __WX$(TOOLKIT)__ $(__WXUNIV_DEFINE_p_5) $(__EXCEPTIONS_DEFINE_p_5) $(__RTTI_DEFINE_p_5) $(__THREAD_DEFINE_p_5) --include-dir $(srcdir) $(__DLLFLAG_p_5) --include-dir $(srcdir)/../../../samples $(__RCDEFDIR_p_1) --include-dir $(top_srcdir)/include
-
-tex2rtf_gui_tex2rtf.o: $(srcdir)/tex2rtf.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(srcdir)/tex2rtf.cpp
-
-tex2rtf_gui_tex2any.o: $(srcdir)/tex2any.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(srcdir)/tex2any.cpp
-
-tex2rtf_gui_texutils.o: $(srcdir)/texutils.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(srcdir)/texutils.cpp
-
-tex2rtf_gui_rtfutils.o: $(srcdir)/rtfutils.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(srcdir)/rtfutils.cpp
-
-tex2rtf_gui_xlputils.o: $(srcdir)/xlputils.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(srcdir)/xlputils.cpp
-
-tex2rtf_gui_htmlutil.o: $(srcdir)/htmlutil.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(srcdir)/htmlutil.cpp
-
-tex2rtf_gui_readshg.o: $(srcdir)/readshg.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(srcdir)/readshg.cpp
-
-tex2rtf_gui_table.o: $(srcdir)/table.cpp
- $(CXXC) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(srcdir)/table.cpp
-
-
-# Include dependency info, if present:
-@IF_GNU_MAKE@-include .deps/*.d
-
-.PHONY: all install uninstall clean distclean install_tex2rtf uninstall_tex2rtf install_tex2rtf_gui uninstall_tex2rtf_gui
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: bmputils.h
-// Purpose: Utilities for manipulating bitmap and metafile images for
-// the purposes of conversion to RTF
-// Author: Julian Smart
-// Modified by: Wlodzimiez ABX Skiba 2003/2004 Unicode support
-// Ron Lee
-// Created: 7.9.93
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-static char hexArray[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B',
- 'C', 'D', 'E', 'F' };
-
-void DecToHex(int dec, wxChar *buf)
-{
- int firstDigit = (int)(dec/16.0);
- int secondDigit = (int)(dec - (firstDigit*16.0));
- buf[0] = hexArray[firstDigit];
- buf[1] = hexArray[secondDigit];
- buf[2] = 0;
-}
-
-static unsigned int getshort(FILE *fp)
-{
- int c, c1;
- c = getc(fp); c1 = getc(fp);
- return ((unsigned int) c) + (((unsigned int) c1) << 8);
-}
-
-static unsigned long getint(FILE *fp)
-{
- int c, c1, c2, c3;
- c = getc(fp); c1 = getc(fp); c2 = getc(fp); c3 = getc(fp);
- return (long)((long) c) +
- (((long) c1) << 8) +
- (((long) c2) << 16) +
- (((long) c3) << 24);
-}
-
-bool GetBMPHeader(FILE *fp, int *Width, int *Height, int *Planes, int *BitsPerPixel)
-{
- // Remember about all fields but store only important ones
- unsigned long /*
- bfSize,
- bfOffBits,
- biSize,
- */
- biWidth,
- biHeight,
- biPlanes,
- biBitCount
- /* ,
- biCompression,
- biSizeImage,
- biXPelsPerMeter,
- biYPelsPerMeter,
- biClrUsed,
- biClrImportant
- */
- ;
-
- /* read the file type (first two bytes) */
- int c = getc(fp); int c1 = getc(fp);
- if (c!='B' || c1!='M') { return false; }
-
- /* bfSize = */ getint(fp);
- getshort(fp); /* reserved and ignored */
- getshort(fp);
- /* bfOffBits = */ getint(fp);
-
- /* biSize = */ getint(fp);
- biWidth = getint(fp);
- biHeight = getint(fp);
- biPlanes = getshort(fp);
- biBitCount = getshort(fp);
- /* biCompression = */ getint(fp);
- /* biSizeImage = */ getint(fp);
- /* biXPelsPerMeter = */ getint(fp);
- /* biYPelsPerMeter = */ getint(fp);
- /* biClrUsed = */ getint(fp);
- /* biClrImportant = */ getint(fp);
-
- *Width = (int)biWidth;
- *Height = (int)biHeight;
- *Planes = (int)biPlanes;
- *BitsPerPixel = (int)biBitCount;
-
-// fseek(fp, bfOffBits, SEEK_SET);
-
- return true;
-}
-
-static int scanLineWidth = 0;
-
-bool OutputBitmapHeader(FILE *fd, bool isWinHelp = false)
-{
- int Width, Height, Planes, BitsPerPixel;
- if (!GetBMPHeader(fd, &Width, &Height, &Planes, &BitsPerPixel))
- return false;
-
- scanLineWidth = (int)((float)Width/(8.0/(float)BitsPerPixel));
- if ((float)((int)(scanLineWidth/2.0)) != (float)(scanLineWidth/2.0))
- scanLineWidth ++;
-
- int goalW = 15*Width;
- int goalH = 15*Height;
-
- TexOutput(_T("{\\pict"));
- if (isWinHelp) TexOutput(_T("\\wbitmap0"));
- else TexOutput(_T("\\dibitmap)"));
-
- wxChar buf[50];
- TexOutput(_T("\\picw")); wxSnprintf(buf, sizeof(buf), _T("%d"), Width); TexOutput(buf);
- TexOutput(_T("\\pich")); wxSnprintf(buf, sizeof(buf), _T("%d"), Height); TexOutput(buf);
- TexOutput(_T("\\wbmbitspixel")); wxSnprintf(buf, sizeof(buf), _T("%d"), BitsPerPixel); TexOutput(buf);
- TexOutput(_T("\\wbmplanes")); wxSnprintf(buf, sizeof(buf), _T("%d"), Planes); TexOutput(buf);
- TexOutput(_T("\\wbmwidthbytes")); wxSnprintf(buf, sizeof(buf), _T("%d"), scanLineWidth); TexOutput(buf);
- TexOutput(_T("\\picwgoal")); wxSnprintf(buf, sizeof(buf), _T("%d"), goalW); TexOutput(buf);
- TexOutput(_T("\\pichgoal")); wxSnprintf(buf, sizeof(buf), _T("%d"), goalH); TexOutput(buf);
- TexOutput(_T("\n"));
- return true;
-}
-
-
-bool OutputBitmapData(FILE *fd)
-{
- fseek(fd, 14, SEEK_SET);
- int bytesSoFar = 0;
- int ch = getc(fd);
- wxChar hexBuf[3];
- while (ch != EOF)
- {
- if (bytesSoFar == scanLineWidth)
- {
- bytesSoFar = 0;
- TexOutput(_T("\n"));
- }
- DecToHex(ch, hexBuf);
- TexOutput(hexBuf);
- bytesSoFar ++;
- ch = getc(fd);
- }
- TexOutput(_T("\n}\n"));
- return true;
-}
-
-#ifdef __WXMSW__
-struct mfPLACEABLEHEADER {
- DWORD key;
- HANDLE hmf;
- RECT bbox;
- WORD inch;
- DWORD reserved;
- WORD checksum;
-};
-
-// Returns size in TWIPS
-bool GetMetafileHeader(FILE *handle, int *width, int *height)
-{
- char buffer[40];
- mfPLACEABLEHEADER *theHeader = (mfPLACEABLEHEADER *)&buffer[0];
- fread((void *)theHeader, sizeof(char), sizeof(mfPLACEABLEHEADER), handle);
- if (theHeader->key != 0x9AC6CDD7)
- {
- return false;
- }
-
- float widthInUnits = (float)theHeader->bbox.right - theHeader->bbox.left;
- float heightInUnits = (float)theHeader->bbox.bottom - theHeader->bbox.top;
- *width = (int)((widthInUnits*1440.0)/theHeader->inch);
- *height = (int)((heightInUnits*1440.0)/theHeader->inch);
- return true;
-}
-
-bool OutputMetafileHeader(FILE *handle, bool WXUNUSED(isWinHelp), int userWidth, int userHeight)
-{
- int Width, Height;
- if (!GetMetafileHeader(handle, &Width, &Height))
- return false;
-
- scanLineWidth = 64;
- int goalW = Width;
- int goalH = Height;
-
- // Scale to user's dimensions if we have the information
- if (userWidth > 0 && userHeight == 0)
- {
- double scaleFactor = ((double)userWidth/(double)goalW);
- goalW = userWidth;
- goalH = (int)((goalH * scaleFactor) + 0.5);
- }
- else if (userWidth == 0 && userHeight > 0)
- {
- double scaleFactor = ((double)userHeight/(double)goalH);
- goalH = userHeight;
- goalW = (int)((goalW * scaleFactor) + 0.5);
- }
- else if (userWidth > 0 && userHeight > 0)
- {
- goalW = userWidth;
- goalH = userHeight;
- }
-
- TexOutput(_T("{\\pict"));
- TexOutput(_T("\\wmetafile8"));
-
- wxChar buf[50];
- TexOutput(_T("\\picw")); wxSnprintf(buf, sizeof(buf), _T("%d"), Width); TexOutput(buf);
- TexOutput(_T("\\pich")); wxSnprintf(buf, sizeof(buf), _T("%d"), Height); TexOutput(buf);
- TexOutput(_T("\\picwgoal")); wxSnprintf(buf, sizeof(buf), _T("%d"), goalW); TexOutput(buf);
- TexOutput(_T("\\pichgoal")); wxSnprintf(buf, sizeof(buf), _T("%d"), goalH); TexOutput(buf);
- TexOutput(_T("\n"));
- return true;
-}
-
-bool OutputMetafileData(FILE *handle)
-{
- int bytesSoFar = 0;
- wxChar hexBuf[3];
- int ch;
- do
- {
- ch = getc(handle);
- if (bytesSoFar == scanLineWidth)
- {
- bytesSoFar = 0;
- TexOutput(_T("\n"));
- }
- if (ch != EOF)
- {
- DecToHex(ch, hexBuf);
- TexOutput(hexBuf);
- bytesSoFar ++;
- }
- } while (ch != EOF);
- TexOutput(_T("\n}\n"));
- return true;
-}
-
-#endif
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: htmlutil.cpp
-// Purpose: Converts Latex to HTML
-// Author: Julian Smart
-// Modified by: Wlodzimierz ABX Skiba 2003/2004 Unicode support
-// Ron Lee
-// Created: 7.9.93
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#endif
-
-#include "wx/arrstr.h"
-
-#include "tex2any.h"
-#include "tex2rtf.h"
-#include "table.h"
-#include <stdio.h>
-#define HTML_FILENAME_PATTERN _T("%s_%s.html")
-
-static inline wxChar* copystring(const wxChar* s)
- { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
-
-extern wxHashTable TexReferences;
-
-extern int passNumber;
-
-extern void DecToHex(int, wxChar *);
-void GenerateHTMLIndexFile(wxChar *fname);
-
-bool PrimaryAnchorOfTheFile( wxChar *file, wxChar *label );
-
-void GenerateHTMLWorkshopFiles(wxChar *fname);
-void HTMLWorkshopAddToContents(int level, wxChar *s, wxChar *file);
-void HTMLWorkshopStartContents();
-void HTMLWorkshopEndContents();
-
-void OutputContentsFrame(void);
-
-#include "readshg.h" // Segmented hypergraphics parsing
-
-wxChar *ChaptersName = NULL;
-wxChar *SectionsName = NULL;
-wxChar *SubsectionsName = NULL;
-wxChar *SubsubsectionsName = NULL;
-wxChar *TitlepageName = NULL;
-wxChar *lastFileName = NULL;
-wxChar *lastTopic = NULL;
-wxChar *currentFileName = NULL;
-wxChar *contentsFrameName = NULL;
-
-static TexChunk *descriptionItemArg = NULL;
-static TexChunk *helpRefFilename = NULL;
-static TexChunk *helpRefText = NULL;
-static int indentLevel = 0;
-static int citeCount = 1;
-extern FILE *Contents;
-FILE *FrameContents = NULL;
-FILE *Titlepage = NULL;
-// FILE *FrameTitlepage = NULL;
-int fileId = 0;
-bool subsectionStarted = false;
-
-// Which column of a row are we in? (Assumes no nested tables, of course)
-int currentColumn = 0;
-
-// Are we in verbatim mode? If so, format differently.
-static bool inVerbatim = false;
-
-// Need to know whether we're in a table or figure for benefit
-// of listoffigures/listoftables
-static bool inFigure = false;
-static bool inTable = false;
-
-// This is defined in the Tex2Any library.
-extern wxChar *BigBuffer;
-
-// DHS Two-column table dimensions.
-static int TwoColWidthA = -1;
-static int TwoColWidthB = -1;
-
-
-class HyperReference: public wxObject
-{
- public:
- wxChar *refName;
- wxChar *refFile;
- HyperReference(wxChar *name, wxChar *file)
- {
- if (name) refName = copystring(name);
- if (file) refFile = copystring(file);
- }
-};
-
-class TexNextPage: public wxObject
-{
- public:
- wxChar *label;
- wxChar *filename;
- TexNextPage(wxChar *theLabel, wxChar *theFile)
- {
- label = copystring(theLabel);
- filename = copystring(theFile);
- }
- virtual ~TexNextPage(void)
- {
- delete[] label;
- delete[] filename;
- }
-};
-
-wxHashTable TexNextPages(wxKEY_STRING);
-
-static wxChar *CurrentChapterName = NULL;
-static wxChar *CurrentChapterFile = NULL;
-static wxChar *CurrentSectionName = NULL;
-static wxChar *CurrentSectionFile = NULL;
-static wxChar *CurrentSubsectionName = NULL;
-static wxChar *CurrentSubsectionFile = NULL;
-static wxChar *CurrentSubsubsectionName = NULL;
-static wxChar *CurrentSubsubsectionFile = NULL;
-static wxChar *CurrentTopic = NULL;
-
-static void SetCurrentTopic(wxChar *s)
-{
- if (CurrentTopic) delete[] CurrentTopic;
- CurrentTopic = copystring(s);
-}
-
-void SetCurrentChapterName(wxChar *s, wxChar *file)
-{
- if (CurrentChapterName) delete[] CurrentChapterName;
- CurrentChapterName = copystring(s);
- if (CurrentChapterFile) delete[] CurrentChapterFile;
- CurrentChapterFile = copystring(file);
-
- currentFileName = CurrentChapterFile;
-
- SetCurrentTopic(s);
-}
-void SetCurrentSectionName(wxChar *s, wxChar *file)
-{
- if (CurrentSectionName) delete[] CurrentSectionName;
- CurrentSectionName = copystring(s);
- if (CurrentSectionFile) delete[] CurrentSectionFile;
- CurrentSectionFile = copystring(file);
-
- currentFileName = CurrentSectionFile;
- SetCurrentTopic(s);
-}
-void SetCurrentSubsectionName(wxChar *s, wxChar *file)
-{
- if (CurrentSubsectionName) delete[] CurrentSubsectionName;
- CurrentSubsectionName = copystring(s);
- if (CurrentSubsectionFile) delete[] CurrentSubsectionFile;
- CurrentSubsectionFile = copystring(file);
- currentFileName = CurrentSubsectionFile;
- SetCurrentTopic(s);
-}
-void SetCurrentSubsubsectionName(wxChar *s, wxChar *file)
-{
- if (CurrentSubsubsectionName) delete[] CurrentSubsubsectionName;
- CurrentSubsubsectionName = copystring(s);
- if (CurrentSubsubsectionFile) delete[] CurrentSubsubsectionFile;
- CurrentSubsubsectionFile = copystring(file);
- currentFileName = CurrentSubsubsectionFile;
- SetCurrentTopic(s);
-}
-
-
-// mapping between fileId and filenames if truncateFilenames=false:
-static wxArrayString gs_filenames;
-
-
-/*
- * Close former filedescriptor and reopen using another filename.
- *
- */
-
-void ReopenFile(FILE **fd, wxChar **fileName, const wxChar *label)
-{
- if (*fd)
- {
- wxFprintf(*fd, _T("\n</FONT></BODY></HTML>\n"));
- fclose(*fd);
- }
- fileId ++;
- wxChar buf[400];
- if (truncateFilenames)
- {
- wxSnprintf(buf, sizeof(buf), _T("%s%d.htm"), FileRoot, fileId);
- }
- else
- {
- if (fileId == 1)
- gs_filenames.Add(wxEmptyString);
- wxSnprintf(buf, sizeof(buf), HTML_FILENAME_PATTERN, FileRoot, label);
- gs_filenames.Add(buf);
- }
- if (*fileName) delete[] *fileName;
- *fileName = copystring(wxFileNameFromPath(buf));
- *fd = wxFopen(buf, _T("w"));
- wxFprintf(*fd, _T("<HTML>\n"));
-}
-
-/*
- * Reopen section contents file, i.e. the index appended to each section
- * in subsectionCombine mode
- */
-
-static wxChar *SectionContentsFilename = NULL;
-static FILE *SectionContentsFD = NULL;
-
-void ReopenSectionContentsFile(void)
-{
- if ( SectionContentsFD )
- {
- fclose(SectionContentsFD);
- }
- if ( SectionContentsFilename )
- delete[] SectionContentsFilename;
- SectionContentsFD = NULL;
- SectionContentsFilename = NULL;
-
- // Create the name from the current section filename
- if ( CurrentSectionFile )
- {
- wxChar buf[256];
- wxStrcpy(buf, CurrentSectionFile);
- wxStripExtension(buf);
- wxStrcat(buf, _T(".con"));
- SectionContentsFilename = copystring(buf);
-
- SectionContentsFD = wxFopen(SectionContentsFilename, _T("w"));
- }
-}
-
-
-
-
-struct textreplace
-{
- wxChar *text;
- size_t text_length;
- wxChar *replace;
- size_t replace_length;
-};
-
-#define tr(x,y) {x, sizeof(x)-1, y, sizeof(y)-1}
-
-static textreplace notverb_array[] =
-{
- tr(_T("``"), _T("“")),
- tr(_T("''"), _T("”")),
- tr(_T("`"), _T("‘")),
- tr(_T("'"), _T("’")),
- tr(_T("---"), _T("—")),
- tr(_T("--"), _T("–")),
-};
-
-#undef tr
-
-/*
- * Given a TexChunk with a string value, scans through the string
- * converting Latex-isms into HTML-isms, such as 2 newlines -> <P>.
- *
- */
-
-void ProcessText2HTML(TexChunk *chunk)
-{
- bool changed = false;
- int ptr = 0;
- int i = 0;
- wxChar ch = 1;
- size_t len = wxStrlen(chunk->value);
- while (ch != 0)
- {
- ch = chunk->value[i];
-
- if (ch == _T('<')) // Change < to <
- {
- BigBuffer[ptr] = 0;
- wxStrcat(BigBuffer, _T("<"));
- ptr += 4;
- i += 1;
- len--;
- changed = true;
- }
- else if (ch == _T('>')) // Change > to >
- {
- BigBuffer[ptr] = 0;
- wxStrcat(BigBuffer, _T(">"));
- ptr += 4;
- i += 1;
- len--;
- changed = true;
- }
- else
- {
- bool replaced = false;
- if (!inVerbatim)
- {
- for (size_t x = 0; x < WXSIZEOF(notverb_array); x++)
- {
- textreplace& tr = notverb_array[x];
- if (ch != tr.text[0])
- continue;
- if (len < tr.text_length)
- continue;
-
- size_t y;
- for (y = 1; y < tr.text_length; y++)
- {
- if (chunk->value[y] != tr.text[y])
- break;
- }
-
- if (y != tr.text_length)
- continue;
-
- // can now copy it over.
- for (y = 0; y < tr.replace_length; y++)
- {
- BigBuffer[ptr++] = tr.replace[y];
- }
-
- len -= tr.text_length;
- i += tr.text_length;
- replaced = true;
- changed = true;
- break;
- }
- }
-
- if (!replaced)
- {
- BigBuffer[ptr] = ch;
- i ++;
- ptr ++;
- len--;
- }
- }
- }
- BigBuffer[ptr] = 0;
-
- if (changed)
- {
- delete chunk->value;
- chunk->value = copystring(BigBuffer);
- }
-}
-
-/*
- * Scan through all chunks starting from the given one,
- * calling ProcessText2HTML to convert Latex-isms to RTF-isms.
- * This should be called after Tex2Any has parsed the file,
- * and before TraverseDocument is called.
- *
- */
-
-void Text2HTML(TexChunk *chunk)
-{
- Tex2RTFYield();
- if (stopRunning) return;
-
- switch (chunk->type)
- {
- case CHUNK_TYPE_MACRO:
- {
- TexMacroDef *def = chunk->def;
-
- if (def && def->ignore)
- return;
-
- if (def && (def->macroId == ltVERBATIM || def->macroId == ltVERB || def->macroId == ltSPECIAL))
- inVerbatim = true;
-
- wxNode *node = chunk->children.GetFirst();
- while (node)
- {
- TexChunk *child_chunk = (TexChunk *)node->GetData();
- Text2HTML(child_chunk);
- node = node->GetNext();
- }
-
- if (def && (def->macroId == ltVERBATIM || def->macroId == ltVERB || def->macroId == ltSPECIAL))
- inVerbatim = false;
-
- break;
- }
- case CHUNK_TYPE_ARG:
- {
- wxNode *node = chunk->children.GetFirst();
- while (node)
- {
- TexChunk *child_chunk = (TexChunk *)node->GetData();
- Text2HTML(child_chunk);
- node = node->GetNext();
- }
-
- break;
- }
- case CHUNK_TYPE_STRING:
- {
- if (chunk->value)
- ProcessText2HTML(chunk);
- break;
- }
- }
-}
-
-/*
- * Add appropriate browse buttons to this page.
- *
- */
-
-void AddBrowseButtons(wxChar *upLabel, wxChar *upFilename,
- wxChar *previousLabel, wxChar *previousFilename,
- wxChar *thisLabel, wxChar *thisFilename)
-{
- wxChar contentsReferenceBuf[80];
- wxChar upReferenceBuf[80];
- wxChar backReferenceBuf[80];
- wxChar forwardReferenceBuf[80];
- if (htmlBrowseButtons == HTML_BUTTONS_NONE)
- return;
-
- wxChar *contentsReference; // no need to initialize because always assigned below
- if (htmlBrowseButtons == HTML_BUTTONS_TEXT)
- contentsReference = ContentsNameString;
- else
- {
-// contentsReference = "<img align=center src=\"contents.gif\" BORDER=0 ALT=\"Contents\">";
- contentsReference = contentsReferenceBuf;
- wxSnprintf(contentsReference, sizeof(contentsReferenceBuf),
- _T("<img align=center src=\"%s\" BORDER=0 ALT=\"Contents\">"),
- ConvertCase(_T("contents.gif")));
- }
-
- wxChar *upReference; // no need to initialize because always assigned below
- if (htmlBrowseButtons == HTML_BUTTONS_TEXT)
- upReference = UpNameString;
- else
- {
-// upReference = "<img align=center src=\"up.gif\" ALT=\"Up\">";
- upReference = upReferenceBuf;
- wxSnprintf(upReference, sizeof(upReferenceBuf),
- _T("<img align=center src=\"%s\" BORDER=0 ALT=\"Up\">"),
- ConvertCase(_T("up.gif")));
- }
-
- wxChar *backReference; // no need to initialize because always assigned below
- if (htmlBrowseButtons == HTML_BUTTONS_TEXT)
- backReference = _T("<<");
- else
- {
-// backReference = "<img align=center src=\"back.gif\" ALT=\"Previous\">";
- backReference = backReferenceBuf;
- wxSnprintf(backReference, sizeof(backReferenceBuf),
- _T("<img align=center src=\"%s\" BORDER=0 ALT=\"Previous\">"),
- ConvertCase(_T("back.gif")));
- }
-
- wxChar *forwardReference; // no need to initialize because always assigned below
- if (htmlBrowseButtons == HTML_BUTTONS_TEXT)
- forwardReference = _T(">>");
- else
- {
-// forwardReference = "<img align=center src=\"forward.gif\" ALT=\"Next\">";
- forwardReference = forwardReferenceBuf;
- wxSnprintf(forwardReference, sizeof(forwardReferenceBuf),
- _T("<img align=center src=\"%s\" BORDER=0 ALT=\"Next\">"),
- ConvertCase(_T("forward.gif")));
- }
-
- TexOutput(_T("<CENTER>"));
-
- wxChar buf[200];
-
- /*
- * Contents button
- *
- */
-
- if (truncateFilenames)
- {
- wxChar buf1[80];
- wxStrcpy(buf1, ConvertCase(wxFileNameFromPath(FileRoot)));
- wxSnprintf(buf, sizeof(buf),
- _T("\n<A HREF=\"%s.%s\">%s</A> "),
- buf1, ConvertCase(_T("htm")), contentsReference);
- }
- else
- {
- wxChar buf1[80];
- wxStrcpy(buf1, ConvertCase(wxFileNameFromPath(FileRoot)));
- wxSnprintf(buf, sizeof(buf),
- _T("\n<A HREF=\"%s%s\">%s</A> "),
- buf1, ConvertCase(_T("_contents.html")), contentsReference);
- }
-// TexOutput(_T("<NOFRAMES>"));
- TexOutput(buf);
-// TexOutput(_T("</NOFRAMES>"));
-
- /*
- * Up button
- *
- */
-
- if (upLabel && upFilename)
- {
- if ( (wxStrlen(upLabel) > 0) && !PrimaryAnchorOfTheFile(upFilename, upLabel) )
- wxSnprintf(buf, sizeof(buf),
- _T("<A HREF=\"%s#%s\">%s</A> "),
- ConvertCase(upFilename), upLabel, upReference);
- else
- wxSnprintf(buf, sizeof(buf),
- _T("<A HREF=\"%s\">%s</A> "),
- ConvertCase(upFilename), upReference);
- if (wxStrcmp(upLabel, _T("contents")) == 0)
- {
-// TexOutput(_T("<NOFRAMES>"));
- TexOutput(buf);
-// TexOutput(_T("</NOFRAMES>"));
- }
- else
- TexOutput(buf);
- }
-
- /*
- * << button
- *
- */
-
- if (previousLabel && previousFilename)
- {
- if (PrimaryAnchorOfTheFile(previousFilename, previousLabel))
- wxSnprintf(buf, sizeof(buf),
- _T("<A HREF=\"%s\">%s</A> "),
- ConvertCase(previousFilename), backReference);
- else
- wxSnprintf(buf, sizeof(buf),
- _T("<A HREF=\"%s#%s\">%s</A> "),
- ConvertCase(previousFilename), previousLabel, backReference);
- if (wxStrcmp(previousLabel, _T("contents")) == 0)
- {
-// TexOutput(_T("<NOFRAMES>"));
- TexOutput(buf);
-// TexOutput(_T("</NOFRAMES>"));
- }
- else
- TexOutput(buf);
- }
- else
- {
- // A placeholder so the buttons don't keep moving position
- wxSnprintf(buf, sizeof(buf), _T("%s "), backReference);
- TexOutput(buf);
- }
-
- wxChar *nextLabel = NULL;
- wxChar *nextFilename = NULL;
-
- // Get the next page, and record the previous page's 'next' page
- // (i.e. this page)
- TexNextPage *nextPage = (TexNextPage *)TexNextPages.Get(thisLabel);
- if (nextPage)
- {
- nextLabel = nextPage->label;
- nextFilename = nextPage->filename;
- }
- if (previousLabel && previousFilename)
- {
- TexNextPage *oldNextPage = (TexNextPage *)TexNextPages.Get(previousLabel);
- if (oldNextPage)
- {
- delete oldNextPage;
- TexNextPages.Delete(previousLabel);
- }
- TexNextPage *newNextPage = new TexNextPage(thisLabel, thisFilename);
- TexNextPages.Put(previousLabel, newNextPage);
- }
-
- /*
- * >> button
- *
- */
-
- if (nextLabel && nextFilename)
- {
- if (PrimaryAnchorOfTheFile(nextFilename, nextLabel))
- wxSnprintf(buf, sizeof(buf),
- _T("<A HREF=\"%s\">%s</A> "),
- ConvertCase(nextFilename), forwardReference);
- else
- wxSnprintf(buf, sizeof(buf),
- _T("<A HREF=\"%s#%s\">%s</A> "),
- ConvertCase(nextFilename), nextLabel, forwardReference);
- TexOutput(buf);
- }
- else
- {
- // A placeholder so the buttons don't keep moving position
- wxSnprintf(buf, sizeof(buf), _T("%s "), forwardReference);
- TexOutput(buf);
- }
-
- /*
- * Horizontal rule to finish it off nicely.
- *
- */
- TexOutput(_T("</CENTER>"));
- TexOutput(_T("<HR>\n"));
-
- // Update last topic/filename
- if (lastFileName)
- delete[] lastFileName;
- lastFileName = copystring(thisFilename);
- if (lastTopic)
- delete[] lastTopic;
- lastTopic = copystring(thisLabel);
-}
-
-// A colour string is either 3 numbers separated by semicolons (RGB),
-// or a reference to a GIF. Return the filename or a hex string like #934CE8
-wxChar *ParseColourString(wxChar *bkStr, bool *isPicture)
-{
- static wxChar resStr[300];
- wxStrcpy(resStr, bkStr);
- wxStringTokenizer tok(resStr, _T(";"), wxTOKEN_STRTOK);
- if (tok.HasMoreTokens())
- {
- wxString token1 = tok.GetNextToken();
- if (!tok.HasMoreTokens())
- {
- *isPicture = true;
- return resStr;
- }
- else
- {
- wxString token2 = tok.GetNextToken();
- *isPicture = false;
- if (tok.HasMoreTokens())
- {
- wxString token3 = tok.GetNextToken();
-
- // Now convert 3 strings into decimal numbers, and then hex numbers.
- int red = wxAtoi(token1.c_str());
- int green = wxAtoi(token2.c_str());
- int blue = wxAtoi(token3.c_str());
-
- wxStrcpy(resStr, _T("#"));
-
- wxChar buf[3];
- DecToHex(red, buf);
- wxStrcat(resStr, buf);
- DecToHex(green, buf);
- wxStrcat(resStr, buf);
- DecToHex(blue, buf);
- wxStrcat(resStr, buf);
- return resStr;
- }
- else return NULL;
- }
- }
- else return NULL;
-}
-
-void OutputFont(void)
-{
- // Only output <font face> if explicitly requested by htmlFaceName= directive in
- // tex2rtf.ini. Otherwise do NOT set the font because we want to use browser's
- // default font:
- if (htmlFaceName)
- {
- // Output <FONT FACE=...>
- TexOutput(_T("<FONT FACE=\""));
- TexOutput(htmlFaceName);
- TexOutput(_T("\">\n"));
- }
-}
-
-// Output start of <BODY> block
-void OutputBodyStart(void)
-{
- TexOutput(_T("\n<BODY"));
- if (backgroundImageString)
- {
- bool isPicture = false;
- wxChar *s = ParseColourString(backgroundImageString, &isPicture);
- if (s)
- {
- TexOutput(_T(" BACKGROUND=\""));
- TexOutput(s);
- TexOutput(_T("\""));
- }
- }
- if (backgroundColourString)
- {
- bool isPicture = false;
- wxChar *s = ParseColourString(backgroundColourString, &isPicture);
- if (s)
- {
- TexOutput(_T(" BGCOLOR="));
- TexOutput(s);
- }
- }
-
- // Set foreground text colour, if one is specified
- if (textColourString)
- {
- bool isPicture = false;
- wxChar *s = ParseColourString(textColourString, &isPicture);
- if (s)
- {
- TexOutput(_T(" TEXT=")); TexOutput(s);
- }
- }
- // Set link text colour, if one is specified
- if (linkColourString)
- {
- bool isPicture = false;
- wxChar *s = ParseColourString(linkColourString, &isPicture);
- if (s)
- {
- TexOutput(_T(" LINK=")); TexOutput(s);
- }
- }
- // Set followed link text colour, if one is specified
- if (followedLinkColourString)
- {
- bool isPicture = false;
- wxChar *s = ParseColourString(followedLinkColourString, &isPicture);
- if (s)
- {
- TexOutput(_T(" VLINK=")); TexOutput(s);
- }
- }
- TexOutput(_T(">\n"));
-
- OutputFont();
-}
-
-void HTMLHead()
-{
- TexOutput(_T("<head>"));
- if (htmlStylesheet) {
- TexOutput(_T("<link rel=stylesheet type=\"text/css\" href=\""));
- TexOutput(htmlStylesheet);
- TexOutput(_T("\">"));
- }
-};
-
-void HTMLHeadTo(FILE* f)
-{
- if (htmlStylesheet)
- wxFprintf(f,_T("<head><link rel=stylesheet type=\"text/css\" href=\"%s\">"),htmlStylesheet);
- else
- wxFprintf(f,_T("<head>"));
-}
-
-// Called on start/end of macro examination
-void HTMLOnMacro(int macroId, int no_args, bool start)
-{
- switch (macroId)
- {
- case ltCHAPTER:
- case ltCHAPTERSTAR:
- case ltCHAPTERHEADING:
- {
- if (!start)
- {
- sectionNo = 0;
- figureNo = 0;
- subsectionNo = 0;
- subsubsectionNo = 0;
- if (macroId != ltCHAPTERSTAR)
- chapterNo ++;
-
- SetCurrentOutput(NULL);
- startedSections = true;
-
- wxChar *topicName = FindTopicName(GetNextChunk());
- ReopenFile(&Chapters, &ChaptersName, topicName);
- AddTexRef(topicName, ChaptersName, ChapterNameString);
-
- SetCurrentChapterName(topicName, ChaptersName);
- if (htmlWorkshopFiles) HTMLWorkshopAddToContents(0, topicName, ChaptersName);
-
- SetCurrentOutput(Chapters);
-
- HTMLHead();
- TexOutput(_T("<title>"));
- OutputCurrentSection(); // Repeat section header
- TexOutput(_T("</title></head>\n"));
- OutputBodyStart();
-
- wxChar titleBuf[200];
- if (truncateFilenames)
- wxSnprintf(titleBuf, sizeof(titleBuf), _T("%s.htm"), wxFileNameFromPath(FileRoot));
- else
- wxSnprintf(titleBuf, sizeof(titleBuf), _T("%s_contents.html"), wxFileNameFromPath(FileRoot));
-
- wxFprintf(Chapters, _T("<A NAME=\"%s\"></A>"), topicName);
-
- AddBrowseButtons(_T(""), titleBuf, // Up
- lastTopic, lastFileName, // Last topic
- topicName, ChaptersName); // This topic
-
- if(PrimaryAnchorOfTheFile(ChaptersName, topicName))
- wxFprintf(Contents, _T("\n<LI><A HREF=\"%s\">"), ConvertCase(ChaptersName));
- else
- wxFprintf(Contents, _T("\n<LI><A HREF=\"%s#%s\">"), ConvertCase(ChaptersName), topicName);
-
- if (htmlFrameContents && FrameContents)
- {
- SetCurrentOutput(FrameContents);
- if(PrimaryAnchorOfTheFile(ChaptersName, topicName))
- wxFprintf(FrameContents, _T("\n<LI><A HREF=\"%s\" TARGET=\"mainwindow\">"), ConvertCase(ChaptersName));
- else
- wxFprintf(FrameContents, _T("\n<LI><A HREF=\"%s#%s\" TARGET=\"mainwindow\">"), ConvertCase(ChaptersName), topicName);
- OutputCurrentSection();
- wxFprintf(FrameContents, _T("</A>\n"));
- }
-
- SetCurrentOutputs(Contents, Chapters);
- wxFprintf(Chapters, _T("\n<H2>"));
- OutputCurrentSection();
- wxFprintf(Contents, _T("</A>\n"));
- wxFprintf(Chapters, _T("</H2>\n"));
-
- SetCurrentOutput(Chapters);
-
- // Add this section title to the list of keywords
- if (htmlIndex)
- {
- OutputCurrentSectionToString(wxTex2RTFBuffer);
- AddKeyWordForTopic(topicName, wxTex2RTFBuffer, ConvertCase(currentFileName));
- }
- }
- break;
- }
- case ltSECTION:
- case ltSECTIONSTAR:
- case ltSECTIONHEADING:
- case ltGLOSS:
- {
- if (!start)
- {
- subsectionNo = 0;
- subsubsectionNo = 0;
- subsectionStarted = false;
-
- if (macroId != ltSECTIONSTAR)
- sectionNo ++;
-
- SetCurrentOutput(NULL);
- startedSections = true;
-
- wxChar *topicName = FindTopicName(GetNextChunk());
- ReopenFile(&Sections, &SectionsName, topicName);
- AddTexRef(topicName, SectionsName, SectionNameString);
-
- SetCurrentSectionName(topicName, SectionsName);
- if (htmlWorkshopFiles) HTMLWorkshopAddToContents(1, topicName, SectionsName);
-
- SetCurrentOutput(Sections);
- HTMLHead();
- TexOutput(_T("<title>"));
- OutputCurrentSection();
- TexOutput(_T("</title></head>\n"));
- OutputBodyStart();
-
- wxFprintf(Sections, _T("<A NAME=\"%s\"></A>"), topicName);
- AddBrowseButtons(CurrentChapterName, CurrentChapterFile, // Up
- lastTopic, lastFileName, // Last topic
- topicName, SectionsName); // This topic
-
- FILE *jumpFrom = ((DocumentStyle == LATEX_ARTICLE) ? Contents : Chapters);
-
- SetCurrentOutputs(jumpFrom, Sections);
- if (DocumentStyle == LATEX_ARTICLE)
- {
- if(PrimaryAnchorOfTheFile(SectionsName, topicName))
- wxFprintf(jumpFrom, _T("\n<LI><A HREF=\"%s\">"), ConvertCase(SectionsName));
- else
- wxFprintf(jumpFrom, _T("\n<LI><A HREF=\"%s#%s\">"), ConvertCase(SectionsName), topicName);
- }
- else
- {
- if(PrimaryAnchorOfTheFile(SectionsName, topicName))
- wxFprintf(jumpFrom, _T("\n<A HREF=\"%s\"><B>"), ConvertCase(SectionsName));
- else
- wxFprintf(jumpFrom, _T("\n<A HREF=\"%s#%s\"><B>"), ConvertCase(SectionsName), topicName);
- }
-
- wxFprintf(Sections, _T("\n<H2>"));
- OutputCurrentSection();
-
- if (DocumentStyle == LATEX_ARTICLE)
- wxFprintf(jumpFrom, _T("</A>\n"));
- else
- wxFprintf(jumpFrom, _T("</B></A><BR>\n"));
- wxFprintf(Sections, _T("</H2>\n"));
-
- SetCurrentOutput(Sections);
- // Add this section title to the list of keywords
- if (htmlIndex)
- {
- OutputCurrentSectionToString(wxTex2RTFBuffer);
- AddKeyWordForTopic(topicName, wxTex2RTFBuffer, currentFileName);
- }
- }
- break;
- }
- case ltSUBSECTION:
- case ltSUBSECTIONSTAR:
- case ltMEMBERSECTION:
- case ltFUNCTIONSECTION:
- {
- if (!start)
- {
- if (!Sections)
- {
- OnError(_T("You cannot have a subsection before a section!"));
- }
- else
- {
- subsubsectionNo = 0;
-
- if (macroId != ltSUBSECTIONSTAR)
- subsectionNo ++;
-
- if ( combineSubSections && !subsectionStarted )
- {
- fflush(Sections);
-
- // Read old .con file in at this point
- wxChar buf[256];
- wxStrcpy(buf, CurrentSectionFile);
- wxStripExtension(buf);
- wxStrcat(buf, _T(".con"));
- FILE *fd = wxFopen(buf, _T("r"));
- if ( fd )
- {
- int ch = getc(fd);
- while (ch != EOF)
- {
- wxPutc(ch, Sections);
- ch = getc(fd);
- }
- fclose(fd);
- }
- wxFprintf(Sections, _T("<P>\n"));
-
- // Close old file, create a new file for the sub(sub)section contents entries
- ReopenSectionContentsFile();
- }
-
- startedSections = true;
- subsectionStarted = true;
-
- wxChar *topicName = FindTopicName(GetNextChunk());
-
- if ( !combineSubSections )
- {
- SetCurrentOutput(NULL);
- ReopenFile(&Subsections, &SubsectionsName, topicName);
- AddTexRef(topicName, SubsectionsName, SubsectionNameString);
- SetCurrentSubsectionName(topicName, SubsectionsName);
- if (htmlWorkshopFiles) HTMLWorkshopAddToContents(2, topicName, SubsectionsName);
- SetCurrentOutput(Subsections);
-
- HTMLHead();
- TexOutput(_T("<title>"));
- OutputCurrentSection();
- TexOutput(_T("</title></head>\n"));
- OutputBodyStart();
-
- wxFprintf(Subsections, _T("<A NAME=\"%s\"></A>"), topicName);
- AddBrowseButtons(CurrentSectionName, CurrentSectionFile, // Up
- lastTopic, lastFileName, // Last topic
- topicName, SubsectionsName); // This topic
-
- SetCurrentOutputs(Sections, Subsections);
- if(PrimaryAnchorOfTheFile(SubsectionsName, topicName))
- wxFprintf(Sections, _T("\n<A HREF=\"%s\"><B>"), ConvertCase(SubsectionsName));
- else
- wxFprintf(Sections, _T("\n<A HREF=\"%s#%s\"><B>"), ConvertCase(SubsectionsName), topicName);
-
- wxFprintf(Subsections, _T("\n<H3>"));
- OutputCurrentSection();
- wxFprintf(Sections, _T("</B></A><BR>\n"));
- wxFprintf(Subsections, _T("</H3>\n"));
-
- SetCurrentOutput(Subsections);
- }
- else
- {
- AddTexRef(topicName, SectionsName, SubsectionNameString);
- SetCurrentSubsectionName(topicName, SectionsName);
-
-// if ( subsectionNo != 0 )
- wxFprintf(Sections, _T("\n<HR>\n"));
-
- // We're putting everything into the section file
- wxFprintf(Sections, _T("<A NAME=\"%s\"></A>"), topicName);
- wxFprintf(Sections, _T("\n<H3>"));
- OutputCurrentSection();
- wxFprintf(Sections, _T("</H3>\n"));
-
- SetCurrentOutput(SectionContentsFD);
- wxFprintf(SectionContentsFD, _T("<A HREF=\"#%s\">"), topicName);
- OutputCurrentSection();
- TexOutput(_T("</A><BR>\n"));
-
- if (htmlWorkshopFiles) HTMLWorkshopAddToContents(2, topicName, SectionsName);
- SetCurrentOutput(Sections);
- }
- // Add this section title to the list of keywords
- if (htmlIndex)
- {
- OutputCurrentSectionToString(wxTex2RTFBuffer);
- AddKeyWordForTopic(topicName, wxTex2RTFBuffer, currentFileName);
- }
-
- }
- }
- break;
- }
- case ltSUBSUBSECTION:
- case ltSUBSUBSECTIONSTAR:
- {
- if (!start)
- {
- if (!Subsections && !combineSubSections)
- {
- OnError(_T("You cannot have a subsubsection before a subsection!"));
- }
- else
- {
- if (macroId != ltSUBSUBSECTIONSTAR)
- subsubsectionNo ++;
-
- startedSections = true;
-
- wxChar *topicName = FindTopicName(GetNextChunk());
-
- if ( !combineSubSections )
- {
- SetCurrentOutput(NULL);
- ReopenFile(&Subsubsections, &SubsubsectionsName, topicName);
- AddTexRef(topicName, SubsubsectionsName, SubsubsectionNameString);
- SetCurrentSubsubsectionName(topicName, SubsubsectionsName);
- if (htmlWorkshopFiles) HTMLWorkshopAddToContents(3, topicName, SubsubsectionsName);
-
- SetCurrentOutput(Subsubsections);
- HTMLHead();
- TexOutput(_T("<title>"));
- OutputCurrentSection();
- TexOutput(_T("</title></head>\n"));
- OutputBodyStart();
-
- wxFprintf(Subsubsections, _T("<A NAME=\"%s\"></A>"), topicName);
-
- AddBrowseButtons(CurrentSubsectionName, CurrentSubsectionFile, // Up
- lastTopic, lastFileName, // Last topic
- topicName, SubsubsectionsName); // This topic
-
- SetCurrentOutputs(Subsections, Subsubsections);
- if(PrimaryAnchorOfTheFile(SubsubsectionsName, topicName))
- wxFprintf(Subsections, _T("\n<A HREF=\"%s\"><B>"), ConvertCase(SubsubsectionsName));
- else
- wxFprintf(Subsections, _T("\n<A HREF=\"%s#%s\"><B>"), ConvertCase(SubsubsectionsName), topicName);
-
- wxFprintf(Subsubsections, _T("\n<H3>"));
- OutputCurrentSection();
- wxFprintf(Subsections, _T("</B></A><BR>\n"));
- wxFprintf(Subsubsections, _T("</H3>\n"));
- }
- else
- {
- AddTexRef(topicName, SectionsName, SubsubsectionNameString);
- SetCurrentSubsectionName(topicName, SectionsName);
- wxFprintf(Sections, _T("\n<HR>\n"));
-
- // We're putting everything into the section file
- wxFprintf(Sections, _T("<A NAME=\"%s\"></A>"), topicName);
- wxFprintf(Sections, _T("\n<H3>"));
- OutputCurrentSection();
- wxFprintf(Sections, _T("</H3>\n"));
-/* TODO: where do we put subsubsection contents entry - indented, with subsection entries?
- SetCurrentOutput(SectionContentsFD);
- wxFprintf(SectionContentsFD, "<A HREF=\"#%s\">", topicName);
- OutputCurrentSection();
- TexOutput(_T("</A><BR>"));
-*/
- if (htmlWorkshopFiles) HTMLWorkshopAddToContents(2, topicName, SectionsName);
- SetCurrentOutput(Sections);
- }
-
- // Add this section title to the list of keywords
- if (htmlIndex)
- {
- OutputCurrentSectionToString(wxTex2RTFBuffer);
- AddKeyWordForTopic(topicName, wxTex2RTFBuffer, currentFileName);
- }
- }
- }
- break;
- }
- case ltFUNC:
- case ltPFUNC:
- {
- if ( !combineSubSections )
- SetCurrentOutput(Subsections);
- else
- SetCurrentOutput(Sections);
- if (start)
- {
- }
- else
- {
- }
- break;
- }
- case ltCLIPSFUNC:
- {
- if ( !combineSubSections )
- SetCurrentOutput(Subsections);
- else
- SetCurrentOutput(Sections);
- if (start)
- {
- }
- else
- {
- }
- break;
- }
- case ltMEMBER:
- {
- if ( !combineSubSections )
- SetCurrentOutput(Subsections);
- else
- SetCurrentOutput(Sections);
- if (start)
- {
- }
- else
- {
- }
- break;
- }
- case ltVOID:
-// if (start)
-// TexOutput(_T("<B>void</B>"));
- break;
- case ltHARDY:
- if (start)
- TexOutput(_T("HARDY"));
- break;
- case ltWXCLIPS:
- if (start)
- TexOutput(_T("wxCLIPS"));
- break;
- case ltAMPERSAND:
- if (start)
- TexOutput(_T("&"));
- break;
- case ltSPECIALAMPERSAND:
- {
- if (start)
- {
- if (inTabular)
- {
- // End cell, start cell
-
- TexOutput(_T("</FONT></TD>"));
-
- // Start new row and cell, setting alignment for the first cell.
- if (currentColumn < noColumns)
- currentColumn ++;
-
- wxChar buf[100];
- if (TableData[currentColumn].justification == 'c')
- wxSnprintf(buf, sizeof(buf), _T("\n<TD ALIGN=CENTER>"));
- else if (TableData[currentColumn].justification == 'r')
- wxSnprintf(buf, sizeof(buf), _T("\n<TD ALIGN=RIGHT>"));
- else if (TableData[currentColumn].absWidth)
- {
- // Convert from points * 20 into pixels.
- int points = TableData[currentColumn].width / 20;
-
- // Say the display is 100 DPI (dots/pixels per inch).
- // There are 72 pts to the inch. So 1pt = 1/72 inch, or 100 * 1/72 dots.
- int pixels = (int)(points * 100.0 / 72.0);
- wxSnprintf(buf, sizeof(buf), _T("<TD ALIGN=CENTER WIDTH=%d>"), pixels);
- }
- else
- wxSnprintf(buf, sizeof(buf), _T("\n<TD ALIGN=LEFT>"));
- TexOutput(buf);
- OutputFont();
- }
- else
- TexOutput(_T("&"));
- }
- break;
- }
- case ltBACKSLASHCHAR:
- {
- if (start)
- {
- if (inTabular)
- {
- // End row. In fact, tables without use of \row or \ruledrow isn't supported for
- // HTML: the syntax is too different (e.g. how do we know where to put the first </TH>
- // if we've ended the last row?). So normally you wouldn't use \\ to end a row.
- TexOutput(_T("</TR>\n"));
- }
- else
- TexOutput(_T("<BR>\n"));
- }
- break;
- }
- case ltROW:
- case ltRULEDROW:
- {
- if (start)
- {
- currentColumn = 0;
-
- // Start new row and cell, setting alignment for the first cell.
- wxChar buf[100];
- if (TableData[currentColumn].justification == 'c')
- wxSnprintf(buf, sizeof(buf), _T("<TR>\n<TD ALIGN=CENTER>"));
- else if (TableData[currentColumn].justification == 'r')
- wxSnprintf(buf, sizeof(buf), _T("<TR>\n<TD ALIGN=RIGHT>"));
- else if (TableData[currentColumn].absWidth)
- {
- // Convert from points * 20 into pixels.
- int points = TableData[currentColumn].width / 20;
-
- // Say the display is 100 DPI (dots/pixels per inch).
- // There are 72 pts to the inch. So 1pt = 1/72 inch, or 100 * 1/72 dots.
- int pixels = (int)(points * 100.0 / 72.0);
- wxSnprintf(buf, sizeof(buf), _T("<TR>\n<TD ALIGN=CENTER WIDTH=%d>"), pixels);
- }
- else
- wxSnprintf(buf, sizeof(buf), _T("<TR>\n<TD ALIGN=LEFT>"));
- TexOutput(buf);
- OutputFont();
- }
- else
- {
- // End cell and row
- // Start new row and cell
- TexOutput(_T("</FONT></TD>\n</TR>\n"));
- }
- break;
- }
- // HTML-only: break until the end of the picture (both margins are clear).
- case ltBRCLEAR:
- {
- if (start)
- TexOutput(_T("<BR CLEAR=ALL>"));
- break;
- }
- case ltRTFSP: // Explicit space, RTF only
- break;
- case ltSPECIALTILDE:
- {
- if (start)
- {
- #if (1) // if(inVerbatim)
- TexOutput(_T("~"));
- #else
- TexOutput(_T(" "));
- #endif
- }
- break;
- }
- case ltINDENTED :
- {
- if ( start )
- TexOutput(_T("<UL><UL>\n"));
- else
- TexOutput(_T("</UL></UL>\n"));
- break;
- }
- case ltITEMIZE:
- case ltENUMERATE:
- case ltDESCRIPTION:
-// case ltTWOCOLLIST:
- {
- if (start)
- {
- indentLevel ++;
-
- int listType;
- if (macroId == ltENUMERATE)
- listType = LATEX_ENUMERATE;
- else if (macroId == ltITEMIZE)
- listType = LATEX_ITEMIZE;
- else
- listType = LATEX_DESCRIPTION;
-
- itemizeStack.Insert(new ItemizeStruc(listType));
- switch (listType)
- {
- case LATEX_ITEMIZE:
- TexOutput(_T("<UL>\n"));
- break;
- case LATEX_ENUMERATE:
- TexOutput(_T("<OL>\n"));
- break;
- case LATEX_DESCRIPTION:
- default:
- TexOutput(_T("<DL>\n"));
- break;
- }
- }
- else
- {
- indentLevel --;
- if (itemizeStack.GetFirst())
- {
- ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.GetFirst()->GetData();
- switch (struc->listType)
- {
- case LATEX_ITEMIZE:
- TexOutput(_T("</UL>\n"));
- break;
- case LATEX_ENUMERATE:
- TexOutput(_T("</OL>\n"));
- break;
- case LATEX_DESCRIPTION:
- default:
- TexOutput(_T("</DL>\n"));
- break;
- }
-
- delete struc;
- delete itemizeStack.GetFirst();
- }
- }
- break;
- }
- case ltTWOCOLLIST :
- {
- if ( start )
- TexOutput(_T("\n<TABLE>\n"));
- else {
- TexOutput(_T("\n</TABLE>\n"));
- // DHS
- TwoColWidthA = -1;
- TwoColWidthB = -1;
- }
- break;
- }
- case ltPAR:
- {
- if (start)
- TexOutput(_T("<P>\n"));
- break;
- }
-/* For footnotes we need to output the text at the bottom of the page and
- * insert a reference to it. Is it worth the trouble...
- case ltFOOTNOTE:
- case ltFOOTNOTEPOPUP:
- {
- if (start)
- {
- TexOutput(_T("<FN>"));
- }
- else TexOutput(_T("</FN>"));
- break;
- }
-*/
- case ltVERB:
- {
- if (start)
- TexOutput(_T("<TT>"));
- else TexOutput(_T("</TT>"));
- break;
- }
- case ltVERBATIM:
- {
- if (start)
- {
- wxChar buf[100];
- wxSnprintf(buf, sizeof(buf), _T("<PRE>\n"));
- TexOutput(buf);
- }
- else TexOutput(_T("</PRE>\n"));
- break;
- }
- case ltCENTERLINE:
- case ltCENTER:
- {
- if (start)
- {
- TexOutput(_T("<CENTER>"));
- }
- else TexOutput(_T("</CENTER>"));
- break;
- }
- case ltFLUSHLEFT:
- {
-/*
- if (start)
- {
- TexOutput(_T("{\\ql "));
- }
- else TexOutput(_T("}\\par\\pard\n"));
-*/
- break;
- }
- case ltFLUSHRIGHT:
- {
-/*
- if (start)
- {
- TexOutput(_T("{\\qr "));
- }
- else TexOutput(_T("}\\par\\pard\n"));
-*/
- break;
- }
- case ltSMALL:
- {
- if (start)
- {
- // Netscape extension
- TexOutput(_T("<FONT SIZE=2>"));
- }
- else TexOutput(_T("</FONT>"));
- break;
- }
- case ltTINY:
- {
- if (start)
- {
- // Netscape extension
- TexOutput(_T("<FONT SIZE=1>"));
- }
- else TexOutput(_T("</FONT>"));
- break;
- }
- case ltNORMALSIZE:
- {
- if (start)
- {
- // Netscape extension
- TexOutput(_T("<FONT SIZE=3>"));
- }
- else TexOutput(_T("</FONT>"));
- break;
- }
- case ltlarge:
- {
- if (start)
- {
- // Netscape extension
- TexOutput(_T("<FONT SIZE=4>"));
- }
- else TexOutput(_T("</FONT>"));
- break;
- }
- case ltLarge:
- {
- if (start)
- {
- // Netscape extension
- TexOutput(_T("<FONT SIZE=5>"));
- }
- else TexOutput(_T("</FONT>"));
- break;
- }
- case ltLARGE:
- {
- if (start)
- {
- // Netscape extension
- TexOutput(_T("<FONT SIZE=6>"));
- }
- else TexOutput(_T("</FONT>"));
- break;
- }
- case ltBFSERIES:
- case ltTEXTBF:
- case ltBF:
- {
- if (start)
- {
- TexOutput(_T("<B>"));
- }
- else TexOutput(_T("</B>"));
- break;
- }
- case ltITSHAPE:
- case ltTEXTIT:
- case ltIT:
- {
- if (start)
- {
- TexOutput(_T("<I>"));
- }
- else TexOutput(_T("</I>"));
- break;
- }
- case ltEMPH:
- case ltEM:
- {
- if (start)
- {
- TexOutput(_T("<EM>"));
- }
- else TexOutput(_T("</EM>"));
- break;
- }
- case ltUNDERLINE:
- {
- if (start)
- {
- TexOutput(_T("<UL>"));
- }
- else TexOutput(_T("</UL>"));
- break;
- }
- case ltTTFAMILY:
- case ltTEXTTT:
- case ltTT:
- {
- if (start)
- {
- TexOutput(_T("<TT>"));
- }
- else TexOutput(_T("</TT>"));
- break;
- }
- case ltCOPYRIGHT:
- {
- if (start)
- TexOutput(_T("©"), true);
- break;
- }
- case ltREGISTERED:
- {
- if (start)
- TexOutput(_T("®"), true);
- break;
- }
- // Arrows
- case ltLEFTARROW:
- {
- if (start) TexOutput(_T("<--"));
- break;
- }
- case ltLEFTARROW2:
- {
- if (start) TexOutput(_T("<=="));
- break;
- }
- case ltRIGHTARROW:
- {
- if (start) TexOutput(_T("-->"));
- break;
- }
- case ltRIGHTARROW2:
- {
- if (start) TexOutput(_T("==>"));
- break;
- }
- case ltLEFTRIGHTARROW:
- {
- if (start) TexOutput(_T("<-->"));
- break;
- }
- case ltLEFTRIGHTARROW2:
- {
- if (start) TexOutput(_T("<==>"));
- break;
- }
-/*
- case ltSC:
- {
- break;
- }
-*/
- case ltITEM:
- {
- if (!start)
- {
- wxNode *node = itemizeStack.GetFirst();
- if (node)
- {
- ItemizeStruc *struc = (ItemizeStruc *)node->GetData();
- struc->currentItem += 1;
- if (struc->listType == LATEX_DESCRIPTION)
- {
- if (descriptionItemArg)
- {
- TexOutput(_T("<DT> "));
- TraverseChildrenFromChunk(descriptionItemArg);
- TexOutput(_T("\n"));
- descriptionItemArg = NULL;
- }
- TexOutput(_T("<DD>"));
- }
- else
- TexOutput(_T("<LI>"));
- }
- }
- break;
- }
- case ltMAKETITLE:
- {
- if (start && DocumentTitle && DocumentAuthor)
- {
- // Add a special label for the contents page.
-// TexOutput(_T("<CENTER>\n"));
- TexOutput(_T("<A NAME=\"contents\">"));
- TexOutput(_T("<H2 ALIGN=CENTER>\n"));
- TraverseChildrenFromChunk(DocumentTitle);
- TexOutput(_T("</H2>"));
- TexOutput(_T("<P>"));
- TexOutput(_T("</A>\n"));
- TexOutput(_T("<P>\n\n"));
- TexOutput(_T("<H3 ALIGN=CENTER>"));
- TraverseChildrenFromChunk(DocumentAuthor);
- TexOutput(_T("</H3><P>\n\n"));
- if (DocumentDate)
- {
- TexOutput(_T("<H3 ALIGN=CENTER>"));
- TraverseChildrenFromChunk(DocumentDate);
- TexOutput(_T("</H3><P>\n\n"));
- }
-// TexOutput(_T("\n</CENTER>\n"));
- TexOutput(_T("\n<P><HR><P>\n"));
-
-/*
- // Now do optional frame contents page
- if (htmlFrameContents && FrameContents)
- {
- SetCurrentOutput(FrameContents);
-
- // Add a special label for the contents page.
- TexOutput(_T("<CENTER>\n"));
- TexOutput(_T("<H3>\n"));
- TraverseChildrenFromChunk(DocumentTitle);
- TexOutput(_T("</H3>"));
- TexOutput(_T("<P>"));
- TexOutput(_T("</A>\n"));
- TexOutput(_T("<P>\n\n"));
- TexOutput(_T("<H3>"));
- TraverseChildrenFromChunk(DocumentAuthor);
- TexOutput(_T("</H3><P>\n\n"));
- if (DocumentDate)
- {
- TexOutput(_T("<H4>"));
- TraverseChildrenFromChunk(DocumentDate);
- TexOutput(_T("</H4><P>\n\n"));
- }
- TexOutput(_T("\n</CENTER>\n"));
- TexOutput(_T("<P><HR><P>\n"));
-
- SetCurrentOutput(Titlepage);
- }
-*/
- }
- break;
- }
- case ltHELPREF:
- case ltHELPREFN:
- case ltPOPREF:
- case ltURLREF:
- {
- if (start)
- {
- helpRefFilename = NULL;
- helpRefText = NULL;
- }
- break;
- }
- case ltBIBLIOGRAPHY:
- {
- if (start)
- {
- DefaultOnMacro(macroId, no_args, start);
- }
- else
- {
- DefaultOnMacro(macroId, no_args, start);
- TexOutput(_T("</DL>\n"));
- }
- break;
- }
- case ltHRULE:
- {
- if (start)
- {
- TexOutput(_T("<HR>\n"));
- }
- break;
- }
- case ltRULE:
- {
- if (start)
- {
- TexOutput(_T("<HR>\n"));
- }
- break;
- }
- case ltTABLEOFCONTENTS:
- {
- if (start)
- {
- // NB: if this is uncommented, the table of contents
- // completely disappears. If left commented, it's in the wrong
- // place.
- //fflush(Titlepage);
-
- FILE *fd = wxFopen(ContentsName, _T("r"));
- if (fd)
- {
- int ch = getc(fd);
- while (ch != EOF)
- {
- wxPutc(ch, Titlepage);
- ch = getc(fd);
- }
- fclose(fd);
- fflush(Titlepage);
- }
- else
- {
- TexOutput(_T("RUN TEX2RTF AGAIN FOR CONTENTS PAGE\n"));
- OnInform(_T("Run Tex2RTF again to include contents page."));
- }
- }
- break;
- }
- case ltLANGLEBRA:
- {
- if (start)
- TexOutput(_T("<"));
- break;
- }
- case ltRANGLEBRA:
- {
- if (start)
- TexOutput(_T(">"));
- break;
- }
- case ltQUOTE:
- case ltQUOTATION:
- {
- if (start)
- TexOutput(_T("<BLOCKQUOTE>"));
- else
- TexOutput(_T("</BLOCKQUOTE>"));
- break;
- }
- case ltCAPTION:
- case ltCAPTIONSTAR:
- {
- if (start)
- {
- if (inTabular)
- TexOutput(_T("\n<CAPTION>"));
-
- wxChar figBuf[40];
-
- if ( inFigure )
- {
- figureNo ++;
-
- if (DocumentStyle != LATEX_ARTICLE)
- wxSnprintf(figBuf, sizeof(figBuf), _T("%s %d.%d: "), FigureNameString, chapterNo, figureNo);
- else
- wxSnprintf(figBuf, sizeof(figBuf), _T("%s %d: "), FigureNameString, figureNo);
- }
- else
- {
- tableNo ++;
-
- if (DocumentStyle != LATEX_ARTICLE)
- wxSnprintf(figBuf, sizeof(figBuf), _T("%s %d.%d: "), TableNameString, chapterNo, tableNo);
- else
- wxSnprintf(figBuf, sizeof(figBuf), _T("%s %d: "), TableNameString, tableNo);
- }
-
- TexOutput(figBuf);
- }
- else
- {
- if (inTabular)
- TexOutput(_T("\n</CAPTION>\n"));
-
- wxChar *topicName = FindTopicName(GetNextChunk());
-
- int n = inFigure ? figureNo : tableNo;
-
- AddTexRef(topicName, NULL, NULL,
- ((DocumentStyle != LATEX_ARTICLE) ? chapterNo : n),
- ((DocumentStyle != LATEX_ARTICLE) ? n : 0));
- }
- break;
- }
- case ltSS:
- {
- if (start) TexOutput(_T("ß"));
- break;
- }
- case ltFIGURE:
- {
- if (start) inFigure = true;
- else inFigure = false;
- break;
- }
- case ltTABLE:
- {
- if (start) inTable = true;
- else inTable = false;
- break;
- }
- default:
- DefaultOnMacro(macroId, no_args, start);
- break;
- }
-}
-/* CheckTypeRef()
-
- should be called at of argument which usually is
- type declaration which propably contains name of
- documented class
-
- examples:
- HTMLOnArgument
- - ltFUNC,
- - ltPARAM
- - ltCPARAM
-
- checks: GetArgData() if contains Type Declaration
- and can be referenced to some file
- prints:
- before<a href="xxx&yyy">type</a>after
-
- returns:
- false - if no reference was found
- true - if reference was found and HREF printed
-*/
-static bool CheckTypeRef()
-{
- wxString typeDecl = GetArgData();
- if( !typeDecl.empty() ) {
- typeDecl.Replace(wxT("\\"),wxT(""));
- wxString label = typeDecl;
- label.Replace(wxT("const"),wxT(""));
- label.Replace(wxT("virtual"),wxT(""));
- label.Replace(wxT("static"),wxT(""));
- label.Replace(wxT("extern"),wxT(""));
- label = label.BeforeFirst('&');
- label = label.BeforeFirst(wxT('*'));
- label = label.BeforeFirst(wxT('\\'));
- label.Trim(true); label.Trim(false);
- wxString typeName = label;
- label.MakeLower();
- TexRef *texRef = FindReference(label);
-
- if (texRef && texRef->refFile && wxStrcmp(texRef->refFile, _T("??")) != 0) {
- int a = typeDecl.Find(typeName);
- wxString before = typeDecl.Mid( 0, a );
- wxString after = typeDecl.Mid( a+typeName.Length() );
- //wxFprintf(stderr,wxT("%s <%s> %s to ... %s#%s !!!!\n"),
- // before.c_str(),
- // typeName.c_str(),
- // after.c_str(),
- // texRef->refFile,label.c_str());
- TexOutput(before);
- TexOutput(_T("<A HREF=\""));
- TexOutput(texRef->refFile);
- TexOutput(_T("#"));
- TexOutput(label);
- TexOutput(wxT("\">"));
- TexOutput(typeName);
- TexOutput(wxT("</A>"));
- TexOutput(after);
- return true;
- } else {
- //wxFprintf(stderr,wxT("'%s' from (%s) -> label %s NOT FOUND\n"),
- // typeName.c_str(),
- // typeDecl.c_str(),
- // label.c_str());
- return false;
- }
- }
- return false;
-}
-// Called on start/end of argument examination
-bool HTMLOnArgument(int macroId, int arg_no, bool start)
-{
- switch (macroId)
- {
- case ltCHAPTER:
- case ltCHAPTERSTAR:
- case ltCHAPTERHEADING:
- case ltSECTION:
- case ltSECTIONSTAR:
- case ltSECTIONHEADING:
- case ltSUBSECTION:
- case ltSUBSECTIONSTAR:
- case ltSUBSUBSECTION:
- case ltSUBSUBSECTIONSTAR:
- case ltGLOSS:
- case ltMEMBERSECTION:
- case ltFUNCTIONSECTION:
- {
- if (!start && (arg_no == 1))
- currentSection = GetArgChunk();
- return false;
- }
- case ltFUNC:
- {
- if (start && (arg_no == 1)) {
- TexOutput(_T("<B>"));
- if( CheckTypeRef() ) {
- TexOutput(_T("</B> "));
- return false;
- }
- }
-
- if (!start && (arg_no == 1))
- TexOutput(_T("</B> "));
-
- if (start && (arg_no == 2))
- {
- if (!suppressNameDecoration) TexOutput(_T("<B>"));
- currentMember = GetArgChunk();
- }
- if (!start && (arg_no == 2))
- {
- if (!suppressNameDecoration) TexOutput(_T("</B>"));
- }
-
- if (start && (arg_no == 3))
- TexOutput(_T("("));
- if (!start && (arg_no == 3))
- TexOutput(_T(")"));
- break;
- }
- case ltCLIPSFUNC:
- {
- if (start && (arg_no == 1))
- TexOutput(_T("<B>"));
- if (!start && (arg_no == 1))
- TexOutput(_T("</B> "));
-
- if (start && (arg_no == 2))
- {
- if (!suppressNameDecoration) TexOutput(_T("( "));
- currentMember = GetArgChunk();
- }
- if (!start && (arg_no == 2))
- {
- }
-
- if (!start && (arg_no == 3))
- TexOutput(_T(")"));
- break;
- }
- case ltPFUNC:
- {
- if (!start && (arg_no == 1))
- TexOutput(_T(" "));
-
- if (start && (arg_no == 2))
- TexOutput(_T("(*"));
- if (!start && (arg_no == 2))
- TexOutput(_T(")"));
-
- if (start && (arg_no == 2))
- currentMember = GetArgChunk();
-
- if (start && (arg_no == 3))
- TexOutput(_T("("));
- if (!start && (arg_no == 3))
- TexOutput(_T(")"));
- break;
- }
- case ltPARAM:
- case ltCPARAM:
- {
- const wxChar* pend = macroId == ltCPARAM ?
- _T("</B> ") : _T("</B>");
- if( arg_no == 1) {
- if( start ) {
- TexOutput(_T("<B>"));
- if( CheckTypeRef() ) {
- TexOutput(pend);
- return false;
- }
- } else {
- TexOutput(pend);
- }
- }
- if (start && (arg_no == 2))
- {
- TexOutput(_T("<I>"));
- }
- if (!start && (arg_no == 2))
- {
- TexOutput(_T("</I>"));
- }
- break;
- }
- case ltMEMBER:
- {
- if (!start && (arg_no == 1))
- TexOutput(_T(" "));
-
- if (start && (arg_no == 2))
- currentMember = GetArgChunk();
- break;
- }
- case ltREF:
- {
- if (start)
- {
- wxChar *sec = NULL;
-
- wxChar *refName = GetArgData();
- if (refName)
- {
- TexRef *texRef = FindReference(refName);
- if (texRef)
- {
- sec = texRef->sectionNumber;
- }
- }
- if (sec)
- {
- TexOutput(sec);
- }
- return false;
- }
- break;
- }
- case ltURLREF:
- {
- if (IsArgOptional())
- return false;
- else if ((GetNoArgs() - arg_no) == 1)
- {
- if (start)
- helpRefText = GetArgChunk();
- return false;
- }
- else if ((GetNoArgs() - arg_no) == 0) // Arg = 2, or 3 if first is optional
- {
- if (start)
- {
- TexChunk *ref = GetArgChunk();
- TexOutput(_T("<A HREF=\""));
- inVerbatim = true;
- TraverseChildrenFromChunk(ref);
- inVerbatim = false;
- TexOutput(_T("\">"));
- if (helpRefText)
- TraverseChildrenFromChunk(helpRefText);
- TexOutput(_T("</A>"));
- }
- return false;
- }
- break;
- }
-
- case ltHELPREF:
- case ltHELPREFN:
- case ltPOPREF:
- {
- if (IsArgOptional())
- {
- if (start)
- helpRefFilename = GetArgChunk();
- return false;
- }
- if ((GetNoArgs() - arg_no) == 1)
- {
- if (start)
- helpRefText = GetArgChunk();
- return false;
- }
- else if ((GetNoArgs() - arg_no) == 0) // Arg = 2, or 3 if first is optional
- {
- if (start)
- {
- wxChar *refName = GetArgData();
- wxChar *refFilename = NULL;
-
- if (refName)
- {
- TexRef *texRef = FindReference(refName);
- if (texRef)
- {
- if (texRef->refFile && wxStrcmp(texRef->refFile, _T("??")) != 0)
- refFilename = texRef->refFile;
-
- TexOutput(_T("<A HREF=\""));
- // If a filename is supplied, use it, otherwise try to
- // use the filename associated with the reference (from this document).
- if (helpRefFilename)
- {
- TraverseChildrenFromChunk(helpRefFilename);
- TexOutput(_T("#"));
- TexOutput(refName);
- }
- else if (refFilename)
- {
- TexOutput(ConvertCase(refFilename));
- if(!PrimaryAnchorOfTheFile(texRef->refFile, refName))
- {
- TexOutput(_T("#"));
- TexOutput(refName);
- }
- }
- TexOutput(_T("\">"));
- if (helpRefText)
- TraverseChildrenFromChunk(helpRefText);
- TexOutput(_T("</A>"));
- }
- else
- {
- if (helpRefText)
- TraverseChildrenFromChunk(helpRefText);
- if (!ignoreBadRefs)
- TexOutput(_T(" (REF NOT FOUND)"));
-
- // for launching twice do not warn in preparation pass
- if ((passNumber == 1 && !runTwice) ||
- (passNumber == 2 && runTwice))
- {
- wxString errBuf;
- errBuf.Printf(_T("Warning: unresolved reference '%s'"), refName);
- OnInform(errBuf);
- }
- }
- }
- else TexOutput(_T("??"));
- }
- return false;
- }
- break;
- }
- case ltIMAGE:
- case ltIMAGEL:
- case ltIMAGER:
- case ltPSBOXTO:
- {
- if (arg_no == 2)
- {
- if (start)
- {
- wxChar *alignment = _T("");
- if (macroId == ltIMAGEL)
- alignment = _T(" align=left");
- else if (macroId == ltIMAGER)
- alignment = _T(" align=right");
-
- // Try to find an XBM or GIF image first.
- wxChar *filename = copystring(GetArgData());
- wxChar buf[500];
-
- wxStrcpy(buf, filename);
- StripExtension(buf);
- wxStrcat(buf, _T(".xbm"));
- wxString f = TexPathList.FindValidPath(buf);
-
- if (f == _T("")) // Try for a GIF instead
- {
- wxStrcpy(buf, filename);
- StripExtension(buf);
- wxStrcat(buf, _T(".gif"));
- f = TexPathList.FindValidPath(buf);
- }
-
- if (f == _T("")) // Try for a JPEG instead
- {
- wxStrcpy(buf, filename);
- StripExtension(buf);
- wxStrcat(buf, _T(".jpg"));
- f = TexPathList.FindValidPath(buf);
- }
-
- if (f == _T("")) // Try for a PNG instead
- {
- wxStrcpy(buf, filename);
- StripExtension(buf);
- wxStrcat(buf, _T(".png"));
- f = TexPathList.FindValidPath(buf);
- }
-
- if (f != _T(""))
- {
- wxChar *inlineFilename = copystring(f);
-#if 0
- wxChar *originalFilename = TexPathList.FindValidPath(filename);
- // If we have found the existing filename, make the inline
- // image point to the original file (could be PS, for example)
- if (originalFilename && (wxStrcmp(inlineFilename, originalFilename) != 0))
- {
- TexOutput(_T("<A HREF=\""));
- TexOutput(ConvertCase(originalFilename));
- TexOutput(_T("\">"));
- TexOutput(_T("<img src=\""));
- TexOutput(ConvertCase(wxFileNameFromPath(inlineFilename)));
- TexOutput(_T("\""));
- TexOutput(alignment);
- TexOutput(_T("></A>"));
- }
- else
-#endif
- {
- TexOutput(_T("<img src=\""));
- TexOutput(ConvertCase(wxFileNameFromPath(inlineFilename)));
- TexOutput(_T("\""));
- TexOutput(alignment);
- TexOutput(_T(">"));
- delete[] inlineFilename;
- }
- }
- else
- {
- // Last resort - a link to a PS file.
- TexOutput(_T("<A HREF=\""));
- TexOutput(ConvertCase(wxFileNameFromPath(filename)));
- TexOutput(_T("\">Picture</A>\n"));
- wxSnprintf(buf, sizeof(buf), _T("Warning: could not find an inline XBM/GIF for %s."), filename);
- OnInform(buf);
- }
- }
- }
- return false;
- }
- // First arg is PSBOX spec (ignored), second is image file, third is map name.
- case ltIMAGEMAP:
- {
- static wxChar *imageFile = NULL;
- if (start && (arg_no == 2))
- {
- // Try to find an XBM or GIF image first.
- wxChar *filename = copystring(GetArgData());
- wxChar buf[500];
-
- wxStrcpy(buf, filename);
- StripExtension(buf);
- wxStrcat(buf, _T(".xbm"));
- wxString f = TexPathList.FindValidPath(buf);
-
- if (f == _T("")) // Try for a GIF instead
- {
- wxStrcpy(buf, filename);
- StripExtension(buf);
- wxStrcat(buf, _T(".gif"));
- f = TexPathList.FindValidPath(buf);
- }
- if (f == _T(""))
- {
- wxChar buf[300];
- wxSnprintf(buf, sizeof(buf), _T("Warning: could not find an inline XBM/GIF for %s."), filename);
- OnInform(buf);
- }
- delete[] filename;
- if (imageFile)
- delete[] imageFile;
- imageFile = NULL;
- if (!f.empty())
- {
- imageFile = copystring(f);
- }
- }
- else if (start && (arg_no == 3))
- {
- if (imageFile)
- {
- // First, try to find a .shg (segmented hypergraphics file)
- // that we can convert to a map file
- wxChar buf[256];
- wxStrcpy(buf, imageFile);
- StripExtension(buf);
- wxStrcat(buf, _T(".shg"));
- wxString f = TexPathList.FindValidPath(buf);
-
- if (f != _T(""))
- {
- // The default HTML file to go to is THIS file (so a no-op)
- SHGToMap(f, currentFileName);
- }
-
- wxChar *mapName = GetArgData();
- TexOutput(_T("<A HREF=\"/cgi-bin/imagemap/"));
- if (mapName)
- TexOutput(mapName);
- else
- TexOutput(_T("unknown"));
- TexOutput(_T("\">"));
- TexOutput(_T("<img src=\""));
- TexOutput(ConvertCase(wxFileNameFromPath(imageFile)));
- TexOutput(_T("\" ISMAP></A><P>"));
- delete[] imageFile;
- imageFile = NULL;
- }
- }
- return false;
- }
- case ltINDENTED :
- {
- if ( arg_no == 1 )
- return false;
- else
- {
- return true;
- }
- }
- case ltITEM:
- {
- if (start)
- {
- descriptionItemArg = GetArgChunk();
- return false;
- }
- return true;
- }
- case ltTWOCOLITEM:
- case ltTWOCOLITEMRULED:
- {
-/*
- if (start && (arg_no == 1))
- TexOutput(_T("\n<DT> "));
- if (start && (arg_no == 2))
- TexOutput(_T("<DD> "));
-*/
- if (arg_no == 1)
- {
- if ( start ) {
- // DHS
- if (TwoColWidthA > -1)
- {
- wxChar buf[100];
- wxSnprintf(buf, sizeof(buf), _T("\n<TR><TD VALIGN=TOP WIDTH=%d>\n"),TwoColWidthA);
- TexOutput(buf);
- }
- else
- {
- TexOutput(_T("\n<TR><TD VALIGN=TOP>\n"));
- }
- OutputFont();
- } else
- TexOutput(_T("\n</FONT></TD>\n"));
- }
- if (arg_no == 2)
- {
- // DHS
- if ( start )
- {
- if (TwoColWidthB > -1)
- {
- wxChar buf[100];
- wxSnprintf(buf, sizeof(buf), _T("\n<TD VALIGN=TOP WIDTH=%d>\n"),TwoColWidthB);
- TexOutput(buf);
- }
- else
- {
- TexOutput(_T("\n<TD VALIGN=TOP>\n"));
- }
- OutputFont();
- } else
- TexOutput(_T("\n</FONT></TD></TR>\n"));
- }
- return true;
- }
- case ltNUMBEREDBIBITEM:
- {
- if (arg_no == 1 && start)
- {
- TexOutput(_T("\n<DT> "));
- }
- if (arg_no == 2 && !start)
- TexOutput(_T("<P>\n"));
- break;
- }
- case ltBIBITEM:
- {
- wxChar buf[100];
- if (arg_no == 1 && start)
- {
- wxChar *citeKey = GetArgData();
- TexRef *ref = (TexRef *)TexReferences.Get(citeKey);
- if (ref)
- {
- if (ref->sectionNumber) delete[] ref->sectionNumber;
- wxSnprintf(buf, sizeof(buf), _T("[%d]"), citeCount);
- ref->sectionNumber = copystring(buf);
- }
-
- wxSnprintf(buf, sizeof(buf), _T("\n<DT> [%d] "), citeCount);
- TexOutput(buf);
- citeCount ++;
- return false;
- }
- if (arg_no == 2 && !start)
- TexOutput(_T("<P>\n"));
- return true;
- }
- case ltMARGINPAR:
- case ltMARGINPARODD:
- case ltMARGINPAREVEN:
- case ltNORMALBOX:
- case ltNORMALBOXD:
- {
- if (start)
- {
- TexOutput(_T("<HR>\n"));
- return true;
- }
- else
- TexOutput(_T("<HR><P>\n"));
- break;
- }
- // DHS
- case ltTWOCOLWIDTHA:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- float points = ParseUnitArgument(val);
- TwoColWidthA = (int)((points * 100.0) / 72.0);
- }
- return false;
- }
- // DHS
- case ltTWOCOLWIDTHB:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- float points = ParseUnitArgument(val);
- TwoColWidthB = (int)((points * 100.0) / 72.0);
- }
- return false;
- }
- /*
- * Accents
- *
- */
- case ltACCENT_GRAVE:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case 'a':
- TexOutput(_T("à"));
- break;
- case 'e':
- TexOutput(_T("è"));
- break;
- case 'i':
- TexOutput(_T("ì"));
- break;
- case 'o':
- TexOutput(_T("ò"));
- break;
- case 'u':
- TexOutput(_T("ù"));
- break;
- case 'A':
- TexOutput(_T("À"));
- break;
- case 'E':
- TexOutput(_T("È"));
- break;
- case 'I':
- TexOutput(_T("Ì"));
- break;
- case 'O':
- TexOutput(_T("Ò"));
- break;
- case 'U':
- TexOutput(_T("Ì"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_ACUTE:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case 'a':
- TexOutput(_T("á"));
- break;
- case 'e':
- TexOutput(_T("é"));
- break;
- case 'i':
- TexOutput(_T("í"));
- break;
- case 'o':
- TexOutput(_T("ó"));
- break;
- case 'u':
- TexOutput(_T("ú"));
- break;
- case 'y':
- TexOutput(_T("ý"));
- break;
- case 'A':
- TexOutput(_T("Á"));
- break;
- case 'E':
- TexOutput(_T("É"));
- break;
- case 'I':
- TexOutput(_T("Í"));
- break;
- case 'O':
- TexOutput(_T("Ó"));
- break;
- case 'U':
- TexOutput(_T("Ú"));
- break;
- case 'Y':
- TexOutput(_T("Ý"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_CARET:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case 'a':
- TexOutput(_T("â"));
- break;
- case 'e':
- TexOutput(_T("ê"));
- break;
- case 'i':
- TexOutput(_T("î"));
- break;
- case 'o':
- TexOutput(_T("ô"));
- break;
- case 'u':
- TexOutput(_T("û"));
- break;
- case 'A':
- TexOutput(_T("Â"));
- break;
- case 'E':
- TexOutput(_T("Ê"));
- break;
- case 'I':
- TexOutput(_T("Î"));
- break;
- case 'O':
- TexOutput(_T("Ô"));
- break;
- case 'U':
- TexOutput(_T("Î"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_TILDE:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case ' ':
- TexOutput(_T("~"));
- break;
- case 'a':
- TexOutput(_T("ã"));
- break;
- case 'n':
- TexOutput(_T("ñ"));
- break;
- case 'o':
- TexOutput(_T("õ"));
- break;
- case 'A':
- TexOutput(_T("Ã"));
- break;
- case 'N':
- TexOutput(_T("Ñ"));
- break;
- case 'O':
- TexOutput(_T("Õ"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_UMLAUT:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case 'a':
- TexOutput(_T("ä"));
- break;
- case 'e':
- TexOutput(_T("ë"));
- break;
- case 'i':
- TexOutput(_T("ï"));
- break;
- case 'o':
- TexOutput(_T("ö"));
- break;
- case 'u':
- TexOutput(_T("ü"));
- break;
- case 'y':
- TexOutput(_T("ÿ"));
- break;
- case 'A':
- TexOutput(_T("Ä"));
- break;
- case 'E':
- TexOutput(_T("Ë"));
- break;
- case 'I':
- TexOutput(_T("Ï"));
- break;
- case 'O':
- TexOutput(_T("Ö"));
- break;
- case 'U':
- TexOutput(_T("Ü"));
- break;
- case 'Y':
- TexOutput(_T("Ÿ"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_DOT:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case 'a':
- TexOutput(_T("å"));
- break;
- case 'A':
- TexOutput(_T("Å"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltBACKGROUND:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- bool isPicture = false;
- ParseColourString(val, &isPicture);
- if (isPicture)
- {
- if (backgroundImageString)
- delete[] backgroundImageString;
- backgroundImageString = copystring(val);
- }
- else
- {
- if (backgroundColourString)
- delete[] backgroundColourString;
- backgroundColourString = copystring(val);
- }
- }
- }
- return false;
- }
- case ltBACKGROUNDIMAGE:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- if (backgroundImageString)
- delete[] backgroundImageString;
- backgroundImageString = copystring(val);
- }
- }
- return false;
- }
- case ltBACKGROUNDCOLOUR:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- if (backgroundColourString)
- delete[] backgroundColourString;
- backgroundColourString = copystring(val);
- }
- }
- return false;
- }
- case ltTEXTCOLOUR:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- if (textColourString)
- delete[] textColourString;
- textColourString = copystring(val);
- }
- }
- return false;
- }
- case ltLINKCOLOUR:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- if (linkColourString)
- delete[] linkColourString;
- linkColourString = copystring(val);
- }
- }
- return false;
- }
- case ltFOLLOWEDLINKCOLOUR:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- if (followedLinkColourString)
- delete[] followedLinkColourString;
- followedLinkColourString = copystring(val);
- }
- }
- return false;
- }
- case ltACCENT_CADILLA:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case 'c':
- TexOutput(_T("ç"));
- break;
- case 'C':
- TexOutput(_T("Ç"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
-/*
- case ltFOOTNOTE:
- case ltFOOTNOTEPOPUP:
- {
- if (arg_no == 1)
- return true;
- else
- return false;
- break;
- }
-*/
- case ltTABULAR:
- case ltSUPERTABULAR:
- {
- if (arg_no == 1)
- {
- if (start)
- {
- currentRowNumber = 0;
- inTabular = true;
- startRows = true;
- tableVerticalLineLeft = false;
- tableVerticalLineRight = false;
-
- wxChar *alignString = copystring(GetArgData());
- ParseTableArgument(alignString);
-
- TexOutput(_T("<TABLE BORDER>\n"));
-
- // Write the first row formatting for compatibility
- // with standard Latex
- if (compatibilityMode)
- {
- TexOutput(_T("<TR>\n<TD>"));
- OutputFont();
-/*
- for (int i = 0; i < noColumns; i++)
- {
- currentWidth += TableData[i].width;
- wxSnprintf(buf, sizeof(buf), _T("\\cellx%d"), currentWidth);
- TexOutput(buf);
- }
- TexOutput(_T("\\pard\\intbl\n"));
-*/
- }
- delete[] alignString;
-
- return false;
- }
- }
- else if (arg_no == 2 && !start)
- {
- TexOutput(_T("</TABLE>\n"));
- inTabular = false;
- }
- break;
- }
- case ltTHEBIBLIOGRAPHY:
- {
- if (start && (arg_no == 1))
- {
- ReopenFile(&Chapters, &ChaptersName, _T("bibliography"));
- AddTexRef(_T("bibliography"), ChaptersName, _T("bibliography"));
- SetCurrentSubsectionName(_T("bibliography"), ChaptersName);
-
- citeCount = 1;
-
- SetCurrentOutput(Chapters);
-
- wxChar titleBuf[150];
- if (truncateFilenames)
- wxSnprintf(titleBuf, sizeof(titleBuf), _T("%s.htm"), wxFileNameFromPath(FileRoot));
- else
- wxSnprintf(titleBuf, sizeof(titleBuf), _T("%s_contents.html"), wxFileNameFromPath(FileRoot));
-
- HTMLHead();
- TexOutput(_T("<title>"));
- TexOutput(ReferencesNameString);
- TexOutput(_T("</title></head>\n"));
- OutputBodyStart();
-
- wxFprintf(Chapters, _T("<A NAME=\"%s\">\n<H2>%s"), _T("bibliography"), ReferencesNameString);
- AddBrowseButtons(_T("contents"), titleBuf, // Up
- lastTopic, lastFileName, // Last topic
- _T("bibliography"), ChaptersName); // This topic
-
- SetCurrentOutputs(Contents, Chapters);
- if(PrimaryAnchorOfTheFile(ChaptersName, _T("bibliography")))
- wxFprintf(Contents, _T("\n<LI><A HREF=\"%s\">"), ConvertCase(ChaptersName));
- else
- wxFprintf(Contents, _T("\n<LI><A HREF=\"%s#%s\">"), ConvertCase(ChaptersName), _T("bibliography"));
-
- wxFprintf(Contents, _T("%s</A>\n"), ReferencesNameString);
- wxFprintf(Chapters, _T("</H2>\n</A>\n"));
-
- SetCurrentOutput(Chapters);
- return false;
- }
- if (!start && (arg_no == 2))
- {
- }
- return true;
- }
- case ltINDEX:
- {
- /* Build up list of keywords associated with topics */
- if (start)
- {
-// wxChar *entry = GetArgData();
- wxChar buf[300];
- OutputChunkToString(GetArgChunk(), buf);
- if (CurrentTopic)
- {
- AddKeyWordForTopic(CurrentTopic, buf, currentFileName);
- }
- }
- return false;
- }
- case ltFCOL:
-// case ltBCOL:
- {
- if (start)
- {
- switch (arg_no)
- {
- case 1:
- {
- wxChar *name = GetArgData();
- wxChar buf2[10];
- if (!FindColourHTMLString(name, buf2))
- {
- wxStrcpy(buf2, _T("#000000"));
- wxChar buf[100];
- wxSnprintf(buf, sizeof(buf), _T("Could not find colour name %s"), name);
- OnError(buf);
- }
- TexOutput(_T("<FONT COLOR=\""));
- TexOutput(buf2);
- TexOutput(_T("\">"));
- break;
- }
- case 2:
- {
- return true;
- }
- default:
- break;
- }
- }
- else
- {
- if (arg_no == 2) TexOutput(_T("</FONT>"));
- }
- return false;
- }
- case ltINSERTATLEVEL:
- {
- // This macro allows you to insert text at a different level
- // from the current level, e.g. into the Sections from within a subsubsection.
- if (useWord)
- return false;
- static int currentLevelNo = 1;
- static FILE* oldLevelFile = Chapters;
- if (start)
- {
- switch (arg_no)
- {
- case 1:
- {
- oldLevelFile = CurrentOutput1;
-
- wxChar *str = GetArgData();
- currentLevelNo = wxAtoi(str);
- FILE* outputFile;
- // TODO: cope with article style (no chapters)
- switch (currentLevelNo)
- {
- case 1:
- {
- outputFile = Chapters;
- break;
- }
- case 2:
- {
- outputFile = Sections;
- break;
- }
- case 3:
- {
- outputFile = Subsections;
- break;
- }
- case 4:
- {
- outputFile = Subsubsections;
- break;
- }
- default:
- {
- outputFile = NULL;
- break;
- }
- }
- if (outputFile)
- CurrentOutput1 = outputFile;
- return false;
- }
- case 2:
- {
- return true;
- }
- default:
- break;
- }
- return true;
- }
- else
- {
- if (arg_no == 2)
- {
- CurrentOutput1 = oldLevelFile;
- }
- return true;
- }
- }
- default:
- return DefaultOnArgument(macroId, arg_no, start);
- }
- return true;
-}
-
-bool HTMLGo(void)
-{
- fileId = 0;
- inVerbatim = false;
- indentLevel = 0;
- inTabular = false;
- startRows = false;
- tableVerticalLineLeft = false;
- tableVerticalLineRight = false;
- noColumns = 0;
-
- if (!InputFile.empty() && !OutputFile.empty())
- {
- // Do some HTML-specific transformations on all the strings,
- // recursively
- Text2HTML(GetTopLevelChunk());
-
- wxChar buf[300];
- if (truncateFilenames)
- wxSnprintf(buf, sizeof(buf), _T("%s.htm"), FileRoot);
- else
- wxSnprintf(buf, sizeof(buf), _T("%s_contents.html"), FileRoot);
- if (TitlepageName) delete[] TitlepageName;
- TitlepageName = copystring(buf);
- Titlepage = wxFopen(buf, _T("w"));
-
- if (truncateFilenames)
- wxSnprintf(buf, sizeof(buf), _T("%s_fc.htm"), FileRoot);
- else
- wxSnprintf(buf, sizeof(buf), _T("%s_fcontents.html"), FileRoot);
-
- contentsFrameName = copystring(buf);
-
- Contents = wxFopen(TmpContentsName, _T("w"));
-
- if (htmlFrameContents)
- {
-// FrameContents = wxFopen(TmpFrameContentsName, _T("w"));
- FrameContents = wxFopen(contentsFrameName, _T("w"));
- wxFprintf(FrameContents, _T("<HTML>\n<UL>\n"));
- }
-
- if (!Titlepage || !Contents)
- {
- OnError(_T("Cannot open output file!"));
- return false;
- }
- AddTexRef(_T("contents"), wxFileNameFromPath(TitlepageName), ContentsNameString);
-
- wxFprintf(Contents, _T("<P><P><H2>%s</H2><P><P>\n"), ContentsNameString);
-
- wxFprintf(Contents, _T("<UL>\n"));
-
- SetCurrentOutput(Titlepage);
- if (htmlWorkshopFiles) HTMLWorkshopStartContents();
- OnInform(_T("Converting..."));
-
- TraverseDocument();
- wxFprintf(Contents, _T("</UL>\n\n"));
-
-// SetCurrentOutput(Titlepage);
- fclose(Titlepage);
-
- if (Contents)
- {
-// wxFprintf(Titlepage, _T("\n</BODY></HTML>\n"));
- fclose(Contents);
- Contents = NULL;
- }
-
- if (FrameContents)
- {
- wxFprintf(FrameContents, _T("\n</UL>\n"));
- wxFprintf(FrameContents, _T("</HTML>\n"));
- fclose(FrameContents);
- FrameContents = NULL;
- }
-
- if (Chapters)
- {
- wxFprintf(Chapters, _T("\n</FONT></BODY></HTML>\n"));
- fclose(Chapters);
- Chapters = NULL;
- }
- if (Sections)
- {
- wxFprintf(Sections, _T("\n</FONT></BODY></HTML>\n"));
- fclose(Sections);
- Sections = NULL;
- }
- if (Subsections && !combineSubSections)
- {
- wxFprintf(Subsections, _T("\n</FONT></BODY></HTML>\n"));
- fclose(Subsections);
- Subsections = NULL;
- }
- if (Subsubsections && !combineSubSections)
- {
- wxFprintf(Subsubsections, _T("\n</FONT></BODY></HTML>\n"));
- fclose(Subsubsections);
- Subsubsections = NULL;
- }
- if ( SectionContentsFD )
- {
- fclose(SectionContentsFD);
- SectionContentsFD = NULL;
- }
-
- // Create a temporary file for the title page header, add some info,
- // and concat the titlepage just generated.
- // This is necessary in order to put the title of the document
- // at the TOP of the file within <HEAD>, even though we only find out
- // what it is later on.
- FILE *tmpTitle = wxFopen(_T("title.tmp"), _T("w"));
- if (tmpTitle)
- {
- if (DocumentTitle)
- {
- SetCurrentOutput(tmpTitle);
- HTMLHead();
- TexOutput(_T("\n<TITLE>"));
- TraverseChildrenFromChunk(DocumentTitle);
- TexOutput(_T("</TITLE></HEAD>\n"));
- }
- else
- {
- SetCurrentOutput(tmpTitle);
- HTMLHeadTo(tmpTitle);
- if (contentsString)
- wxFprintf(tmpTitle, _T("<TITLE>%s</TITLE></HEAD>\n\n"), contentsString);
- else
- wxFprintf(tmpTitle, _T("<TITLE>%s</TITLE></HEAD>\n\n"), wxFileNameFromPath(FileRoot));
- }
-
- // Output frame information
- if (htmlFrameContents)
- {
- wxChar firstFileName[300];
- if (truncateFilenames)
- wxSnprintf(firstFileName, sizeof(firstFileName), _T("%s1.htm"), FileRoot);
- else
- wxStrcpy(firstFileName, gs_filenames[1].c_str());
-
- wxFprintf(tmpTitle, _T("<FRAMESET COLS=\"30%%,70%%\">\n"));
-
- wxFprintf(tmpTitle, _T("<FRAME SRC=\"%s\">\n"), ConvertCase(wxFileNameFromPath(contentsFrameName)));
- wxFprintf(tmpTitle, _T("<FRAME SRC=\"%s\" NAME=\"mainwindow\">\n"), ConvertCase(wxFileNameFromPath(firstFileName)));
- wxFprintf(tmpTitle, _T("</FRAMESET>\n"));
-
- wxFprintf(tmpTitle, _T("<NOFRAMES>\n"));
- }
-
- // Output <BODY...> to temporary title page
- OutputBodyStart();
- fflush(tmpTitle);
-
- // Concat titlepage
- FILE *fd = wxFopen(TitlepageName, _T("r"));
- if (fd)
- {
- int ch = getc(fd);
- while (ch != EOF)
- {
- wxPutc(ch, tmpTitle);
- ch = getc(fd);
- }
- fclose(fd);
- }
-
- wxFprintf(tmpTitle, _T("\n</FONT></BODY>\n"));
-
- if (htmlFrameContents)
- {
- wxFprintf(tmpTitle, _T("\n</NOFRAMES>\n"));
- }
- wxFprintf(tmpTitle, _T("\n</HTML>\n"));
-
- fclose(tmpTitle);
- if (wxFileExists(TitlepageName)) wxRemoveFile(TitlepageName);
- if (!wxRenameFile(_T("title.tmp"), TitlepageName))
- {
- wxCopyFile(_T("title.tmp"), TitlepageName);
- wxRemoveFile(_T("title.tmp"));
- }
- }
-
- if (lastFileName) delete[] lastFileName;
- lastFileName = NULL;
- if (lastTopic) delete[] lastTopic;
- lastTopic = NULL;
-
- if (wxFileExists(ContentsName)) wxRemoveFile(ContentsName);
-
- if (!wxRenameFile(TmpContentsName, ContentsName))
- {
- wxCopyFile(TmpContentsName, ContentsName);
- wxRemoveFile(TmpContentsName);
- }
-
- // Generate .htx file if requested
- if (htmlIndex)
- {
- wxChar htmlIndexName[300];
- wxSnprintf(htmlIndexName, sizeof(htmlIndexName), _T("%s.htx"), FileRoot);
- GenerateHTMLIndexFile(htmlIndexName);
- }
-
- // Generate HTML Help Workshop files if requested
- if (htmlWorkshopFiles)
- {
- HTMLWorkshopEndContents();
- GenerateHTMLWorkshopFiles(FileRoot);
- }
-
- return true;
- }
-
- return false;
-}
-
-// Output .htx index file
-void GenerateHTMLIndexFile(wxChar *fname)
-{
- FILE *fd = wxFopen(fname, _T("w"));
- if (!fd)
- return;
-
- TopicTable.BeginFind();
- wxHashTable::Node *node = TopicTable.Next();
- while (node)
- {
- TexTopic *texTopic = (TexTopic *)node->GetData();
- const wxChar *topicName = node->GetKeyString();
- if (texTopic->filename && texTopic->keywords)
- {
- wxStringListNode *node1 = texTopic->keywords->GetFirst();
- while (node1)
- {
- wxChar *s = (wxChar *)node1->GetData();
- wxFprintf(fd, _T("%s|%s|%s\n"), topicName, texTopic->filename, s);
- node1 = node1->GetNext();
- }
- }
- node = TopicTable.Next();
- }
- fclose(fd);
-}
-
-
-
-
-
-
-
-// output .hpp, .hhc and .hhk files:
-
-
-void GenerateHTMLWorkshopFiles(wxChar *fname)
-{
- FILE *f;
- wxChar buf[300];
-
- /* Generate project file : */
-
- wxSnprintf(buf, sizeof(buf), _T("%s.hhp"), fname);
- f = wxFopen(buf, _T("wt"));
- wxFprintf(f,
- _T("[OPTIONS]\n")
- _T("Compatibility=1.1\n")
- _T("Full-text search=Yes\n")
- _T("Contents file=%s.hhc\n")
- _T("Compiled file=%s.chm\n")
- _T("Default Window=%sHelp\n")
- _T("Default topic=%s\n")
- _T("Index file=%s.hhk\n")
- _T("Title="),
- wxFileNameFromPath(fname),
- wxFileNameFromPath(fname),
- wxFileNameFromPath(fname),
- wxFileNameFromPath(TitlepageName),
- wxFileNameFromPath(fname)
- );
-
- if (DocumentTitle) {
- SetCurrentOutput(f);
- TraverseChildrenFromChunk(DocumentTitle);
- }
- else wxFprintf(f, _T("(unknown)"));
-
- wxFprintf(f, _T("\n\n[WINDOWS]\n")
- _T("%sHelp=,\"%s.hhc\",\"%s.hhk\",\"%s\",,,,,,0x2420,,0x380e,,,,,0,,,"),
- wxFileNameFromPath(fname),
- wxFileNameFromPath(fname),
- wxFileNameFromPath(fname),
- wxFileNameFromPath(TitlepageName));
-
-
- wxFprintf(f, _T("\n\n[FILES]\n"));
- wxFprintf(f, _T("%s\n"), wxFileNameFromPath(TitlepageName));
- for (int i = 1; i <= fileId; i++) {
- if (truncateFilenames)
- wxSnprintf(buf, sizeof(buf), _T("%s%d.htm"), wxFileNameFromPath(FileRoot), i);
- else
- wxStrcpy(buf, wxFileNameFromPath(gs_filenames[i].c_str()));
- wxFprintf(f, _T("%s\n"), buf);
- }
- fclose(f);
-
- /* Generate index file : */
-
- wxSnprintf(buf, sizeof(buf), _T("%s.hhk"), fname);
- f = wxFopen(buf, _T("wt"));
-
- wxFprintf(f,
- _T("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n")
- _T("<HTML>\n"));
- HTMLHeadTo(f);
- wxFprintf(f,
- _T("\n")
- _T("<meta name=\"GENERATOR\" content=\"tex2rtf\">\n")
- _T("<!-- Sitemap 1.0 -->\n")
- _T("</HEAD><BODY>\n")
- _T("<OBJECT type=\"text/site properties\">\n")
- _T(" <param name=\"ImageType\" value=\"Folder\">\n")
- _T("</OBJECT>\n")
- _T("<UL>\n"));
-
- TopicTable.BeginFind();
- wxHashTable::Node *node = TopicTable.Next();
- while (node)
- {
- TexTopic *texTopic = (TexTopic *)node->GetData();
- const wxChar *topicName = node->GetKeyString();
- if (texTopic->filename && texTopic->keywords)
- {
- wxStringListNode *node1 = texTopic->keywords->GetFirst();
- while (node1)
- {
- wxChar *s = (wxChar *)node1->GetData();
- wxFprintf(f,
- _T(" <LI> <OBJECT type=\"text/sitemap\">\n")
- _T(" <param name=\"Local\" value=\"%s#%s\">\n")
- _T(" <param name=\"Name\" value=\"%s\">\n")
- _T(" </OBJECT>\n"),
- texTopic->filename, topicName, s);
- node1 = node1->GetNext();
- }
- }
- node = TopicTable.Next();
- }
-
- wxFprintf(f, _T("</UL>\n"));
- fclose(f);
-}
-
-
-
-static FILE *HTMLWorkshopContents = NULL;
-static int HTMLWorkshopLastLevel = 0;
-
-void HTMLWorkshopAddToContents(int level, wxChar *s, wxChar *file)
-{
- int i;
-
- if (level > HTMLWorkshopLastLevel)
- for (i = HTMLWorkshopLastLevel; i < level; i++)
- wxFprintf(HTMLWorkshopContents, _T("<UL>"));
- if (level < HTMLWorkshopLastLevel)
- for (i = level; i < HTMLWorkshopLastLevel; i++)
- wxFprintf(HTMLWorkshopContents, _T("</UL>"));
-
- SetCurrentOutput(HTMLWorkshopContents);
- wxFprintf(HTMLWorkshopContents,
- _T(" <LI> <OBJECT type=\"text/sitemap\">\n")
- _T(" <param name=\"Local\" value=\"%s#%s\">\n")
- _T(" <param name=\"Name\" value=\""),
- file, s);
- OutputCurrentSection();
- wxFprintf(HTMLWorkshopContents,
- _T("\">\n")
- _T(" </OBJECT>\n"));
- HTMLWorkshopLastLevel = level;
-}
-
-
-void HTMLWorkshopStartContents()
-{
- wxChar buf[300];
- wxSnprintf(buf, sizeof(buf), _T("%s.hhc"), FileRoot);
- HTMLWorkshopContents = wxFopen(buf, _T("wt"));
- HTMLWorkshopLastLevel = 0;
-
- wxFprintf(HTMLWorkshopContents,
- _T("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n")
- _T("<HTML>\n"));
- HTMLHeadTo(HTMLWorkshopContents);
- wxFprintf(HTMLWorkshopContents,
- _T("\n")
- _T("<meta name=\"GENERATOR\" content=\"tex2rtf\">\n")
- _T("<!-- Sitemap 1.0 -->\n")
- _T("</HEAD><BODY>\n")
- _T("<OBJECT type=\"text/site properties\">\n")
- _T(" <param name=\"ImageType\" value=\"Folder\">\n")
- _T("</OBJECT>\n")
- _T("<UL>\n")
- _T("<LI> <OBJECT type=\"text/sitemap\">\n")
- _T("<param name=\"Local\" value=\"%s\">\n")
- _T("<param name=\"Name\" value=\"Contents\">\n</OBJECT>\n"),
- wxFileNameFromPath(TitlepageName)
- );
-
-}
-
-
-void HTMLWorkshopEndContents()
-{
- for (int i = HTMLWorkshopLastLevel; i >= 0; i--)
- wxFprintf(HTMLWorkshopContents, _T("</UL>\n"));
- fclose(HTMLWorkshopContents);
-}
-
-
-bool PrimaryAnchorOfTheFile( wxChar *file, wxChar *label )
-{
- wxString file_label;
- file_label.Printf( HTML_FILENAME_PATTERN, FileRoot, label );
- return file_label.IsSameAs( file , false );
-}
+++ /dev/null
-# =========================================================================
-# This makefile was generated by
-# Bakefile 0.2.3 (http://www.bakefile.org)
-# Do not modify, all changes will be overwritten!
-# =========================================================================
-
-.autodepend
-
-!ifndef BCCDIR
-!ifndef MAKEDIR
-!error Your Borland compiler does not define MAKEDIR. Please define the BCCDIR variable, e.g. BCCDIR=d:\bc4
-!endif
-BCCDIR = $(MAKEDIR)\..
-!endif
-
-!include ../../../build/msw/config.bcc
-
-# -------------------------------------------------------------------------
-# Do not modify the rest of this file!
-# -------------------------------------------------------------------------
-
-### Variables: ###
-
-WX_RELEASE_NODOT = 29
-COMPILER_PREFIX = bcc
-OBJS = \
- $(COMPILER_PREFIX)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
-LIBDIRNAME = .\..\..\..\lib\$(COMPILER_PREFIX)_$(LIBTYPE_SUFFIX)$(CFG)
-SETUPHDIR = \
- $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
-TEX2RTF_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
- $(__OPTIMIZEFLAG) $(__THREADSFLAG_0) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
- $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
- $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
- $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\..\include -I. $(__DLLFLAG_p) \
- -DwxUSE_GUI=0 -DNO_GUI $(CPPFLAGS) $(CXXFLAGS)
-TEX2RTF_OBJECTS = \
- $(OBJS)\tex2rtf_tex2rtf.obj \
- $(OBJS)\tex2rtf_tex2any.obj \
- $(OBJS)\tex2rtf_texutils.obj \
- $(OBJS)\tex2rtf_rtfutils.obj \
- $(OBJS)\tex2rtf_xlputils.obj \
- $(OBJS)\tex2rtf_htmlutil.obj \
- $(OBJS)\tex2rtf_readshg.obj \
- $(OBJS)\tex2rtf_table.obj
-TEX2RTF_GUI_CXXFLAGS = $(__RUNTIME_LIBS) -I$(BCCDIR)\include $(__DEBUGINFO) \
- $(__OPTIMIZEFLAG) $(__THREADSFLAG_0) -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
- $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
- $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
- $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\..\include -I. $(__DLLFLAG_p) \
- -I.\..\..\..\samples -DNOPCH $(CPPFLAGS) $(CXXFLAGS)
-TEX2RTF_GUI_OBJECTS = \
- $(OBJS)\tex2rtf_gui_tex2rtf.obj \
- $(OBJS)\tex2rtf_gui_tex2any.obj \
- $(OBJS)\tex2rtf_gui_texutils.obj \
- $(OBJS)\tex2rtf_gui_rtfutils.obj \
- $(OBJS)\tex2rtf_gui_xlputils.obj \
- $(OBJS)\tex2rtf_gui_htmlutil.obj \
- $(OBJS)\tex2rtf_gui_readshg.obj \
- $(OBJS)\tex2rtf_gui_table.obj
-
-### Conditionally set variables: ###
-
-!if "$(USE_GUI)" == "0"
-PORTNAME = base
-!endif
-!if "$(USE_GUI)" == "1"
-PORTNAME = msw
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-WXDEBUGFLAG = d
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-WXDEBUGFLAG = d
-!endif
-!if "$(UNICODE)" == "1"
-WXUNICODEFLAG = u
-!endif
-!if "$(WXUNIV)" == "1"
-WXUNIVNAME = univ
-!endif
-!if "$(SHARED)" == "1"
-WXDLLFLAG = dll
-!endif
-!if "$(SHARED)" == "0"
-LIBTYPE_SUFFIX = lib
-!endif
-!if "$(SHARED)" == "1"
-LIBTYPE_SUFFIX = dll
-!endif
-!if "$(MONOLITHIC)" == "0"
-EXTRALIBS_FOR_BASE =
-!endif
-!if "$(MONOLITHIC)" == "1"
-EXTRALIBS_FOR_BASE =
-!endif
-!if "$(USE_GUI)" == "1"
-__tex2rtf_gui___depname = $(OBJS)\tex2rtf_gui.exe
-!endif
-!if "$(WXUNIV)" == "1"
-__WXUNIV_DEFINE_p_3 = -d__WXUNIVERSAL__
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-__DEBUG_DEFINE_p_3 = -d__WXDEBUG__
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-__DEBUG_DEFINE_p_3 = -d__WXDEBUG__
-!endif
-!if "$(USE_EXCEPTIONS)" == "0"
-__EXCEPTIONS_DEFINE_p_3 = -dwxNO_EXCEPTIONS
-!endif
-!if "$(USE_RTTI)" == "0"
-__RTTI_DEFINE_p_3 = -dwxNO_RTTI
-!endif
-!if "$(USE_THREADS)" == "0"
-__THREAD_DEFINE_p_3 = -dwxNO_THREADS
-!endif
-!if "$(UNICODE)" == "0"
-__UNICODE_DEFINE_p_3 = -dwxUSE_UNICODE=0
-!endif
-!if "$(UNICODE)" == "1"
-__UNICODE_DEFINE_p_3 = -d_UNICODE
-!endif
-!if "$(MSLU)" == "1"
-__MSLU_DEFINE_p_3 = -dwxUSE_UNICODE_MSLU=1
-!endif
-!if "$(USE_GDIPLUS)" == "1"
-__GFXCTX_DEFINE_p_3 = -dwxUSE_GRAPHICS_CONTEXT=1
-!endif
-!if "$(SHARED)" == "1"
-__DLLFLAG_p_3 = -dWXUSINGDLL
-!endif
-!if "$(MONOLITHIC)" == "0"
-__WXLIB_HTML_p = \
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib
-!endif
-!if "$(MONOLITHIC)" == "0"
-__WXLIB_CORE_p = \
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
-!endif
-!if "$(BUILD)" == "debug"
-__OPTIMIZEFLAG = -Od
-!endif
-!if "$(BUILD)" == "release"
-__OPTIMIZEFLAG = -O2
-!endif
-!if "$(USE_THREADS)" == "0"
-__THREADSFLAG =
-!endif
-!if "$(USE_THREADS)" == "1"
-__THREADSFLAG = mt
-!endif
-!if "$(USE_THREADS)" == "0"
-__THREADSFLAG_0 =
-!endif
-!if "$(USE_THREADS)" == "1"
-__THREADSFLAG_0 = -tWM
-!endif
-!if "$(RUNTIME_LIBS)" == "dynamic"
-__RUNTIME_LIBS = -tWR
-!endif
-!if "$(RUNTIME_LIBS)" == "static"
-__RUNTIME_LIBS =
-!endif
-!if "$(RUNTIME_LIBS)" == "dynamic"
-__RUNTIME_LIBS_0 = i
-!endif
-!if "$(RUNTIME_LIBS)" == "static"
-__RUNTIME_LIBS_0 =
-!endif
-!if "$(WXUNIV)" == "1"
-__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-__DEBUG_DEFINE_p = -D__WXDEBUG__
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-__DEBUG_DEFINE_p = -D__WXDEBUG__
-!endif
-!if "$(USE_EXCEPTIONS)" == "0"
-__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
-!endif
-!if "$(USE_RTTI)" == "0"
-__RTTI_DEFINE_p = -DwxNO_RTTI
-!endif
-!if "$(USE_THREADS)" == "0"
-__THREAD_DEFINE_p = -DwxNO_THREADS
-!endif
-!if "$(UNICODE)" == "0"
-__UNICODE_DEFINE_p = -DwxUSE_UNICODE=0
-!endif
-!if "$(UNICODE)" == "1"
-__UNICODE_DEFINE_p = -D_UNICODE
-!endif
-!if "$(MSLU)" == "1"
-__MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1
-!endif
-!if "$(USE_GDIPLUS)" == "1"
-__GFXCTX_DEFINE_p = -DwxUSE_GRAPHICS_CONTEXT=1
-!endif
-!if "$(SHARED)" == "1"
-__DLLFLAG_p = -DWXUSINGDLL
-!endif
-!if "$(MONOLITHIC)" == "0"
-__WXLIB_BASE_p = \
- wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-!if "$(MONOLITHIC)" == "1"
-__WXLIB_MONO_p = \
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-!if "$(MSLU)" == "1"
-__UNICOWS_LIB_p = unicows.lib
-!endif
-!if "$(USE_GDIPLUS)" == "1"
-__GDIPLUS_LIB_p = gdiplus.lib
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO = -v
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO = -v-
-!endif
-!if "$(DEBUG_INFO)" == "0"
-__DEBUGINFO = -v-
-!endif
-!if "$(DEBUG_INFO)" == "1"
-__DEBUGINFO = -v
-!endif
-
-
-all: $(OBJS)
-$(OBJS):
- -if not exist $(OBJS) mkdir $(OBJS)
-
-### Targets: ###
-
-all: $(OBJS)\tex2rtf.exe $(__tex2rtf_gui___depname)
-
-clean:
- -if exist $(OBJS)\*.obj del $(OBJS)\*.obj
- -if exist $(OBJS)\*.res del $(OBJS)\*.res
- -if exist $(OBJS)\*.csm del $(OBJS)\*.csm
- -if exist $(OBJS)\tex2rtf.exe del $(OBJS)\tex2rtf.exe
- -if exist $(OBJS)\tex2rtf.tds del $(OBJS)\tex2rtf.tds
- -if exist $(OBJS)\tex2rtf.ilc del $(OBJS)\tex2rtf.ilc
- -if exist $(OBJS)\tex2rtf.ild del $(OBJS)\tex2rtf.ild
- -if exist $(OBJS)\tex2rtf.ilf del $(OBJS)\tex2rtf.ilf
- -if exist $(OBJS)\tex2rtf.ils del $(OBJS)\tex2rtf.ils
- -if exist $(OBJS)\tex2rtf_gui.exe del $(OBJS)\tex2rtf_gui.exe
- -if exist $(OBJS)\tex2rtf_gui.tds del $(OBJS)\tex2rtf_gui.tds
- -if exist $(OBJS)\tex2rtf_gui.ilc del $(OBJS)\tex2rtf_gui.ilc
- -if exist $(OBJS)\tex2rtf_gui.ild del $(OBJS)\tex2rtf_gui.ild
- -if exist $(OBJS)\tex2rtf_gui.ilf del $(OBJS)\tex2rtf_gui.ilf
- -if exist $(OBJS)\tex2rtf_gui.ils del $(OBJS)\tex2rtf_gui.ils
-
-$(OBJS)\tex2rtf.exe: $(TEX2RTF_OBJECTS)
- ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -ap @&&|
- c0x32.obj $(TEX2RTF_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)$(__RUNTIME_LIBS_0).lib,,
-|
-
-!if "$(USE_GUI)" == "1"
-$(OBJS)\tex2rtf_gui.exe: $(TEX2RTF_GUI_OBJECTS) $(OBJS)\tex2rtf_gui_sample.res
- ilink32 -Tpe -q $(LDFLAGS) -L$(BCCDIR)\lib -L$(BCCDIR)\lib\psdk $(__DEBUGINFO) -L$(LIBDIRNAME) -aa @&&|
- c0w32.obj $(TEX2RTF_GUI_OBJECTS),$@,, $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_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)$(__RUNTIME_LIBS_0).lib,, $(OBJS)\tex2rtf_gui_sample.res
-|
-!endif
-
-$(OBJS)\tex2rtf_tex2rtf.obj: .\tex2rtf.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_CXXFLAGS) .\tex2rtf.cpp
-
-$(OBJS)\tex2rtf_tex2any.obj: .\tex2any.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_CXXFLAGS) .\tex2any.cpp
-
-$(OBJS)\tex2rtf_texutils.obj: .\texutils.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_CXXFLAGS) .\texutils.cpp
-
-$(OBJS)\tex2rtf_rtfutils.obj: .\rtfutils.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_CXXFLAGS) .\rtfutils.cpp
-
-$(OBJS)\tex2rtf_xlputils.obj: .\xlputils.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_CXXFLAGS) .\xlputils.cpp
-
-$(OBJS)\tex2rtf_htmlutil.obj: .\htmlutil.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_CXXFLAGS) .\htmlutil.cpp
-
-$(OBJS)\tex2rtf_readshg.obj: .\readshg.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_CXXFLAGS) .\readshg.cpp
-
-$(OBJS)\tex2rtf_table.obj: .\table.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_CXXFLAGS) .\table.cpp
-
-$(OBJS)\tex2rtf_gui_sample.res: .\..\..\..\samples\sample.rc
- brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_3) $(__DEBUG_DEFINE_p_3) $(__EXCEPTIONS_DEFINE_p_3) $(__RTTI_DEFINE_p_3) $(__THREAD_DEFINE_p_3) $(__UNICODE_DEFINE_p_3) $(__MSLU_DEFINE_p_3) $(__GFXCTX_DEFINE_p_3) -i$(SETUPHDIR) -i.\..\..\..\include -i. $(__DLLFLAG_p_3) -i.\..\..\..\samples -dNOPCH .\..\..\..\samples\sample.rc
-
-$(OBJS)\tex2rtf_gui_tex2rtf.obj: .\tex2rtf.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_GUI_CXXFLAGS) .\tex2rtf.cpp
-
-$(OBJS)\tex2rtf_gui_tex2any.obj: .\tex2any.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_GUI_CXXFLAGS) .\tex2any.cpp
-
-$(OBJS)\tex2rtf_gui_texutils.obj: .\texutils.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_GUI_CXXFLAGS) .\texutils.cpp
-
-$(OBJS)\tex2rtf_gui_rtfutils.obj: .\rtfutils.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_GUI_CXXFLAGS) .\rtfutils.cpp
-
-$(OBJS)\tex2rtf_gui_xlputils.obj: .\xlputils.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_GUI_CXXFLAGS) .\xlputils.cpp
-
-$(OBJS)\tex2rtf_gui_htmlutil.obj: .\htmlutil.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_GUI_CXXFLAGS) .\htmlutil.cpp
-
-$(OBJS)\tex2rtf_gui_readshg.obj: .\readshg.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_GUI_CXXFLAGS) .\readshg.cpp
-
-$(OBJS)\tex2rtf_gui_table.obj: .\table.cpp
- $(CXX) -q -c -P -o$@ $(TEX2RTF_GUI_CXXFLAGS) .\table.cpp
-
+++ /dev/null
-# =========================================================================
-# This makefile was generated by
-# Bakefile 0.2.3 (http://www.bakefile.org)
-# Do not modify, all changes will be overwritten!
-# =========================================================================
-
-include ../../../build/msw/config.gcc
-
-# -------------------------------------------------------------------------
-# Do not modify the rest of this file!
-# -------------------------------------------------------------------------
-
-### Variables: ###
-
-CPPDEPS = -MT$@ -MF$@.d -MD
-WX_RELEASE_NODOT = 29
-COMPILER_PREFIX = gcc
-OBJS = \
- $(COMPILER_PREFIX)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
-LIBDIRNAME = .\..\..\..\lib\$(COMPILER_PREFIX)_$(LIBTYPE_SUFFIX)$(CFG)
-SETUPHDIR = \
- $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
-TEX2RTF_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \
- $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
- $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
- $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
- $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\..\include -W -Wall -I. \
- $(__DLLFLAG_p) -DwxUSE_GUI=0 -DNO_GUI $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \
- -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
-TEX2RTF_OBJECTS = \
- $(OBJS)\tex2rtf_tex2rtf.o \
- $(OBJS)\tex2rtf_tex2any.o \
- $(OBJS)\tex2rtf_texutils.o \
- $(OBJS)\tex2rtf_rtfutils.o \
- $(OBJS)\tex2rtf_xlputils.o \
- $(OBJS)\tex2rtf_htmlutil.o \
- $(OBJS)\tex2rtf_readshg.o \
- $(OBJS)\tex2rtf_table.o
-TEX2RTF_GUI_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) \
- $(GCCFLAGS) -DHAVE_W32API_H -D__WXMSW__ $(__WXUNIV_DEFINE_p) \
- $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
- $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
- $(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I.\..\..\..\include -W -Wall -I. \
- $(__DLLFLAG_p) -I.\..\..\..\samples -DNOPCH $(__RTTIFLAG) \
- $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
-TEX2RTF_GUI_OBJECTS = \
- $(OBJS)\tex2rtf_gui_sample_rc.o \
- $(OBJS)\tex2rtf_gui_tex2rtf.o \
- $(OBJS)\tex2rtf_gui_tex2any.o \
- $(OBJS)\tex2rtf_gui_texutils.o \
- $(OBJS)\tex2rtf_gui_rtfutils.o \
- $(OBJS)\tex2rtf_gui_xlputils.o \
- $(OBJS)\tex2rtf_gui_htmlutil.o \
- $(OBJS)\tex2rtf_gui_readshg.o \
- $(OBJS)\tex2rtf_gui_table.o
-
-### Conditionally set variables: ###
-
-ifeq ($(GCC_VERSION),2.95)
-GCCFLAGS = -fvtable-thunks
-endif
-ifeq ($(USE_GUI),0)
-PORTNAME = base
-endif
-ifeq ($(USE_GUI),1)
-PORTNAME = msw
-endif
-ifeq ($(BUILD),debug)
-ifeq ($(DEBUG_FLAG),default)
-WXDEBUGFLAG = d
-endif
-endif
-ifeq ($(DEBUG_FLAG),1)
-WXDEBUGFLAG = d
-endif
-ifeq ($(UNICODE),1)
-WXUNICODEFLAG = u
-endif
-ifeq ($(WXUNIV),1)
-WXUNIVNAME = univ
-endif
-ifeq ($(SHARED),1)
-WXDLLFLAG = dll
-endif
-ifeq ($(SHARED),0)
-LIBTYPE_SUFFIX = lib
-endif
-ifeq ($(SHARED),1)
-LIBTYPE_SUFFIX = dll
-endif
-ifeq ($(MONOLITHIC),0)
-EXTRALIBS_FOR_BASE =
-endif
-ifeq ($(MONOLITHIC),1)
-EXTRALIBS_FOR_BASE =
-endif
-ifeq ($(USE_GUI),1)
-__tex2rtf_gui___depname = $(OBJS)\tex2rtf_gui.exe
-endif
-ifeq ($(WXUNIV),1)
-__WXUNIV_DEFINE_p_3 = --define __WXUNIVERSAL__
-endif
-ifeq ($(BUILD),debug)
-ifeq ($(DEBUG_FLAG),default)
-__DEBUG_DEFINE_p_3 = --define __WXDEBUG__
-endif
-endif
-ifeq ($(DEBUG_FLAG),1)
-__DEBUG_DEFINE_p_3 = --define __WXDEBUG__
-endif
-ifeq ($(USE_EXCEPTIONS),0)
-__EXCEPTIONS_DEFINE_p_3 = --define wxNO_EXCEPTIONS
-endif
-ifeq ($(USE_RTTI),0)
-__RTTI_DEFINE_p_3 = --define wxNO_RTTI
-endif
-ifeq ($(USE_THREADS),0)
-__THREAD_DEFINE_p_3 = --define wxNO_THREADS
-endif
-ifeq ($(UNICODE),0)
-__UNICODE_DEFINE_p_3 = --define wxUSE_UNICODE=0
-endif
-ifeq ($(UNICODE),1)
-__UNICODE_DEFINE_p_3 = --define _UNICODE
-endif
-ifeq ($(MSLU),1)
-__MSLU_DEFINE_p_3 = --define wxUSE_UNICODE_MSLU=1
-endif
-ifeq ($(USE_GDIPLUS),1)
-__GFXCTX_DEFINE_p_3 = --define wxUSE_GRAPHICS_CONTEXT=1
-endif
-ifeq ($(SHARED),1)
-__DLLFLAG_p_3 = --define WXUSINGDLL
-endif
-ifeq ($(MONOLITHIC),0)
-__WXLIB_HTML_p = \
- -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html
-endif
-ifeq ($(MONOLITHIC),0)
-__WXLIB_CORE_p = \
- -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
-endif
-ifeq ($(USE_GUI),1)
-__LIB_TIFF_p = -lwxtiff$(WXDEBUGFLAG)
-endif
-ifeq ($(USE_GUI),1)
-__LIB_JPEG_p = -lwxjpeg$(WXDEBUGFLAG)
-endif
-ifeq ($(USE_GUI),1)
-__LIB_PNG_p = -lwxpng$(WXDEBUGFLAG)
-endif
-ifeq ($(BUILD),debug)
-__OPTIMIZEFLAG = -O0
-endif
-ifeq ($(BUILD),release)
-__OPTIMIZEFLAG = -O2
-endif
-ifeq ($(USE_RTTI),0)
-__RTTIFLAG = -fno-rtti
-endif
-ifeq ($(USE_RTTI),1)
-__RTTIFLAG =
-endif
-ifeq ($(USE_EXCEPTIONS),0)
-__EXCEPTIONSFLAG = -fno-exceptions
-endif
-ifeq ($(USE_EXCEPTIONS),1)
-__EXCEPTIONSFLAG =
-endif
-ifeq ($(WXUNIV),1)
-__WXUNIV_DEFINE_p = -D__WXUNIVERSAL__
-endif
-ifeq ($(BUILD),debug)
-ifeq ($(DEBUG_FLAG),default)
-__DEBUG_DEFINE_p = -D__WXDEBUG__
-endif
-endif
-ifeq ($(DEBUG_FLAG),1)
-__DEBUG_DEFINE_p = -D__WXDEBUG__
-endif
-ifeq ($(USE_EXCEPTIONS),0)
-__EXCEPTIONS_DEFINE_p = -DwxNO_EXCEPTIONS
-endif
-ifeq ($(USE_RTTI),0)
-__RTTI_DEFINE_p = -DwxNO_RTTI
-endif
-ifeq ($(USE_THREADS),0)
-__THREAD_DEFINE_p = -DwxNO_THREADS
-endif
-ifeq ($(UNICODE),0)
-__UNICODE_DEFINE_p = -DwxUSE_UNICODE=0
-endif
-ifeq ($(UNICODE),1)
-__UNICODE_DEFINE_p = -D_UNICODE
-endif
-ifeq ($(MSLU),1)
-__MSLU_DEFINE_p = -DwxUSE_UNICODE_MSLU=1
-endif
-ifeq ($(USE_GDIPLUS),1)
-__GFXCTX_DEFINE_p = -DwxUSE_GRAPHICS_CONTEXT=1
-endif
-ifeq ($(SHARED),1)
-__DLLFLAG_p = -DWXUSINGDLL
-endif
-ifeq ($(MONOLITHIC),0)
-__WXLIB_BASE_p = \
- -lwxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
-endif
-ifeq ($(MONOLITHIC),1)
-__WXLIB_MONO_p = \
- -lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)
-endif
-ifeq ($(MSLU),1)
-__UNICOWS_LIB_p = -lunicows
-endif
-ifeq ($(USE_GDIPLUS),1)
-__GDIPLUS_LIB_p = -lgdiplus
-endif
-ifeq ($(BUILD),debug)
-ifeq ($(DEBUG_INFO),default)
-__DEBUGINFO = -g
-endif
-endif
-ifeq ($(BUILD),release)
-ifeq ($(DEBUG_INFO),default)
-__DEBUGINFO =
-endif
-endif
-ifeq ($(DEBUG_INFO),0)
-__DEBUGINFO =
-endif
-ifeq ($(DEBUG_INFO),1)
-__DEBUGINFO = -g
-endif
-ifeq ($(USE_THREADS),0)
-__THREADSFLAG =
-endif
-ifeq ($(USE_THREADS),1)
-__THREADSFLAG = -mthreads
-endif
-
-
-all: $(OBJS)
-$(OBJS):
- -if not exist $(OBJS) mkdir $(OBJS)
-
-### Targets: ###
-
-all: $(OBJS)\tex2rtf.exe $(__tex2rtf_gui___depname)
-
-clean:
- -if exist $(OBJS)\*.o del $(OBJS)\*.o
- -if exist $(OBJS)\*.d del $(OBJS)\*.d
- -if exist $(OBJS)\tex2rtf.exe del $(OBJS)\tex2rtf.exe
- -if exist $(OBJS)\tex2rtf_gui.exe del $(OBJS)\tex2rtf_gui.exe
-
-$(OBJS)\tex2rtf.exe: $(TEX2RTF_OBJECTS)
- $(CXX) -o $@ $(TEX2RTF_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
-
-ifeq ($(USE_GUI),1)
-$(OBJS)\tex2rtf_gui.exe: $(TEX2RTF_GUI_OBJECTS) $(OBJS)\tex2rtf_gui_sample_rc.o
- $(CXX) -o $@ $(TEX2RTF_GUI_OBJECTS) $(LDFLAGS) $(__DEBUGINFO) $(__THREADSFLAG) -L$(LIBDIRNAME) -Wl,--subsystem,windows -mwindows $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_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
-endif
-
-$(OBJS)\tex2rtf_tex2rtf.o: ./tex2rtf.cpp
- $(CXX) -c -o $@ $(TEX2RTF_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\tex2rtf_tex2any.o: ./tex2any.cpp
- $(CXX) -c -o $@ $(TEX2RTF_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\tex2rtf_texutils.o: ./texutils.cpp
- $(CXX) -c -o $@ $(TEX2RTF_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\tex2rtf_rtfutils.o: ./rtfutils.cpp
- $(CXX) -c -o $@ $(TEX2RTF_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\tex2rtf_xlputils.o: ./xlputils.cpp
- $(CXX) -c -o $@ $(TEX2RTF_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\tex2rtf_htmlutil.o: ./htmlutil.cpp
- $(CXX) -c -o $@ $(TEX2RTF_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\tex2rtf_readshg.o: ./readshg.cpp
- $(CXX) -c -o $@ $(TEX2RTF_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\tex2rtf_table.o: ./table.cpp
- $(CXX) -c -o $@ $(TEX2RTF_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\tex2rtf_gui_sample_rc.o: ./../../../samples/sample.rc
- windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_3) $(__DEBUG_DEFINE_p_3) $(__EXCEPTIONS_DEFINE_p_3) $(__RTTI_DEFINE_p_3) $(__THREAD_DEFINE_p_3) $(__UNICODE_DEFINE_p_3) $(__MSLU_DEFINE_p_3) $(__GFXCTX_DEFINE_p_3) --include-dir $(SETUPHDIR) --include-dir ./../../../include --include-dir . $(__DLLFLAG_p_3) --include-dir ./../../../samples --define NOPCH
-
-$(OBJS)\tex2rtf_gui_tex2rtf.o: ./tex2rtf.cpp
- $(CXX) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\tex2rtf_gui_tex2any.o: ./tex2any.cpp
- $(CXX) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\tex2rtf_gui_texutils.o: ./texutils.cpp
- $(CXX) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\tex2rtf_gui_rtfutils.o: ./rtfutils.cpp
- $(CXX) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\tex2rtf_gui_xlputils.o: ./xlputils.cpp
- $(CXX) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\tex2rtf_gui_htmlutil.o: ./htmlutil.cpp
- $(CXX) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\tex2rtf_gui_readshg.o: ./readshg.cpp
- $(CXX) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(CPPDEPS) $<
-
-$(OBJS)\tex2rtf_gui_table.o: ./table.cpp
- $(CXX) -c -o $@ $(TEX2RTF_GUI_CXXFLAGS) $(CPPDEPS) $<
-
-.PHONY: all clean
-
-
-SHELL := $(COMSPEC)
-
-# Dependencies tracking:
--include $(OBJS)/*.d
+++ /dev/null
-# makefile
-
-CXXFLAGS = `wx-config --cxxflags`
-LDFLAGS = `wx-config --libs`
-
-PROGRAM = tex2rtf
-
-OBJECTS = tex2rtf.o tex2any.o texutils.o rtfutils.o xlputils.o htmlutil.o readshg.o table.o
-
-# implementation
-
-.SUFFIXES: .o .cpp
-
-.cpp.o :
- $(CXX) -c $(CXXFLAGS) -o $@ $<
-
-all: $(PROGRAM)
-
-$(PROGRAM): $(OBJECTS)
- $(CXX) -o $(PROGRAM) $(OBJECTS) $(LDFLAGS)
-
-clean:
- rm -f *.o $(PROGRAM)
-
+++ /dev/null
-# =========================================================================
-# This makefile was generated by
-# Bakefile 0.2.3 (http://www.bakefile.org)
-# Do not modify, all changes will be overwritten!
-# =========================================================================
-
-!include <../../../build/msw/config.vc>
-
-# -------------------------------------------------------------------------
-# Do not modify the rest of this file!
-# -------------------------------------------------------------------------
-
-### Variables: ###
-
-WX_RELEASE_NODOT = 29
-COMPILER_PREFIX = vc
-OBJS = \
- $(COMPILER_PREFIX)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)$(DIR_SUFFIX_CPU)
-LIBDIRNAME = \
- .\..\..\..\lib\$(COMPILER_PREFIX)$(DIR_SUFFIX_CPU)_$(LIBTYPE_SUFFIX)$(CFG)
-SETUPHDIR = \
- $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
-TEX2RTF_CXXFLAGS = /M$(__RUNTIME_LIBS_8)$(__DEBUGRUNTIME) /DWIN32 \
- $(__DEBUGINFO) /Fd$(OBJS)\tex2rtf.pdb $(____DEBUGRUNTIME) $(__OPTIMIZEFLAG) \
- $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) \
- $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) \
- $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) $(__GFXCTX_DEFINE_p) \
- /I$(SETUPHDIR) /I.\..\..\..\include /W4 /I. $(__DLLFLAG_p) /D_CONSOLE \
- /DwxUSE_GUI=0 /DNO_GUI $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) \
- $(CXXFLAGS)
-TEX2RTF_OBJECTS = \
- $(OBJS)\tex2rtf_tex2rtf.obj \
- $(OBJS)\tex2rtf_tex2any.obj \
- $(OBJS)\tex2rtf_texutils.obj \
- $(OBJS)\tex2rtf_rtfutils.obj \
- $(OBJS)\tex2rtf_xlputils.obj \
- $(OBJS)\tex2rtf_htmlutil.obj \
- $(OBJS)\tex2rtf_readshg.obj \
- $(OBJS)\tex2rtf_table.obj
-TEX2RTF_GUI_CXXFLAGS = /M$(__RUNTIME_LIBS_22)$(__DEBUGRUNTIME) /DWIN32 \
- $(__DEBUGINFO) /Fd$(OBJS)\tex2rtf_gui.pdb $(____DEBUGRUNTIME) \
- $(__OPTIMIZEFLAG) $(__NO_VC_CRTDBG_p) /D__WXMSW__ $(__WXUNIV_DEFINE_p) \
- $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) \
- $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
- $(__GFXCTX_DEFINE_p) /I$(SETUPHDIR) /I.\..\..\..\include /W4 /I. \
- $(__DLLFLAG_p) /D_WINDOWS /I.\..\..\..\samples /DNOPCH $(__RTTIFLAG) \
- $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
-TEX2RTF_GUI_OBJECTS = \
- $(OBJS)\tex2rtf_gui_sample.res \
- $(OBJS)\tex2rtf_gui_tex2rtf.obj \
- $(OBJS)\tex2rtf_gui_tex2any.obj \
- $(OBJS)\tex2rtf_gui_texutils.obj \
- $(OBJS)\tex2rtf_gui_rtfutils.obj \
- $(OBJS)\tex2rtf_gui_xlputils.obj \
- $(OBJS)\tex2rtf_gui_htmlutil.obj \
- $(OBJS)\tex2rtf_gui_readshg.obj \
- $(OBJS)\tex2rtf_gui_table.obj
-
-### Conditionally set variables: ###
-
-!if "$(USE_GUI)" == "0"
-PORTNAME = base
-!endif
-!if "$(USE_GUI)" == "1"
-PORTNAME = msw
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-WXDEBUGFLAG = d
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-WXDEBUGFLAG = d
-!endif
-!if "$(UNICODE)" == "1"
-WXUNICODEFLAG = u
-!endif
-!if "$(WXUNIV)" == "1"
-WXUNIVNAME = univ
-!endif
-!if "$(TARGET_CPU)" == "amd64"
-DIR_SUFFIX_CPU = _amd64
-!endif
-!if "$(TARGET_CPU)" == "amd64"
-DIR_SUFFIX_CPU = _amd64
-!endif
-!if "$(TARGET_CPU)" == "ia64"
-DIR_SUFFIX_CPU = _ia64
-!endif
-!if "$(TARGET_CPU)" == "ia64"
-DIR_SUFFIX_CPU = _ia64
-!endif
-!if "$(SHARED)" == "1"
-WXDLLFLAG = dll
-!endif
-!if "$(SHARED)" == "0"
-LIBTYPE_SUFFIX = lib
-!endif
-!if "$(SHARED)" == "1"
-LIBTYPE_SUFFIX = dll
-!endif
-!if "$(TARGET_CPU)" == "amd64"
-LINK_TARGET_CPU = /MACHINE:AMD64
-!endif
-!if "$(TARGET_CPU)" == "amd64"
-LINK_TARGET_CPU = /MACHINE:AMD64
-!endif
-!if "$(TARGET_CPU)" == "ia64"
-LINK_TARGET_CPU = /MACHINE:IA64
-!endif
-!if "$(TARGET_CPU)" == "ia64"
-LINK_TARGET_CPU = /MACHINE:IA64
-!endif
-!if "$(MONOLITHIC)" == "0"
-EXTRALIBS_FOR_BASE =
-!endif
-!if "$(MONOLITHIC)" == "1"
-EXTRALIBS_FOR_BASE =
-!endif
-!if "$(RUNTIME_LIBS)" == "dynamic"
-__RUNTIME_LIBS_8 = D
-!endif
-!if "$(RUNTIME_LIBS)" == "static"
-__RUNTIME_LIBS_8 = $(__THREADSFLAG)
-!endif
-!if "$(USE_GUI)" == "1"
-__tex2rtf_gui___depname = $(OBJS)\tex2rtf_gui.exe
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
-____DEBUGRUNTIME_16_p_1 = /d _DEBUG
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
-____DEBUGRUNTIME_16_p_1 =
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "0"
-____DEBUGRUNTIME_16_p_1 =
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "1"
-____DEBUGRUNTIME_16_p_1 = /d _DEBUG
-!endif
-!if "$(RUNTIME_LIBS)" == "dynamic"
-__RUNTIME_LIBS_22 = D
-!endif
-!if "$(RUNTIME_LIBS)" == "static"
-__RUNTIME_LIBS_22 = $(__THREADSFLAG)
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
-__NO_VC_CRTDBG_p_3 = /d __NO_VC_CRTDBG__
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
-__NO_VC_CRTDBG_p_3 = /d __NO_VC_CRTDBG__
-!endif
-!if "$(WXUNIV)" == "1"
-__WXUNIV_DEFINE_p_3 = /d __WXUNIVERSAL__
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-__DEBUG_DEFINE_p_3 = /d __WXDEBUG__
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-__DEBUG_DEFINE_p_3 = /d __WXDEBUG__
-!endif
-!if "$(USE_EXCEPTIONS)" == "0"
-__EXCEPTIONS_DEFINE_p_3 = /d wxNO_EXCEPTIONS
-!endif
-!if "$(USE_RTTI)" == "0"
-__RTTI_DEFINE_p_3 = /d wxNO_RTTI
-!endif
-!if "$(USE_THREADS)" == "0"
-__THREAD_DEFINE_p_3 = /d wxNO_THREADS
-!endif
-!if "$(UNICODE)" == "0"
-__UNICODE_DEFINE_p_3 = /d wxUSE_UNICODE=0
-!endif
-!if "$(UNICODE)" == "1"
-__UNICODE_DEFINE_p_3 = /d _UNICODE
-!endif
-!if "$(MSLU)" == "1"
-__MSLU_DEFINE_p_3 = /d wxUSE_UNICODE_MSLU=1
-!endif
-!if "$(USE_GDIPLUS)" == "1"
-__GFXCTX_DEFINE_p_3 = /d wxUSE_GRAPHICS_CONTEXT=1
-!endif
-!if "$(SHARED)" == "1"
-__DLLFLAG_p_3 = /d WXUSINGDLL
-!endif
-!if "$(MONOLITHIC)" == "0"
-__WXLIB_HTML_p = \
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib
-!endif
-!if "$(MONOLITHIC)" == "0"
-__WXLIB_CORE_p = \
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
-!endif
-!if "$(USE_GUI)" == "1"
-__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO = /Zi
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO =
-!endif
-!if "$(DEBUG_INFO)" == "0"
-__DEBUGINFO =
-!endif
-!if "$(DEBUG_INFO)" == "1"
-__DEBUGINFO = /Zi
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_1 = /DEBUG
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_INFO)" == "default"
-__DEBUGINFO_1 =
-!endif
-!if "$(DEBUG_INFO)" == "0"
-__DEBUGINFO_1 =
-!endif
-!if "$(DEBUG_INFO)" == "1"
-__DEBUGINFO_1 = /DEBUG
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
-____DEBUGRUNTIME = /D_DEBUG
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
-____DEBUGRUNTIME =
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "0"
-____DEBUGRUNTIME =
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "1"
-____DEBUGRUNTIME = /D_DEBUG
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "default"
-__DEBUGRUNTIME = d
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_RUNTIME_LIBS)" == "default"
-__DEBUGRUNTIME =
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "0"
-__DEBUGRUNTIME =
-!endif
-!if "$(DEBUG_RUNTIME_LIBS)" == "1"
-__DEBUGRUNTIME = d
-!endif
-!if "$(BUILD)" == "debug"
-__OPTIMIZEFLAG = /Od
-!endif
-!if "$(BUILD)" == "release"
-__OPTIMIZEFLAG = /O2
-!endif
-!if "$(USE_THREADS)" == "0"
-__THREADSFLAG = L
-!endif
-!if "$(USE_THREADS)" == "1"
-__THREADSFLAG = T
-!endif
-!if "$(USE_RTTI)" == "0"
-__RTTIFLAG =
-!endif
-!if "$(USE_RTTI)" == "1"
-__RTTIFLAG = /GR
-!endif
-!if "$(USE_EXCEPTIONS)" == "0"
-__EXCEPTIONSFLAG =
-!endif
-!if "$(USE_EXCEPTIONS)" == "1"
-__EXCEPTIONSFLAG = /EHsc
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_RUNTIME_LIBS)" == "0"
-__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
-!endif
-!if "$(BUILD)" == "release" && "$(DEBUG_FLAG)" == "1"
-__NO_VC_CRTDBG_p = /D__NO_VC_CRTDBG__
-!endif
-!if "$(WXUNIV)" == "1"
-__WXUNIV_DEFINE_p = /D__WXUNIVERSAL__
-!endif
-!if "$(BUILD)" == "debug" && "$(DEBUG_FLAG)" == "default"
-__DEBUG_DEFINE_p = /D__WXDEBUG__
-!endif
-!if "$(DEBUG_FLAG)" == "1"
-__DEBUG_DEFINE_p = /D__WXDEBUG__
-!endif
-!if "$(USE_EXCEPTIONS)" == "0"
-__EXCEPTIONS_DEFINE_p = /DwxNO_EXCEPTIONS
-!endif
-!if "$(USE_RTTI)" == "0"
-__RTTI_DEFINE_p = /DwxNO_RTTI
-!endif
-!if "$(USE_THREADS)" == "0"
-__THREAD_DEFINE_p = /DwxNO_THREADS
-!endif
-!if "$(UNICODE)" == "0"
-__UNICODE_DEFINE_p = /DwxUSE_UNICODE=0
-!endif
-!if "$(UNICODE)" == "1"
-__UNICODE_DEFINE_p = /D_UNICODE
-!endif
-!if "$(MSLU)" == "1"
-__MSLU_DEFINE_p = /DwxUSE_UNICODE_MSLU=1
-!endif
-!if "$(USE_GDIPLUS)" == "1"
-__GFXCTX_DEFINE_p = /DwxUSE_GRAPHICS_CONTEXT=1
-!endif
-!if "$(SHARED)" == "1"
-__DLLFLAG_p = /DWXUSINGDLL
-!endif
-!if "$(MONOLITHIC)" == "0"
-__WXLIB_BASE_p = \
- wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-!if "$(MONOLITHIC)" == "1"
-__WXLIB_MONO_p = \
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-!if "$(MSLU)" == "1"
-__UNICOWS_LIB_p = unicows.lib
-!endif
-!if "$(USE_GDIPLUS)" == "1"
-__GDIPLUS_LIB_p = gdiplus.lib
-!endif
-
-
-all: $(OBJS)
-$(OBJS):
- -if not exist $(OBJS) mkdir $(OBJS)
-
-### Targets: ###
-
-all: $(OBJS)\tex2rtf.exe $(__tex2rtf_gui___depname)
-
-clean:
- -if exist $(OBJS)\*.obj del $(OBJS)\*.obj
- -if exist $(OBJS)\*.res del $(OBJS)\*.res
- -if exist $(OBJS)\*.pch del $(OBJS)\*.pch
- -if exist $(OBJS)\tex2rtf.exe del $(OBJS)\tex2rtf.exe
- -if exist $(OBJS)\tex2rtf.ilk del $(OBJS)\tex2rtf.ilk
- -if exist $(OBJS)\tex2rtf.pdb del $(OBJS)\tex2rtf.pdb
- -if exist $(OBJS)\tex2rtf_gui.exe del $(OBJS)\tex2rtf_gui.exe
- -if exist $(OBJS)\tex2rtf_gui.ilk del $(OBJS)\tex2rtf_gui.ilk
- -if exist $(OBJS)\tex2rtf_gui.pdb del $(OBJS)\tex2rtf_gui.pdb
-
-$(OBJS)\tex2rtf.exe: $(TEX2RTF_OBJECTS)
- link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /pdb:"$(OBJS)\tex2rtf.pdb" $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:CONSOLE @<<
- $(TEX2RTF_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
-<<
-
-!if "$(USE_GUI)" == "1"
-$(OBJS)\tex2rtf_gui.exe: $(TEX2RTF_GUI_OBJECTS) $(OBJS)\tex2rtf_gui_sample.res
- link /NOLOGO /OUT:$@ $(LDFLAGS) $(__DEBUGINFO_1) /pdb:"$(OBJS)\tex2rtf_gui.pdb" $(LINK_TARGET_CPU) /LIBPATH:$(LIBDIRNAME) /SUBSYSTEM:WINDOWS @<<
- $(TEX2RTF_GUI_OBJECTS) $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_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
-<<
-!endif
-
-$(OBJS)\tex2rtf_tex2rtf.obj: .\tex2rtf.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_CXXFLAGS) .\tex2rtf.cpp
-
-$(OBJS)\tex2rtf_tex2any.obj: .\tex2any.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_CXXFLAGS) .\tex2any.cpp
-
-$(OBJS)\tex2rtf_texutils.obj: .\texutils.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_CXXFLAGS) .\texutils.cpp
-
-$(OBJS)\tex2rtf_rtfutils.obj: .\rtfutils.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_CXXFLAGS) .\rtfutils.cpp
-
-$(OBJS)\tex2rtf_xlputils.obj: .\xlputils.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_CXXFLAGS) .\xlputils.cpp
-
-$(OBJS)\tex2rtf_htmlutil.obj: .\htmlutil.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_CXXFLAGS) .\htmlutil.cpp
-
-$(OBJS)\tex2rtf_readshg.obj: .\readshg.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_CXXFLAGS) .\readshg.cpp
-
-$(OBJS)\tex2rtf_table.obj: .\table.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_CXXFLAGS) .\table.cpp
-
-$(OBJS)\tex2rtf_gui_sample.res: .\..\..\..\samples\sample.rc
- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_16_p_1) $(__NO_VC_CRTDBG_p_3) /d __WXMSW__ $(__WXUNIV_DEFINE_p_3) $(__DEBUG_DEFINE_p_3) $(__EXCEPTIONS_DEFINE_p_3) $(__RTTI_DEFINE_p_3) $(__THREAD_DEFINE_p_3) $(__UNICODE_DEFINE_p_3) $(__MSLU_DEFINE_p_3) $(__GFXCTX_DEFINE_p_3) /i $(SETUPHDIR) /i .\..\..\..\include /i . $(__DLLFLAG_p_3) /d _WINDOWS /i .\..\..\..\samples /d NOPCH .\..\..\..\samples\sample.rc
-
-$(OBJS)\tex2rtf_gui_tex2rtf.obj: .\tex2rtf.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_GUI_CXXFLAGS) .\tex2rtf.cpp
-
-$(OBJS)\tex2rtf_gui_tex2any.obj: .\tex2any.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_GUI_CXXFLAGS) .\tex2any.cpp
-
-$(OBJS)\tex2rtf_gui_texutils.obj: .\texutils.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_GUI_CXXFLAGS) .\texutils.cpp
-
-$(OBJS)\tex2rtf_gui_rtfutils.obj: .\rtfutils.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_GUI_CXXFLAGS) .\rtfutils.cpp
-
-$(OBJS)\tex2rtf_gui_xlputils.obj: .\xlputils.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_GUI_CXXFLAGS) .\xlputils.cpp
-
-$(OBJS)\tex2rtf_gui_htmlutil.obj: .\htmlutil.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_GUI_CXXFLAGS) .\htmlutil.cpp
-
-$(OBJS)\tex2rtf_gui_readshg.obj: .\readshg.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_GUI_CXXFLAGS) .\readshg.cpp
-
-$(OBJS)\tex2rtf_gui_table.obj: .\table.cpp
- $(CXX) /c /nologo /TP /Fo$@ $(TEX2RTF_GUI_CXXFLAGS) .\table.cpp
-
+++ /dev/null
-# =========================================================================
-# This makefile was generated by
-# Bakefile 0.2.3 (http://www.bakefile.org)
-# Do not modify, all changes will be overwritten!
-# =========================================================================
-
-!include ../../../build/msw/config.wat
-
-# -------------------------------------------------------------------------
-# Do not modify the rest of this file!
-# -------------------------------------------------------------------------
-
-# Speed up compilation a bit:
-!ifdef __LOADDLL__
-! loaddll wcc wccd
-! loaddll wccaxp wccdaxp
-! loaddll wcc386 wccd386
-! loaddll wpp wppdi86
-! loaddll wppaxp wppdaxp
-! loaddll wpp386 wppd386
-! loaddll wlink wlink
-! loaddll wlib wlibd
-!endif
-
-# We need these variables in some bakefile-made rules:
-WATCOM_CWD = $+ $(%cdrive):$(%cwd) $-
-
-### Conditionally set variables: ###
-
-PORTNAME =
-!ifeq USE_GUI 0
-PORTNAME = base
-!endif
-!ifeq USE_GUI 1
-PORTNAME = msw
-!endif
-WXDEBUGFLAG =
-!ifeq BUILD debug
-!ifeq DEBUG_FLAG default
-WXDEBUGFLAG = d
-!endif
-!endif
-!ifeq DEBUG_FLAG 1
-WXDEBUGFLAG = d
-!endif
-WXUNICODEFLAG =
-!ifeq UNICODE 1
-WXUNICODEFLAG = u
-!endif
-WXUNIVNAME =
-!ifeq WXUNIV 1
-WXUNIVNAME = univ
-!endif
-WXDLLFLAG =
-!ifeq SHARED 1
-WXDLLFLAG = dll
-!endif
-LIBTYPE_SUFFIX =
-!ifeq SHARED 0
-LIBTYPE_SUFFIX = lib
-!endif
-!ifeq SHARED 1
-LIBTYPE_SUFFIX = dll
-!endif
-EXTRALIBS_FOR_BASE =
-!ifeq MONOLITHIC 0
-EXTRALIBS_FOR_BASE =
-!endif
-!ifeq MONOLITHIC 1
-EXTRALIBS_FOR_BASE =
-!endif
-__tex2rtf_gui___depname =
-!ifeq USE_GUI 1
-__tex2rtf_gui___depname = $(OBJS)\tex2rtf_gui.exe
-!endif
-__WXLIB_HTML_p =
-!ifeq MONOLITHIC 0
-__WXLIB_HTML_p = &
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_html.lib
-!endif
-__WXLIB_CORE_p =
-!ifeq MONOLITHIC 0
-__WXLIB_CORE_p = &
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
-!endif
-__LIB_TIFF_p =
-!ifeq USE_GUI 1
-__LIB_TIFF_p = wxtiff$(WXDEBUGFLAG).lib
-!endif
-__LIB_JPEG_p =
-!ifeq USE_GUI 1
-__LIB_JPEG_p = wxjpeg$(WXDEBUGFLAG).lib
-!endif
-__LIB_PNG_p =
-!ifeq USE_GUI 1
-__LIB_PNG_p = wxpng$(WXDEBUGFLAG).lib
-!endif
-__DEBUGINFO =
-!ifeq BUILD debug
-!ifeq DEBUG_INFO default
-__DEBUGINFO = -d2
-!endif
-!endif
-!ifeq BUILD release
-!ifeq DEBUG_INFO default
-__DEBUGINFO = -d0
-!endif
-!endif
-!ifeq DEBUG_INFO 0
-__DEBUGINFO = -d0
-!endif
-!ifeq DEBUG_INFO 1
-__DEBUGINFO = -d2
-!endif
-__DEBUGINFO_1 =
-!ifeq BUILD debug
-!ifeq DEBUG_INFO default
-__DEBUGINFO_1 = debug all
-!endif
-!endif
-!ifeq BUILD release
-!ifeq DEBUG_INFO default
-__DEBUGINFO_1 =
-!endif
-!endif
-!ifeq DEBUG_INFO 0
-__DEBUGINFO_1 =
-!endif
-!ifeq DEBUG_INFO 1
-__DEBUGINFO_1 = debug all
-!endif
-__OPTIMIZEFLAG =
-!ifeq BUILD debug
-__OPTIMIZEFLAG = -od
-!endif
-!ifeq BUILD release
-__OPTIMIZEFLAG = -ot -ox
-!endif
-__THREADSFLAG =
-!ifeq USE_THREADS 0
-__THREADSFLAG =
-!endif
-!ifeq USE_THREADS 1
-__THREADSFLAG = -bm
-!endif
-__RUNTIME_LIBS =
-!ifeq RUNTIME_LIBS dynamic
-__RUNTIME_LIBS = -br
-!endif
-!ifeq RUNTIME_LIBS static
-__RUNTIME_LIBS =
-!endif
-__RTTIFLAG =
-!ifeq USE_RTTI 0
-__RTTIFLAG =
-!endif
-!ifeq USE_RTTI 1
-__RTTIFLAG = -xr
-!endif
-__EXCEPTIONSFLAG =
-!ifeq USE_EXCEPTIONS 0
-__EXCEPTIONSFLAG =
-!endif
-!ifeq USE_EXCEPTIONS 1
-__EXCEPTIONSFLAG = -xs
-!endif
-__WXLIB_BASE_p =
-!ifeq MONOLITHIC 0
-__WXLIB_BASE_p = &
- wxbase$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-__WXLIB_MONO_p =
-!ifeq MONOLITHIC 1
-__WXLIB_MONO_p = &
- wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR).lib
-!endif
-__GDIPLUS_LIB_p =
-!ifeq USE_GDIPLUS 1
-__GDIPLUS_LIB_p = gdiplus.lib
-!endif
-__WXUNIV_DEFINE_p =
-!ifeq WXUNIV 1
-__WXUNIV_DEFINE_p = -d__WXUNIVERSAL__
-!endif
-__DEBUG_DEFINE_p =
-!ifeq BUILD debug
-!ifeq DEBUG_FLAG default
-__DEBUG_DEFINE_p = -d__WXDEBUG__
-!endif
-!endif
-!ifeq DEBUG_FLAG 1
-__DEBUG_DEFINE_p = -d__WXDEBUG__
-!endif
-__EXCEPTIONS_DEFINE_p =
-!ifeq USE_EXCEPTIONS 0
-__EXCEPTIONS_DEFINE_p = -dwxNO_EXCEPTIONS
-!endif
-__RTTI_DEFINE_p =
-!ifeq USE_RTTI 0
-__RTTI_DEFINE_p = -dwxNO_RTTI
-!endif
-__THREAD_DEFINE_p =
-!ifeq USE_THREADS 0
-__THREAD_DEFINE_p = -dwxNO_THREADS
-!endif
-__UNICODE_DEFINE_p =
-!ifeq UNICODE 0
-__UNICODE_DEFINE_p = -dwxUSE_UNICODE=0
-!endif
-!ifeq UNICODE 1
-__UNICODE_DEFINE_p = -d_UNICODE
-!endif
-__GFXCTX_DEFINE_p =
-!ifeq USE_GDIPLUS 1
-__GFXCTX_DEFINE_p = -dwxUSE_GRAPHICS_CONTEXT=1
-!endif
-__DLLFLAG_p =
-!ifeq SHARED 1
-__DLLFLAG_p = -dWXUSINGDLL
-!endif
-
-### Variables: ###
-
-WX_RELEASE_NODOT = 29
-COMPILER_PREFIX = wat
-OBJS = &
- $(COMPILER_PREFIX)_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
-LIBDIRNAME = .\..\..\..\lib\$(COMPILER_PREFIX)_$(LIBTYPE_SUFFIX)$(CFG)
-SETUPHDIR = &
- $(LIBDIRNAME)\$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)
-TEX2RTF_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
- $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
- $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) &
- $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) &
- -i=.\..\..\..\include -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 -i=. &
- $(__DLLFLAG_p) -dwxUSE_GUI=0 -dNO_GUI $(__RTTIFLAG) $(__EXCEPTIONSFLAG) &
- $(CPPFLAGS) $(CXXFLAGS)
-TEX2RTF_OBJECTS = &
- $(OBJS)\tex2rtf_tex2rtf.obj &
- $(OBJS)\tex2rtf_tex2any.obj &
- $(OBJS)\tex2rtf_texutils.obj &
- $(OBJS)\tex2rtf_rtfutils.obj &
- $(OBJS)\tex2rtf_xlputils.obj &
- $(OBJS)\tex2rtf_htmlutil.obj &
- $(OBJS)\tex2rtf_readshg.obj &
- $(OBJS)\tex2rtf_table.obj
-TEX2RTF_GUI_CXXFLAGS = $(__DEBUGINFO) $(__OPTIMIZEFLAG) $(__THREADSFLAG) &
- $(__RUNTIME_LIBS) -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) &
- $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) &
- $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) &
- -i=.\..\..\..\include -wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 -i=. &
- $(__DLLFLAG_p) -i=.\..\..\..\samples -dNOPCH $(__RTTIFLAG) &
- $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
-TEX2RTF_GUI_OBJECTS = &
- $(OBJS)\tex2rtf_gui_tex2rtf.obj &
- $(OBJS)\tex2rtf_gui_tex2any.obj &
- $(OBJS)\tex2rtf_gui_texutils.obj &
- $(OBJS)\tex2rtf_gui_rtfutils.obj &
- $(OBJS)\tex2rtf_gui_xlputils.obj &
- $(OBJS)\tex2rtf_gui_htmlutil.obj &
- $(OBJS)\tex2rtf_gui_readshg.obj &
- $(OBJS)\tex2rtf_gui_table.obj
-
-
-all : $(OBJS)
-$(OBJS) :
- -if not exist $(OBJS) mkdir $(OBJS)
-
-### Targets: ###
-
-all : .SYMBOLIC $(OBJS)\tex2rtf.exe $(__tex2rtf_gui___depname)
-
-clean : .SYMBOLIC
- -if exist $(OBJS)\*.obj del $(OBJS)\*.obj
- -if exist $(OBJS)\*.res del $(OBJS)\*.res
- -if exist $(OBJS)\*.lbc del $(OBJS)\*.lbc
- -if exist $(OBJS)\*.ilk del $(OBJS)\*.ilk
- -if exist $(OBJS)\*.pch del $(OBJS)\*.pch
- -if exist $(OBJS)\tex2rtf.exe del $(OBJS)\tex2rtf.exe
- -if exist $(OBJS)\tex2rtf_gui.exe del $(OBJS)\tex2rtf_gui.exe
-
-$(OBJS)\tex2rtf.exe : $(TEX2RTF_OBJECTS)
- @%create $(OBJS)\tex2rtf.lbc
- @%append $(OBJS)\tex2rtf.lbc option quiet
- @%append $(OBJS)\tex2rtf.lbc name $^@
- @%append $(OBJS)\tex2rtf.lbc option caseexact
- @%append $(OBJS)\tex2rtf.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt ref 'main_'
- @for %i in ($(TEX2RTF_OBJECTS)) do @%append $(OBJS)\tex2rtf.lbc file %i
- @for %i in ( $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__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) do @%append $(OBJS)\tex2rtf.lbc library %i
- @%append $(OBJS)\tex2rtf.lbc
- @for %i in () do @%append $(OBJS)\tex2rtf.lbc option stack=%i
- wlink @$(OBJS)\tex2rtf.lbc
-
-!ifeq USE_GUI 1
-$(OBJS)\tex2rtf_gui.exe : $(TEX2RTF_GUI_OBJECTS) $(OBJS)\tex2rtf_gui_sample.res
- @%create $(OBJS)\tex2rtf_gui.lbc
- @%append $(OBJS)\tex2rtf_gui.lbc option quiet
- @%append $(OBJS)\tex2rtf_gui.lbc name $^@
- @%append $(OBJS)\tex2rtf_gui.lbc option caseexact
- @%append $(OBJS)\tex2rtf_gui.lbc $(LDFLAGS) $(__DEBUGINFO_1) libpath $(LIBDIRNAME) system nt_win ref '_WinMain@16'
- @for %i in ($(TEX2RTF_GUI_OBJECTS)) do @%append $(OBJS)\tex2rtf_gui.lbc file %i
- @for %i in ( $(__WXLIB_HTML_p) $(__WXLIB_CORE_p) $(__WXLIB_BASE_p) $(__WXLIB_MONO_p) $(__LIB_TIFF_p) $(__LIB_JPEG_p) $(__LIB_PNG_p) wxzlib$(WXDEBUGFLAG).lib wxregex$(WXUNICODEFLAG)$(WXDEBUGFLAG).lib wxexpat$(WXDEBUGFLAG).lib $(EXTRALIBS_FOR_BASE) $(__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) do @%append $(OBJS)\tex2rtf_gui.lbc library %i
- @%append $(OBJS)\tex2rtf_gui.lbc option resource=$(OBJS)\tex2rtf_gui_sample.res
- @for %i in () do @%append $(OBJS)\tex2rtf_gui.lbc option stack=%i
- wlink @$(OBJS)\tex2rtf_gui.lbc
-!endif
-
-$(OBJS)\tex2rtf_tex2rtf.obj : .AUTODEPEND .\tex2rtf.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_CXXFLAGS) $<
-
-$(OBJS)\tex2rtf_tex2any.obj : .AUTODEPEND .\tex2any.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_CXXFLAGS) $<
-
-$(OBJS)\tex2rtf_texutils.obj : .AUTODEPEND .\texutils.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_CXXFLAGS) $<
-
-$(OBJS)\tex2rtf_rtfutils.obj : .AUTODEPEND .\rtfutils.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_CXXFLAGS) $<
-
-$(OBJS)\tex2rtf_xlputils.obj : .AUTODEPEND .\xlputils.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_CXXFLAGS) $<
-
-$(OBJS)\tex2rtf_htmlutil.obj : .AUTODEPEND .\htmlutil.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_CXXFLAGS) $<
-
-$(OBJS)\tex2rtf_readshg.obj : .AUTODEPEND .\readshg.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_CXXFLAGS) $<
-
-$(OBJS)\tex2rtf_table.obj : .AUTODEPEND .\table.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_CXXFLAGS) $<
-
-$(OBJS)\tex2rtf_gui_sample.res : .AUTODEPEND .\..\..\..\samples\sample.rc
- wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) -i=.\..\..\..\include -i=. $(__DLLFLAG_p) -i=.\..\..\..\samples -dNOPCH $<
-
-$(OBJS)\tex2rtf_gui_tex2rtf.obj : .AUTODEPEND .\tex2rtf.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_GUI_CXXFLAGS) $<
-
-$(OBJS)\tex2rtf_gui_tex2any.obj : .AUTODEPEND .\tex2any.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_GUI_CXXFLAGS) $<
-
-$(OBJS)\tex2rtf_gui_texutils.obj : .AUTODEPEND .\texutils.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_GUI_CXXFLAGS) $<
-
-$(OBJS)\tex2rtf_gui_rtfutils.obj : .AUTODEPEND .\rtfutils.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_GUI_CXXFLAGS) $<
-
-$(OBJS)\tex2rtf_gui_xlputils.obj : .AUTODEPEND .\xlputils.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_GUI_CXXFLAGS) $<
-
-$(OBJS)\tex2rtf_gui_htmlutil.obj : .AUTODEPEND .\htmlutil.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_GUI_CXXFLAGS) $<
-
-$(OBJS)\tex2rtf_gui_readshg.obj : .AUTODEPEND .\readshg.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_GUI_CXXFLAGS) $<
-
-$(OBJS)\tex2rtf_gui_table.obj : .AUTODEPEND .\table.cpp
- $(CXX) -bt=nt -zq -fo=$^@ $(TEX2RTF_GUI_CXXFLAGS) $<
-
+++ /dev/null
-# From: Juan Altmayer Pizzorno[SMTP:juan@vms.gmd.de]
-# Sent: 31 May 1996 10:11
-# To: J.Smart@ed.ac.uk
-# Subject: Changes to Tex2RTF
-#
-# Hello,
-#
-# Recently I've been looking for a way to create and maintain documentation on
-# multiple platforms out of a single source -- specifically, something that
-# prints nicely and can be converted to WinHelp and HTML. I liked the approach
-# of Tex2RTF, so I set off to give it a try... I found out it would crash
-# when submitted to a certain LaTeX file I created. I wanted to find out why,
-# so I went on and worked on compiling on my PC: Windows NT 4.0 beta, Visual
-# C++ 4.1a. Since all I was interested on was the conversion utility, I tried
-# to make it work without a GUI. It didn't compile immediately, but after a
-# few small changes it now works like a charm. Unfortunately it doesn't crash
-# anymore, so I can't tell why it used to... Anyway, I wanted to contribute
-# the changes back: I'm appending two files to this message, the first a
-# description of the changes, and the second a quick-and-dirty makefile that
-# doesn't require wxWindows to run. Please do write to me if you have any
-# questions or anything.
-#
-# Last but not least, it's great that you took the time and wrote Tex2RTF!!
-#
-# Quick-and-dirty makefile for building Tex2RTF without the wx
-# libraries on a Windows NT machine. If you want to use it for
-# "real", please update the dependancies between object and include
-# files. Created for Windows NT 4.0 and Visual C++ 4.1.
-#
-# Juan Altmayer Pizzorno, May 1996
-#
-
-syslibs=kernel32.lib advapi32.lib
-
-cxxflags=/nologo /MD /W0 /O2 /Zi /D "WIN32" /D "_WIN32" /D "_DEBUG" /c
-linkflags=$(syslibs) /out:$@ /nologo /debug
-
-!if "$(PROCESSOR_ARCHITECTURE)" == "x86"
-cxxflags=$(cxxflags) /G5 # optimize for pentium
-!endif
-
-cxx=cl
-link=link
-remove=del
-cxxflags=$(cxxflags) /I wxwin /D wx_msw /D WINVER=0x0400 /D WIN95=0
-cxxflags=$(cxxflags) /D "NO_GUI"
-
-objects=tex2any.obj texutils.obj tex2rtf.obj rtfutils.obj table.obj readshg.obj xlputils.obj htmlutil.obj
-objects=$(objects) wb_hash.obj wb_list.obj wb_obj.obj wb_utils.obj
-
-all : tex2rtf.exe
-
-clean :
- -$(remove) *.obj
-
-cleanall : clean
- -$(remove) *.exe *.pdb *.ilk
-
-tex2rtf.exe : $(objects)
- $(link) $(linkflags) $(objects)
-
-tex2any.obj : tex2any.cpp tex2any.h
- $(cxx) $(cxxflags) tex2any.cpp
-
-texutils.obj : texutils.cpp tex2any.h
- $(cxx) $(cxxflags) texutils.cpp
-
-tex2rtf.obj : tex2rtf.cpp bmputils.h tex2rtf.h tex2any.h
- $(cxx) $(cxxflags) tex2rtf.cpp
-
-rtfutils.obj : rtfutils.cpp tex2rtf.h bmputils.h tex2any.h readshg.h table.h
- $(cxx) $(cxxflags) rtfutils.cpp
-
-table.obj : table.cpp table.h
- $(cxx) $(cxxflags) table.cpp
-
-readshg.obj : readshg.cpp readshg.h
- $(cxx) $(cxxflags) readshg.cpp
-
-xlputils.obj : xlputils.cpp tex2rtf.h rtfutils.h tex2any.h
- $(cxx) $(cxxflags) xlputils.cpp
-
-htmlutil.obj : htmlutil.cpp tex2rtf.h tex2any.h table.h
- $(cxx) $(cxxflags) htmlutil.cpp
-
-wb_hash.obj : wxwin\wb_hash.cpp
- $(cxx) $(cxxflags) wxwin\wb_hash.cpp
-
-wb_list.obj : wxwin\wb_list.cpp
- $(cxx) $(cxxflags) wxwin\wb_list.cpp
-
-wb_obj.obj : wxwin\wb_obj.cpp
- $(cxx) $(cxxflags) wxwin\wb_obj.cpp
-
-wb_utils.obj : wxwin\wb_utils.cpp
- $(cxx) $(cxxflags) wxwin\wb_utils.cpp
-
-
+++ /dev/null
-/*
- * File: maths.cc
- * Purpose: Beginnings of a maths parser for LaTeX.
- * NOT IMPLEMENTED. I'm still thinking how best to do this...
- *
- */
-
-// For compilers that support precompilation, includes "wx.h".
-#ifdef WX_PRECOMP
-#include "wx/wxprec.h"
-#endif
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#endif
-
-#include <ctype.h>
-#include "tex2any.h"
-#include <stdlib.h>
-#include <time.h>
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: readshg.cpp
-// Purpose: Petr Smilauer's .SHG (Segmented Hypergraphics file) reading
-// code.
-// Note: .SHG is undocumented (anywhere!) so this is
-// reverse-engineering
-// and guesswork at its best.
-// Author: Petr Smilauer
-// Modified by: Wlodzimiez ABX Skiba 2003/2004 Unicode support
-// Ron Lee
-// Created: 01/01/99
-// RCS-ID: $Id$
-// Copyright: (c) Petr Smilauer
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "readshg.h"
-#include "tex2any.h"
-
-// Returns the number of hotspots, and the array of hotspots.
-// E.g.
-// HotSpots *array;
-// int n = ParseSHG("thing.shg", &array);
-
-int ParseSHG( const wxChar* fileName, HotSpot **hotspots)
-{ FILE* fSHG = wxFopen( fileName, _T("rb"));
- long offset;
- int nHotspots = 0;
-
- if(fSHG == 0)
- return 0;
- nHotspots = 0;
- //first, look at offset OFF_OFFSET to get another offset :-)
- fseek( fSHG, OFF_OFFSET, SEEK_SET);
- offset = 0L; // init whole 4-byte variable
- fread( &offset, 2, 1, fSHG); // get the offset in first two bytes..
- if(offset == 0) // if zero, used next DWORD field
- fread( &offset, 4, 1, fSHG);// this is our offset for very long DIB
- offset += 9; // don't know hot this delta comes-about
- if(fseek( fSHG, offset, SEEK_SET) != 0)
- {
- fclose( fSHG);
- return -1; // this is probably because incorrect offset calculation.
- }
- fread( &nHotspots, 2, 1, fSHG);
-
- *hotspots = new HotSpot[nHotspots];
-
- int nMacroStrings = 0;
-
- fread( &nMacroStrings, 2, 1, fSHG); // we can ignore the macros, as this is
- // repeated later, but we need to know how much to skip
- fseek( fSHG, 2, SEEK_CUR); // skip another 2 bytes I do not understand ;-)
-
- ShgInfoBlock sib;
- int i;
-
- int sizeOf = sizeof( ShgInfoBlock);
-
- for( i = 0 ; i < nHotspots ; ++i)
- {
- fread( &sib, sizeOf, 1, fSHG); // read one hotspot' info
- // analyse it:
- (*hotspots)[i].type = (HotspotType)(sib.hotspotType & 0xFB);
- (*hotspots)[i].left = sib.left;
- (*hotspots)[i].top = sib.top;
- (*hotspots)[i].right = sib.left + sib.width;
- (*hotspots)[i].bottom = sib.top + sib.height;
- (*hotspots)[i].IsVisible = ((sib.hotspotType & 4) == 0);
- (*hotspots)[i].szHlpTopic_Macro[0] = '\0';
- }
- // we have it...now read-off the macro-string block
- if(nMacroStrings > 0)
- fseek( fSHG, nMacroStrings, SEEK_CUR); //nMacroStrings is byte offset...
- // and, at the last, read through the strings: hotspot-id[ignored], then topic/macro
- int c;
- for( i = 0 ; i < nHotspots ; ++i)
- {
- while( (c = fgetc( fSHG)) != 0)
- ;
- // now read it:
- int j = 0;
- while( (c = fgetc( fSHG)) != 0)
- {
- (*hotspots)[i].szHlpTopic_Macro[j] = (wxChar)c;
- ++j;
- }
- (*hotspots)[i].szHlpTopic_Macro[j] = 0;
- }
- fclose( fSHG);
- return nHotspots;
-}
-
-
-// Convert Windows .SHG file to HTML map file
-
-bool SHGToMap(const wxChar *filename, const wxChar *defaultFile)
-{
- // Test the SHG parser
- HotSpot *hotspots = NULL;
- int n = ParseSHG(filename, &hotspots);
- if (n == 0)
- return false;
-
- wxChar buf[100];
- wxSnprintf(buf, sizeof(buf), _T("Converting .SHG file to HTML map file: there are %d hotspots in %s."), n, filename);
- OnInform(buf);
-
- wxChar outBuf[256];
- wxStrcpy(outBuf, filename);
- StripExtension(outBuf);
- wxStrcat(outBuf, _T(".map"));
-
- FILE *fd = wxFopen(outBuf, _T("w"));
- if (!fd)
- {
- OnError(_T("Could not open .map file for writing."));
- delete[] hotspots;
- return false;
- }
-
- wxFprintf(fd, _T("default %s\n"), defaultFile);
- for (int i = 0; i < n; i++)
- {
- wxChar *refFilename = _T("??");
-
- TexRef *texRef = FindReference(hotspots[i].szHlpTopic_Macro);
- if (texRef)
- refFilename = texRef->refFile;
- else
- {
- wxChar buf[300];
- wxSnprintf(buf, sizeof(buf), _T("Warning: could not find hotspot reference %s"), hotspots[i].szHlpTopic_Macro);
- OnInform(buf);
- }
- wxFprintf(fd, _T("rect %s %d %d %d %d\n"), refFilename, (int)hotspots[i].left, (int)hotspots[i].top,
- (int)hotspots[i].right, (int)hotspots[i].bottom);
- }
- wxFprintf(fd, _T("\n"));
-
- fclose(fd);
-
- delete[] hotspots;
- return true;
-}
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: readshg.h
-// Purpose: Petr Smilauer's .SHG (Segmented Hypergraphics file) reading
-// code.
-// Note: .SHG is undocumented (anywhere!) so this is
-// reverse-engineering
-// and guesswork at its best.
-// Author: Petr Smilauer
-// Modified by:
-// Created: 01/01/99
-// RCS-ID: $Id$
-// Copyright: (c) Petr Smilauer
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef readshgh
-#define readshgh
-
-#include <stdio.h>
-#include <stdlib.h>
-
-typedef enum { TypePopup = 0xE2, TypeJump = 0xE3, TypeMacro = 0xC8} HotspotType;
-
-#define NOT_VISIBLE 0x04
-
-typedef struct
-{
- unsigned char hotspotType;// combines HotspotType /w NOT_VISIBLE if appropriate
- unsigned char flag; // NOT_VISIBLE or 0 ??
- unsigned char skip; // 0, always??
- unsigned short left,
- top,
- width, // left+width/top+height give right/bottom,
- height; // =>right and bottom edge are not 'included'
- unsigned char magic[4]; // wonderful numbers: for macros, this seems
- // (at least first 2 bytes) to represent offset into macro-strings block.
-} ShgInfoBlock; // whole block is just 15 bytes long. How weird!
-
-#define OFF_OFFSET 0x20 // this is offset, where WORD (?) lies
-#define OFFSET_DELTA 9 // we must add this to get real offset from file beginning
-
-struct HotSpot
-{
- HotspotType type;
- unsigned int left,
- top,
- right,
- bottom;
- wxChar szHlpTopic_Macro[65];
- bool IsVisible;
-};
-
-// Returns the number of hotspots, and the array of hotspots.
-// E.g.
-// HotSpots *array;
-// int n = ParseSHG("thing.shg", &array);
-
-extern int ParseSHG( const wxChar* fileName, HotSpot **hotspots);
-
-// Converts Windows .SHG file to HTML map file
-extern bool SHGToMap(const wxChar *filename, const wxChar *defaultFile);
-
-#endif
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: rtfutils.cpp
-// Purpose: Converts Latex to Word RTF/WinHelp RTF
-// Author: Julian Smart
-// Modified by: Wlodzimiez ABX Skiba 2003/2004 Unicode support
-// Ron Lee
-// Created: 7.9.93
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#endif
-
-#include "tex2any.h"
-#include "tex2rtf.h"
-#include <ctype.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-#ifdef __WIN32__
-#include <windows.h>
-#endif
-
-#include "bmputils.h"
-#include "table.h"
-
-static inline wxChar* copystring(const wxChar* s)
- { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
-
-wxList itemizeStack;
-static int indentLevel = 0;
-static int forbidParindent = 0; // if > 0, no parindent (e.g. in center environment)
-int forbidResetPar = 0; // If > 0, don't reset memory of having output a new par
-
-static wxChar *contentsLineSection = NULL;
-static wxChar *contentsLineValue = NULL;
-static TexChunk *descriptionItemArg = NULL;
-static wxStringList environmentStack; // Stack of paragraph styles we need to remember
-static int footnoteCount = 0;
-static int citeCount = 1;
-extern bool winHelp;
-extern bool startedSections;
-extern FILE *Contents;
-extern FILE *Chapters;
-extern FILE *Popups;
-extern FILE *WinHelpContentsFile;
-extern wxChar *RTFCharset;
-// This is defined in the Tex2Any library and isn't in use after parsing
-extern wxChar *BigBuffer;
-
-extern wxHashTable TexReferences;
-
-// Are we in verbatim mode? If so, format differently.
-static bool inVerbatim = false;
-
-// We're in a series of PopRef topics, so don't output section headings
-bool inPopRefSection = false;
-
-// Green colour?
-static bool hotSpotColour = true;
-static bool hotSpotUnderline = true;
-
-// Transparency (WHITE = transparent)
-static bool bitmapTransparency = true;
-
-// Linear RTF requires us to set the style per section.
-static wxChar *currentNumberStyle = NULL;
-static int currentItemSep = 8;
-static int CurrentTextWidth = 8640; // Say, six inches
-static int CurrentLeftMarginOdd = 400;
-static int CurrentLeftMarginEven = 1440;
-static int CurrentRightMarginOdd = 1440;
-static int CurrentRightMarginEven = 400;
-static int CurrentMarginParWidth = 2000;
-static int CurrentMarginParSep = 400; // Gap between marginpar and text
-static int CurrentMarginParX = CurrentLeftMarginOdd + CurrentTextWidth + CurrentMarginParSep;
-static int GutterWidth = 2300;
-
-// Two-column table dimensions, in twips
-static int TwoColWidthA = 1500;
-static int TwoColWidthB = 3000;
-
-const int PageWidth = 12242; // 8.25 inches wide for A4
-
-// Remember the anchor in a helpref
-static TexChunk *helpRefText = NULL;
-
-/*
- * Flag to say we've just issued a \par\pard command, so don't
- * repeat this unnecessarily.
- *
- */
-
-int issuedNewParagraph = 0;
-
-// Need to know whether we're in a table or figure for benefit
-// of listoffigures/listoftables
-static bool inFigure = false;
-static bool inTable = false;
-
-/*
- * Current topics
- *
- */
-static wxChar *CurrentChapterName = NULL;
-static wxChar *CurrentSectionName = NULL;
-static wxChar *CurrentSubsectionName = NULL;
-static wxChar *CurrentTopic = NULL;
-
-static bool InPopups()
-{
- if (CurrentChapterName && (wxStrcmp(CurrentChapterName, _T("popups")) == 0))
- return true;
- if (CurrentSectionName && (wxStrcmp(CurrentSectionName, _T("popups")) == 0))
- return true;
- return false;
-}
-
-static void SetCurrentTopic(wxChar *s)
-{
- if (CurrentTopic) delete[] CurrentTopic;
- CurrentTopic = copystring(s);
-}
-
-void SetCurrentChapterName(wxChar *s)
-{
- if (CurrentChapterName) delete[] CurrentChapterName;
- CurrentChapterName = copystring(s);
- SetCurrentTopic(s);
-}
-void SetCurrentSectionName(wxChar *s)
-{
- if (CurrentSectionName) delete[] CurrentSectionName;
- CurrentSectionName = copystring(s);
- SetCurrentTopic(s);
-}
-void SetCurrentSubsectionName(wxChar *s)
-{
- if (CurrentSubsectionName) delete[] CurrentSubsectionName;
- CurrentSubsectionName = copystring(s);
- SetCurrentTopic(s);
-}
-
-// Indicate that a parent topic at level 'level' has children.
-// Level 1 is a chapter, 2 is a section, etc.
-void NotifyParentHasChildren(int parentLevel)
-{
- wxChar *parentTopic = NULL;
- switch (parentLevel)
- {
- case 1:
- {
- parentTopic = CurrentChapterName;
- break;
- }
- case 2:
- {
- parentTopic = CurrentSectionName;
- break;
- }
- case 3:
- {
- parentTopic = CurrentSubsectionName;
- break;
- }
- default:
- {
- break;
- }
- }
- if (parentTopic)
- {
- TexTopic *texTopic = (TexTopic *)TopicTable.Get(parentTopic);
- if (!texTopic)
- {
- texTopic = new TexTopic;
- TopicTable.Put(parentTopic, texTopic);
- }
- texTopic->hasChildren = true;
- }
-}
-
-// Have to keep a count of what levels are books, what are pages,
-// in order to correct for a Win95 bug which means that if you
-// have a book at level n, and then a page at level n, the page
-// ends up on level n + 1.
-
-bool ContentsLevels[5];
-
-// Reset below this level (starts from 1)
-void ResetContentsLevels(int l)
-{
- int i;
- for (i = l; i < 5; i++)
- ContentsLevels[i] = false;
-
- // There are always books on the top level
- ContentsLevels[0] = true;
-}
-
-// Output a WinHelp section as a keyword, substituting
-// : for space.
-void OutputSectionKeyword(FILE *fd)
-{
- OutputCurrentSectionToString(wxTex2RTFBuffer);
-
- unsigned int i;
- for (i = 0; i < wxStrlen(wxTex2RTFBuffer); i++)
- if (wxTex2RTFBuffer[i] == ':')
- wxTex2RTFBuffer[i] = ' ';
- // Don't write to index if there's some RTF in the string
- else if ( wxTex2RTFBuffer[i] == '{' )
- return;
-
- wxFprintf(fd, _T("K{\\footnote {K} "));
- wxFprintf(fd, _T("%s"), wxTex2RTFBuffer);
-
- wxFprintf(fd, _T("}\n"));
-}
-
-// Write a line for the .cnt file, if we're doing this.
-void WriteWinHelpContentsFileLine(wxChar *topicName, wxChar *xitle, int level)
-{
- // First, convert any RTF characters to ASCII
- wxChar title[255];
- int s=0;
- int d=0;
- // assuming iso-8859-1 here even in Unicode build (FIXME?)
- while ( (xitle[s]!=0)&&(d<255) )
- {
- wxChar ch=wxChar(xitle[s]&0xff);
- if (ch==0x5c) {
- wxChar ch1=wxChar(xitle[s+1]&0xff);
- wxChar ch2=wxChar(xitle[s+2]&0xff);
- wxChar ch3=wxChar(xitle[s+3]&0xff);
- s+=4; // next character
- if ((ch1==0x27)&&(ch2==0x66)&&(ch3==0x36)) { title[d++]=wxChar('ö'); }
- if ((ch1==0x27)&&(ch2==0x65)&&(ch3==0x34)) { title[d++]=wxChar('ä'); }
- if ((ch1==0x27)&&(ch2==0x66)&&(ch3==0x63)) { title[d++]=wxChar('ü'); }
- if ((ch1==0x27)&&(ch2==0x64)&&(ch3==0x36)) { title[d++]=wxChar('Ö'); }
- if ((ch1==0x27)&&(ch2==0x63)&&(ch3==0x34)) { title[d++]=wxChar('Ä'); }
- if ((ch1==0x27)&&(ch2==0x64)&&(ch3==0x63)) { title[d++]=wxChar('Ü'); }
- } else {
- title[d++]=ch;
- s++;
- }
- }
- title[d]=0;
-
- // Section (2) becomes level 1 if it's an article.
- if (DocumentStyle == LATEX_ARTICLE)
- level --;
-
- if (level == 0) // Means we had a Chapter in an article, oops.
- return;
-
- ResetContentsLevels(level);
-
- if (winHelp && winHelpContents && WinHelpContentsFile)
- {
- TexTopic *texTopic = (TexTopic *)TopicTable.Get(topicName);
- if (texTopic)
- {
- // If a previous section at this level was a book, we *have* to have a
- // book not a page, because of a bug in WHC (or WinHelp 4).
- if (texTopic->hasChildren || level == 1 || ContentsLevels[level-1])
- {
- // At this level, we have a pointer to a further hierarchy.
- // So we need a 'book' consisting of (say) Chapter 1.
- wxFprintf(WinHelpContentsFile, _T("%d %s\n"), level, title);
-
- // Then we have a 'page' consisting of the text for this chapter
- wxFprintf(WinHelpContentsFile, _T("%d %s=%s\n"), level+1, title, topicName);
-
- // Then we'll be writing out further pages or books at level + 1...
-
- // Remember that at this level, we had a book and *must* for the
- // remainder of sections at this level.
- ContentsLevels[level-1] = true;
- }
- else
- {
- wxFprintf(WinHelpContentsFile, _T("%d %s=%s\n"), level, title, topicName);
- }
- }
- else
- {
- if (level == 1 || ContentsLevels[level-1])
- {
- // Always have a book at level 1
- wxFprintf(WinHelpContentsFile, _T("%d %s\n"), level, title);
- wxFprintf(WinHelpContentsFile, _T("%d %s=%s\n"), level+1, title, topicName);
- ContentsLevels[level-1] = true;
- }
- else
- // Probably doesn't have children if it hasn't been added to the topic table
- wxFprintf(WinHelpContentsFile, _T("%d %s=%s\n"), level, title, topicName);
- }
- }
-}
-
-void SplitIndexEntry(wxChar *entry, wxChar *buf1, wxChar *buf2)
-{
- int len = wxStrlen(entry); int i = 0;
- while ((i < len) && entry[i] != '!')
- { buf1[i] = entry[i]; i ++; }
- buf1[i] = 0; buf2[0] = 0; int j = 0;
-
- if (entry[i] == '!')
- {
- i ++;
- while (i < len) { buf2[j] = entry[i]; i ++; j++; }
- buf2[j] = 0;
- }
-}
-
-/*
- * Output topic index entries in WinHelp RTF
- *
- */
-void GenerateKeywordsForTopic(wxChar *topic)
-{
- TexTopic *texTopic = (TexTopic *)TopicTable.Get(topic);
- if (!texTopic)
- return;
-
- wxStringList *list = texTopic->keywords;
- if (list)
- {
- wxStringListNode *node = list->GetFirst();
- while (node)
- {
- wxChar *s = (wxChar *)node->GetData();
-
- // Must separate out main entry form subentry (only 1 subentry allowed)
- wxChar buf1[100]; wxChar buf2[100];
- SplitIndexEntry(s, buf1, buf2);
-
- // Check for ':' which messes up index
- unsigned int i;
- for (i = 0; i < wxStrlen(buf1) ; i++)
- if (buf1[i] == ':')
- buf1[i] = ' ';
- for (i = 0; i < wxStrlen(buf2) ; i++)
- if (buf2[i] == ':')
- buf2[i] = ' ';
-
- // {K} is a strange fix to prevent words beginning with K not
- // being indexed properly
- TexOutput(_T("K{\\footnote {K} "));
- TexOutput(buf1);
- if (wxStrlen(buf2) > 0)
- {
- // Output subentry
- TexOutput(_T(", "));
- TexOutput(buf2);
- }
- TexOutput(_T("}\n"));
- node = node->GetNext();
- }
- }
-}
-
-/*
- * Output index entry in linear RTF
- *
- */
-
-void GenerateIndexEntry(wxChar *entry)
-{
- if (useWord)
- {
- wxChar buf1[100]; wxChar buf2[100];
- SplitIndexEntry(entry, buf1, buf2);
-
- TexOutput(_T("{\\xe\\v {"));
- TexOutput(buf1);
- if (wxStrlen(buf2) > 0)
- {
- TexOutput(_T("\\:"));
- TexOutput(buf2);
- }
- TexOutput(_T("}}"));
- }
-}
-
- /*
- * Write a suitable RTF header.
- *
- */
-
-void WriteColourTable(FILE *fd)
-{
- wxFprintf(fd, _T("{\\colortbl"));
- wxNode *node = ColourTable.GetFirst();
- while (node)
- {
- ColourTableEntry *entry = (ColourTableEntry *)node->GetData();
- wxFprintf(fd, _T("\\red%d\\green%d\\blue%d;\n"), entry->red, entry->green, entry->blue);
- node = node->GetNext();
- }
- wxFprintf(fd, _T("}"));
-}
-
-/*
- * Write heading style
- *
- */
-
-void WriteHeadingStyle(FILE *fd, int heading)
-{
- switch (heading)
- {
- case 1:
- {
- wxFprintf(fd, _T("\\sb300\\sa260\\f2\\b\\fs%d"), chapterFont*2);
- break;
- }
- case 2:
- {
- wxFprintf(fd, _T("\\sb200\\sa240\\f2\\b\\fs%d"), sectionFont*2);
- break;
- }
- case 3:
- {
- wxFprintf(fd, _T("\\sb120\\sa240\\f2\\b\\fs%d"), subsectionFont*2);
- break;
- }
- case 4:
- {
- wxFprintf(fd, _T("\\sb120\\sa240\\f2\\b\\fs%d"), subsectionFont*2);
- break;
- }
- default:
- break;
- }
-}
-
-void WriteRTFHeader(FILE *fd)
-{
- wxFprintf(fd, _T("{\\rtf1\\%s \\deff0\n"), RTFCharset);
- wxFprintf(fd, _T("{\\fonttbl{\\f0\\froman Times New Roman;}{\\f1\\ftech Symbol;}{\\f2\\fswiss Arial;}\n"));
- wxFprintf(fd, _T("{\\f3\\fmodern Courier New;}{\\f4\\ftech Wingdings;}{\\f5\\ftech Monotype Sorts;}\n}"));
- /*
- * Style sheet
- */
- wxFprintf(fd, _T("{\\stylesheet{\\f2\\fs22\\sa200 \\snext0 Normal;}\n"));
- // Headings
- wxFprintf(fd, _T("{\\s1 ")); WriteHeadingStyle(fd, 1); wxFprintf(fd, _T("\\sbasedon0\\snext0 heading 1;}\n"));
- wxFprintf(fd, _T("{\\s2 ")); WriteHeadingStyle(fd, 2); wxFprintf(fd, _T("\\sbasedon0\\snext0 heading 2;}\n"));
- wxFprintf(fd, _T("{\\s3 ")); WriteHeadingStyle(fd, 3); wxFprintf(fd, _T("\\sbasedon0\\snext0 heading 3;}\n"));
- wxFprintf(fd, _T("{\\s4 ")); WriteHeadingStyle(fd, 4); wxFprintf(fd, _T("\\sbasedon0\\snext0 heading 4;}\n"));
-
- // Code style
- wxFprintf(fd, _T("{\\s10\\ql \\li720\\ri0\\nowidctlpar\\faauto\\rin0\\lin720\\itap0 \\cbpat17\
-\\f2\\fs20 \\sbasedon0 \\snext24 Code;}\n"));
-
- // Table of contents styles
- wxFprintf(fd, _T("{\\s20\\sb300\\tqr\\tldot\\tx8640 \\b\\f2 \\sbasedon0\\snext0 toc 1;}\n"));
-
- wxFprintf(fd, _T("{\\s21\\sb90\\tqr\\tldot\\li400\\tqr\\tx8640 \\f2\\fs20\\sbasedon0\\snext0 toc 2;}\n"));
- wxFprintf(fd, _T("{\\s22\\sb90\\tqr\\tldot\\li800\\tx8640 \\f2\\fs20 \\sbasedon0\\snext0 toc 3;}\n"));
- wxFprintf(fd, _T("{\\s23\\sb90\\tqr\\tldot\\li1200\\tx8640 \\f2\\fs20 \\sbasedon0\\snext0 toc 4;}\n"));
-
- // Index styles
- wxFprintf(fd, _T("{\\s30\\fi-200\\li200\\tqr\\tx3960 \\f2\\fs18 \\sbasedon0\\snext0 index 1;}\n"));
- wxFprintf(fd, _T("{\\s31\\fi-200\\li400\\tqr\\tx3960 \\f2\\fs18 \\sbasedon0\\snext0 index 2;}\n"));
- wxFprintf(fd, _T("{\\s32\\fi-200\\li600\\tqr\\tx3960 \\f2\\fs18 \\sbasedon0\\snext0 index 3;}\n"));
- wxFprintf(fd, _T("{\\s33\\fi-200\\li800\\tqr\\tx3960 \\f2\\fs18 \\sbasedon0\\snext0 index 4;}\n"));
- wxFprintf(fd, _T("{\\s35\\qc\\sb240\\sa120 \\b\\f2\\fs26 \\sbasedon0\\snext30 index heading;}\n"));
- wxFprintf(fd, _T("}\n"));
-
- WriteColourTable(fd);
- wxFprintf(fd, _T("\n\\ftnbj\\ftnrestart")); // Latex default is footnotes at bottom of page, not section.
- wxFprintf(fd, _T("\n"));
-}
-
-void OutputNumberStyle(wxChar *numberStyle)
-{
- if (numberStyle)
- {
- if (wxStrcmp(numberStyle, _T("arabic")) == 0)
- {
- TexOutput(_T("\\pgndec"));
- }
- else if (wxStrcmp(numberStyle, _T("roman")) == 0)
- {
- TexOutput(_T("\\pgnlcrm"));
- }
- else if (wxStrcmp(numberStyle, _T("Roman")) == 0)
- {
- TexOutput(_T("\\pgnucrm"));
- }
- else if (wxStrcmp(numberStyle, _T("alph")) == 0)
- {
- TexOutput(_T("\\pgnlcltr"));
- }
- else if (wxStrcmp(numberStyle, _T("Alph")) == 0)
- {
- TexOutput(_T("\\pgnucltr"));
- }
- }
-}
-
-/*
- * Write a Windows help project file
- */
-
-bool WriteHPJ(const wxString& filename)
-{
- wxChar hpjFilename[256];
- wxChar helpFile[50];
- wxChar rtfFile[50];
- wxStrcpy(hpjFilename, filename);
- StripExtension(hpjFilename);
- wxStrcat(hpjFilename, _T(".hpj"));
-
- wxStrcpy(helpFile, wxFileNameFromPath(filename));
- StripExtension(helpFile);
- wxStrcpy(rtfFile, helpFile);
- wxStrcat(helpFile, _T(".hlp"));
- wxStrcat(rtfFile, _T(".rtf"));
-
- FILE *fd = wxFopen(hpjFilename, _T("w"));
- if (!fd)
- return false;
-
- wxChar *helpTitle = winHelpTitle;
- if (!helpTitle)
- helpTitle = _T("Untitled");
-
- wxString thePath = wxPathOnly(InputFile);
- if (thePath.empty())
- thePath = _T(".");
- wxFprintf(fd, _T("[OPTIONS]\n"));
- wxFprintf(fd, _T("BMROOT=%s ; Assume that bitmaps are where the source is\n"), thePath.c_str());
- wxFprintf(fd, _T("TITLE=%s\n"), helpTitle);
- wxFprintf(fd, _T("CONTENTS=Contents\n"));
-
- if (winHelpVersion > 3)
- {
- wxFprintf(fd, _T("; COMPRESS=12 Hall Zeck ; Max compression, but needs lots of memory\n"));
- wxFprintf(fd, _T("COMPRESS=8 Zeck\n"));
- wxFprintf(fd, _T("LCID=0x809 0x0 0x0 ;English (British)\n"));
- wxFprintf(fd, _T("HLP=.\\%s.hlp\n"), wxFileNameFromPath(FileRoot));
- }
- else
- {
- wxFprintf(fd, _T("COMPRESS=HIGH\n"));
- }
- wxFprintf(fd, _T("\n"));
-
- if (winHelpVersion > 3)
- {
- wxFprintf(fd, _T("[WINDOWS]\n"));
- wxFprintf(fd, _T("Main=\"\",(553,102,400,600),20736,(r14876671),(r12632256),f3\n"));
- wxFprintf(fd, _T("\n"));
- }
-
- wxFprintf(fd, _T("[FILES]\n%s\n\n"), rtfFile);
- wxFprintf(fd, _T("[CONFIG]\n"));
- if (useUpButton)
- wxFprintf(fd, _T("CreateButton(\"Up\", \"&Up\", \"JumpId(`%s', `Contents')\")\n"), helpFile);
- wxFprintf(fd, _T("BrowseButtons()\n\n"));
- wxFprintf(fd, _T("[MAP]\n\n[BITMAPS]\n\n"));
- fclose(fd);
- return true;
-}
-
-
-/*
- * Given a TexChunk with a string value, scans through the string
- * converting Latex-isms into RTF-isms, such as 2 newlines -> \par,
- * and inserting spaces at the start of lines since in Latex, a newline
- * implies a space, but not in RTF.
- *
- */
-
-void ProcessText2RTF(TexChunk *chunk)
-{
- bool changed = false;
- int ptr = 0;
- int i = 0;
- wxChar ch = 1;
- int len = wxStrlen(chunk->value);
- while (ch != 0)
- {
- ch = chunk->value[i];
-
- if (ch == 10)
- {
- if (inVerbatim)
- {
- BigBuffer[ptr] = 0; wxStrcat(BigBuffer, _T("\\par\n")); ptr += 5;
-// BigBuffer[ptr] = 0; wxStrcat(BigBuffer, _T("\\par{\\v this was verbatim}\n")); ptr += 5;
- i ++;
- changed = true;
- }
- else
- {
- // If the first character of the next line is ASCII,
- // put a space in. Implicit in Latex, not in RTF.
- /*
- The reason this is difficult is that you don't really know
- where a space would be appropriate. If you always put in a space
- when you find a newline, unwanted spaces appear in the text.
- */
- if ((i > 0) && (len > i+1 && isascii(chunk->value[i+1]) &&
- !isspace(chunk->value[i+1])) ||
- ((len > i+1 && chunk->value[i+1] == 13) &&
- (len > i+2 && isascii(chunk->value[i+2]) &&
- !isspace(chunk->value[i+2]))))
-// if (true)
- {
- // DOS files have a 13 after the 10
- BigBuffer[ptr] = 10;
- ptr ++;
- i ++;
- if (chunk->value[i] == 13)
- {
- BigBuffer[ptr] = 13;
- ptr ++;
- i ++;
- }
-
- BigBuffer[ptr] = ' ';
- ptr ++;
-
- // Note that the actual ASCII character seen is dealt with in the next
- // iteration
- changed = true;
- }
- else
- {
- BigBuffer[ptr] = ch;
- i ++;
- }
- }
- }
- else if (!inVerbatim && ch == '`' && (len >= i+1 && chunk->value[i+1] == '`'))
- {
- BigBuffer[ptr] = '"'; ptr ++;
- i += 2;
- changed = true;
- }
- else if (!inVerbatim && ch == '`') // Change ` to '
- {
- BigBuffer[ptr] = 39; ptr ++;
- i += 1;
- changed = true;
- }
- else if (inVerbatim && ch == '\\') // Change backslash to two backslashes
- {
- BigBuffer[ptr] = '\\'; ptr ++;
- BigBuffer[ptr] = '\\'; ptr ++;
- i += 1;
- changed = true;
- }
- else if (inVerbatim && (ch == '{' || ch == '}')) // Escape the curly bracket
- {
- BigBuffer[ptr] = '\\'; ptr ++;
- BigBuffer[ptr] = ch; ptr ++;
- i += 1;
- changed = true;
- }
- else
- {
- BigBuffer[ptr] = ch;
- i ++;
- ptr ++;
- }
- }
- BigBuffer[ptr] = 0;
-
- if (changed)
- {
- delete[] chunk->value;
- chunk->value = copystring(BigBuffer);
- }
-}
-
-/*
- * Scan through all chunks starting from the given one,
- * calling ProcessText2RTF to convert Latex-isms to RTF-isms.
- * This should be called after Tex2Any has parsed the file,
- * and before TraverseDocument is called.
- *
- */
-
-void Text2RTF(TexChunk *chunk)
-{
- Tex2RTFYield();
- if (stopRunning) return;
-
- switch (chunk->type)
- {
- case CHUNK_TYPE_MACRO:
- {
- TexMacroDef *def = chunk->def;
- if (def && def->ignore)
- return;
-
- if (def && (def->macroId == ltVERBATIM || def->macroId == ltVERB))
- inVerbatim = true;
-
- wxNode *node = chunk->children.GetFirst();
- while (node)
- {
- TexChunk *child_chunk = (TexChunk *)node->GetData();
- Text2RTF(child_chunk);
- node = node->GetNext();
- }
-
- if (def && (def->macroId == ltVERBATIM || def->macroId == ltVERB))
- inVerbatim = false;
-
- break;
- }
- case CHUNK_TYPE_ARG:
- {
- wxNode *node = chunk->children.GetFirst();
- while (node)
- {
- TexChunk *child_chunk = (TexChunk *)node->GetData();
- Text2RTF(child_chunk);
- node = node->GetNext();
- }
-
- break;
- }
- case CHUNK_TYPE_STRING:
- {
- if (chunk->value)
- ProcessText2RTF(chunk);
- break;
- }
- }
-}
-
-/*
- * Not used yet
- *
- */
-
-wxChar browseBuf[10];
-static long browseId = 0;
-wxChar *GetBrowseString(void)
-{
- wxChar buf[10];
- browseId ++;
- wxSnprintf(buf, sizeof(buf), _T("%ld"), browseId);
- int noZeroes = 5-wxStrlen(buf);
- wxStrcpy(browseBuf, _T("browse"));
- for (int i = 0; i < noZeroes; i++)
- wxStrcat(browseBuf, _T("0"));
- wxStrcat(browseBuf, buf);
- return browseBuf;
-}
-
-/*
- * Keeping track of environments to restore the styles after \pard.
- * Push strings like "\qc" onto stack.
- *
- */
-
-void PushEnvironmentStyle(wxChar *style)
-{
- environmentStack.Add(style);
-}
-
-void PopEnvironmentStyle(void)
-{
- wxStringListNode *node = environmentStack.GetLast();
- if (node)
- {
- wxChar *val = (wxChar *)node->GetData();
- delete[] val;
- delete node;
- }
-}
-
-// Write out the styles, most recent first.
-void WriteEnvironmentStyles(void)
-{
- wxStringListNode *node = environmentStack.GetLast();
- while (node)
- {
- wxChar *val = (wxChar *)node->GetData();
- TexOutput(val);
- node = node->GetNext();
- }
- if (!inTabular && (ParIndent > 0) && (forbidParindent == 0))
- {
- wxChar buf[15];
- wxSnprintf(buf, sizeof(buf), _T("\\fi%d"), ParIndent*20); // Convert points to TWIPS
- TexOutput(buf);
- }
- if (environmentStack.GetCount() > 0 || (ParIndent > 0))
- TexOutput(_T("\n"));
-}
-
-
-/*
- * Output a header
- *
- */
-
-void OutputRTFHeaderCommands(void)
-{
- wxChar buf[300];
- if (PageStyle && wxStrcmp(PageStyle, _T("plain")) == 0)
- {
- TexOutput(_T("{\\headerl }{\\headerr }"));
- }
- else if (PageStyle && wxStrcmp(PageStyle, _T("empty")) == 0)
- {
- TexOutput(_T("{\\headerl }{\\headerr }"));
- }
- else if (PageStyle && wxStrcmp(PageStyle, _T("headings")) == 0)
- {
- // Left header
- TexOutput(_T("{\\headerl\\fi0 "));
-
- if (headerRule)
- TexOutput(_T("\\brdrb\\brdrs\\brdrw15\\brsp20 "));
-
- TexOutput(_T("{\\i \\qr "));
- if (DocumentStyle == LATEX_ARTICLE)
- {
- wxSnprintf(buf, sizeof(buf), _T("SECTION %d"), sectionNo);
- TexOutput(buf);
- }
- else
- {
- wxSnprintf(buf, sizeof(buf), _T("CHAPTER %d: "), chapterNo);
- TexOutput(buf);
- }
- TexOutput(_T("{\\field{\\*\\fldinst PAGE \\\\* MERGEFORMAT }{\\fldrslt 1}}"));
- TexOutput(_T("}\\par\\pard}"));
-
- // Right header
- TexOutput(_T("{\\headerr\\fi0 "));
-
- if (headerRule)
- TexOutput(_T("\\brdrb\\brdrs\\brdrw15\\brsp20 "));
-
- TexOutput(_T("{\\i \\qc "));
- if (DocumentStyle == LATEX_ARTICLE)
- {
- wxSnprintf(buf, sizeof(buf), _T("SECTION %d"), sectionNo);
- TexOutput(buf);
- }
- else
- {
- wxSnprintf(buf, sizeof(buf), _T("CHAPTER %d"), chapterNo);
- TexOutput(buf);
- }
- TexOutput(_T("{\\field{\\*\\fldinst PAGE \\\\* MERGEFORMAT }{\\fldrslt 1}}"));
- TexOutput(_T("}\\par\\pard}"));
- }
- else
- {
- int oldForbidResetPar = forbidResetPar;
- forbidResetPar = 0;
-
- if (LeftHeaderEven || CentreHeaderEven || RightHeaderEven)
- {
- TexOutput(_T("{\\headerl\\fi0 "));
-
- if (headerRule)
- TexOutput(_T("\\brdrb\\brdrs\\brdrw15\\brsp20 "));
-
- if (LeftHeaderEven)
- {
- if (!CentreHeaderEven && !RightHeaderEven)
- TexOutput(_T("\\ql "));
- TraverseChildrenFromChunk(LeftHeaderEven);
- }
- if (CentreHeaderEven)
- {
- if (!LeftHeaderEven && !RightHeaderEven)
- TexOutput(_T("\\qc "));
- else
- TexOutput(_T("\\tab\\tab\\tab "));
- TraverseChildrenFromChunk(CentreHeaderEven);
- }
- if (RightHeaderEven)
- {
- if (!LeftHeaderEven && !CentreHeaderEven)
- TexOutput(_T("\\qr "));
- else
- TexOutput(_T("\\tab\\tab\\tab\\tab\\tab\\tab "));
- TraverseChildrenFromChunk(RightHeaderEven);
- }
- TexOutput(_T("\\par\\pard}"));
- }
-
- if (LeftHeaderOdd || CentreHeaderOdd || RightHeaderOdd)
- {
- TexOutput(_T("{\\headerr\\fi0 "));
-
- if (headerRule)
- TexOutput(_T("\\brdrb\\brdrs\\brdrw15\\brsp20 "));
-
- if (LeftHeaderOdd)
- {
- if (!CentreHeaderOdd && !RightHeaderOdd)
- TexOutput(_T("\\ql "));
- TraverseChildrenFromChunk(LeftHeaderOdd);
- }
- if (CentreHeaderOdd)
- {
- if (!LeftHeaderOdd && !RightHeaderOdd)
- TexOutput(_T("\\qc "));
- else
- TexOutput(_T("\\tab\\tab\\tab "));
- TraverseChildrenFromChunk(CentreHeaderOdd);
- }
- if (RightHeaderOdd)
- {
- if (!LeftHeaderOdd && !CentreHeaderOdd)
- TexOutput(_T("\\qr "));
- else
- TexOutput(_T("\\tab\\tab\\tab\\tab\\tab\\tab "));
- TraverseChildrenFromChunk(RightHeaderOdd);
- }
- TexOutput(_T("\\par\\pard}"));
- }
- // As an approximation, don't put a header on the first page of a section.
- // This may not always be desired, but it's a reasonable guess.
- TexOutput(_T("{\\headerf }"));
-
- forbidResetPar = oldForbidResetPar;
- }
-}
-
-void OutputRTFFooterCommands(void)
-{
- if (PageStyle && wxStrcmp(PageStyle, _T("plain")) == 0)
- {
- TexOutput(_T("{\\footerl\\fi0 "));
- if (footerRule)
- TexOutput(_T("\\brdrt\\brdrs\\brdrw15\\brsp20 "));
- TexOutput(_T("{\\qc "));
- TexOutput(_T("{\\field{\\*\\fldinst PAGE \\\\* MERGEFORMAT }{\\fldrslt 1}}"));
- TexOutput(_T("}\\par\\pard}"));
-
- TexOutput(_T("{\\footerr\\fi0 "));
- if (footerRule)
- TexOutput(_T("\\brdrt\\brdrs\\brdrw15\\brsp20 "));
- TexOutput(_T("{\\qc "));
- TexOutput(_T("{\\field{\\*\\fldinst PAGE \\\\* MERGEFORMAT }{\\fldrslt 1}}"));
- TexOutput(_T("}\\par\\pard}"));
- }
- else if (PageStyle && wxStrcmp(PageStyle, _T("empty")) == 0)
- {
- TexOutput(_T("{\\footerl }{\\footerr }"));
- }
- else if (PageStyle && wxStrcmp(PageStyle, _T("headings")) == 0)
- {
- TexOutput(_T("{\\footerl }{\\footerr }"));
- }
- else
- {
- if (LeftFooterEven || CentreFooterEven || RightFooterEven)
- {
- TexOutput(_T("{\\footerl\\fi0 "));
- if (footerRule)
- TexOutput(_T("\\brdrt\\brdrs\\brdrw15\\brsp20 "));
- if (LeftFooterEven)
- {
- if (!CentreFooterEven && !RightFooterEven)
- TexOutput(_T("\\ql "));
- TraverseChildrenFromChunk(LeftFooterEven);
- }
- if (CentreFooterEven)
- {
- if (!LeftFooterEven && !RightFooterEven)
- TexOutput(_T("\\qc "));
- else
- TexOutput(_T("\\tab\\tab\\tab "));
- TraverseChildrenFromChunk(CentreFooterEven);
- }
- if (RightFooterEven)
- {
- if (!LeftFooterEven && !CentreFooterEven)
- TexOutput(_T("\\qr "));
- else
- TexOutput(_T("\\tab\\tab\\tab\\tab\\tab\\tab "));
- TraverseChildrenFromChunk(RightFooterEven);
- }
- TexOutput(_T("\\par\\pard}"));
- }
-
- if (LeftFooterOdd || CentreFooterOdd || RightFooterOdd)
- {
- TexOutput(_T("{\\footerr\\fi0 "));
- if (footerRule)
- TexOutput(_T("\\brdrt\\brdrs\\brdrw15\\brsp20 "));
- if (LeftFooterOdd)
- {
- if (!CentreFooterOdd && !RightFooterOdd)
- TexOutput(_T("\\ql "));
- TraverseChildrenFromChunk(LeftFooterOdd);
- }
- if (CentreFooterOdd)
- {
- if (!LeftFooterOdd && !RightFooterOdd)
- TexOutput(_T("\\qc "));
- else
- TexOutput(_T("\\tab\\tab\\tab "));
- TraverseChildrenFromChunk(CentreFooterOdd);
- }
- if (RightFooterOdd)
- {
- if (!LeftFooterOdd && !CentreFooterOdd)
- TexOutput(_T("\\qr "));
- else
- TexOutput(_T("\\tab\\tab\\tab\\tab\\tab\\tab "));
- TraverseChildrenFromChunk(RightFooterOdd);
- }
- TexOutput(_T("\\par\\pard}"));
- }
-
- // As an approximation, put a footer on the first page of a section.
- // This may not always be desired, but it's a reasonable guess.
- if (LeftFooterOdd || CentreFooterOdd || RightFooterOdd)
- {
- TexOutput(_T("{\\footerf\\fi0 "));
- if (LeftFooterOdd)
- {
- if (!CentreFooterOdd && !RightFooterOdd)
- TexOutput(_T("\\ql "));
- TraverseChildrenFromChunk(LeftFooterOdd);
- }
- if (CentreFooterOdd)
- {
- if (!LeftFooterOdd && !RightFooterOdd)
- TexOutput(_T("\\qc "));
- else
- TexOutput(_T("\\tab\\tab\\tab "));
- TraverseChildrenFromChunk(CentreFooterOdd);
- }
- if (RightFooterOdd)
- {
- if (!LeftFooterOdd && !CentreFooterOdd)
- TexOutput(_T("\\qr "));
- else
- TexOutput(_T("\\tab\\tab\\tab\\tab\\tab\\tab "));
- TraverseChildrenFromChunk(RightFooterOdd);
- }
- TexOutput(_T("\\par\\pard}"));
- }
- }
-}
-
-// Called on start/end of macro examination
-void RTFOnMacro(int macroId, int no_args, bool start)
-{
-/*
- wxChar tmpBuf[40];
- wxSnprintf(tmpBuf, sizeof(tmpBuf), _T("%d (%d)"), macroId, (int)start);
- OutputDebugString("RTFOnMacro Start "); OutputDebugString(tmpBuf);
- OutputDebugString("\n"); wxYield();
-*/
-
- // ltLABEL is included here because after a section but BEFORE
- // the label is seen, a new paragraph is issued. Don't upset this by
- // immediately forgetting we've done it.
- if (start && (macroId != ltPAR && macroId != ltITEMIZE &&
- macroId != ltENUMERATE && macroId != ltDESCRIPTION &&
- macroId != ltVERBATIM && macroId != ltLABEL &&
- macroId != ltSETHEADER && macroId != ltSETFOOTER &&
- macroId != ltPAGENUMBERING &&
- (forbidResetPar == 0)))
- {
- issuedNewParagraph = 0;
- }
-
- wxChar buf[300];
- switch (macroId)
- {
- case ltCHAPTER:
- case ltCHAPTERSTAR:
- case ltCHAPTERHEADING:
- case ltCHAPTERHEADINGSTAR:
- {
- if (!start)
- {
- sectionNo = 0;
- figureNo = 0;
- tableNo = 0;
- subsectionNo = 0;
- subsubsectionNo = 0;
- footnoteCount = 0;
-
- if (macroId != ltCHAPTERSTAR && macroId != ltCHAPTERHEADINGSTAR)
- chapterNo ++;
-
- wxChar *topicName = FindTopicName(GetNextChunk());
- SetCurrentChapterName(topicName);
-
- if (winHelpContents && winHelp && !InPopups())
- {
- OutputCurrentSectionToString(wxTex2RTFBuffer);
- WriteWinHelpContentsFileLine(topicName, wxTex2RTFBuffer, 1);
- }
- AddTexRef(topicName, NULL, ChapterNameString, chapterNo);
-
- if (winHelp)
- {
- if (!InPopups())
- wxFprintf(Contents, _T("\n{\\uldb "));
- wxFprintf(Chapters, _T("\\page"));
- wxFprintf(Chapters, _T("\n${\\footnote "));
- if (!InPopups())
- SetCurrentOutputs(Contents, Chapters);
- else
- SetCurrentOutput(Chapters);
- }
- else
- {
- wxFprintf(Chapters, _T("\\sect\\pgncont\\titlepg\n"));
-
- // If a non-custom page style, we generate the header now.
- if (PageStyle && (wxStrcmp(PageStyle, _T("plain")) == 0 ||
- wxStrcmp(PageStyle, _T("empty")) == 0 ||
- wxStrcmp(PageStyle, _T("headings")) == 0))
- {
- OutputRTFHeaderCommands();
- OutputRTFFooterCommands();
- }
-
- // Need to reset the current numbering style, or RTF forgets it.
- SetCurrentOutput(Chapters);
- OutputNumberStyle(currentNumberStyle);
-
- SetCurrentOutput(Contents);
-
- if (!InPopups())
- {
- if (macroId == ltCHAPTER)
- {
- // Section
- wxFprintf(Contents, _T("\\par\n\\pard{\\b %d\\tab "), chapterNo);
- }
- else if (macroId == ltCHAPTERHEADING)
- {
- wxFprintf(Contents, _T("\\par\n\\pard{\\b "));
- }
- else SetCurrentOutput(NULL); // No entry in table of contents
- }
- }
-
- startedSections = true;
-
- // Output heading to contents page
- if (!InPopups())
- {
- OutputCurrentSection();
-
- if (winHelp)
- {
- wxFprintf(Contents, _T("}{\\v %s}\\pard\\par\n"), topicName);
- //WriteEnvironmentStyles();
- }
- else if ((macroId == ltCHAPTER) || (macroId == ltCHAPTERHEADING))
- wxFprintf(Contents, _T("}\\par\\par\\pard\n"));
-
- // From here, just output to chapter
- SetCurrentOutput(Chapters);
- }
-
- if (winHelp)
- {
- wxFprintf(Chapters, _T("}\n#{\\footnote %s}\n"), topicName);
- wxFprintf(Chapters, _T("+{\\footnote %s}\n"), GetBrowseString());
-
- OutputSectionKeyword(Chapters);
-
- GenerateKeywordsForTopic(topicName);
- if (useUpButton)
- {
- // If we're generating a .cnt file, we don't want to be able
- // jump up to the old-style contents page, so disable it.
- if (winHelpContents)
- wxFprintf(Chapters, _T("!{\\footnote DisableButton(\"Up\")}\n"));
- else
- wxFprintf(Chapters, _T("!{\\footnote EnableButton(\"Up\");ChangeButtonBinding(\"Up\", \"JumpId(`%s.hlp', `%s')\")}\n"),
- wxFileNameFromPath(FileRoot), _T("Contents"));
- }
- }
-
- if (!InPopups())
- {
- wxChar *styleCommand = _T("");
- if (!winHelp && useHeadingStyles && (macroId == ltCHAPTER || macroId == ltCHAPTERHEADING || macroId == ltCHAPTERHEADINGSTAR))
- styleCommand = _T("\\s1");
- wxFprintf(Chapters, _T("\\pard{%s"), ((winHelp && !InPopups()) ? _T("\\keepn\\sa140\\sb140") : styleCommand));
- WriteHeadingStyle(Chapters, 1); wxFprintf(Chapters, _T(" "));
- if (!winHelp)
- {
- if (macroId == ltCHAPTER)
- {
- if (useWord)
-// wxFprintf(Chapters, "{\\bkmkstart %s}%d{\\bkmkend %s}. ", topicName, chapterNo,
- wxFprintf(Chapters, _T("{\\bkmkstart %s}{\\bkmkend %s}"), topicName, topicName);
- else
- wxFprintf(Chapters, _T("%d. "), chapterNo);
- }
- else if ( useWord )
- {
- wxFprintf(Chapters, _T("{\\bkmkstart %s}{\\bkmkend %s}"), topicName, topicName);
- }
- }
- OutputCurrentSection();
- TexOutput(_T("\\par\\pard}\n"));
- }
- issuedNewParagraph = 1;
- WriteEnvironmentStyles();
- }
- break;
- }
- case ltSECTION:
- case ltSECTIONSTAR:
- case ltSECTIONHEADING:
- case ltSECTIONHEADINGSTAR:
- case ltGLOSS:
- {
- FILE *jumpFrom;
- if (DocumentStyle == LATEX_ARTICLE)
- jumpFrom = Contents;
- else
- jumpFrom = Chapters;
-
- if (!start)
- {
- subsectionNo = 0;
- subsubsectionNo = 0;
- if (DocumentStyle == LATEX_ARTICLE)
- footnoteCount = 0;
-
- if (macroId != ltSECTIONSTAR && macroId != ltSECTIONHEADINGSTAR)
- sectionNo ++;
-
- wxChar *topicName = FindTopicName(GetNextChunk());
- SetCurrentSectionName(topicName);
- NotifyParentHasChildren(1);
- if (winHelpContents && winHelp && !InPopups())
- {
- OutputCurrentSectionToString(wxTex2RTFBuffer);
- WriteWinHelpContentsFileLine(topicName, wxTex2RTFBuffer, 2);
- }
- AddTexRef(topicName, NULL, SectionNameString, chapterNo, sectionNo);
-
- if (winHelp)
- {
- SetCurrentOutputs(jumpFrom, Sections);
- // Newline for a new section if this is an article
- if ((DocumentStyle == LATEX_ARTICLE) &&
- ((macroId == ltSECTION) || (macroId == ltSECTIONSTAR) || (macroId == ltSECTIONHEADINGSTAR)))
- wxFprintf(Sections, _T("\\page\n"));
-
- if (!InPopups())
- wxFprintf(jumpFrom, _T("\n{\\uldb "));
- }
- else
- {
- if (DocumentStyle == LATEX_ARTICLE)
- {
- TexOutput(_T("\\sect\\pgncont\n"));
- // If a non-custom page style, we generate the header now.
- if (PageStyle && (wxStrcmp(PageStyle, _T("plain")) == 0 ||
- wxStrcmp(PageStyle, _T("empty")) == 0 ||
- wxStrcmp(PageStyle, _T("headings")) == 0))
- {
- OutputRTFHeaderCommands();
- OutputRTFFooterCommands();
- }
- }
- SetCurrentOutput(Contents);
-
- if (macroId == ltSECTION)
- {
- if (!InPopups())
- {
- if (DocumentStyle == LATEX_REPORT)
- wxFprintf(Contents, _T("\n\\pard{\\tab %d.%d\\tab "), chapterNo, sectionNo);
- else
- wxFprintf(Contents, _T("\\par\n\\pard{\\b %d\\tab "), sectionNo);
- }
- }
- else if (macroId == ltSECTIONHEADING)
- {
- if (!InPopups())
- {
- if (DocumentStyle == LATEX_REPORT)
- wxFprintf(Contents, _T("\n\\pard{\\tab ")); //, chapterNo, sectionNo);
- else
- wxFprintf(Contents, _T("\\par\n\\pard{\\b ")); //, sectionNo);
- }
- }
- else SetCurrentOutput(NULL);
- }
-
- if (startedSections)
- {
- if (winHelp)
- wxFprintf(Sections, _T("\\page\n"));
- }
- startedSections = true;
-
- if (winHelp)
- wxFprintf(Sections, _T("\n${\\footnote "));
-
- // Output heading to contents page
- if (!InPopups())
- OutputCurrentSection();
-
- if (winHelp)
- {
- if (!InPopups())
- {
- wxFprintf(jumpFrom, _T("}{\\v %s}\\pard\\par\n"), topicName);
- //WriteEnvironmentStyles();
- }
- }
- else if ((macroId != ltSECTIONSTAR) && (macroId != ltGLOSS))
- {
- if (DocumentStyle == LATEX_REPORT)
- wxFprintf(Contents, _T("}\\par\\pard\n"));
- else
- wxFprintf(Contents, _T("}\\par\\par\\pard\n"));
- }
-
- SetCurrentOutput(winHelp ? Sections : Chapters);
-
- if (winHelp)
- {
- wxFprintf(Sections, _T("}\n#{\\footnote %s}\n"), topicName);
- wxFprintf(Sections, _T("+{\\footnote %s}\n"), GetBrowseString());
- OutputSectionKeyword(Sections);
- GenerateKeywordsForTopic(topicName);
- if (useUpButton)
- {
- if (DocumentStyle == LATEX_ARTICLE)
- {
- wxFprintf(Sections, _T("!{\\footnote EnableButton(\"Up\");ChangeButtonBinding(\"Up\", \"JumpId(`%s.hlp', `%s')\")}\n"),
- wxFileNameFromPath(FileRoot), _T("Contents"));
- }
- else if (CurrentChapterName)
- {
- wxFprintf(Sections, _T("!{\\footnote EnableButton(\"Up\");ChangeButtonBinding(\"Up\", \"JumpId(`%s.hlp', `%s')\")}\n"),
- wxFileNameFromPath(FileRoot), CurrentChapterName);
- }
- }
- }
-
- if (!InPopups())
- {
- wxChar *styleCommand = _T("");
- if (!winHelp && useHeadingStyles && (macroId != ltSECTIONSTAR))
- {
- if (DocumentStyle == LATEX_ARTICLE)
- styleCommand = _T("\\s1");
- else
- styleCommand = _T("\\s2");
- }
- wxChar *keep = _T("");
- if (winHelp && (macroId != ltGLOSS) && !InPopups())
- keep = _T("\\keepn\\sa140\\sb140");
-
- wxFprintf(winHelp ? Sections : Chapters, _T("\\pard{%s%s"),
- keep, styleCommand);
-
- WriteHeadingStyle((winHelp ? Sections : Chapters),
- (DocumentStyle == LATEX_ARTICLE ? 1 : 2));
- wxFprintf(winHelp ? Sections : Chapters, _T(" "));
-
- if (!winHelp)
- {
- if ((macroId != ltSECTIONSTAR) && (macroId != ltSECTIONHEADINGSTAR) && (macroId != ltGLOSS))
- {
- if (DocumentStyle == LATEX_REPORT)
- {
- if (useWord)
-// wxFprintf(Chapters, _T("{\\bkmkstart %s}%d.%d{\\bkmkend %s}. "), topicName, chapterNo, sectionNo,
- wxFprintf(Chapters, _T("{\\bkmkstart %s}{\\bkmkend %s}"), topicName,
- topicName);
- else
- wxFprintf(Chapters, _T("%d.%d. "), chapterNo, sectionNo);
- }
- else
- {
- if (useWord)
-// wxFprintf(Chapters, "{\\bkmkstart %s}%d{\\bkmkend %s}. ", topicName, sectionNo,
- wxFprintf(Chapters, _T("{\\bkmkstart %s}{\\bkmkend %s}"), topicName,
- topicName);
- else
- wxFprintf(Chapters, _T("%d. "), sectionNo);
- }
- }
- else if ( useWord )
- {
- wxFprintf(Chapters, _T("{\\bkmkstart %s}{\\bkmkend %s}"), topicName, topicName);
- }
- }
- OutputCurrentSection();
- TexOutput(_T("\\par\\pard}\n"));
-// TexOutput(_T("\\par\\pard}\\par\n"));
- }
- issuedNewParagraph = 1;
- WriteEnvironmentStyles();
-// issuedNewParagraph = 2;
- }
- break;
- }
- case ltSUBSECTION:
- case ltSUBSECTIONSTAR:
- case ltMEMBERSECTION:
- case ltFUNCTIONSECTION:
- {
- if (!start)
- {
- if (winHelp && !Sections)
- {
- OnError(_T("You cannot have a subsection before a section!"));
- }
- else
- {
- subsubsectionNo = 0;
-
- if (macroId != ltSUBSECTIONSTAR)
- subsectionNo ++;
-
- wxChar *topicName = FindTopicName(GetNextChunk());
- SetCurrentSubsectionName(topicName);
- NotifyParentHasChildren(2);
- if (winHelpContents && winHelp && !InPopups())
- {
- OutputCurrentSectionToString(wxTex2RTFBuffer);
- WriteWinHelpContentsFileLine(topicName, wxTex2RTFBuffer, 3);
- }
- AddTexRef(topicName, NULL, SectionNameString, chapterNo, sectionNo, subsectionNo);
-
- if (winHelp)
- {
- SetCurrentOutputs(Sections, Subsections);
- SetCurrentOutputs(Sections, Subsections);
- if (!InPopups())
- wxFprintf(Sections, _T("\n{\\uldb "));
- }
- else
- {
- if ((macroId != ltSUBSECTIONSTAR) && (macroId != ltMEMBERSECTION) &&
- (macroId != ltFUNCTIONSECTION))
- {
- SetCurrentOutput(Contents);
- if (DocumentStyle == LATEX_REPORT)
- wxFprintf(Contents, _T("\n\\pard\\tab\\tab %d.%d.%d\\tab "), chapterNo, sectionNo, subsectionNo);
- else
- wxFprintf(Contents, _T("\n\\pard\\tab %d.%d\\tab "), sectionNo, subsectionNo);
- } else SetCurrentOutput(NULL);
- }
- if (startedSections)
- {
- if (winHelp)
- {
- if (!InPopups())
- wxFprintf(Subsections, _T("\\page\n"));
- }
- // Experimental JACS 2004-02-21
-#if 0
- else
- wxFprintf(Chapters, _T("\\par\n"));
-#endif
- }
- startedSections = true;
-
- if (winHelp)
- wxFprintf(Subsections, _T("\n${\\footnote "));
-
- // Output to contents page
- if (!InPopups())
- OutputCurrentSection();
-
- if (winHelp)
- {
- if (!InPopups())
- {
- wxFprintf(Sections, _T("}{\\v %s}\\pard\\par\n"), topicName);
- //WriteEnvironmentStyles();
- }
- }
- else if ((macroId != ltSUBSECTIONSTAR) && (macroId != ltMEMBERSECTION) &&
- (macroId != ltFUNCTIONSECTION))
- wxFprintf(Contents, _T("\\par\\pard\n"));
-
- SetCurrentOutput(winHelp ? Subsections : Chapters);
- if (winHelp)
- {
- wxFprintf(Subsections, _T("}\n#{\\footnote %s}\n"), topicName);
- wxFprintf(Subsections, _T("+{\\footnote %s}\n"), GetBrowseString());
- OutputSectionKeyword(Subsections);
- GenerateKeywordsForTopic(topicName);
- if (useUpButton && CurrentSectionName)
- {
- wxFprintf(Subsections, _T("!{\\footnote EnableButton(\"Up\");ChangeButtonBinding(\"Up\", \"JumpId(`%s.hlp', `%s')\")}\n"),
- wxFileNameFromPath(FileRoot), CurrentSectionName);
- }
- }
- if (!winHelp && indexSubsections && useWord)
- {
- // Insert index entry for this subsection
- TexOutput(_T("{\\xe\\v {"));
- OutputCurrentSection();
- TexOutput(_T("}}"));
- }
-
- if (!InPopups())
- {
- wxChar *styleCommand = _T("");
- if (!winHelp && useHeadingStyles && (macroId != ltSUBSECTIONSTAR))
- {
- if (DocumentStyle == LATEX_ARTICLE)
- styleCommand = _T("\\s2");
- else
- styleCommand = _T("\\s3");
- }
- wxChar *keep = _T("");
- if (winHelp && !InPopups())
- keep = _T("\\keepn\\sa140\\sb140");
-
- wxFprintf(winHelp ? Subsections : Chapters, _T("\\pard{%s%s"),
- keep, styleCommand);
-
- WriteHeadingStyle((winHelp ? Subsections : Chapters),
- (DocumentStyle == LATEX_ARTICLE ? 2 : 3));
- wxFprintf(winHelp ? Subsections : Chapters, _T(" "));
-
- if (!winHelp)
- {
- if ((macroId != ltSUBSECTIONSTAR) && (macroId != ltMEMBERSECTION) &&
- (macroId != ltFUNCTIONSECTION))
- {
- if (DocumentStyle == LATEX_REPORT)
- {
- if (useWord)
-// wxFprintf(Chapters, _T("{\\bkmkstart %s}%d.%d.%d{\\bkmkend %s}. "), topicName, chapterNo, sectionNo, subsectionNo,
- wxFprintf(Chapters, _T("{\\bkmkstart %s}{\\bkmkend %s}"), topicName,
- topicName);
- else
- wxFprintf(Chapters, _T("%d.%d.%d. "), chapterNo, sectionNo, subsectionNo);
- }
- else
- {
- if (useWord)
-// wxFprintf(Chapters, _T("{\\bkmkstart %s}%d.%d{\\bkmkend %s}. "), topicName, sectionNo, subsectionNo,
- wxFprintf(Chapters, _T("{\\bkmkstart %s}{\\bkmkend %s}"), topicName,
- topicName);
- else
- wxFprintf(Chapters, _T("%d.%d. "), sectionNo, subsectionNo);
- }
- }
- else if ( useWord )
- {
- wxFprintf(Chapters, _T("{\\bkmkstart %s}{\\bkmkend %s}"), topicName, topicName);
- }
- }
- OutputCurrentSection(); // Repeat section header
-
- // Experimental JACS
- TexOutput(_T("\\par\\pard}\n"));
- // TexOutput(_T("\\par\\pard}\\par\n"));
- }
- issuedNewParagraph = 1;
- WriteEnvironmentStyles();
- }
- }
- break;
- }
- case ltSUBSUBSECTION:
- case ltSUBSUBSECTIONSTAR:
- {
- if (!start)
- {
- if (winHelp && !Subsections)
- {
- OnError(_T("You cannot have a subsubsection before a subsection!"));
- }
- else
- {
- if (macroId != ltSUBSUBSECTIONSTAR)
- subsubsectionNo ++;
-
- wxChar *topicName = FindTopicName(GetNextChunk());
- SetCurrentTopic(topicName);
- NotifyParentHasChildren(3);
- if (winHelpContents && winHelp)
- {
- OutputCurrentSectionToString(wxTex2RTFBuffer);
- WriteWinHelpContentsFileLine(topicName, wxTex2RTFBuffer, 4);
- }
- AddTexRef(topicName, NULL, SectionNameString, chapterNo, sectionNo, subsectionNo, subsubsectionNo);
-
- if (winHelp)
- {
- SetCurrentOutputs(Subsections, Subsubsections);
- wxFprintf(Subsections, _T("\n{\\uldb "));
- }
- else
- {
- if (macroId != ltSUBSUBSECTIONSTAR)
- {
- if (DocumentStyle == LATEX_ARTICLE)
- {
- SetCurrentOutput(Contents);
- wxFprintf(Contents, _T("\n\\tab\\tab %d.%d.%d\\tab "),
- sectionNo, subsectionNo, subsubsectionNo);
- }
- else
- SetCurrentOutput(NULL); // Don't write it into the contents, or anywhere else
- }
- else
- SetCurrentOutput(NULL); // Don't write it into the contents, or anywhere else
- }
-
- if (startedSections)
- {
- if (winHelp)
- wxFprintf(Subsubsections, _T("\\page\n"));
- // Experimental JACS 2004-02-21
-#if 0
- else
- wxFprintf(Chapters, _T("\\par\n"));
-#endif
- }
-
- startedSections = true;
-
- if (winHelp)
- wxFprintf(Subsubsections, _T("\n${\\footnote "));
-
- // Output header to contents page
- OutputCurrentSection();
-
- if (winHelp)
- {
- wxFprintf(Subsections, _T("}{\\v %s}\\pard\\par\n"), topicName);
- //WriteEnvironmentStyles();
- }
- else if ((DocumentStyle == LATEX_ARTICLE) && (macroId != ltSUBSUBSECTIONSTAR))
- wxFprintf(Contents, _T("\\par\\pard\n"));
-
- SetCurrentOutput(winHelp ? Subsubsections : Chapters);
- if (winHelp)
- {
- wxFprintf(Subsubsections, _T("}\n#{\\footnote %s}\n"), topicName);
- wxFprintf(Subsubsections, _T("+{\\footnote %s}\n"), GetBrowseString());
- OutputSectionKeyword(Subsubsections);
- GenerateKeywordsForTopic(topicName);
- if (useUpButton && CurrentSubsectionName)
- {
- wxFprintf(Subsubsections, _T("!{\\footnote EnableButton(\"Up\");ChangeButtonBinding(\"Up\", \"JumpId(`%s.hlp', `%s')\")}\n"),
- wxFileNameFromPath(FileRoot), CurrentSubsectionName);
- }
- }
- if (!winHelp && indexSubsections && useWord)
- {
- // Insert index entry for this subsubsection
- TexOutput(_T("{\\xe\\v {"));
- OutputCurrentSection();
- TexOutput(_T("}}"));
- }
-
- wxChar *styleCommand = _T("");
- if (!winHelp && useHeadingStyles && (macroId != ltSUBSUBSECTIONSTAR))
- {
- if (DocumentStyle == LATEX_ARTICLE)
- styleCommand = _T("\\s3");
- else
- styleCommand = _T("\\s4");
- }
- wxChar *keep = _T("");
- if (winHelp)
- keep = _T("\\keepn\\sa140\\sb140");
-
- wxFprintf(winHelp ? Subsubsections : Chapters, _T("\\pard{%s%s"),
- keep, styleCommand);
-
- WriteHeadingStyle((winHelp ? Subsubsections : Chapters),
- (DocumentStyle == LATEX_ARTICLE ? 3 : 4));
- wxFprintf(winHelp ? Subsubsections : Chapters, _T(" "));
-
- if (!winHelp)
- {
- if ((macroId != ltSUBSUBSECTIONSTAR))
- {
- if (DocumentStyle == LATEX_ARTICLE)
- {
- if (useWord)
-// wxFprintf(Chapters, _T("{\\bkmkstart %s}%d.%d.%d{\\bkmkend %s}. "), topicName, sectionNo, subsectionNo, subsubsectionNo,
- wxFprintf(Chapters, _T("{\\bkmkstart %s}{\\bkmkend %s}"), topicName,
- topicName);
- else
- wxFprintf(Chapters, _T("%d.%d.%d. "), sectionNo, subsectionNo, subsubsectionNo);
- }
- else
- {
- if (useWord)
-// wxFprintf(Chapters, _T("{\\bkmkstart %s}%d.%d.%d.%d{\\bkmkend %s}. "), topicName, chapterNo, sectionNo, subsectionNo, subsubsectionNo,
- wxFprintf(Chapters, _T("{\\bkmkstart %s}{\\bkmkend %s}"), topicName,
- topicName);
- else
- wxFprintf(Chapters, _T("%d.%d.%d.%d. "), chapterNo, sectionNo, subsectionNo, subsubsectionNo);
- }
- }
- else if ( useWord )
- {
- wxFprintf(Chapters, _T("{\\bkmkstart %s}{\\bkmkend %s}"), topicName, topicName);
- }
- }
- OutputCurrentSection(); // Repeat section header
- TexOutput(_T("\\par\\pard}\n"));
- issuedNewParagraph = 1;
- WriteEnvironmentStyles();
-// TexOutput(_T("\\par\\pard}\\par\n"));
-// issuedNewParagraph = 2;
- }
- }
- break;
- }
- case ltCAPTION:
- case ltCAPTIONSTAR:
- {
- if (!start)
- {
- wxChar *topicName = FindTopicName(GetNextChunk());
- SetCurrentTopic(topicName);
-
- TexOutput(_T("\\pard\\par"));
- wxChar figBuf[200];
-
- if (inFigure)
- {
- figureNo ++;
-
- if (winHelp || !useWord)
- {
- if (DocumentStyle != LATEX_ARTICLE)
- wxSnprintf(figBuf, sizeof(figBuf), _T("%s %d.%d: "), FigureNameString, chapterNo, figureNo);
- else
- wxSnprintf(figBuf, sizeof(figBuf), _T("%s %d: "), FigureNameString, figureNo);
- }
- else
- {
- wxSnprintf(figBuf, sizeof(figBuf), _T("%s {\\field\\flddirty{\\*\\fldinst SEQ Figure \\\\* ARABIC }{\\fldrslt {\\bkmkstart %s}??{\\bkmkend %s}}}: "),
- FigureNameString, topicName, topicName);
- }
- }
- else
- {
- tableNo ++;
-
- if (winHelp || !useWord)
- {
- if (DocumentStyle != LATEX_ARTICLE)
- wxSnprintf(figBuf, sizeof(figBuf), _T("%s %d.%d: "), TableNameString, chapterNo, tableNo);
- else
- wxSnprintf(figBuf, sizeof(figBuf), _T("%s %d: "), TableNameString, tableNo);
- }
- else
- {
- wxSnprintf(figBuf, sizeof(figBuf), _T("%s {\\field\\flddirty{\\*\\fldinst SEQ Table \\\\* ARABIC }{\\fldrslt {\\bkmkstart %s}??{\\bkmkend %s}}}: "),
- TableNameString, topicName, topicName);
- }
- }
-
- int n = (inTable ? tableNo : figureNo);
- AddTexRef(topicName, NULL, NULL,
- ((DocumentStyle != LATEX_ARTICLE) ? chapterNo : n),
- ((DocumentStyle != LATEX_ARTICLE) ? n : 0));
-
- if (winHelp)
- TexOutput(_T("\\qc{\\b "));
- else
- TexOutput(_T("\\ql{\\b "));
- TexOutput(figBuf);
-
- OutputCurrentSection();
-
- TexOutput(_T("}\\par\\pard\n"));
- WriteEnvironmentStyles();
- }
- break;
- }
- case ltFUNC:
- case ltPFUNC:
- {
-// SetCurrentOutput(winHelp ? Subsections : Chapters);
- if (start)
- {
- TexOutput(_T("{"));
- }
- else
- {
- TexOutput(_T("}\n"));
- if (winHelp)
- {
- TexOutput(_T("K{\\footnote {K} "));
- suppressNameDecoration = true;
- TraverseChildrenFromChunk(currentMember);
- suppressNameDecoration = false;
- TexOutput(_T("}\n"));
- }
- if (!winHelp && useWord)
- {
- // Insert index entry for this function
- TexOutput(_T("{\\xe\\v {"));
- suppressNameDecoration = true; // Necessary so don't print "(\\bf" etc.
- TraverseChildrenFromChunk(currentMember);
- suppressNameDecoration = false;
- TexOutput(_T("}}"));
- }
- }
- break;
- }
- case ltCLIPSFUNC:
- {
-// SetCurrentOutput(winHelp ? Subsections : Chapters);
- if (start)
- {
- TexOutput(_T("{"));
- }
- else
- {
- TexOutput(_T("}\n"));
- if (winHelp)
- {
- TexOutput(_T("K{\\footnote {K} "));
- suppressNameDecoration = true; // Necessary so don't print "(\\bf" etc.
- TraverseChildrenFromChunk(currentMember);
- suppressNameDecoration = false;
- TexOutput(_T("}\n"));
- }
- if (!winHelp && useWord)
- {
- // Insert index entry for this function
- TexOutput(_T("{\\xe\\v {"));
- suppressNameDecoration = true; // Necessary so don't print "(\\bf" etc.
- TraverseChildrenFromChunk(currentMember);
- suppressNameDecoration = false;
- TexOutput(_T("}}"));
- }
- }
- break;
- }
- case ltMEMBER:
- {
-// SetCurrentOutput(winHelp ? Subsections : Chapters);
- if (start)
- {
- TexOutput(_T("{\\b "));
- }
- else
- {
- TexOutput(_T("}\n"));
- if (winHelp)
- {
- TexOutput(_T("K{\\footnote {K} "));
- TraverseChildrenFromChunk(currentMember);
- TexOutput(_T("}\n"));
- }
- if (!winHelp && useWord)
- {
- // Insert index entry for this function
- TexOutput(_T("{\\xe\\v {"));
- suppressNameDecoration = true; // Necessary so don't print "(\\bf" etc.
- TraverseChildrenFromChunk(currentMember);
- suppressNameDecoration = false;
- TexOutput(_T("}}"));
- }
- }
- break;
- }
- case ltDOCUMENT:
- {
- if (start)
- SetCurrentOutput(Chapters);
- break;
- }
- case ltTABLEOFCONTENTS:
- {
- if (start)
- {
- if (!winHelp && useWord)
- {
- // Insert Word for Windows table of contents
- TexOutput(_T("\\par\\pard\\pgnrestart\\sect\\titlepg"));
-
- // In linear RTF, same as chapter headings.
- wxSnprintf(buf, sizeof(buf), _T("{\\b\\fs%d %s}\\par\\par\\pard\n\n"), chapterFont*2, ContentsNameString);
-
- TexOutput(buf);
- wxSnprintf(buf, sizeof(buf), _T("{\\field{\\*\\fldinst TOC \\\\o \"1-%d\" }{\\fldrslt PRESS F9 TO REFORMAT CONTENTS}}\n"), contentsDepth);
- TexOutput(buf);
-// TexOutput(_T("\\sect\\sectd"));
- }
- else
- {
- FILE *fd = wxFopen(ContentsName, _T("r"));
- if (fd)
- {
- int ch = getc(fd);
- while (ch != EOF)
- {
- wxPutc(ch, Chapters);
- ch = getc(fd);
- }
- fclose(fd);
- }
- else
- {
- TexOutput(_T("{\\i RUN TEX2RTF AGAIN FOR CONTENTS PAGE}\\par\n"));
- OnInform(_T("Run Tex2RTF again to include contents page."));
- }
- }
- }
- break;
- }
- case ltVOID:
- {
-// if (start)
-// TexOutput(_T("{\\b void}"));
- break;
- }
- case ltHARDY:
- {
- if (start)
- TexOutput(_T("{\\scaps HARDY}"));
- break;
- }
- case ltWXCLIPS:
- {
- if (start)
- TexOutput(_T("wxCLIPS"));
- break;
- }
- case ltSPECIALAMPERSAND:
- {
- if (start)
- {
- if (inTabular)
- TexOutput(_T("\\cell "));
- else
- TexOutput(_T("&"));
- }
- break;
- }
- case ltSPECIALTILDE:
- {
- if (start)
- {
- #if 1 // if(inVerbatim)
- TexOutput(_T("~"));
- #else
- TexOutput(_T(" "));
- #endif
- }
- break;
- }
- case ltBACKSLASHCHAR:
- {
- if (start)
- {
- if (inTabular)
- {
-// TexOutput(_T("\\cell\\row\\trowd\\trgaph108\\trleft-108\n"));
- TexOutput(_T("\\cell\\row\\trowd\\trgaph108\n"));
- int currentWidth = 0;
- for (int i = 0; i < noColumns; i++)
- {
- currentWidth += TableData[i].width;
- if (TableData[i].rightBorder)
- TexOutput(_T("\\clbrdrr\\brdrs\\brdrw15"));
-
- if (TableData[i].leftBorder)
- TexOutput(_T("\\clbrdrl\\brdrs\\brdrw15"));
-
- wxSnprintf(buf, sizeof(buf), _T("\\cellx%d"), currentWidth);
- TexOutput(buf);
- }
- TexOutput(_T("\\pard\\intbl\n"));
- }
- else
- TexOutput(_T("\\line\n"));
- }
- break;
- }
- case ltRANGLEBRA:
- {
- if (start)
- TexOutput(_T("\tab "));
- break;
- }
- case ltRTFSP: // Explicit space, RTF only
- {
- if (start)
- TexOutput(_T(" "));
- break;
- }
- case ltITEMIZE:
- case ltENUMERATE:
- case ltDESCRIPTION:
- {
- if (start)
- {
- if (indentLevel > 0)
- {
- // Experimental JACS 2004-02-21
- TexOutput(_T("\\par\n"));
- issuedNewParagraph = 1;
-// TexOutput(_T("\\par\\par\n"));
-// issuedNewParagraph = 2;
- }
- else
- {
- // Top-level list: issue a new paragraph if we haven't
- // just done so
- if (!issuedNewParagraph)
- {
- TexOutput(_T("\\par\\pard"));
- WriteEnvironmentStyles();
- issuedNewParagraph = 1;
- }
- else issuedNewParagraph = 0;
- }
- indentLevel ++;
- TexOutput(_T("\\fi0\n"));
- int listType;
- if (macroId == ltENUMERATE)
- listType = LATEX_ENUMERATE;
- else if (macroId == ltITEMIZE)
- listType = LATEX_ITEMIZE;
- else
- listType = LATEX_DESCRIPTION;
-
- int oldIndent = 0;
- wxNode *node = itemizeStack.GetFirst();
- if (node)
- oldIndent = ((ItemizeStruc *)node->GetData())->indentation;
-
- int indentSize1 = oldIndent + 20*labelIndentTab;
- int indentSize2 = oldIndent + 20*itemIndentTab;
-
- ItemizeStruc *struc = new ItemizeStruc(listType, indentSize2, indentSize1);
- itemizeStack.Insert(struc);
-
- wxSnprintf(buf, sizeof(buf), _T("\\tx%d\\tx%d\\li%d\\sa200"), indentSize1, indentSize2, indentSize2);
- PushEnvironmentStyle(buf);
- }
- else
- {
- currentItemSep = 8; // Reset to the default
- indentLevel --;
- PopEnvironmentStyle();
-
- if (itemizeStack.GetFirst())
- {
- ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.GetFirst()->GetData();
- delete struc;
- delete itemizeStack.GetFirst();
- }
-/* Change 18/7/97 - don't know why we wish to do this
- if (itemizeStack.Number() == 0)
- {
- OnMacro(ltPAR, 0, true);
- OnMacro(ltPAR, 0, false);
- issuedNewParagraph = 2;
- }
-*/
- }
- break;
- }
- case ltTWOCOLLIST:
- {
- if (start)
- {
- indentLevel ++;
- int oldIndent = 0;
- wxNode *node = itemizeStack.GetFirst();
- if (node)
- oldIndent = ((ItemizeStruc *)node->GetData())->indentation;
-
- int indentSize = oldIndent + TwoColWidthA;
-
- ItemizeStruc *struc = new ItemizeStruc(LATEX_TWOCOL, indentSize);
- itemizeStack.Insert(struc);
-
-// wxSnprintf(buf, sizeof(buf), _T("\\tx%d\\li%d\\ri%d"), indentSize, indentSize, TwoColWidthA+TwoColWidthB+oldIndent);
- wxSnprintf(buf, sizeof(buf), _T("\\tx%d\\li%d\\sa200"), indentSize, indentSize);
- PushEnvironmentStyle(buf);
- }
- else
- {
- indentLevel --;
- PopEnvironmentStyle();
- if (itemizeStack.GetFirst())
- {
- ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.GetFirst()->GetData();
- delete struc;
- delete itemizeStack.GetFirst();
- }
-/*
- // JACS June 1997
- TexOutput(_T("\\pard\n"));
- WriteEnvironmentStyles();
-*/
-/* why do we need this? */
-// Experimental
- TexOutput(_T("\\pard\n"));
-#if 0
- if (itemizeStack.GetCount() == 0)
- {
- issuedNewParagraph = 0;
- OnMacro(ltPAR, 0, true);
- OnMacro(ltPAR, 0, false);
- }
-#endif
- }
- break;
- }
- case ltITEM:
- {
- wxNode *node = itemizeStack.GetFirst();
- if (node)
- {
- ItemizeStruc *struc = (ItemizeStruc *)node->GetData();
- if (!start)
- {
- struc->currentItem += 1;
- wxChar indentBuf[60];
-
- int indentSize1 = struc->labelIndentation;
- int indentSize2 = struc->indentation;
-
- TexOutput(_T("\n"));
- if (struc->currentItem > 1 && issuedNewParagraph == 0)
- {
- // JACS
-// if (currentItemSep > 0)
-// TexOutput(_T("\\par"));
-
- TexOutput(_T("\\par"));
- issuedNewParagraph = 1;
-// WriteEnvironmentStyles();
- }
-
- wxSnprintf(buf, sizeof(buf), _T("\\tx%d\\tx%d\\li%d\\fi-%d\n"), indentSize1, indentSize2,
- indentSize2, 20*itemIndentTab);
- TexOutput(buf);
-
- switch (struc->listType)
- {
- case LATEX_ENUMERATE:
- {
- if (descriptionItemArg)
- {
- TexOutput(_T("\\tab{ "));
- TraverseChildrenFromChunk(descriptionItemArg);
- TexOutput(_T("}\\tab"));
- descriptionItemArg = NULL;
- }
- else
- {
- wxSnprintf(indentBuf, sizeof(indentBuf), _T("\\tab{\\b %d.}\\tab"), struc->currentItem);
- TexOutput(indentBuf);
- }
- break;
- }
- case LATEX_ITEMIZE:
- {
- if (descriptionItemArg)
- {
- TexOutput(_T("\\tab{ "));
- TraverseChildrenFromChunk(descriptionItemArg);
- TexOutput(_T("}\\tab"));
- descriptionItemArg = NULL;
- }
- else
- {
- if (bulletFile && winHelp)
- {
- if (winHelpVersion > 3) // Transparent bitmap
- wxSnprintf(indentBuf, sizeof(indentBuf), _T("\\tab\\{bmct %s\\}\\tab"), bulletFile);
- else
- wxSnprintf(indentBuf, sizeof(indentBuf), _T("\\tab\\{bmc %s\\}\\tab"), bulletFile);
- }
- else if (winHelp)
- wxSnprintf(indentBuf, sizeof(indentBuf), _T("\\tab{\\b o}\\tab"));
- else
- wxSnprintf(indentBuf, sizeof(indentBuf), _T("\\tab{\\f1\\'b7}\\tab"));
- TexOutput(indentBuf);
- }
- break;
- }
- default:
- case LATEX_DESCRIPTION:
- {
- if (descriptionItemArg)
- {
- TexOutput(_T("\\tab{\\b "));
- TraverseChildrenFromChunk(descriptionItemArg);
- TexOutput(_T("} "));
- descriptionItemArg = NULL;
- }
- break;
- }
- }
- }
- }
- break;
- }
- case ltTWOCOLITEM:
- case ltTWOCOLITEMRULED:
- {
- wxNode *node = itemizeStack.GetFirst();
- if (node)
- {
- ItemizeStruc *struc = (ItemizeStruc *)node->GetData();
- if (start)
- {
- struc->currentItem += 1;
-
- int oldIndent = 0;
- wxNode *node2 = NULL;
- if (itemizeStack.GetCount() > 1) // TODO: do I actually mean Nth(0) here??
- node2 = itemizeStack.Item(1);
- if (node2)
- oldIndent = ((ItemizeStruc *)node2->GetData())->indentation;
-
- TexOutput(_T("\n"));
- // JACS
-#if 0
- if (struc->currentItem > 1)
- {
- if (currentItemSep > 0)
- TexOutput(_T("\\par"));
-
-// WriteEnvironmentStyles();
- }
-#endif
-
-// wxSnprintf(buf, sizeof(buf), _T("\\tx%d\\li%d\\fi-%d\\ri%d\n"), TwoColWidthA,
-// TwoColWidthA, TwoColWidthA, TwoColWidthA+TwoColWidthB+oldIndent);
-/*
- wxSnprintf(buf, sizeof(buf), _T("\\tx%d\\li%d\\fi-%d\n"), TwoColWidthA,
- TwoColWidthA, TwoColWidthA);
-*/
- wxSnprintf(buf, sizeof(buf), _T("\\tx%d\\li%d\\fi-%d\n"), TwoColWidthA + oldIndent,
- TwoColWidthA + oldIndent, TwoColWidthA);
- TexOutput(buf);
- }
- }
- break;
- }
- case ltVERBATIM:
- case ltVERB:
- {
- if (start)
- {
- // JACS
-#if 0
- if (macroId == ltVERBATIM)
- {
- if (!issuedNewParagraph)
- {
- TexOutput(_T("\\par\\pard"));
- WriteEnvironmentStyles();
- issuedNewParagraph = 1;
- }
- else issuedNewParagraph = 0;
- }
-#endif
-
- if (macroId == ltVERBATIM)
- wxSnprintf(buf, sizeof(buf), _T("{\\f3\\s10\\fs20\\li720\\sa0 "));
- else
- wxSnprintf(buf, sizeof(buf), _T("{\\f3\\fs20 "));
- TexOutput(buf);
- }
- else
- {
- TexOutput(_T("}"));
- if (macroId == ltVERBATIM)
- {
- TexOutput(_T("\\pard\n"));
- WriteEnvironmentStyles();
- // JACS
-#if 0
- TexOutput(_T("\\par\n"));
- issuedNewParagraph = 1;
-#endif
- }
- }
- break;
- }
- case ltCENTERLINE:
- case ltCENTER:
- {
- if (start)
- {
- TexOutput(_T("\\qc "));
- forbidParindent ++;
- PushEnvironmentStyle(_T("\\qc\\sa200"));
- }
- else
- {
- TexOutput(_T("\\par\\pard\n"));
- issuedNewParagraph = 1;
- forbidParindent --;
- PopEnvironmentStyle();
- WriteEnvironmentStyles();
- }
- break;
- }
- case ltFLUSHLEFT:
- {
- if (start)
- {
- TexOutput(_T("\\ql\\sa200 "));
- forbidParindent ++;
- PushEnvironmentStyle(_T("\\ql"));
- }
- else
- {
- TexOutput(_T("\\par\\pard\n"));
- issuedNewParagraph = 1;
- forbidParindent --;
- PopEnvironmentStyle();
- WriteEnvironmentStyles();
- }
- break;
- }
- case ltFLUSHRIGHT:
- {
- if (start)
- {
- TexOutput(_T("\\qr\\sa200 "));
- forbidParindent ++;
- PushEnvironmentStyle(_T("\\qr"));
- }
- else
- {
- TexOutput(_T("\\par\\pard\n"));
- issuedNewParagraph = 1;
- forbidParindent --;
- PopEnvironmentStyle();
- WriteEnvironmentStyles();
- }
- break;
- }
- case ltSMALL:
- case ltFOOTNOTESIZE:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("{\\fs%d\n"), smallFont*2);
- TexOutput(buf);
- }
- else TexOutput(_T("}\n"));
- break;
- }
- case ltTINY:
- case ltSCRIPTSIZE:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("{\\fs%d\n"), tinyFont*2);
- TexOutput(buf);
- }
- else TexOutput(_T("}\n"));
- break;
- }
- case ltNORMALSIZE:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("{\\fs%d\n"), normalFont*2);
- TexOutput(buf);
- }
- else TexOutput(_T("}\n"));
- break;
- }
- case ltlarge:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("{\\fs%d\n"), largeFont1*2);
- TexOutput(buf);
- }
- else TexOutput(_T("}\n"));
- break;
- }
- case ltLarge:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("{\\fs%d\n"), LargeFont2*2);
- TexOutput(buf);
- }
- else TexOutput(_T("}\n"));
- break;
- }
- case ltLARGE:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("{\\fs%d\n"), LARGEFont3*2);
- TexOutput(buf);
- }
- else TexOutput(_T("}\n"));
- break;
- }
- case lthuge:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("{\\fs%d\n"), hugeFont1*2);
- TexOutput(buf);
- }
- else TexOutput(_T("}\n"));
- break;
- }
- case ltHuge:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("{\\fs%d\n"), HugeFont2*2);
- TexOutput(buf);
- }
- else TexOutput(_T("}\n"));
- break;
- }
- case ltHUGE:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("{\\fs%d\n"), HUGEFont3*2);
- TexOutput(buf);
- }
- else TexOutput(_T("}\n"));
- break;
- }
- case ltTEXTBF:
- case ltBFSERIES:
- case ltBF:
- {
- if (start)
- {
- TexOutput(_T("{\\b "));
- }
- else TexOutput(_T("}"));
- break;
- }
- case ltUNDERLINE:
- {
- if (start)
- {
- TexOutput(_T("{\\ul "));
- }
- else TexOutput(_T("}"));
- break;
- }
- case ltTEXTIT:
- case ltITSHAPE:
- case ltIT:
- case ltEMPH:
- case ltEM:
- {
- if (start)
- {
- TexOutput(_T("{\\i "));
- }
- else TexOutput(_T("}"));
- break;
- }
- // Roman font: do nothing. Should really switch between
- // fonts.
- case ltTEXTRM:
- case ltRMFAMILY:
- case ltRM:
- {
-/*
- if (start)
- {
- TexOutput(_T("{\\plain "));
- }
- else TexOutput(_T("}"));
- */
- break;
- }
- // Medium-weight font. Unbolden...
- case ltMDSERIES:
- {
- if (start)
- {
- TexOutput(_T("{\\b0 "));
- }
- else TexOutput(_T("}"));
- break;
- }
- // Upright (un-italic or slant)
- case ltUPSHAPE:
- {
- if (start)
- {
- TexOutput(_T("{\\i0 "));
- }
- else TexOutput(_T("}"));
- break;
- }
- case ltTEXTSC:
- case ltSCSHAPE:
- case ltSC:
- {
- if (start)
- {
- TexOutput(_T("{\\scaps "));
- }
- else TexOutput(_T("}"));
- break;
- }
- case ltTEXTTT:
- case ltTTFAMILY:
- case ltTT:
- {
- if (start)
- {
- TexOutput(_T("{\\f3 "));
- }
- else TexOutput(_T("}"));
- break;
- }
- case ltLBRACE:
- {
- if (start)
- TexOutput(_T("\\{"));
- break;
- }
- case ltRBRACE:
- {
- if (start)
- TexOutput(_T("\\}"));
- break;
- }
- case ltBACKSLASH:
- {
- if (start)
- TexOutput(_T("\\\\"));
- break;
- }
- case ltPAR:
- {
- if (start)
- {
- if ( issuedNewParagraph == 0 )
- {
- TexOutput(_T("\\par\\pard"));
- issuedNewParagraph ++;
-
- // Extra par if parskip is more than zero (usually looks best.)
- // N.B. JACS 2004-02-21: shouldn't need this for linear RTF if
- // we have a suitable set of styles.
-#if 0
- if (winHelp && !inTabular && (ParSkip > 0))
- {
- TexOutput(_T("\\par"));
- issuedNewParagraph ++;
- }
-#endif
- WriteEnvironmentStyles();
- }
- // 1 is a whole paragraph if ParSkip == 0,
- // half a paragraph if ParSkip > 0
- else if ( issuedNewParagraph == 1 )
- {
- // Don't need a par at all if we've already had one,
- // and ParSkip == 0.
-#if 0
- // Extra par if parskip is more than zero (usually looks best.)
- if (winHelp && !inTabular && (ParSkip > 0))
- {
- TexOutput(_T("\\par"));
- issuedNewParagraph ++;
- }
-#endif
- WriteEnvironmentStyles();
- }
-/*
- if (!issuedNewParagraph || (issuedNewParagraph > 1))
- {
- TexOutput(_T("\\par\\pard"));
-
- // Extra par if parskip is more than zero (usually looks best.)
- if (!inTabular && (ParSkip > 0))
- TexOutput(_T("\\par"));
- WriteEnvironmentStyles();
- }
-*/
-
- TexOutput(_T("\n"));
- }
- break;
- }
- case ltNEWPAGE:
- {
- // In Windows Help, no newpages until we've started some chapters or sections
- if (!(winHelp && !startedSections))
- if (start)
- TexOutput(_T("\\page\n"));
- break;
- }
- case ltMAKETITLE:
- {
- if (start && DocumentTitle)
- {
- TexOutput(_T("\\par\\pard"));
- if (!winHelp)
- TexOutput(_T("\\par"));
- wxSnprintf(buf, sizeof(buf), _T("\\qc{\\fs%d\\b "), titleFont*2);
- TexOutput(buf);
- TraverseChildrenFromChunk(DocumentTitle);
- TexOutput(_T("}\\par\\pard\n"));
-
- if (DocumentAuthor)
- {
- if (!winHelp)
- TexOutput(_T("\\par"));
- wxSnprintf(buf, sizeof(buf), _T("\\par\\qc{\\fs%d "), authorFont*2);
- TexOutput(buf);
- TraverseChildrenFromChunk(DocumentAuthor);
- TexOutput(_T("}"));
- TexOutput(_T("\\par\\pard\n"));
- }
- if (DocumentDate)
- {
- TexOutput(_T("\\par"));
- wxSnprintf(buf, sizeof(buf), _T("\\qc{\\fs%d "), authorFont*2);
- TexOutput(buf);
- TraverseChildrenFromChunk(DocumentDate);
- TexOutput(_T("}\\par\\pard\n"));
- }
- // If linear RTF, we want this titlepage to be in a separate
- // section with its own (blank) header and footer
- if (!winHelp && (DocumentStyle != LATEX_ARTICLE))
- {
- TexOutput(_T("{\\header }{\\footer }\n"));
- // Not sure about this: we get too many sections.
-// TexOutput(_T("\\sect"));
- }
- }
- break;
- }
- case ltADDCONTENTSLINE:
- {
- if (!start)
- {
- if (contentsLineSection && contentsLineValue)
- {
- if (wxStrcmp(contentsLineSection, _T("chapter")) == 0)
- {
- wxFprintf(Contents, _T("\\par\n{\\b %s}\\par\n"), contentsLineValue);
- }
- else if (wxStrcmp(contentsLineSection, _T("section")) == 0)
- {
- if (DocumentStyle != LATEX_ARTICLE)
- wxFprintf(Contents, _T("\n\\tab%s\\par\n"), contentsLineValue);
- else
- wxFprintf(Contents, _T("\\par\n{\\b %s}\\par\n"), contentsLineValue);
- }
- }
- }
- break;
- }
- case ltHRULE:
- {
- if (start)
- {
- TexOutput(_T("\\brdrb\\brdrs\\par\\pard\n"));
- issuedNewParagraph = 1;
- WriteEnvironmentStyles();
- }
- break;
- }
- case ltRULE:
- {
- if (start)
- {
- TexOutput(_T("\\brdrb\\brdrs\\par\\pard\n"));
- issuedNewParagraph = 1;
- WriteEnvironmentStyles();
- }
- break;
- }
- case ltHLINE:
- {
- if (start)
- ruleTop ++;
- break;
- }
- case ltNUMBEREDBIBITEM:
- {
- if (start)
- TexOutput(_T("\\li260\\fi-260 ")); // Indent from 2nd line
- else
- TexOutput(_T("\\par\\pard\\par\n\n"));
- break;
- }
- case ltTHEPAGE:
- {
- if (start)
- {
- TexOutput(_T("{\\field{\\*\\fldinst PAGE \\\\* MERGEFORMAT }{\\fldrslt 1}}"));
- }
- break;
- }
- case ltTHECHAPTER:
- {
- if (start)
- {
-// TexOutput(_T("{\\field{\\*\\fldinst SECTION \\\\* MERGEFORMAT }{\\fldrslt 1}}"));
- wxSnprintf(buf, sizeof(buf), _T("%d"), chapterNo);
- TexOutput(buf);
- }
- break;
- }
- case ltTHESECTION:
- {
- if (start)
- {
-// TexOutput(_T("{\\field{\\*\\fldinst SECTION \\\\* MERGEFORMAT }{\\fldrslt 1}}"));
- wxSnprintf(buf, sizeof(buf), _T("%d"), sectionNo);
- TexOutput(buf);
- }
- break;
- }
- case ltTWOCOLUMN:
- {
- if (!start && !winHelp)
- {
- TexOutput(_T("\\cols2\n"));
- }
- break;
- }
- case ltONECOLUMN:
- {
- if (!start && !winHelp)
- {
- TexOutput(_T("\\cols1\n"));
- }
- break;
- }
- case ltPRINTINDEX:
- {
- if (start && useWord && !winHelp)
- {
- FakeCurrentSection(_T("Index"));
- OnMacro(ltPAR, 0, true);
- OnMacro(ltPAR, 0, false);
- TexOutput(_T("\\par{\\field{\\*\\fldinst INDEX \\\\h \"\\emdash A\\emdash \"\\\\c \"2\"}{\\fldrslt PRESS F9 TO REFORMAT INDEX}}\n"));
- }
- break;
- }
- case ltLISTOFFIGURES:
- {
- if (start && useWord && !winHelp)
- {
- FakeCurrentSection(FiguresNameString, false);
- OnMacro(ltPAR, 0, true);
- OnMacro(ltPAR, 0, false);
- OnMacro(ltPAR, 0, true);
- OnMacro(ltPAR, 0, false);
- wxChar buf[200];
- wxSnprintf(buf, sizeof(buf), _T("{\\field\\fldedit{\\*\\fldinst TOC \\\\c \"%s\" }{\\fldrslt PRESS F9 TO REFORMAT LIST OF FIGURES}}\n"),
- FigureNameString);
- TexOutput(buf);
- }
- break;
- }
- case ltLISTOFTABLES:
- {
- if (start && useWord && !winHelp)
- {
- FakeCurrentSection(TablesNameString, false);
- OnMacro(ltPAR, 0, true);
- OnMacro(ltPAR, 0, false);
- OnMacro(ltPAR, 0, true);
- OnMacro(ltPAR, 0, false);
- wxChar buf[200];
- wxSnprintf(buf, sizeof(buf), _T("{\\field\\fldedit{\\*\\fldinst TOC \\\\c \"%s\" }{\\fldrslt PRESS F9 TO REFORMAT LIST OF TABLES}}\n"),
- TablesNameString);
- TexOutput(buf);
- }
- break;
- }
- // Symbols
- case ltALPHA:
- if (start) TexOutput(_T("{\\f1\\'61}"));
- break;
- case ltBETA:
- if (start) TexOutput(_T("{\\f1\\'62}"));
- break;
- case ltGAMMA:
- if (start) TexOutput(_T("{\\f1\\'63}"));
- break;
- case ltDELTA:
- if (start) TexOutput(_T("{\\f1\\'64}"));
- break;
- case ltEPSILON:
- case ltVAREPSILON:
- if (start) TexOutput(_T("{\\f1\\'65}"));
- break;
- case ltZETA:
- if (start) TexOutput(_T("{\\f1\\'7A}"));
- break;
- case ltETA:
- if (start) TexOutput(_T("{\\f1\\'68}"));
- break;
- case ltTHETA:
- case ltVARTHETA:
- if (start) TexOutput(_T("{\\f1\\'71}"));
- break;
- case ltIOTA:
- if (start) TexOutput(_T("{\\f1\\'69}"));
- break;
- case ltKAPPA:
- if (start) TexOutput(_T("{\\f1\\'6B}"));
- break;
- case ltLAMBDA:
- if (start) TexOutput(_T("{\\f1\\'6C}"));
- break;
- case ltMU:
- if (start) TexOutput(_T("{\\f1\\'6D}"));
- break;
- case ltNU:
- if (start) TexOutput(_T("{\\f1\\'6E}"));
- break;
- case ltXI:
- if (start) TexOutput(_T("{\\f1\\'78}"));
- break;
- case ltPI:
- if (start) TexOutput(_T("{\\f1\\'70}"));
- break;
- case ltVARPI:
- if (start) TexOutput(_T("{\\f1\\'76}"));
- break;
- case ltRHO:
- case ltVARRHO:
- if (start) TexOutput(_T("{\\f1\\'72}"));
- break;
- case ltSIGMA:
- if (start) TexOutput(_T("{\\f1\\'73}"));
- break;
- case ltVARSIGMA:
- if (start) TexOutput(_T("{\\f1\\'56}"));
- break;
- case ltTAU:
- if (start) TexOutput(_T("{\\f1\\'74}"));
- break;
- case ltUPSILON:
- if (start) TexOutput(_T("{\\f1\\'75}"));
- break;
- case ltPHI:
- case ltVARPHI:
- if (start) TexOutput(_T("{\\f1\\'66}"));
- break;
- case ltCHI:
- if (start) TexOutput(_T("{\\f1\\'63}"));
- break;
- case ltPSI:
- if (start) TexOutput(_T("{\\f1\\'79}"));
- break;
- case ltOMEGA:
- if (start) TexOutput(_T("{\\f1\\'77}"));
- break;
- case ltCAP_GAMMA:
- if (start) TexOutput(_T("{\\f1\\'47}"));
- break;
- case ltCAP_DELTA:
- if (start) TexOutput(_T("{\\f1\\'44}"));
- break;
- case ltCAP_THETA:
- if (start) TexOutput(_T("{\\f1\\'51}"));
- break;
- case ltCAP_LAMBDA:
- if (start) TexOutput(_T("{\\f1\\'4C}"));
- break;
- case ltCAP_XI:
- if (start) TexOutput(_T("{\\f1\\'58}"));
- break;
- case ltCAP_PI:
- if (start) TexOutput(_T("{\\f1\\'50}"));
- break;
- case ltCAP_SIGMA:
- if (start) TexOutput(_T("{\\f1\\'53}"));
- break;
- case ltCAP_UPSILON:
- if (start) TexOutput(_T("{\\f1\\'54}"));
- break;
- case ltCAP_PHI:
- if (start) TexOutput(_T("{\\f1\\'46}"));
- break;
- case ltCAP_PSI:
- if (start) TexOutput(_T("{\\f1\\'59}"));
- break;
- case ltCAP_OMEGA:
- if (start) TexOutput(_T("{\\f1\\'57}"));
- break;
- // Binary operation symbols
- case ltLE:
- case ltLEQ:
- if (start) TexOutput(_T("{\\f1\\'A3}"));
- break;
- case ltLL:
- if (start) TexOutput(_T("<<"));
- break;
- case ltSUBSET:
- if (start) TexOutput(_T("{\\f1\\'CC}"));
- break;
- case ltSUBSETEQ:
- if (start) TexOutput(_T("{\\f1\\'CD}"));
- break;
- case ltIN:
- if (start) TexOutput(_T("{\\f1\\'CE}"));
- break;
- case ltGE:
- case ltGEQ:
- if (start) TexOutput(_T("{\\f1\\'B3}"));
- break;
- case ltGG:
- if (start) TexOutput(_T(">>"));
- break;
- case ltSUPSET:
- if (start) TexOutput(_T("{\\f1\\'C9}"));
- break;
- case ltSUPSETEQ:
- if (start) TexOutput(_T("{\\f1\\'CD}"));
- break;
- case ltNI:
- if (start) TexOutput(_T("{\\f1\\'27}"));
- break;
- case ltPERP:
- if (start) TexOutput(_T("{\\f1\\'5E}"));
- break;
- case ltNEQ:
- if (start) TexOutput(_T("{\\f1\\'B9}"));
- break;
- case ltAPPROX:
- if (start) TexOutput(_T("{\\f1\\'BB}"));
- break;
- case ltCONG:
- if (start) TexOutput(_T("{\\f1\\'40}"));
- break;
- case ltEQUIV:
- if (start) TexOutput(_T("{\\f1\\'BA}"));
- break;
- case ltPROPTO:
- if (start) TexOutput(_T("{\\f1\\'B5}"));
- break;
- case ltSIM:
- if (start) TexOutput(_T("{\\f1\\'7E}"));
- break;
- case ltSMILE:
- if (start) TexOutput(_T("{\\f4\\'4A}"));
- break;
- case ltFROWN:
- if (start) TexOutput(_T("{\\f4\\'4C}"));
- break;
- case ltMID:
- if (start) TexOutput(_T("|"));
- break;
-
- // Negated relation symbols
- case ltNOTEQ:
- if (start) TexOutput(_T("{\\f1\\'B9}"));
- break;
- case ltNOTIN:
- if (start) TexOutput(_T("{\\f1\\'CF}"));
- break;
- case ltNOTSUBSET:
- if (start) TexOutput(_T("{\\f1\\'CB}"));
- break;
-
- // Arrows
- case ltLEFTARROW:
- if (start) TexOutput(_T("{\\f1\\'AC}"));
- break;
- case ltLEFTARROW2:
- if (start) TexOutput(_T("{\\f1\\'DC}"));
- break;
- case ltRIGHTARROW:
- if (start) TexOutput(_T("{\\f1\\'AE}"));
- break;
- case ltRIGHTARROW2:
- if (start) TexOutput(_T("{\\f1\\'DE}"));
- break;
- case ltLEFTRIGHTARROW:
- if (start) TexOutput(_T("{\\f1\\'AB}"));
- break;
- case ltLEFTRIGHTARROW2:
- if (start) TexOutput(_T("{\\f1\\'DB}"));
- break;
- case ltUPARROW:
- if (start) TexOutput(_T("{\\f1\\'AD}"));
- break;
- case ltUPARROW2:
- if (start) TexOutput(_T("{\\f1\\'DD}"));
- break;
- case ltDOWNARROW:
- if (start) TexOutput(_T("{\\f1\\'AF}"));
- break;
- case ltDOWNARROW2:
- if (start) TexOutput(_T("{\\f1\\'DF}"));
- break;
-
- // Miscellaneous symbols
- case ltALEPH:
- if (start) TexOutput(_T("{\\f1\\'CO}"));
- break;
- case ltWP:
- if (start) TexOutput(_T("{\\f1\\'C3}"));
- break;
- case ltRE:
- if (start) TexOutput(_T("{\\f1\\'C2}"));
- break;
- case ltIM:
- if (start) TexOutput(_T("{\\f1\\'C1}"));
- break;
- case ltEMPTYSET:
- if (start) TexOutput(_T("{\\f1\\'C6}"));
- break;
- case ltNABLA:
- if (start) TexOutput(_T("{\\f1\\'D1}"));
- break;
- case ltSURD:
- if (start) TexOutput(_T("{\\f1\\'D6}"));
- break;
- case ltPARTIAL:
- if (start) TexOutput(_T("{\\f1\\'B6}"));
- break;
- case ltBOT:
- if (start) TexOutput(_T("{\\f1\\'5E}"));
- break;
- case ltFORALL:
- if (start) TexOutput(_T("{\\f1\\'22}"));
- break;
- case ltEXISTS:
- if (start) TexOutput(_T("{\\f1\\'24}"));
- break;
- case ltNEG:
- if (start) TexOutput(_T("{\\f1\\'D8}"));
- break;
- case ltSHARP:
- if (start) TexOutput(_T("{\\f1\\'23}"));
- break;
- case ltANGLE:
- if (start) TexOutput(_T("{\\f1\\'D0}"));
- break;
- case ltTRIANGLE:
- if (start) TexOutput(_T("{\\f5\\'73}"));
- break;
- case ltCLUBSUIT:
- if (start) TexOutput(_T("{\\f5\\'A8}"));
- break;
- case ltDIAMONDSUIT:
- if (start) TexOutput(_T("{\\f5\\'A9}"));
- break;
- case ltHEARTSUIT:
- if (start) TexOutput(_T("{\\f5\\'AA}"));
- break;
- case ltSPADESUIT:
- if (start) TexOutput(_T("{\\f5\\'AB}"));
- break;
- case ltINFTY:
- if (start) TexOutput(_T("{\\f1\\'A5}"));
- break;
- case ltCOPYRIGHT:
- if (start) TexOutput(_T("{\\f0\\'A9}"));
- break;
- case ltREGISTERED:
- if (start) TexOutput(_T("{\\f0\\'AE}"));
- break;
- case ltPM:
- if (start) TexOutput(_T("{\\f1\\'B1}"));
- break;
- case ltMP:
- if (start) TexOutput(_T("{\\f1\\'B1}"));
- break;
- case ltTIMES:
- if (start) TexOutput(_T("{\\f1\\'B4}"));
- break;
- case ltDIV:
- if (start) TexOutput(_T("{\\f1\\'B8}"));
- break;
- case ltCDOT:
- if (start) TexOutput(_T("{\\f1\\'D7}"));
- break;
- case ltAST:
- if (start) TexOutput(_T("{\\f1\\'2A}"));
- break;
- case ltSTAR:
- if (start) TexOutput(_T("{\\f5\\'AB}"));
- break;
- case ltCAP:
- if (start) TexOutput(_T("{\\f1\\'C7}"));
- break;
- case ltCUP:
- if (start) TexOutput(_T("{\\f1\\'C8}"));
- break;
- case ltVEE:
- if (start) TexOutput(_T("{\\f1\\'DA}"));
- break;
- case ltWEDGE:
- if (start) TexOutput(_T("{\\f1\\'D9}"));
- break;
- case ltCIRC:
- if (start) TexOutput(_T("{\\f1\\'B0}"));
- break;
- case ltBULLET:
- if (start) TexOutput(_T("{\\f1\\'B7}"));
- break;
- case ltDIAMOND:
- if (start) TexOutput(_T("{\\f1\\'E0}"));
- break;
- case ltBOX:
- if (start) TexOutput(_T("{\\f1\\'C6}"));
- break;
- case ltDIAMOND2:
- if (start) TexOutput(_T("{\\f1\\'E0}"));
- break;
- case ltBIGTRIANGLEDOWN:
- if (start) TexOutput(_T("{\\f1\\'D1}"));
- break;
- case ltOPLUS:
- if (start) TexOutput(_T("{\\f1\\'C5}"));
- break;
- case ltOTIMES:
- if (start) TexOutput(_T("{\\f1\\'C4}"));
- break;
- case ltSS:
- if (start) TexOutput(_T("{\\'DF}"));
- break;
- case ltFIGURE:
- {
- if (start) inFigure = true;
- else inFigure = false;
- break;
- }
- case ltTABLE:
- {
- if (start) inTable = true;
- else inTable = false;
- break;
- }
- default:
- {
- DefaultOnMacro(macroId, no_args, start);
- break;
- }
- }
-}
-
-// Called on start/end of argument examination
-bool RTFOnArgument(int macroId, int arg_no, bool start)
-{
- wxChar buf[300];
- switch (macroId)
- {
- case ltCHAPTER:
- case ltCHAPTERSTAR:
- case ltCHAPTERHEADING:
- case ltSECTION:
- case ltSECTIONSTAR:
- case ltSECTIONHEADING:
- case ltSUBSECTION:
- case ltSUBSECTIONSTAR:
- case ltSUBSUBSECTION:
- case ltSUBSUBSECTIONSTAR:
- case ltGLOSS:
- case ltMEMBERSECTION:
- case ltFUNCTIONSECTION:
- case ltCAPTION:
- case ltCAPTIONSTAR:
- {
- if (!start && (arg_no == 1))
- currentSection = GetArgChunk();
- return false;
- }
- case ltFUNC:
- {
- if (start && (arg_no == 1))
- TexOutput(_T("\\pard\\li600\\fi-600{\\b "));
-
- if (!start && (arg_no == 1))
- TexOutput(_T("} "));
-
- if (start && (arg_no == 2))
- {
- if (!suppressNameDecoration) TexOutput(_T("{\\b "));
- currentMember = GetArgChunk();
- }
- if (!start && (arg_no == 2))
- {
- if (!suppressNameDecoration) TexOutput(_T("}"));
- }
-
- if (start && (arg_no == 3))
- TexOutput(_T("("));
- if (!start && (arg_no == 3))
- {
-// TexOutput(_T(")\\li0\\fi0"));
-// TexOutput(_T(")\\par\\pard\\li0\\fi0"));
-// issuedNewParagraph = 1;
- TexOutput(_T(")"));
- WriteEnvironmentStyles();
- }
- break;
- }
- case ltCLIPSFUNC:
- {
- if (start && (arg_no == 1))
- TexOutput(_T("\\pard\\li260\\fi-260{\\b "));
- if (!start && (arg_no == 1))
- TexOutput(_T("} "));
-
- if (start && (arg_no == 2))
- {
- if (!suppressNameDecoration) TexOutput(_T("({\\b "));
- currentMember = GetArgChunk();
- }
- if (!start && (arg_no == 2))
- {
- if (!suppressNameDecoration) TexOutput(_T("}"));
- }
-
- if (!start && (arg_no == 3))
- {
- TexOutput(_T(")\\li0\\fi0"));
- WriteEnvironmentStyles();
- }
- break;
- }
- case ltPFUNC:
- {
- if (start && (arg_no == 1))
- TexOutput(_T("\\pard\\li260\\fi-260"));
-
- if (!start && (arg_no == 1))
- TexOutput(_T(" "));
-
- if (start && (arg_no == 2))
- TexOutput(_T("(*"));
- if (!start && (arg_no == 2))
- TexOutput(_T(")"));
-
- if (start && (arg_no == 2))
- currentMember = GetArgChunk();
-
- if (start && (arg_no == 3))
- TexOutput(_T("("));
- if (!start && (arg_no == 3))
- {
- TexOutput(_T(")\\li0\\fi0"));
- WriteEnvironmentStyles();
- }
- break;
- }
- case ltPARAM:
- {
- if (start && (arg_no == 1))
- TexOutput(_T("{\\b "));
- if (!start && (arg_no == 1))
- TexOutput(_T("}"));
- if (start && (arg_no == 2))
- {
- TexOutput(_T("{\\i "));
- }
- if (!start && (arg_no == 2))
- {
- TexOutput(_T("}"));
- }
- break;
- }
- case ltCPARAM:
- {
- if (start && (arg_no == 1))
- TexOutput(_T("{\\b "));
- if (!start && (arg_no == 1))
- TexOutput(_T("} ")); // This is the difference from param - one space!
- if (start && (arg_no == 2))
- {
- TexOutput(_T("{\\i "));
- }
- if (!start && (arg_no == 2))
- {
- TexOutput(_T("}"));
- }
- break;
- }
- case ltMEMBER:
- {
- if (!start && (arg_no == 1))
- TexOutput(_T(" "));
-
- if (start && (arg_no == 2))
- currentMember = GetArgChunk();
- break;
- }
- case ltREF:
- {
- if (start)
- {
- wxChar *sec = NULL;
-
- wxChar *refName = GetArgData();
- if (winHelp || !useWord)
- {
- if (refName)
- {
- TexRef *texRef = FindReference(refName);
- if (texRef)
- {
- sec = texRef->sectionNumber;
- }
- }
- if (sec)
- {
- TexOutput(sec);
- }
- }
- else
- {
- wxFprintf(Chapters, _T("{\\field{\\*\\fldinst REF %s \\\\* MERGEFORMAT }{\\fldrslt ??}}"),
- refName);
- }
- return false;
- }
- break;
- }
- case ltHELPREF:
- case ltHELPREFN:
- {
- if (winHelp)
- {
- if ((GetNoArgs() - arg_no) == 1)
- {
- if (start)
- TexOutput(_T("{\\uldb "));
- else
- TexOutput(_T("}"));
- }
- if ((GetNoArgs() - arg_no) == 0) // Arg = 2, or 3 if first is optional
- {
- if (start)
- {
- TexOutput(_T("{\\v "));
-
- // Remove green colour/underlining if specified
- if (!hotSpotUnderline && !hotSpotColour)
- TexOutput(_T("%"));
- else if (!hotSpotColour)
- TexOutput(_T("*"));
- }
- else TexOutput(_T("}"));
- }
- }
- else // If a linear document, must resolve the references ourselves
- {
- if ((GetNoArgs() - arg_no) == 1)
- {
- // In a linear document we display the anchor text in italic plus
- // the page number.
- if (start)
- TexOutput(_T("{\\i "));
- else
- TexOutput(_T("}"));
-
- if (start)
- helpRefText = GetArgChunk();
-
- return true;
- }
- else if ((GetNoArgs() - arg_no) == 0) // Arg = 2, or 3 if first is optional
- {
- if (macroId != ltHELPREFN)
- {
- wxChar *refName = GetArgData();
- TexRef *texRef = NULL;
- if (refName)
- texRef = FindReference(refName);
- if (start)
- {
- if (texRef || !ignoreBadRefs)
- TexOutput(_T(" ("));
- if (refName)
- {
- if (texRef || !ignoreBadRefs)
- {
- if (useWord)
- {
- TexOutput(_T("p. "));
- TexOutput(_T("{\\field{\\*\\fldinst PAGEREF "));
- TexOutput(refName);
- TexOutput(_T(" \\\\* MERGEFORMAT }{\\fldrslt ??}}"));
- }
- else
- {
- // Only print section name if we're not in Word mode,
- // so can't do page references
- if (texRef)
- {
- TexOutput(texRef->sectionName);
- TexOutput(_T(" "));
- TexOutput(texRef->sectionNumber);
- }
- else
- {
- if (!ignoreBadRefs)
- TexOutput(_T("??"));
- wxSnprintf(buf, sizeof(buf), _T("Warning: unresolved reference '%s'"), refName);
- OnInform(buf);
- }
- }
- }
- }
- else TexOutput(_T("??"));
- }
- else
- {
- if (texRef || !ignoreBadRefs)
- TexOutput(_T(")"));
- }
- }
- return false;
- }
- }
- break;
- }
- case ltURLREF:
- {
- if (arg_no == 1)
- {
- return true;
- }
- else if (arg_no == 2)
- {
- if (start)
- {
- inVerbatim = true;
- TexOutput(_T(" ({\\f3 "));
- }
- else
- {
- TexOutput(_T("})"));
- inVerbatim = false;
- }
- return true;
- }
- break;
- }
- case ltPOPREF:
- {
- if (winHelp)
- {
- if ((GetNoArgs() - arg_no) == 1)
- {
- if (start)
- TexOutput(_T("{\\ul "));
- else
- TexOutput(_T("}"));
- }
- if ((GetNoArgs() - arg_no) == 0) // Arg = 2, or 3 if first is optional
- {
- if (start)
- {
- TexOutput(_T("{\\v "));
-
- // Remove green colour/underlining if specified
- if (!hotSpotUnderline && !hotSpotColour)
- TexOutput(_T("%"));
- else if (!hotSpotColour)
- TexOutput(_T("*"));
- }
- else TexOutput(_T("}"));
- }
- }
- else // A linear document...
- {
- if ((GetNoArgs() - arg_no) == 1)
- {
- // In a linear document we just display the anchor text in italic
- if (start)
- TexOutput(_T("{\\i "));
- else
- TexOutput(_T("}"));
- return true;
- }
- else return false;
- }
- break;
- }
- case ltADDCONTENTSLINE:
- {
- if (start && !winHelp)
- {
- if (arg_no == 2)
- contentsLineSection = copystring(GetArgData());
- else if (arg_no == 3)
- contentsLineValue = copystring(GetArgData());
- return false;
- }
- else return false;
- }
- case ltIMAGE:
- case ltIMAGEL:
- case ltIMAGER:
- case ltIMAGEMAP:
- case ltPSBOXTO:
- {
- if (arg_no == 3)
- return false;
-
- static int imageWidth = 0;
- static int imageHeight = 0;
-
- if (start && (arg_no == 1))
- {
- wxChar *imageDimensions = copystring(GetArgData());
-
- // imageWidth - Convert points to TWIPS (1 twip = 1/20th of point)
- wxStringTokenizer tok(imageDimensions, _T(";:"), wxTOKEN_STRTOK);
- if(tok.HasMoreTokens())
- {
- wxString token = tok.GetNextToken();
- imageWidth = (int)(20*ParseUnitArgument(token));
- }
- else
- {
- imageWidth = 0;
- }
-
- // imageHeight - Convert points to TWIPS (1 twip = 1/20th of point)
- if(tok.HasMoreTokens())
- {
- wxString token = tok.GetNextToken();
- imageHeight = (int)(20*ParseUnitArgument(token));
- }
- else
- {
- imageHeight = 0;
- }
-
- if (imageDimensions) // glt
- delete [] imageDimensions;
- return false;
- }
- else if (start && (arg_no == 2 ))
- {
- wxChar *filename = copystring(GetArgData());
- wxString f = _T("");
- if ((winHelp || (wxStrcmp(bitmapMethod, _T("includepicture")) == 0) || (wxStrcmp(bitmapMethod, _T("import")) == 0)) && useWord)
- {
- if (f == _T("")) // Try for a .shg (segmented hypergraphics file)
- {
- wxStrcpy(buf, filename);
- StripExtension(buf);
- wxStrcat(buf, _T(".shg"));
- f = TexPathList.FindValidPath(buf);
- }
- if (f == _T("")) // Try for a .bmp
- {
- wxStrcpy(buf, filename);
- StripExtension(buf);
- wxStrcat(buf, _T(".bmp"));
- f = TexPathList.FindValidPath(buf);
- }
- if (f == _T("")) // Try for a metafile instead
- {
- wxStrcpy(buf, filename);
- StripExtension(buf);
- wxStrcat(buf, _T(".wmf"));
- f = TexPathList.FindValidPath(buf);
- }
- if (f != _T(""))
- {
- if (winHelp)
- {
- if (bitmapTransparency && (winHelpVersion > 3))
- TexOutput(_T("\\{bmct "));
- else
- TexOutput(_T("\\{bmc "));
- wxString str = wxFileNameFromPath(f);
- TexOutput((wxChar*) (const wxChar*) str);
- TexOutput(_T("\\}"));
- }
- else
- {
- // Microsoft Word method
- if (wxStrcmp(bitmapMethod, _T("import")) == 0)
- TexOutput(_T("{\\field{\\*\\fldinst IMPORT "));
- else
- TexOutput(_T("{\\field{\\*\\fldinst INCLUDEPICTURE "));
-
- // Full path appears not to be valid!
- wxString str = wxFileNameFromPath(f);
- TexOutput((wxChar*)(const wxChar*) str);
-/*
- int len = wxStrlen(f);
- wxChar smallBuf[2]; smallBuf[1] = 0;
- for (int i = 0; i < len; i++)
- {
- smallBuf[0] = f[i];
- TexOutput(smallBuf);
- if (smallBuf[0] == '\\')
- TexOutput(smallBuf);
- }
-*/
- TexOutput(_T("}{\\fldrslt PRESS F9 TO FORMAT PICTURE}}"));
- }
- }
- else
- {
- TexOutput(_T("[No BMP or WMF for image file "));
- TexOutput(filename);
- TexOutput(_T("]"));
- wxSnprintf(buf, sizeof(buf), _T("Warning: could not find a BMP or WMF equivalent for %s."), filename);
- OnInform(buf);
- }
- if (filename) // glt
- delete [] filename;
- }
- else // linear RTF
- {
- if (f == _T("")) // Try for a .bmp
- {
- wxStrcpy(buf, filename);
- StripExtension(buf);
- wxStrcat(buf, _T(".bmp"));
- f = TexPathList.FindValidPath(buf);
- }
- if (f != _T(""))
- {
- FILE *fd = wxFopen(f, _T("rb"));
- if (OutputBitmapHeader(fd, winHelp))
- OutputBitmapData(fd);
- else
- {
- wxSnprintf(buf, sizeof(buf), _T("Could not read bitmap %s.\nMay be in wrong format (needs RGB-encoded Windows BMP)."), f.c_str());
- OnError(buf);
- }
- fclose(fd);
- }
- else // Try for a metafile instead
- {
-#ifdef __WXMSW__
- wxStrcpy(buf, filename);
- StripExtension(buf);
- wxStrcat(buf, _T(".wmf"));
- f = TexPathList.FindValidPath(buf);
- if (f != _T(""))
- {
- // HFILE handle = _lopen(f, READ);
- FILE *fd = wxFopen(f, _T("rb"));
- if (OutputMetafileHeader(fd, winHelp, imageWidth, imageHeight))
- {
- OutputMetafileData(fd);
- }
- else
- {
- wxSnprintf(buf, sizeof(buf), _T("Could not read metafile %s. Perhaps it's not a placeable metafile?"), f.c_str());
- OnError(buf);
- }
- fclose(fd);
- }
- else
- {
-#endif
- TexOutput(_T("[No BMP or WMF for image file "));
- TexOutput(filename);
- TexOutput(_T("]"));
- wxSnprintf(buf, sizeof(buf), _T("Warning: could not find a BMP or WMF equivalent for %s."), filename);
- OnInform(buf);
-#ifdef __WXMSW__
- }
-#endif
- }
- }
- return false;
- }
- else
- return false;
- }
- case ltTABULAR:
- case ltSUPERTABULAR:
- {
- if (arg_no == 1)
- {
- if (start)
- {
- currentRowNumber = 0;
- inTabular = true;
- startRows = true;
- tableVerticalLineLeft = false;
- tableVerticalLineRight = false;
- int currentWidth = 0;
-
- wxChar *alignString = copystring(GetArgData());
- ParseTableArgument(alignString);
-
-// TexOutput(_T("\\trowd\\trgaph108\\trleft-108"));
- TexOutput(_T("\\trowd\\trgaph108"));
-
- // Write the first row formatting for compatibility
- // with standard Latex
- if (compatibilityMode)
- {
- for (int i = 0; i < noColumns; i++)
- {
- currentWidth += TableData[i].width;
- wxSnprintf(buf, sizeof(buf), _T("\\cellx%d"), currentWidth);
- TexOutput(buf);
- }
- TexOutput(_T("\\pard\\intbl\n"));
- }
- delete[] alignString;
-
- return false;
- }
- }
- else if (arg_no == 2 && !start)
- {
- TexOutput(_T("\\pard\n"));
- WriteEnvironmentStyles();
- inTabular = false;
- }
- break;
- }
-
- case ltQUOTE:
- case ltVERSE:
- {
- if (start)
- {
- TexOutput(_T("\\li360\n"));
- forbidParindent ++;
- PushEnvironmentStyle(_T("\\li360\\sa200"));
- }
- else
- {
- forbidParindent --;
- PopEnvironmentStyle();
- OnMacro(ltPAR, 0, true);
- OnMacro(ltPAR, 0, false);
- }
- break;
- }
- case ltQUOTATION:
- {
- if (start)
- {
- TexOutput(_T("\\li360\n"));
- PushEnvironmentStyle(_T("\\li360\\sa200"));
- }
- else
- {
- PopEnvironmentStyle();
- OnMacro(ltPAR, 0, true);
- OnMacro(ltPAR, 0, false);
- }
- break;
- }
- case ltBOXIT:
- case ltFRAMEBOX:
- case ltFBOX:
- case ltNORMALBOX:
- case ltNORMALBOXD:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("\\sa200\\box\\trgaph108%s\n"), ((macroId == ltNORMALBOXD) ? _T("\\brdrdb") : _T("\\brdrs")));
- TexOutput(buf);
- PushEnvironmentStyle(buf);
- }
- else
- {
- PopEnvironmentStyle();
- OnMacro(ltPAR, 0, true);
- OnMacro(ltPAR, 0, false);
- }
- break;
- }
- case ltHELPFONTSIZE:
- {
- if (start)
- {
- wxChar *data = GetArgData();
- if (wxStrcmp(data, _T("10")) == 0)
- SetFontSizes(10);
- else if (wxStrcmp(data, _T("11")) == 0)
- SetFontSizes(11);
- else if (wxStrcmp(data, _T("12")) == 0)
- SetFontSizes(12);
- wxSnprintf(buf, sizeof(buf), _T("\\fs%d\n"), normalFont*2);
- TexOutput(buf);
- TexOutput(buf);
- return false;
- }
- break;
- }
- case ltHELPFONTFAMILY:
- {
- if (start)
- {
- wxChar *data = GetArgData();
- if (wxStrcmp(data, _T("Swiss")) == 0)
- TexOutput(_T("\\f2\n"));
- else if (wxStrcmp(data, _T("Symbol")) == 0)
- TexOutput(_T("\\f1\n"));
- else if (wxStrcmp(data, _T("Times")) == 0)
- TexOutput(_T("\\f0\n"));
-
- return false;
- }
- break;
- }
- case ltPARINDENT:
- {
- if (start && arg_no == 1)
- {
- wxChar *data = GetArgData();
- ParIndent = ParseUnitArgument(data);
- if (ParIndent == 0 || forbidParindent == 0)
- {
- wxSnprintf(buf, sizeof(buf), _T("\\fi%d\n"), ParIndent*20);
- TexOutput(buf);
- }
- return false;
- }
- break;
- }
- case ltITEM:
- {
- if (start && IsArgOptional())
- {
- descriptionItemArg = GetArgChunk();
- return false;
- }
- break;
- }
- case ltTWOCOLITEM:
- case ltTWOCOLITEMRULED:
- {
- switch (arg_no)
- {
- case 1:
- {
- if (!start)
- TexOutput(_T("\\tab "));
- break;
- }
- case 2:
- {
- if (!start)
- {
- if (macroId == ltTWOCOLITEMRULED)
- TexOutput(_T("\\brdrb\\brdrs\\brdrw15\\brsp20 "));
- TexOutput(_T("\\par\\pard\n"));
- issuedNewParagraph = 1;
- WriteEnvironmentStyles();
- }
- break;
- }
- }
- return true;
- }
- /*
- * Accents
- *
- */
- case ltACCENT_GRAVE:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case 'a':
- TexOutput(_T("\\'e0"));
- break;
- case 'e':
- TexOutput(_T("\\'e8"));
- break;
- case 'i':
- TexOutput(_T("\\'ec"));
- break;
- case 'o':
- TexOutput(_T("\\'f2"));
- break;
- case 'u':
- TexOutput(_T("\\'f9"));
- break;
- case 'A':
- TexOutput(_T("\\'c0"));
- break;
- case 'E':
- TexOutput(_T("\\'c8"));
- break;
- case 'I':
- TexOutput(_T("\\'cc"));
- break;
- case 'O':
- TexOutput(_T("\\'d2"));
- break;
- case 'U':
- TexOutput(_T("\\'d9"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_ACUTE:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case 'a':
- TexOutput(_T("\\'e1"));
- break;
- case 'e':
- TexOutput(_T("\\'e9"));
- break;
- case 'i':
- TexOutput(_T("\\'ed"));
- break;
- case 'o':
- TexOutput(_T("\\'f3"));
- break;
- case 'u':
- TexOutput(_T("\\'fa"));
- break;
- case 'y':
- TexOutput(_T("\\'fd"));
- break;
- case 'A':
- TexOutput(_T("\\'c1"));
- break;
- case 'E':
- TexOutput(_T("\\'c9"));
- break;
- case 'I':
- TexOutput(_T("\\'cd"));
- break;
- case 'O':
- TexOutput(_T("\\'d3"));
- break;
- case 'U':
- TexOutput(_T("\\'da"));
- break;
- case 'Y':
- TexOutput(_T("\\'dd"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_CARET:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case 'a':
- TexOutput(_T("\\'e2"));
- break;
- case 'e':
- TexOutput(_T("\\'ea"));
- break;
- case 'i':
- TexOutput(_T("\\'ee"));
- break;
- case 'o':
- TexOutput(_T("\\'f4"));
- break;
- case 'u':
- TexOutput(_T("\\'fb"));
- break;
- case 'A':
- TexOutput(_T("\\'c2"));
- break;
- case 'E':
- TexOutput(_T("\\'ca"));
- break;
- case 'I':
- TexOutput(_T("\\'ce"));
- break;
- case 'O':
- TexOutput(_T("\\'d4"));
- break;
- case 'U':
- TexOutput(_T("\\'db"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_TILDE:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case 'a':
- TexOutput(_T("\\'e3"));
- break;
- case ' ':
- TexOutput(_T("~"));
- break;
- case 'n':
- TexOutput(_T("\\'f1"));
- break;
- case 'o':
- TexOutput(_T("\\'f5"));
- break;
- case 'A':
- TexOutput(_T("\\'c3"));
- break;
- case 'N':
- TexOutput(_T("\\'d1"));
- break;
- case 'O':
- TexOutput(_T("\\'d5"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_UMLAUT:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case 'a':
- TexOutput(_T("\\'e4"));
- break;
- case 'e':
- TexOutput(_T("\\'eb"));
- break;
- case 'i':
- TexOutput(_T("\\'ef"));
- break;
- case 'o':
- TexOutput(_T("\\'f6"));
- break;
- case 'u':
- TexOutput(_T("\\'fc"));
- break;
- case 's':
- TexOutput(_T("\\'df"));
- break;
- case 'y':
- TexOutput(_T("\\'ff"));
- break;
- case 'A':
- TexOutput(_T("\\'c4"));
- break;
- case 'E':
- TexOutput(_T("\\'cb"));
- break;
- case 'I':
- TexOutput(_T("\\'cf"));
- break;
- case 'O':
- TexOutput(_T("\\'d6"));
- break;
- case 'U':
- TexOutput(_T("\\'dc"));
- break;
- case 'Y':
- TexOutput(_T("\\'df"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_DOT:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case 'a':
- TexOutput(_T("\\'e5"));
- break;
- case 'A':
- TexOutput(_T("\\'c5"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_CADILLA:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case 'c':
- TexOutput(_T("\\'e7"));
- break;
- case 'C':
- TexOutput(_T("\\'c7"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltFOOTNOTE:
- {
- static wxChar *helpTopic = NULL;
- static FILE *savedOutput = NULL;
- if (winHelp)
- {
- if (arg_no == 1)
- {
- if (start)
- {
- OnInform(_T("Consider using \\footnotepopup instead of \\footnote."));
- footnoteCount ++;
- wxChar footBuf[20];
- wxSnprintf(footBuf, sizeof(footBuf), _T("(%d)"), footnoteCount);
-
- TexOutput(_T(" {\\ul "));
- TexOutput(footBuf);
- TexOutput(_T("}"));
- helpTopic = FindTopicName(NULL);
- TexOutput(_T("{\\v "));
-
- // Remove green colour/underlining if specified
- if (!hotSpotUnderline && !hotSpotColour)
- TexOutput(_T("%"));
- else if (!hotSpotColour)
- TexOutput(_T("*"));
-
- TexOutput(helpTopic);
- TexOutput(_T("}"));
-
- wxFprintf(Popups, _T("\\page\n"));
-// wxFprintf(Popups, _T("\n${\\footnote }")); // No title
- wxFprintf(Popups, _T("\n#{\\footnote %s}\n"), helpTopic);
- wxFprintf(Popups, _T("+{\\footnote %s}\n"), GetBrowseString());
- savedOutput = CurrentOutput1;
- SetCurrentOutput(Popups);
- }
- else
- {
- SetCurrentOutput(savedOutput);
- }
- return true;
- }
- return true;
- }
- else
- {
- if (start)
- {
- TexOutput(_T(" {\\super \\chftn{\\footnote \\fs20 {\\super \\chftn}"), true);
- }
- else
- {
- TexOutput(_T("}}"), true);
- }
- return true;
- }
- }
- case ltFOOTNOTEPOPUP:
- {
- static wxChar *helpTopic = NULL;
- static FILE *savedOutput = NULL;
- if (winHelp)
- {
- if (arg_no == 1)
- {
- if (start)
- {
- TexOutput(_T("{\\ul "));
- }
- else
- {
- TexOutput(_T("}"));
- }
- return true;
- }
- else if (arg_no == 2)
- {
- if (start)
- {
- helpTopic = FindTopicName(NULL);
- TexOutput(_T("{\\v "));
-
- // Remove green colour/underlining if specified
- if (!hotSpotUnderline && !hotSpotColour)
- TexOutput(_T("%"));
- else if (!hotSpotColour)
- TexOutput(_T("*"));
-
- TexOutput(helpTopic);
- TexOutput(_T("}"));
-
- wxFprintf(Popups, _T("\\page\n"));
-// wxFprintf(Popups, _T("\n${\\footnote }")); // No title
- wxFprintf(Popups, _T("\n#{\\footnote %s}\n"), helpTopic);
- wxFprintf(Popups, _T("+{\\footnote %s}\n"), GetBrowseString());
- savedOutput = CurrentOutput1;
- SetCurrentOutput(Popups);
- }
- else
- {
- SetCurrentOutput(savedOutput);
- }
- return true;
- }
- }
- else
- {
- if (arg_no == 1)
- return true;
- if (start)
- {
- TexOutput(_T(" {\\super \\chftn{\\footnote \\fs20 {\\super \\chftn}"), true);
- }
- else
- {
- TexOutput(_T("}}"), true);
- }
- return true;
- }
- break;
- }
- case ltFANCYPLAIN:
- {
- if (start && (arg_no == 1))
- return false;
- else
- return true;
- }
- case ltSETHEADER:
- {
- if (start)
- forbidResetPar ++;
- else
- forbidResetPar --;
-
- if (winHelp) return false;
- if (start)
- {
- switch (arg_no)
- {
- case 1:
- LeftHeaderEven = GetArgChunk();
- if (wxStrlen(GetArgData(LeftHeaderEven)) == 0)
- LeftHeaderEven = NULL;
- break;
- case 2:
- CentreHeaderEven = GetArgChunk();
- if (wxStrlen(GetArgData(CentreHeaderEven)) == 0)
- CentreHeaderEven = NULL;
- break;
- case 3:
- RightHeaderEven = GetArgChunk();
- if (wxStrlen(GetArgData(RightHeaderEven)) == 0)
- RightHeaderEven = NULL;
- break;
- case 4:
- LeftHeaderOdd = GetArgChunk();
- if (wxStrlen(GetArgData(LeftHeaderOdd)) == 0)
- LeftHeaderOdd = NULL;
- break;
- case 5:
- CentreHeaderOdd = GetArgChunk();
- if (wxStrlen(GetArgData(CentreHeaderOdd)) == 0)
- CentreHeaderOdd = NULL;
- break;
- case 6:
- RightHeaderOdd = GetArgChunk();
- if (wxStrlen(GetArgData(RightHeaderOdd)) == 0)
- RightHeaderOdd = NULL;
- OutputRTFHeaderCommands();
- break;
- default:
- break;
- }
- }
- return false;
- }
- case ltSETFOOTER:
- {
- if (start)
- forbidResetPar ++;
- else
- forbidResetPar --;
-
- if (winHelp) return false;
- if (start)
- {
- switch (arg_no)
- {
- case 1:
- LeftFooterEven = GetArgChunk();
- if (wxStrlen(GetArgData(LeftFooterEven)) == 0)
- LeftFooterEven = NULL;
- break;
- case 2:
- CentreFooterEven = GetArgChunk();
- if (wxStrlen(GetArgData(CentreFooterEven)) == 0)
- CentreFooterEven = NULL;
- break;
- case 3:
- RightFooterEven = GetArgChunk();
- if (wxStrlen(GetArgData(RightFooterEven)) == 0)
- RightFooterEven = NULL;
- break;
- case 4:
- LeftFooterOdd = GetArgChunk();
- if (wxStrlen(GetArgData(LeftFooterOdd)) == 0)
- LeftFooterOdd = NULL;
- break;
- case 5:
- CentreFooterOdd = GetArgChunk();
- if (wxStrlen(GetArgData(CentreFooterOdd)) == 0)
- CentreFooterOdd = NULL;
- break;
- case 6:
- RightFooterOdd = GetArgChunk();
- if (wxStrlen(GetArgData(RightFooterOdd)) == 0)
- RightFooterOdd = NULL;
- OutputRTFFooterCommands();
- break;
- default:
- break;
- }
- }
- return false;
- }
- case ltMARKRIGHT:
- {
- if (winHelp) return false;
- // Fake a SetHeader command
- if (start)
- {
- LeftHeaderOdd = NULL;
- CentreHeaderOdd = NULL;
- RightHeaderOdd = NULL;
- LeftHeaderEven = NULL;
- CentreHeaderEven = NULL;
- RightHeaderEven = NULL;
- OnInform(_T("Consider using setheader/setfooter rather than markright."));
- }
- RTFOnArgument(ltSETHEADER, 4, start);
- if (!start)
- OutputRTFHeaderCommands();
- return false;
- }
- case ltMARKBOTH:
- {
- if (winHelp) return false;
- // Fake a SetHeader command
- switch (arg_no)
- {
- case 1:
- {
- if (start)
- {
- LeftHeaderOdd = NULL;
- CentreHeaderOdd = NULL;
- RightHeaderOdd = NULL;
- LeftHeaderEven = NULL;
- CentreHeaderEven = NULL;
- RightHeaderEven = NULL;
- OnInform(_T("Consider using setheader/setfooter rather than markboth."));
- }
- return RTFOnArgument(ltSETHEADER, 1, start);
- }
- case 2:
- {
- RTFOnArgument(ltSETHEADER, 4, start);
- if (!start)
- OutputRTFHeaderCommands();
- return false;
- }
- }
- break;
- }
- case ltPAGENUMBERING:
- {
- if (start)
- forbidResetPar ++;
- else
- forbidResetPar --;
-
- if (winHelp) return false;
- if (start)
- {
- TexOutput(_T("\\pgnrestart"));
- wxChar *data = GetArgData();
- if (currentNumberStyle) delete[] currentNumberStyle;
- currentNumberStyle = copystring(data);
- OutputNumberStyle(currentNumberStyle);
-
- TexOutput(_T("\n"));
- }
- return false;
- }
- case ltTWOCOLUMN:
- {
- if (winHelp) return false;
- if (start)
- return true;
- break;
- }
- case ltITEMSEP:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- currentItemSep = ParseUnitArgument(val);
- return false;
- }
- break;
- }
- case ltEVENSIDEMARGIN:
- {
- return false;
- }
- case ltODDSIDEMARGIN:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- int twips = (int)(20*ParseUnitArgument(val));
- // Add an inch since in LaTeX it's specified minus an inch
- twips += 1440;
- CurrentLeftMarginOdd = twips;
- wxSnprintf(buf, sizeof(buf), _T("\\margl%d\n"), twips);
- TexOutput(buf);
-
- CurrentMarginParX = CurrentLeftMarginOdd + CurrentTextWidth + CurrentMarginParSep;
- }
- return false;
- }
- case ltMARGINPARWIDTH:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- int twips = (int)(20*ParseUnitArgument(val));
- CurrentMarginParWidth = twips;
- }
- return false;
- }
- case ltMARGINPARSEP:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- int twips = (int)(20*ParseUnitArgument(val));
- CurrentMarginParSep = twips;
- CurrentMarginParX = CurrentLeftMarginOdd + CurrentTextWidth + CurrentMarginParSep;
- }
- return false;
- }
- case ltTEXTWIDTH:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- int twips = (int)(20*ParseUnitArgument(val));
- CurrentTextWidth = twips;
-
- // Need to set an implicit right margin
- CurrentRightMarginOdd = PageWidth - CurrentTextWidth - CurrentLeftMarginOdd;
- CurrentRightMarginEven = PageWidth - CurrentTextWidth - CurrentLeftMarginEven;
- CurrentMarginParX = CurrentLeftMarginOdd + CurrentTextWidth + CurrentMarginParSep;
- wxSnprintf(buf, sizeof(buf), _T("\\margr%d\n"), CurrentRightMarginOdd);
- TexOutput(buf);
- }
- return false;
- }
- case ltMARGINPAR:
- case ltMARGINPARODD:
- {
- if (start)
- {
- if (winHelp)
- {
- TexOutput(_T("\\sa200\\box\n"));
- PushEnvironmentStyle(_T("\\sa200\\box"));
- }
- else
- {
- wxSnprintf(buf, sizeof(buf), _T("\\phpg\\posx%d\\absw%d\n"), CurrentMarginParX, CurrentMarginParWidth);
- TexOutput(buf);
- }
- return true;
- }
- else
- {
- if (winHelp)
- {
- TexOutput(_T("\\par\\pard\n"));
- PopEnvironmentStyle();
- WriteEnvironmentStyles();
- }
- else
- TexOutput(_T("\\par\\pard\n"));
- issuedNewParagraph = 1;
- }
- return false;
- }
- case ltMARGINPAREVEN:
- {
- if (start)
- {
- if (winHelp)
- {
- TexOutput(_T("\\sa200\\box\n"));
- PushEnvironmentStyle(_T("\\sa200\\box"));
- }
- else
- {
- if (mirrorMargins)
- {
- // Have to calculate what the margins are changed to in WfW margin
- // mirror mode, on an even (left-hand) page.
- int x = PageWidth - CurrentRightMarginOdd - CurrentMarginParWidth - CurrentMarginParSep
- - CurrentTextWidth + GutterWidth;
- wxSnprintf(buf, sizeof(buf), _T("\\phpg\\posx%d\\absw%d\n"), x, CurrentMarginParWidth);
- TexOutput(buf);
- }
- else
- {
- wxSnprintf(buf, sizeof(buf), _T("\\phpg\\posx%d\\absw%d\n"), CurrentMarginParX, CurrentMarginParWidth);
- TexOutput(buf);
- }
- }
- return true;
- }
- else
- {
- if (winHelp)
- {
- TexOutput(_T("\\par\\pard\n"));
- PopEnvironmentStyle();
- WriteEnvironmentStyles();
- }
- else
- issuedNewParagraph = 1;
- TexOutput(_T("\\par\\pard\n"));
- }
- return false;
- }
- case ltTWOCOLWIDTHA:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- int twips = (int)(20*ParseUnitArgument(val));
- TwoColWidthA = twips;
- }
- return false;
- }
- case ltTWOCOLWIDTHB:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- int twips = (int)(20*ParseUnitArgument(val));
- TwoColWidthB = twips;
- }
- return false;
- }
- case ltROW:
- case ltRULEDROW:
- {
- if (start)
- {
- int currentWidth = 0;
-
- if (!compatibilityMode || (currentRowNumber > 0))
- {
- TexOutput(_T("\\pard\\intbl"));
-
- if (macroId == ltRULEDROW)
- ruleBottom = 1;
- for (int i = 0; i < noColumns; i++)
- {
- currentWidth += TableData[i].width;
- if (ruleTop == 1)
- {
- TexOutput(_T("\\clbrdrt\\brdrs\\brdrw15"));
- }
- else if (ruleTop > 1)
- {
- TexOutput(_T("\\clbrdrt\\brdrdb\\brdrw15"));
- }
- if (ruleBottom == 1)
- {
- TexOutput(_T("\\clbrdrb\\brdrs\\brdrw15"));
- }
- else if (ruleBottom > 1)
- {
- TexOutput(_T("\\clbrdrb\\brdrdb\\brdrw15"));
- }
-
- if (TableData[i].rightBorder)
- TexOutput(_T("\\clbrdrr\\brdrs\\brdrw15"));
-
- if (TableData[i].leftBorder)
- TexOutput(_T("\\clbrdrl\\brdrs\\brdrw15"));
-
- wxSnprintf(buf, sizeof(buf), _T("\\cellx%d"), currentWidth);
- TexOutput(buf);
- }
- TexOutput(_T("\\pard\\intbl\n"));
- }
- ruleTop = 0;
- ruleBottom = 0;
- currentRowNumber ++;
- return true;
- }
- else
- {
-// TexOutput(_T("\\cell\\row\\trowd\\trgaph108\\trleft-108\n"));
- TexOutput(_T("\\cell\\row\\trowd\\trgaph108\n"));
- }
- break;
- }
- case ltMULTICOLUMN:
- {
- static int noMultiColumns = 0;
- if (start)
- {
- switch (arg_no)
- {
- case 1:
- {
- noMultiColumns = wxAtoi(GetArgData());
- return false;
- }
- case 2:
- {
- return false;
- }
- case 3:
- {
- return true;
- }
- }
- }
- else
- {
- if (arg_no == 3)
- {
- for (int i = 1; i < noMultiColumns; i ++)
- TexOutput(_T("\\cell"));
- }
- }
- break;
- }
- case ltINDENTED:
- {
- if (start && (arg_no == 1))
- {
-// indentLevel ++;
-// TexOutput(_T("\\fi0\n"));
- int oldIndent = 0;
- wxNode *node = itemizeStack.GetFirst();
- if (node)
- oldIndent = ((ItemizeStruc *)node->GetData())->indentation;
-
- int indentValue = 20*ParseUnitArgument(GetArgData());
- int indentSize = indentValue + oldIndent;
-
- ItemizeStruc *struc = new ItemizeStruc(LATEX_INDENT, indentSize);
- itemizeStack.Insert(struc);
-
- wxSnprintf(buf, sizeof(buf), _T("\\tx%d\\li%d\\sa200 "), indentSize, indentSize);
- PushEnvironmentStyle(buf);
- TexOutput(buf);
- return false;
- }
- if (!start && (arg_no == 2))
- {
- PopEnvironmentStyle();
- if (itemizeStack.GetFirst())
- {
- ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.GetFirst()->GetData();
- delete struc;
- delete itemizeStack.GetFirst();
- }
- if (itemizeStack.GetCount() == 0)
- {
- TexOutput(_T("\\par\\pard\n"));
- issuedNewParagraph = 1;
- WriteEnvironmentStyles();
- }
- }
- return true;
- }
-/*
- case ltSIZEDBOX:
- case ltSIZEDBOXD:
- {
- if (start && (arg_no == 1))
- {
- int oldIndent = 0;
- wxNode *node = itemizeStack.GetFirst();
- if (node)
- oldIndent = ((ItemizeStruc *)node->GetData())->indentation;
-
- int boxWidth = 20*ParseUnitArgument(GetArgData());
-
- int indentValue = (int)((CurrentTextWidth - oldIndent - boxWidth)/2.0);
- int indentSize = indentValue + oldIndent;
- int indentSizeRight = indentSize + boxWidth;
-
- ItemizeStruc *struc = new ItemizeStruc(LATEX_INDENT, indentSize);
- itemizeStack.Insert(struc);
-
- wxSnprintf(buf, sizeof(buf), _T("\\tx%d\\li%d\\lr%d\\sa200\\box%s "), indentSize, indentSize, indentSizeRight,
- ((macroId == ltCENTEREDBOX) ? _T("\\brdrs") : _T("\\brdrdb")));
- PushEnvironmentStyle(buf);
- TexOutput(buf);
- return false;
- }
- if (!start && (arg_no == 2))
- {
- PopEnvironmentStyle();
- if (itemizeStack.GetFirst())
- {
- ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.GetFirst()->GetData();
- delete struc;
- delete itemizeStack.GetFirst();
- }
- if (itemizeStack.Number() == 0)
- {
- TexOutput(_T("\\par\\pard\n"));
- issuedNewParagraph = 1;
- WriteEnvironmentStyles();
- }
- }
- return true;
- break;
- }
-*/
- case ltDOCUMENTSTYLE:
- {
- DefaultOnArgument(macroId, arg_no, start);
- if (!start && !IsArgOptional())
- {
- if (MinorDocumentStyleString)
- {
- if (StringMatch(_T("twoside"), MinorDocumentStyleString))
- // Mirror margins, switch on odd/even headers & footers, and break sections at odd pages
- TexOutput(_T("\\margmirror\\facingp\\sbkodd"));
- if (StringMatch(_T("twocolumn"), MinorDocumentStyleString))
- TexOutput(_T("\\cols2"));
- }
- TexOutput(_T("\n"));
- }
- return false;
- }
- case ltSETHOTSPOTCOLOUR:
- case ltSETHOTSPOTCOLOR:
- {
- if (!start)
- {
- wxChar *text = GetArgData();
- if (wxStrcmp(text, _T("yes")) == 0 || wxStrcmp(text, _T("on")) == 0 || wxStrcmp(text, _T("ok")) == 0)
- hotSpotColour = true;
- else
- hotSpotColour = false;
- }
- return false;
- }
- case ltSETTRANSPARENCY:
- {
- if (!start)
- {
- wxChar *text = GetArgData();
- if (wxStrcmp(text, _T("yes")) == 0 || wxStrcmp(text, _T("on")) == 0 || wxStrcmp(text, _T("ok")) == 0)
- bitmapTransparency = true;
- else
- bitmapTransparency = false;
- }
- return false;
- }
- case ltSETHOTSPOTUNDERLINE:
- {
- if (!start)
- {
- wxChar *text = GetArgData();
- if (wxStrcmp(text, _T("yes")) == 0 || wxStrcmp(text, _T("on")) == 0 || wxStrcmp(text, _T("ok")) == 0)
- hotSpotUnderline = true;
- else
- hotSpotUnderline = false;
- }
- return false;
- }
- case ltBIBITEM:
- {
- if (arg_no == 1 && start)
- {
- wxChar *citeKey = GetArgData();
- TexRef *ref = (TexRef *)TexReferences.Get(citeKey);
- if (ref)
- {
- if (ref->sectionNumber) delete[] ref->sectionNumber;
- wxSnprintf(buf, sizeof(buf), _T("[%d]"), citeCount);
- ref->sectionNumber = copystring(buf);
- }
-
- TexOutput(_T("\\li260\\fi-260 ")); // Indent from 2nd line
- wxSnprintf(buf, sizeof(buf), _T("{\\b [%d]} "), citeCount);
- TexOutput(buf);
- citeCount ++;
- return false;
- }
- if (arg_no == 2 && !start)
- TexOutput(_T("\\par\\pard\\par\n\n"));
- return true;
- }
- case ltTHEBIBLIOGRAPHY:
- {
- if (start && (arg_no == 1))
- {
- citeCount = 1;
- if (winHelp)
- SetCurrentOutputs(Contents, Chapters);
-
- if (!winHelp)
- {
- wxFprintf(Chapters, _T("\\sect\\pgncont\\titlepg\n"));
-
- // If a non-custom page style, we generate the header now.
- if (PageStyle && (wxStrcmp(PageStyle, _T("plain")) == 0 ||
- wxStrcmp(PageStyle, _T("empty")) == 0 ||
- wxStrcmp(PageStyle, _T("headings")) == 0))
- {
- OutputRTFHeaderCommands();
- OutputRTFFooterCommands();
- }
-
- // Need to reset the current numbering style, or RTF forgets it.
- OutputNumberStyle(currentNumberStyle);
- SetCurrentOutput(Contents);
- }
- else
- wxFprintf(Chapters, _T("\\page\n"));
-
- if (winHelp)
- wxFprintf(Contents, _T("\n{\\uldb %s}"), ReferencesNameString);
- else
- wxFprintf(Contents, _T("\\par\n\\pard{\\b %s}"), ReferencesNameString);
-
- startedSections = true;
-
- if (winHelp)
- wxFprintf(Chapters, _T("\n${\\footnote %s}"), ReferencesNameString);
-
- wxChar *topicName = _T("bibliography");
-
- if (winHelp)
- {
- wxFprintf(Contents, _T("{\\v %s}\\par\\pard\n"), topicName);
- WriteEnvironmentStyles();
- }
- else
- wxFprintf(Contents, _T("\\par\\par\\pard\n"));
-
- if (winHelp)
- {
- wxFprintf(Chapters, _T("\n#{\\footnote %s}\n"), topicName);
- wxFprintf(Chapters, _T("+{\\footnote %s}\n"), GetBrowseString());
- wxFprintf(Chapters, _T("K{\\footnote {K} %s}\n"), ReferencesNameString);
- GenerateKeywordsForTopic(topicName);
- if (useUpButton)
- {
- wxFprintf(Chapters, _T("!{\\footnote EnableButton(\"Up\");ChangeButtonBinding(\"Up\", \"JumpId(`%s.hlp', `%s')\")}\n"),
- wxFileNameFromPath(FileRoot), "Contents");
- }
- }
-
- SetCurrentOutput(Chapters);
- wxChar *styleCommand = _T("");
- if (!winHelp && useHeadingStyles)
- styleCommand = _T("\\s1");
- wxFprintf(Chapters, _T("\\pard{%s"), (winHelp ? _T("\\keepn\\sa140\\sb140") : styleCommand));
- WriteHeadingStyle(Chapters, 1); wxFprintf(Chapters, _T(" References\\par\\pard}\n"));
-
- return false;
- }
- return true;
- }
- case ltINDEX:
- {
- /*
- * In Windows help, all keywords should be at the start of the
- * topic, but Latex \index commands can be anywhere in the text.
- * So we're going to have to build up lists of keywords for a topic,
- * and insert them on the second pass.
- *
- * In linear RTF, we can embed the index entry now.
- *
- */
- if (start)
- {
-// wxChar *entry = GetArgData();
- wxChar buf[300];
- OutputChunkToString(GetArgChunk(), buf);
- if (winHelp)
- {
- if (CurrentTopic)
- {
- AddKeyWordForTopic(CurrentTopic, buf);
- }
- }
- else GenerateIndexEntry(buf);
- }
- return false;
- }
- case ltFCOL:
- case ltBCOL:
- {
- if (start)
- {
- switch (arg_no)
- {
- case 1:
- {
- wxChar *name = GetArgData();
- int pos = FindColourPosition(name);
- if (pos > -1)
- {
- wxSnprintf(buf, sizeof(buf), _T("{%s%d "), ((macroId == ltFCOL) ? _T("\\cf") : _T("\\cb")), pos);
- TexOutput(buf);
- }
- else
- {
- wxSnprintf(buf, sizeof(buf), _T("Could not find colour name %s"), name);
- OnError(buf);
- }
- break;
- }
- case 2:
- {
- return true;
- }
- default:
- break;
- }
- }
- else
- {
- if (arg_no == 2) TexOutput(_T("}"));
- }
- return false;
- }
- case ltLABEL:
- {
- if (start && !winHelp && useWord)
- {
- wxChar *s = GetArgData();
- // Only insert a bookmark here if it's not just been inserted
- // in a section heading.
- if ( !CurrentTopic || !(wxStrcmp(CurrentTopic, s) == 0) )
-/*
- if ( (!CurrentChapterName || !(CurrentChapterName && (wxStrcmp(CurrentChapterName, s) == 0))) &&
- (!CurrentSectionName || !(CurrentSectionName && (wxStrcmp(CurrentSectionName, s) == 0))) &&
- (!CurrentSubsectionName || !(CurrentSubsectionName && (wxStrcmp(CurrentSubsectionName, s) == 0)))
- )
-*/
- {
- wxFprintf(Chapters, _T("{\\bkmkstart %s}{\\bkmkend %s}"), s,s);
- }
- }
- return false;
- }
- case ltPAGEREF:
- {
- if (start && useWord && !winHelp)
- {
- wxChar *s = GetArgData();
- wxFprintf(Chapters, _T("{\\field{\\*\\fldinst PAGEREF %s \\\\* MERGEFORMAT }{\\fldrslt ??}}"),
- s);
- }
- return false;
- }
- case ltPOPREFONLY:
- {
- if (start)
- inPopRefSection = true;
- else
- inPopRefSection = false;
- break;
- }
- case ltINSERTATLEVEL:
- {
- // This macro allows you to insert text at a different level
- // from the current level, e.g. into the Sections from within a subsubsection.
- if (!winHelp & useWord)
- return false;
- static int currentLevelNo = 1;
- static FILE* oldLevelFile = Chapters;
- if (start)
- {
- switch (arg_no)
- {
- case 1:
- {
- oldLevelFile = CurrentOutput1;
-
- wxChar *str = GetArgData();
- currentLevelNo = wxAtoi(str);
- FILE* outputFile;
- // TODO: cope with article style (no chapters)
- switch (currentLevelNo)
- {
- case 1:
- {
- outputFile = Chapters;
- break;
- }
- case 2:
- {
- outputFile = Sections;
- break;
- }
- case 3:
- {
- outputFile = Subsections;
- break;
- }
- case 4:
- {
- outputFile = Subsubsections;
- break;
- }
- default:
- {
- outputFile = NULL;
- break;
- }
- }
- if (outputFile)
- CurrentOutput1 = outputFile;
- return false;
- }
- case 2:
- {
- return true;
- }
- default:
- break;
- }
- return true;
- }
- else
- {
- if (arg_no == 2)
- {
- CurrentOutput1 = oldLevelFile;
- }
- return true;
- }
- }
- default:
- return DefaultOnArgument(macroId, arg_no, start);
- }
- return true;
-}
-
-bool RTFGo(void)
-{
- if (stopRunning)
- return false;
-
- // Reset variables
- indentLevel = 0;
- forbidParindent = 0;
- contentsLineSection = NULL;
- contentsLineValue = NULL;
- descriptionItemArg = NULL;
- inTabular = false;
- inTable = false;
- inFigure = false;
- startRows = false;
- tableVerticalLineLeft = false;
- tableVerticalLineRight = false;
- noColumns = 0;
- startedSections = false;
- inVerbatim = false;
- browseId = 0;
-
- if (!InputFile.empty() && !OutputFile.empty())
- {
- // Do some RTF-specific transformations on all the strings,
- // recursively
- Text2RTF(GetTopLevelChunk());
-
- Contents = wxFopen(TmpContentsName, _T("w"));
- Chapters = wxFopen(_T("chapters.rtf"), _T("w"));
- if (winHelp)
- {
- Sections = wxFopen(_T("sections.rtf"), _T("w"));
- Subsections = wxFopen(_T("subsections.rtf"), _T("w"));
- Subsubsections = wxFopen(_T("subsubsections.rtf"), _T("w"));
- Popups = wxFopen(_T("popups.rtf"), _T("w"));
- if (winHelpContents)
- {
- WinHelpContentsFile = wxFopen(WinHelpContentsFileName, _T("w"));
- if (WinHelpContentsFile)
- wxFprintf(WinHelpContentsFile, _T(":Base %s.hlp\n"), wxFileNameFromPath(FileRoot));
- }
-
- if (!Sections || !Subsections || !Subsubsections || !Popups || (winHelpContents && !WinHelpContentsFile))
- {
- OnError(_T("Ouch! Could not open temporary file(s) for writing."));
- return false;
- }
- }
- if (!Contents || !Chapters)
- {
- OnError(_T("Ouch! Could not open temporary file(s) for writing."));
- return false;
- }
-
- if (winHelp)
- {
- wxFprintf(Chapters, _T("\n#{\\footnote Contents}\n"));
- wxFprintf(Chapters, _T("${\\footnote Contents}\n"));
- wxFprintf(Chapters, _T("+{\\footnote %s}\n"), GetBrowseString());
- wxFprintf(Chapters, _T("K{\\footnote {K} %s}\n"), ContentsNameString);
- wxFprintf(Chapters, _T("!{\\footnote DisableButton(\"Up\")}\n"));
- }
- if (!winHelp)
- {
- wxFprintf(Chapters, _T("\\titlepg\n"));
- wxFprintf(Contents, _T("\\par\\pard\\pgnrestart\\sect\\titlepg"));
- }
-
- // In WinHelp, Contents title takes font of title.
- // In linear RTF, same as chapter headings.
- wxFprintf(Contents, _T("{\\b\\fs%d %s}\\par\\par\\pard\n\n"),
- (winHelp ? titleFont : chapterFont)*2, ContentsNameString);
-
- // By default, Swiss, 11 point.
- wxFprintf(Chapters, _T("\\f2\\fs22\n"));
-
- PushEnvironmentStyle(_T("\\f2\\fs22\\sa200"));
-
- SetCurrentOutput(Chapters);
-
- if (stopRunning)
- return false;
-
- OnInform(_T("Converting..."));
-
- TraverseDocument();
-
- FILE *Header = wxFopen(_T("header.rtf"), _T("w"));
- if (!Header)
- {
- OnError(_T("Ouch! Could not open temporary file header.rtf for writing."));
- return false;
- }
- WriteRTFHeader(Header);
- fclose(Header);
-
- PopEnvironmentStyle();
-
- Tex2RTFYield(true);
- if (winHelp)
- {
-// wxFprintf(Contents, _T("\\page\n"));
- wxFprintf(Chapters, _T("\\page\n"));
- wxFprintf(Sections, _T("\\page\n"));
- wxFprintf(Subsections, _T("\\page\n"));
- wxFprintf(Subsubsections, _T("\\page\n\n"));
- wxFprintf(Popups, _T("\\page\n}\n"));
- }
-
-// TexOutput(_T("\n\\info{\\doccomm Document created by Julian Smart's Tex2RTF.}\n"));
- if (!winHelp)
- TexOutput(_T("}\n"));
- fclose(Contents); Contents = NULL;
- fclose(Chapters); Chapters = NULL;
- if (winHelp)
- {
- fclose(Sections); Sections = NULL;
- fclose(Subsections); Subsections = NULL;
- fclose(Subsubsections); Subsubsections = NULL;
- fclose(Popups); Popups = NULL;
- if (winHelpContents)
- {
- fclose(WinHelpContentsFile); WinHelpContentsFile = NULL;
- }
- }
-
- if (winHelp)
- {
- wxConcatFiles(_T("header.rtf"), _T("chapters.rtf"), _T("tmp1.rtf"));
- Tex2RTFYield(true);
- wxConcatFiles(_T("tmp1.rtf"), _T("sections.rtf"), _T("tmp2.rtf"));
- Tex2RTFYield(true);
- wxConcatFiles(_T("tmp2.rtf"), _T("subsections.rtf"), _T("tmp3.rtf"));
- Tex2RTFYield(true);
- wxConcatFiles(_T("tmp3.rtf"), _T("subsubsections.rtf"), _T("tmp4.rtf"));
- Tex2RTFYield(true);
- wxConcatFiles(_T("tmp4.rtf"), _T("popups.rtf"), OutputFile);
- Tex2RTFYield(true);
-
- wxRemoveFile(_T("tmp1.rtf"));
- wxRemoveFile(_T("tmp2.rtf"));
- wxRemoveFile(_T("tmp3.rtf"));
- wxRemoveFile(_T("tmp4.rtf"));
- }
- else
- {
- wxConcatFiles(_T("header.rtf"), _T("chapters.rtf"), _T("tmp1.rtf"));
- Tex2RTFYield(true);
- if (wxFileExists(OutputFile))
- wxRemoveFile(OutputFile);
-
- wxString cwdStr = wxGetCwd();
-
- wxString outputDirStr = wxPathOnly(OutputFile);
-
- // Determine if the temp file and the output file are in the same directory,
- // and if they are, then just rename the temp file rather than copying
- // it, as this is much faster when working with large (multi-megabyte files)
- if ((outputDirStr.empty()) || // no path specified on output file
- (cwdStr != outputDirStr)) // paths do not match
- {
- wxRenameFile(_T("tmp1.rtf"), OutputFile);
- }
- else
- {
- wxCopyFile(_T("tmp1.rtf"), OutputFile);
- }
- Tex2RTFYield(true);
- wxRemoveFile(_T("tmp1.rtf"));
- }
-
- if (wxFileExists(ContentsName)) wxRemoveFile(ContentsName);
-
- if (!wxRenameFile(TmpContentsName, ContentsName))
- {
- wxCopyFile(TmpContentsName, ContentsName);
- wxRemoveFile(TmpContentsName);
- }
-
- wxRemoveFile(_T("chapters.rtf"));
- wxRemoveFile(_T("header.rtf"));
-
- if (winHelp)
- {
- wxRemoveFile(_T("sections.rtf"));
- wxRemoveFile(_T("subsections.rtf"));
- wxRemoveFile(_T("subsubsections.rtf"));
- wxRemoveFile(_T("popups.rtf"));
- }
- if (winHelp && generateHPJ)
- WriteHPJ(OutputFile);
- return true;
- }
- return false;
-}
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: rtfutils.h
-// Purpose: RTF-specific code
-// Author: Julian Smart
-// Modified by:
-// Created: 7.9.93
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
- /*
- * Write a suitable RTF header.
- *
- */
-
-void WriteRTFHeader(FILE *fd);
-
-/*
- * Given a TexChunk with a string value, scans through the string
- * converting Latex-isms into RTF-isms, such as 2 newlines -> \par,
- * and inserting spaces at the start of lines since in Latex, a newline
- * implies a space, but not in RTF.
- *
- */
-
-void ProcessText2RTF(TexChunk *chunk);
-
-/*
- * Scan through all chunks starting from the given one,
- * calling ProcessText2RTF to convert Latex-isms to RTF-isms.
- * This should be called after Tex2Any has parsed the file,
- * and before TraverseDocument is called.
- *
- */
-
-void Text2RTF(TexChunk *chunk);
-
-
-/*
- * Keeping track of environments to restore the styles after \pard.
- * Push strings like "\qc" onto stack.
- *
- */
-
-void PushEnvironmentStyle(wxChar *style);
-
-void PopEnvironmentStyle(void);
-
-// Write out the styles, most recent first.
-void WriteEnvironmentStyles(void);
-
-// Called on start/end of macro examination
-void DefaultRtfOnMacro(wxChar *name, int no_args, bool start);
-
-// Called on start/end of argument examination
-bool DefaultRtfOnArgument(wxChar *macro_name, int arg_no, bool start);
-
-// Reset memory of which levels have 'books' (for WinHelp 4 contents file)
-void ResetContentsLevels(int level);
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: symbols.h
-// Purpose: Tex2RTF symbols file
-// Author: Julian Smart
-// Modified by:
-// Created: 2002-03-26
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _TEX2RTF_SYMBOLS_H_
-#define _TEX2RTF_SYMBOLS_H_
-
-//// Build settings
-
-// ScriptTracks version
-#define TEX2RTF_VERSION_NUMBER wxVERSION_FLOAT
-
-#endif
- // _TEX2RTF_SYMBOLS_H_
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: table.cpp
-// Purpose: Utilities for manipulating tables
-// Author: Julian Smart
-// Modified by: Wlodzimiez ABX Skiba 2003/2004 Unicode support
-// Ron Lee
-// Created: 01/01/99
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#endif
-
-#include "wx/hash.h"
-
-#ifdef new
-#undef new
-#endif
-
-#include "wx/beforestd.h"
-#if wxUSE_IOSTREAMH
-#include <iostream.h>
-#include <fstream.h>
-#else
-#include <iostream>
-#include <fstream>
-#endif
-#include "wx/afterstd.h"
-
-#include <ctype.h>
-#include "tex2any.h"
-#include "table.h"
-
-ColumnData TableData[40];
-bool inTabular = false;
-
-bool startRows = false;
-bool tableVerticalLineLeft = false;
-bool tableVerticalLineRight = false;
-int noColumns = 0; // Current number of columns in table
-int ruleTop = 0;
-int ruleBottom = 0;
-int currentRowNumber = 0;
-
-/*
- * Parse table argument
- *
- */
-
-bool ParseTableArgument(wxChar *value)
-{
- noColumns = 0;
- int i = 0;
- int len = wxStrlen(value);
- bool isBorder = false;
- while (i < len)
- {
- int ch = value[i];
- if (ch == '|')
- {
- i ++;
- isBorder = true;
- }
- else if (ch == 'l')
- {
- TableData[noColumns].leftBorder = isBorder;
- TableData[noColumns].rightBorder = false;
- TableData[noColumns].justification = 'l';
- TableData[noColumns].width = 2000; // Estimate
- TableData[noColumns].absWidth = false;
-// TableData[noColumns].spacing = ??
- noColumns ++;
- i ++;
- isBorder = false;
- }
- else if (ch == 'c')
- {
- TableData[noColumns].leftBorder = isBorder;
- TableData[noColumns].rightBorder = false;
- TableData[noColumns].justification = 'c';
- TableData[noColumns].width = defaultTableColumnWidth; // Estimate
- TableData[noColumns].absWidth = false;
-// TableData[noColumns].spacing = ??
- noColumns ++;
- i ++;
- isBorder = false;
- }
- else if (ch == 'r')
- {
- TableData[noColumns].leftBorder = isBorder;
- TableData[noColumns].rightBorder = false;
- TableData[noColumns].justification = 'r';
- TableData[noColumns].width = 2000; // Estimate
- TableData[noColumns].absWidth = false;
-// TableData[noColumns].spacing = ??
- noColumns ++;
- i ++;
- isBorder = false;
- }
- else if (ch == 'p')
- {
- i ++;
- int j = 0;
- wxChar numberBuf[50];
- ch = value[i];
- if (ch == '{')
- {
- i++;
- ch = value[i];
- }
-
- while ((i < len) && (isdigit(ch) || ch == '.'))
- {
- numberBuf[j] = (wxChar)ch;
- j ++;
- i ++;
- ch = value[i];
- }
- // Assume we have 2 characters for units
- numberBuf[j] = value[i];
- j ++; i++;
- numberBuf[j] = value[i];
- j ++; i++;
- numberBuf[j] = 0;
- if (value[i] == '}') i++;
-
- TableData[noColumns].leftBorder = isBorder;
- TableData[noColumns].rightBorder = false;
- TableData[noColumns].justification = 'l';
- TableData[noColumns].width = 20*ParseUnitArgument(numberBuf);
- TableData[noColumns].absWidth = true;
-// TableData[noColumns].spacing = ??
- noColumns ++;
- isBorder = false;
- }
- else
- {
- wxChar *buf = new wxChar[wxStrlen(value) + 80];
- wxSnprintf(buf, wxStrlen(value) + 80, _T("Tabular first argument \"%s\" too complex!"), value);
- OnError(buf);
- delete[] buf;
- return false;
- }
- }
- if (isBorder)
- TableData[noColumns-1].rightBorder = true;
- return true;
-}
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: table.h
-// Purpose: Table utilities
-// Author: Julian Smart
-// Modified by:
-// Created: 7.9.93
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-/*
- * Table dimensions
- *
- */
-
-struct ColumnData
-{
- char justification; // l, r, c
- int width; // -1 or a width in twips
- int spacing; // Space between columns in twips
- bool leftBorder;
- bool rightBorder;
- bool absWidth; // If false (the default), don't use an absolute width if you can help it.
-};
-
-extern ColumnData TableData[];
-extern bool inTabular;
-extern bool startRows;
-extern bool tableVerticalLineLeft;
-extern bool tableVerticalLineRight;
-extern int noColumns; // Current number of columns in table
-extern int ruleTop;
-extern int ruleBottom;
-extern int currentRowNumber;
-extern bool ParseTableArgument(wxChar *value);
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: tex2any.cpp
-// Purpose: Utilities for Latex conversion.
-// Author: Julian Smart
-// Modified by: Wlodzimierz ABX Skiba 2003/2004 Unicode support
-// Ron Lee
-// Created: 01/01/99
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#endif
-
-#include <ctype.h>
-#include "tex2any.h"
-#include <stdlib.h>
-#include <time.h>
-
-static inline wxChar* copystring(const wxChar* s)
- { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
-
-/*
- * Variables accessible from clients
- *
- */
-
-TexChunk * DocumentTitle = NULL;
-TexChunk * DocumentAuthor = NULL;
-TexChunk * DocumentDate = NULL;
-
-// Header/footers/pagestyle
-TexChunk * LeftHeaderEven = NULL;
-TexChunk * LeftFooterEven = NULL;
-TexChunk * CentreHeaderEven = NULL;
-TexChunk * CentreFooterEven = NULL;
-TexChunk * RightHeaderEven = NULL;
-TexChunk * RightFooterEven = NULL;
-TexChunk * LeftHeaderOdd = NULL;
-TexChunk * LeftFooterOdd = NULL;
-TexChunk * CentreHeaderOdd = NULL;
-TexChunk * CentreFooterOdd = NULL;
-TexChunk * RightHeaderOdd = NULL;
-TexChunk * RightFooterOdd = NULL;
-wxChar * PageStyle = copystring(_T("plain"));
-
-int DocumentStyle = LATEX_REPORT;
-int MinorDocumentStyle = 0;
-wxPathList TexPathList;
-wxChar * BibliographyStyleString = copystring(_T("plain"));
-wxChar * DocumentStyleString = copystring(_T("report"));
-wxChar * MinorDocumentStyleString = NULL;
-int ParSkip = 0;
-int ParIndent = 0;
-
-int normalFont = 10;
-int smallFont = 8;
-int tinyFont = 6;
-int largeFont1 = 12;
-int LargeFont2 = 14;
-int LARGEFont3 = 18;
-int hugeFont1 = 20;
-int HugeFont2 = 24;
-int HUGEFont3 = 28;
-
-// All of these tokens MUST be found on a line by themselves (no other
-// text) and must start at the first character of the line, or tex2rtf
-// will fail to process them correctly (a limitation of tex2rtf, not TeX)
-static const wxString syntaxTokens[] =
-{ _T("\\begin{verbatim}"),
- _T("\\begin{toocomplex}"),
- _T("\\end{verbatim}"),
- _T("\\end{toocomplex}"),
- _T("\\verb"),
- _T("\\begin{comment}"),
- _T("\\end{comment}"),
- _T("\\verbatiminput"),
-// _T("\\par"),
- _T("\\input"),
- _T("\\helpinput"),
- _T("\\include"),
- wxEmptyString
-};
-
-
-/*
- * USER-ADJUSTABLE SETTINGS
- *
- */
-
-// Section font sizes
-int chapterFont = 12; // LARGEFont3;
-int sectionFont = 12; // LargeFont2;
-int subsectionFont = 12; // largeFont1;
-int titleFont = LARGEFont3;
-int authorFont = LargeFont2;
-int mirrorMargins = true;
-bool winHelp = false; // Output in Windows Help format if true, linear otherwise
-bool isInteractive = false;
-bool runTwice = false;
-int convertMode = TEX_RTF;
-bool checkCurlyBraces = false;
-bool checkSyntax = false;
-bool headerRule = false;
-bool footerRule = false;
-bool compatibilityMode = false; // If true, maximum Latex compatibility
- // (Quality of RTF generation deteriorate)
-bool generateHPJ; // Generate WinHelp Help Project file
-wxChar *winHelpTitle = NULL; // Windows Help title
-int defaultTableColumnWidth = 2000;
-
-int labelIndentTab = 18; // From left indent to item label (points)
-int itemIndentTab = 40; // From left indent to item (points)
-
-bool useUpButton = true;
-int htmlBrowseButtons = HTML_BUTTONS_TEXT;
-
-bool truncateFilenames = false; // Truncate for DOS
-int winHelpVersion = 3; // WinHelp Version (3 for Windows 3.1, 4 for Win95)
-bool winHelpContents = false; // Generate .cnt file for WinHelp 4
-bool htmlIndex = false; // Generate .htx file for HTML
-bool htmlFrameContents = false; // Use frames for HTML contents page
-wxChar *htmlStylesheet = NULL; // Use this CSS stylesheet for HTML pages
-bool useHeadingStyles = true; // Insert \s1, s2 etc.
-bool useWord = true; // Insert proper Word table of contents, etc etc
-int contentsDepth = 4; // Depth of Word table of contents
-bool indexSubsections = true; // Index subsections in linear RTF
-// Linear RTF method of including bitmaps. Can be "includepicture", "hex"
-wxChar *bitmapMethod = copystring(_T("includepicture"));
-bool upperCaseNames = false;
-// HTML background and text colours
-wxChar *backgroundImageString = NULL;
-wxChar *backgroundColourString = copystring(_T("255;255;255"));
-wxChar *textColourString = NULL;
-wxChar *linkColourString = NULL;
-wxChar *followedLinkColourString = NULL;
-bool combineSubSections = false;
-bool htmlWorkshopFiles = false;
-bool ignoreBadRefs = false;
-wxChar *htmlFaceName = NULL;
-
-extern int passNumber;
-
-extern wxHashTable TexReferences;
-
-/*
- * International support
- */
-
-// Names to help with internationalisation
-wxChar *ContentsNameString = copystring(_T("Contents"));
-wxChar *AbstractNameString = copystring(_T("Abstract"));
-wxChar *GlossaryNameString = copystring(_T("Glossary"));
-wxChar *ReferencesNameString = copystring(_T("References"));
-wxChar *FiguresNameString = copystring(_T("List of Figures"));
-wxChar *TablesNameString = copystring(_T("List of Tables"));
-wxChar *FigureNameString = copystring(_T("Figure"));
-wxChar *TableNameString = copystring(_T("Table"));
-wxChar *IndexNameString = copystring(_T("Index"));
-wxChar *ChapterNameString = copystring(_T("chapter"));
-wxChar *SectionNameString = copystring(_T("section"));
-wxChar *SubsectionNameString = copystring(_T("subsection"));
-wxChar *SubsubsectionNameString = copystring(_T("subsubsection"));
-wxChar *UpNameString = copystring(_T("Up"));
-
-/*
- * Section numbering
- *
- */
-
-int chapterNo = 0;
-int sectionNo = 0;
-int subsectionNo = 0;
-int subsubsectionNo = 0;
-int figureNo = 0;
-int tableNo = 0;
-
-/*
- * Other variables
- *
- */
-
-FILE *CurrentOutput1 = NULL;
-FILE *CurrentOutput2 = NULL;
-FILE *Inputs[15];
-unsigned long LineNumbers[15];
-wxChar *FileNames[15];
-int CurrentInputIndex = 0;
-
-wxChar *TexFileRoot = NULL;
-wxChar *TexBibName = NULL; // Bibliography output file name
-wxChar *TexTmpBibName = NULL; // Temporary bibliography output file name
-bool isSync = false; // If true, should not yield to other processes.
-bool stopRunning = false; // If true, should abort.
-
-static int currentColumn = 0;
-wxChar *currentArgData = NULL;
-bool haveArgData = false; // If true, we're simulating the data.
-TexChunk *currentArgument = NULL;
-TexChunk *nextChunk = NULL;
-bool isArgOptional = false;
-int noArgs = 0;
-
-TexChunk *TopLevel = NULL;
-// wxList MacroDefs(wxKEY_STRING);
-wxHashTable MacroDefs(wxKEY_STRING);
-wxStringList IgnorableInputFiles; // Ignorable \input files, e.g. psbox.tex
-wxChar *BigBuffer = NULL; // For reading in large chunks of text
-TexMacroDef *SoloBlockDef = NULL;
-TexMacroDef *VerbatimMacroDef = NULL;
-
-#define IncrementLineNumber() LineNumbers[CurrentInputIndex] ++
-
-
-TexRef::TexRef(const wxChar *label, const wxChar *file,
- const wxChar *section, const wxChar *sectionN)
-{
- refLabel = copystring(label);
- refFile = file ? copystring(file) : (wxChar*) NULL;
- sectionNumber = section ? copystring(section) : copystring(_T("??"));
- sectionName = sectionN ? copystring(sectionN) : copystring(_T("??"));
-}
-
-TexRef::~TexRef(void)
-{
- delete [] refLabel; refLabel = NULL;
- delete [] refFile; refFile = NULL;
- delete [] sectionNumber; sectionNumber = NULL;
- delete [] sectionName; sectionName = NULL;
-}
-
-
-CustomMacro::~CustomMacro()
-{
- if (macroName)
- delete [] macroName;
- if (macroBody)
- delete [] macroBody;
-}
-
-void TexOutput(const wxString& s, bool ordinaryText)
-{
- // Update current column, but only if we're guaranteed to
- // be ordinary text (not mark-up stuff)
- int i;
- if (ordinaryText)
- for (wxString::const_iterator i = s.begin(); i != s.end(); ++i)
- {
- if (*i == 13 || *i == 10)
- currentColumn = 0;
- else
- currentColumn ++;
- }
-
- if (CurrentOutput1)
- wxFprintf(CurrentOutput1, _T("%s"), s);
- if (CurrentOutput2)
- wxFprintf(CurrentOutput2, _T("%s"), s);
-}
-
-/*
- * Try to find a Latex macro, in one of the following forms:
- * (1) \begin{} ... \end{}
- * (2) \macroname{arg1}...{argn}
- * (3) {\bf arg1}
- */
-
-void ForbidWarning(TexMacroDef *def)
-{
- wxString informBuf;
- switch (def->forbidden)
- {
- case FORBID_WARN:
- {
- informBuf.Printf(_T("Warning: it is recommended that command %s is not used."), def->name);
- OnInform(informBuf);
- break;
- }
- case FORBID_ABSOLUTELY:
- {
- informBuf.Printf(_T("Error: command %s cannot be used and will lead to errors."), def->name);
- OnInform(informBuf);
- break;
- }
- default:
- break;
- }
-}
-
-TexMacroDef *MatchMacro(wxChar *buffer, int *pos, wxChar **env, bool *parseToBrace)
-{
- *parseToBrace = true;
- int i = (*pos);
- TexMacroDef *def = NULL;
- wxChar macroBuf[40];
-
- // First, try to find begin{thing}
- if (wxStrncmp(buffer+i, _T("begin{"), 6) == 0)
- {
- i += 6;
-
- int j = i;
- while ((isalpha(buffer[j]) || buffer[j] == '*') && ((j - i) < 39))
- {
- macroBuf[j-i] = buffer[j];
- j ++;
- }
- macroBuf[j-i] = 0;
- def = (TexMacroDef *)MacroDefs.Get(macroBuf);
-
- if (def)
- {
- *pos = j + 1; // BUGBUG Should this be + 1???
- *env = def->name;
- ForbidWarning(def);
- return def;
- }
- else
- {
- return NULL;
- }
- }
-
- // Failed, so try to find macro from definition list
- int j = i;
-
- // First try getting a one-character macro, but ONLY
- // if these TWO characters are not both alphabetical (could
- // be a longer macro)
- if (!(isalpha(buffer[i]) && isalpha(buffer[i+1])))
- {
- macroBuf[0] = buffer[i];
- macroBuf[1] = 0;
-
- def = (TexMacroDef *)MacroDefs.Get(macroBuf);
- if (def) j ++;
- }
-
- if (!def)
- {
- while ((isalpha(buffer[j]) || buffer[j] == '*') && ((j - i) < 39))
- {
- macroBuf[j-i] = buffer[j];
- j ++;
- }
- macroBuf[j-i] = 0;
- def = (TexMacroDef *)MacroDefs.Get(macroBuf);
- }
-
- if (def)
- {
- i = j;
-
- // We want to check whether this is a space-consuming macro
- // (e.g. {\bf word})
- // No brace, e.g. \input thing.tex instead of \input{thing};
- // or a numeric argument, such as \parindent0pt
- if ((def->no_args > 0) && ((buffer[i] == 32) || (buffer[i] == '=') || (isdigit(buffer[i]))))
- {
- if ((buffer[i] == 32) || (buffer[i] == '='))
- i ++;
-
- *parseToBrace = false;
- }
- *pos = i;
- ForbidWarning(def);
- return def;
- }
- return NULL;
-}
-
-void EatWhiteSpace(wxChar *buffer, int *pos)
-{
- int len = wxStrlen(buffer);
- int j = *pos;
- bool keepGoing = true;
- bool moreLines = true;
- while ((j < len) && keepGoing &&
- (buffer[j] == 10 || buffer[j] == 13 || buffer[j] == ' ' || buffer[j] == 9))
- {
- j ++;
- if (j >= len)
- {
- if (moreLines)
- {
- moreLines = read_a_line(buffer);
- len = wxStrlen(buffer);
- j = 0;
- }
- else
- keepGoing = false;
- }
- }
- *pos = j;
-}
-
-bool FindEndEnvironment(wxChar *buffer, int *pos, wxChar *env)
-{
- int i = (*pos);
-
- // Try to find end{thing}
- if ((wxStrncmp(buffer+i, _T("end{"), 4) == 0) &&
- (wxStrncmp(buffer+i+4, env, wxStrlen(env)) == 0))
- {
- *pos = i + 5 + wxStrlen(env);
- return true;
- }
- else return false;
-}
-
-bool readingVerbatim = false;
-bool readInVerbatim = false; // Within a verbatim, but not nec. verbatiminput
-
-// Switched this off because e.g. \verb${$ causes it to fail. There is no
-// detection of \verb yet.
-// #define CHECK_BRACES 1
-
-unsigned long leftCurly = 0;
-unsigned long rightCurly = 0;
-static wxString currentFileName = wxEmptyString;
-
-bool read_a_line(wxChar *buf)
-{
- if (CurrentInputIndex < 0)
- {
- buf[0] = 0;
- return false;
- }
-
- int ch = -2;
- unsigned long bufIndex = 0;
- buf[0] = 0;
- int lastChar;
-
- while (ch != EOF && ch != 10)
- {
- if (bufIndex >= MAX_LINE_BUFFER_SIZE)
- {
- wxString errBuf;
- errBuf.Printf(_T("Line %lu of file %s is too long. Lines can be no longer than %lu characters. Truncated."),
- LineNumbers[CurrentInputIndex], (const wxChar*) currentFileName.c_str(), MAX_LINE_BUFFER_SIZE);
- OnError(errBuf);
- return false;
- }
-
- if (((bufIndex == 14) && (wxStrncmp(buf, _T("\\end{verbatim}"), 14) == 0)) ||
- ((bufIndex == 16) && (wxStrncmp(buf, _T("\\end{toocomplex}"), 16) == 0)))
- readInVerbatim = false;
-
- lastChar = ch;
- ch = getc(Inputs[CurrentInputIndex]);
-
- if (checkCurlyBraces)
- {
- if (ch == '{' && !readInVerbatim && lastChar != _T('\\'))
- leftCurly++;
- if (ch == '}' && !readInVerbatim && lastChar != _T('\\'))
- {
- rightCurly++;
- if (rightCurly > leftCurly)
- {
- wxString errBuf;
- errBuf.Printf(_T("An extra right Curly brace ('}') was detected at line %lu inside file %s"), LineNumbers[CurrentInputIndex], (const wxChar*) currentFileName.c_str());
- OnError(errBuf);
-
- // Reduce the count of right Curly braces, so the mismatched count
- // isn't reported on every line that has a '}' after the first mismatch
- rightCurly--;
- }
- }
- }
-
- if (ch != EOF)
- {
- // Check for 2 consecutive newlines and replace with \par
- if (ch == 10 && !readInVerbatim)
- {
- int ch1 = getc(Inputs[CurrentInputIndex]);
- if ((ch1 == 10) || (ch1 == 13))
- {
- // Eliminate newline (10) following DOS linefeed
- if (ch1 == 13)
- getc(Inputs[CurrentInputIndex]);
- buf[bufIndex] = 0;
- IncrementLineNumber();
-// wxStrcat(buf, "\\par\n");
-// i += 6;
- if (bufIndex+5 >= MAX_LINE_BUFFER_SIZE)
- {
- wxString errBuf;
- errBuf.Printf(_T("Line %lu of file %s is too long. Lines can be no longer than %lu characters. Truncated."),
- LineNumbers[CurrentInputIndex], (const wxChar*) currentFileName.c_str(),MAX_LINE_BUFFER_SIZE);
- OnError(errBuf);
- return false;
- }
- wxStrcat(buf, _T("\\par"));
- bufIndex += 5;
-
- }
- else
- {
- ungetc(ch1, Inputs[CurrentInputIndex]);
- if (bufIndex >= MAX_LINE_BUFFER_SIZE)
- {
- wxString errBuf;
- errBuf.Printf(_T("Line %lu of file %s is too long. Lines can be no longer than %lu characters. Truncated."),
- LineNumbers[CurrentInputIndex], (const wxChar*) currentFileName.c_str(),MAX_LINE_BUFFER_SIZE);
- OnError(errBuf);
- return false;
- }
-
- buf[bufIndex] = (wxChar)ch;
- bufIndex ++;
- }
- }
- else
- {
-
- // Convert embedded characters to RTF equivalents
- switch(ch)
- {
- case 0xf6: // ö
- case 0xe4: // ü
- case 0xfc: // ü
- case 0xd6: // Ö
- case 0xc4: // Ä
- case 0xdc: // Ü
- if (bufIndex+5 >= MAX_LINE_BUFFER_SIZE)
- {
- wxString errBuf;
- errBuf.Printf(_T("Line %lu of file %s is too long. Lines can be no longer than %lu characters. Truncated."),
- LineNumbers[CurrentInputIndex], (const wxChar*) currentFileName.c_str(),MAX_LINE_BUFFER_SIZE);
- OnError(errBuf);
- return false;
- }
- buf[bufIndex++]='\\';
- buf[bufIndex++]='"';
- buf[bufIndex++]='{';
- switch(ch)
- {
- case 0xf6:buf[bufIndex++]='o';break; // ö
- case 0xe4:buf[bufIndex++]='a';break; // ä
- case 0xfc:buf[bufIndex++]='u';break; // ü
- case 0xd6:buf[bufIndex++]='O';break; // Ö
- case 0xc4:buf[bufIndex++]='A';break; // Ä
- case 0xdc:buf[bufIndex++]='U';break; // Ü
- }
- buf[bufIndex++]='}';
- break;
- case 0xdf: // ß
- if (bufIndex+5 >= MAX_LINE_BUFFER_SIZE)
- {
- wxString errBuf;
- errBuf.Printf(_T("Line %lu of file %s is too long. Lines can be no longer than %lu characters. Truncated."),
- LineNumbers[CurrentInputIndex], (const wxChar*) currentFileName.c_str(),MAX_LINE_BUFFER_SIZE);
- OnError(errBuf);
- return false;
- }
- buf[bufIndex++]='\\';
- buf[bufIndex++]='s';
- buf[bufIndex++]='s';
- buf[bufIndex++]='\\';
- buf[bufIndex++]='/';
- break;
- default:
- if (bufIndex >= MAX_LINE_BUFFER_SIZE)
- {
- wxString errBuf;
- errBuf.Printf(_T("Line %lu of file %s is too long. Lines can be no longer than %lu characters. Truncated."),
- LineNumbers[CurrentInputIndex], (const wxChar*) currentFileName.c_str(),MAX_LINE_BUFFER_SIZE);
- OnError(errBuf);
- return false;
- }
- // If the current character read in is a '_', we need to check
- // whether there should be a '\' before it or not
- if (ch != '_')
- {
- buf[bufIndex++] = (wxChar)ch;
- break;
- }
-
- if (checkSyntax)
- {
- if (readInVerbatim)
- {
- // There should NOT be a '\' before the '_'
- if ((bufIndex > 0 && (buf[bufIndex-1] == '\\')) && (buf[0] != '%'))
- {
-// wxString errBuf;
-// errBuf.Printf(_T("An underscore ('_') was detected at line %lu inside file %s that should NOT have a '\\' before it."),
-// LineNumbers[CurrentInputIndex], (const wxChar*) currentFileName.c_str());
-// OnError(errBuf);
- }
- }
- else
- {
- // There should be a '\' before the '_'
- if (bufIndex == 0)
- {
- wxString errBuf;
- errBuf.Printf(_T("An underscore ('_') was detected at line %lu inside file %s that may need a '\\' before it."),
- LineNumbers[CurrentInputIndex], (const wxChar*) currentFileName.c_str());
- OnError(errBuf);
- }
- else if ((buf[bufIndex-1] != '\\') && (buf[0] != '%') && // If it is a comment line, then no warnings
- (wxStrncmp(buf, _T("\\input"), 6))) // do not report filenames that have underscores in them
- {
- wxString errBuf;
- errBuf.Printf(_T("An underscore ('_') was detected at line %lu inside file %s that may need a '\\' before it."),
- LineNumbers[CurrentInputIndex], (const wxChar*) currentFileName.c_str());
- OnError(errBuf);
- }
- }
- }
- buf[bufIndex++] = (wxChar)ch;
- break;
- } // switch
- } // else
- }
- else
- {
- buf[bufIndex] = 0;
- fclose(Inputs[CurrentInputIndex]);
- Inputs[CurrentInputIndex] = NULL;
- if (CurrentInputIndex > 0)
- ch = ' '; // No real end of file
- CurrentInputIndex --;
-
- if (checkCurlyBraces)
- {
- if (leftCurly != rightCurly)
- {
- wxString errBuf;
- errBuf.Printf(_T("Curly braces do not match inside file %s\n%lu opens, %lu closes"),
- (const wxChar*) currentFileName.c_str(),leftCurly,rightCurly);
- OnError(errBuf);
- }
- leftCurly = 0;
- rightCurly = 0;
- }
-
- if (readingVerbatim)
- {
- readingVerbatim = false;
- readInVerbatim = false;
- wxStrcat(buf, _T("\\end{verbatim}\n"));
- return false;
- }
- }
- if (ch == 10)
- IncrementLineNumber();
- }
- buf[bufIndex] = 0;
-
- // Strip out comment environment
- if (wxStrncmp(buf, _T("\\begin{comment}"), 15) == 0)
- {
- while (wxStrncmp(buf, _T("\\end{comment}"), 13) != 0)
- read_a_line(buf);
- return read_a_line(buf);
- }
- // Read a verbatim input file as if it were a verbatim environment
- else if (wxStrncmp(buf, _T("\\verbatiminput"), 14) == 0)
- {
- int wordLen = 14;
- wxChar *fileName = buf + wordLen + 1;
-
- int j = bufIndex - 1;
- buf[j] = 0;
-
- // thing}\par -- eliminate the \par!
- if (wxStrncmp((buf + wxStrlen(buf)-5), _T("\\par"), 4) == 0)
- {
- j -= 5;
- buf[j] = 0;
- }
-
- if (buf[j-1] == '}')
- buf[j-1] = 0; // Ignore final brace
-
- wxString actualFile = TexPathList.FindValidPath(fileName);
- currentFileName = actualFile;
- if (actualFile.empty())
- {
- wxString errBuf;
- errBuf.Printf(_T("Could not find file: %s"),fileName);
- OnError(errBuf);
- }
- else
- {
- wxString informStr;
- informStr.Printf(_T("Processing: %s"),actualFile.c_str());
- OnInform(informStr);
- CurrentInputIndex ++;
-
- Inputs[CurrentInputIndex] = wxFopen(actualFile, _T("r"));
- LineNumbers[CurrentInputIndex] = 1;
- if (FileNames[CurrentInputIndex])
- delete[] FileNames[CurrentInputIndex];
- FileNames[CurrentInputIndex] = copystring(actualFile);
-
- if (!Inputs[CurrentInputIndex])
- {
- CurrentInputIndex --;
- OnError(_T("Could not open verbatiminput file."));
- }
- else
- {
- readingVerbatim = true;
- readInVerbatim = true;
- wxStrcpy(buf, _T("\\begin{verbatim}\n"));
- return false;
- }
- }
- return false;
- }
- else if (wxStrncmp(buf, _T("\\input"), 6) == 0 || wxStrncmp(buf, _T("\\helpinput"), 10) == 0 ||
- wxStrncmp(buf, _T("\\include"), 8) == 0)
- {
- int wordLen;
- if (wxStrncmp(buf, _T("\\input"), 6) == 0)
- wordLen = 6;
- else
- if (wxStrncmp(buf, _T("\\include"), 8) == 0)
- wordLen = 8;
- else
- wordLen = 10;
-
- wxChar *fileName = buf + wordLen + 1;
-
- int j = bufIndex - 1;
- buf[j] = 0;
-
- // \input{thing}\par -- eliminate the \par!
-// if (wxStrncmp((buf + wxStrlen(buf)-5), "\\par", 4) == 0)
- if (wxStrncmp((buf + wxStrlen(buf)-4), _T("\\par"), 4) == 0) // Bug fix 8/2/95 Ulrich Leodolter
- {
-// j -= 5;
- j -= 4; // Ditto
- buf[j] = 0;
- }
-
- if (buf[j-1] == _T('}'))
- buf[j-1] = 0; // Ignore final brace
-
- // Remove backslashes from name
- wxString fileNameStr(fileName);
- fileNameStr.Replace(_T("\\"), _T(""));
-
- // Ignore some types of input files (e.g. macro definition files)
- wxString fileOnly = wxFileNameFromPath(fileNameStr);
- currentFileName = fileOnly;
- if (IgnorableInputFiles.Member(fileOnly))
- return read_a_line(buf);
-
- wxString actualFile = TexPathList.FindValidPath(fileNameStr);
- if (actualFile.empty())
- {
- wxChar buf2[400];
- wxSnprintf(buf2, sizeof(buf2), _T("%s.tex"), fileNameStr.c_str());
- actualFile = TexPathList.FindValidPath(buf2);
- }
- currentFileName = actualFile;
-
- if (actualFile.empty())
- {
- wxString errBuf;
- errBuf.Printf(_T("Could not find file: %s"),fileName);
- OnError(errBuf);
- }
- else
- {
- // Ensure that if this file includes another,
- // then we look in the same directory as this one.
- TexPathList.EnsureFileAccessible(actualFile);
-
- wxString informStr;
- informStr.Printf(_T("Processing: %s"),actualFile.c_str());
- OnInform(informStr);
- CurrentInputIndex ++;
-
- Inputs[CurrentInputIndex] = wxFopen(actualFile, _T("r"));
- LineNumbers[CurrentInputIndex] = 1;
- if (FileNames[CurrentInputIndex])
- delete[] FileNames[CurrentInputIndex];
- FileNames[CurrentInputIndex] = copystring(actualFile);
-
- if (!Inputs[CurrentInputIndex])
- {
- wxString errBuf;
- errBuf.Printf(_T("Could not open include file %s"), (const wxChar*) actualFile);
- CurrentInputIndex --;
- OnError(errBuf);
- }
- }
- bool succ = read_a_line(buf);
- return succ;
- }
-
- if (checkSyntax)
- {
- wxString bufStr = buf;
- for (int index=0; !syntaxTokens[index].empty(); index++)
- {
- size_t pos = bufStr.find(syntaxTokens[index]);
- if (pos != wxString::npos && pos != 0)
- {
- size_t commentStart = bufStr.find(_T("%"));
- if (commentStart == wxString::npos || commentStart > pos)
- {
- wxString errBuf;
- if (syntaxTokens[index] == _T("\\verb"))
- {
- errBuf.Printf(_T("'%s$....$' was detected at line %lu inside file %s. Please replace this form with \\tt{....}"),
- syntaxTokens[index].c_str(),
- LineNumbers[CurrentInputIndex],
- currentFileName.c_str());
- }
- else
- {
- errBuf.Printf(_T("'%s' was detected at line %lu inside file %s that is not the only text on the line, starting at column one."),
- syntaxTokens[index].c_str(),
- LineNumbers[CurrentInputIndex],
- currentFileName.c_str());
- }
- OnError(errBuf);
- }
- }
- }
- } // checkSyntax
-
- if (wxStrncmp(buf, _T("\\begin{verbatim}"), 16) == 0 ||
- wxStrncmp(buf, _T("\\begin{toocomplex}"), 18) == 0)
- readInVerbatim = true;
- else if (wxStrncmp(buf, _T("\\end{verbatim}"), 14) == 0 ||
- wxStrncmp(buf, _T("\\end{toocomplex}"), 16) == 0)
- readInVerbatim = false;
-
- if (checkCurlyBraces)
- {
- if (ch == EOF && leftCurly != rightCurly)
- {
- wxString errBuf;
- errBuf.Printf(_T("Curly braces do not match inside file %s\n%lu opens, %lu closes"),
- (const wxChar*) currentFileName.c_str(),leftCurly,rightCurly);
- OnError(errBuf);
- }
- }
-
- return (ch == EOF);
-} // read_a_line
-
-/*
- * Parse newcommand
- *
- */
-
-bool ParseNewCommand(wxChar *buffer, int *pos)
-{
- if ((wxStrncmp((buffer+(*pos)), _T("newcommand"), 10) == 0) ||
- (wxStrncmp((buffer+(*pos)), _T("renewcommand"), 12) == 0))
- {
- if (wxStrncmp((buffer+(*pos)), _T("newcommand"), 10) == 0)
- *pos = *pos + 12;
- else
- *pos = *pos + 14;
-
- wxChar commandName[100];
- wxChar commandValue[1000];
- int noArgs = 0;
- int i = 0;
- while (buffer[*pos] != _T('}') && (buffer[*pos] != 0))
- {
- commandName[i] = buffer[*pos];
- *pos += 1;
- i ++;
- }
- commandName[i] = 0;
- i = 0;
- *pos += 1;
- if (buffer[*pos] == _T('['))
- {
- *pos += 1;
- noArgs = (int)(buffer[*pos]) - 48;
- *pos += 2; // read past argument and '['
- }
- bool end = false;
- int braceCount = 0;
- while (!end)
- {
- wxChar ch = buffer[*pos];
- if (ch == _T('{'))
- braceCount ++;
- else if (ch == _T('}'))
- {
- braceCount --;
- if (braceCount == 0)
- end = true;
- }
- else if (ch == 0)
- {
- end = !read_a_line(buffer);
- wxUnusedVar(end);
- *pos = 0;
- break;
- }
- commandValue[i] = ch;
- i ++;
- *pos += 1;
- }
- commandValue[i] = 0;
-
- CustomMacro *macro = new CustomMacro(commandName, noArgs, NULL);
- if (wxStrlen(commandValue) > 0)
- macro->macroBody = copystring(commandValue);
- if (!CustomMacroList.Find(commandName))
- {
- CustomMacroList.Append(commandName, macro);
- AddMacroDef(ltCUSTOM_MACRO, commandName, noArgs);
- }
- return true;
- }
- else return false;
-}
-
-void MacroError(wxChar *buffer)
-{
- wxString errBuf;
- wxChar macroBuf[200];
- macroBuf[0] = '\\';
- int i = 1;
- wxChar ch;
- while (((ch = buffer[i-1]) != '\n') && (ch != 0))
- {
- macroBuf[i] = ch;
- i ++;
- }
- macroBuf[i] = 0;
- if (i > 20)
- macroBuf[20] = 0;
-
- errBuf.Printf(_T("Could not find macro: %s at line %d, file %s"),
- macroBuf, (int)(LineNumbers[CurrentInputIndex]-1), FileNames[CurrentInputIndex]);
- OnError(errBuf);
-
- if (wxStrcmp(macroBuf,_T("\\end{document}")) == 0)
- {
- OnInform( _T("Halted build due to unrecoverable error.") );
- stopRunning = true;
- }
-}
-
-/*
- * Parse an argument.
- * 'environment' specifies the name of the macro IFF if we're looking for the end
- * of an environment, e.g. \end{itemize}. Otherwise it's NULL.
- * 'parseToBrace' is true if the argument should extend to the next right brace,
- * e.g. in {\bf an argument} as opposed to \vskip 30pt
- *
- */
-int ParseArg(TexChunk *thisArg, wxList& children, wxChar *buffer, int pos, wxChar *environment, bool parseToBrace, TexChunk *customMacroArgs)
-{
- Tex2RTFYield();
- if (stopRunning) return pos;
-
- bool eof = false;
- BigBuffer[0] = 0;
- int buf_ptr = 0;
- int len;
-
-/*
-
- // Consume leading brace or square bracket, but ONLY if not following
- // a space, because this could be e.g. {\large {\bf thing}} where {\bf thing}
- // is the argument of \large AS WELL as being a block in its
- // own right.
- if (!environment)
- {
- if ((pos > 0) && (buffer[pos-1] != ' ') && buffer[pos] == '{')
- pos ++;
- else
-
- if ((pos > 0) && (buffer[pos-1] != ' ') && (buffer[pos] == '[' || buffer[pos] == '('))
- {
- isOptional = true;
- pos ++;
- }
- else if ((pos > 1) && (buffer[pos-1] != ' ') && (buffer[pos+1] == '[' || buffer[pos+1] == '('))
- {
- isOptional = true;
- pos += 2;
- }
- }
-*/
-
- // If not parsing to brace, just read the next word
- // (e.g. \vskip 20pt)
- if (!parseToBrace)
- {
- int ch = buffer[pos];
- while (!eof && ch != 13 && ch != 32 && ch != 10 &&
- ch != 0 && ch != '{')
- {
- BigBuffer[buf_ptr] = (wxChar)ch;
- buf_ptr ++;
- pos ++;
- ch = buffer[pos];
- }
- if (buf_ptr > 0)
- {
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_STRING);
- BigBuffer[buf_ptr] = 0;
- chunk->value = copystring(BigBuffer);
- children.Append((wxObject *)chunk);
- }
- return pos;
- }
-
- while (!eof)
- {
- len = wxStrlen(buffer);
- if (pos >= len)
- {
- if (customMacroArgs) return 0;
-
- eof = read_a_line(buffer);
- pos = 0;
- // Check for verbatim (or toocomplex, which comes to the same thing)
- wxString bufStr = buffer;
-// if (bufStr.find("\\begin{verbatim}") != wxString::npos ||
-// bufStr.find("\\begin{toocomplex}") != wxString::npos)
- if (wxStrncmp(buffer, _T("\\begin{verbatim}"), 16) == 0 ||
- wxStrncmp(buffer, _T("\\begin{toocomplex}"), 18) == 0)
- {
- if (buf_ptr > 0)
- {
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_STRING);
- BigBuffer[buf_ptr] = 0;
- chunk->value = copystring(BigBuffer);
- children.Append((wxObject *)chunk);
- }
- BigBuffer[0] = 0;
- buf_ptr = 0;
-
- eof = read_a_line(buffer);
- while (!eof && (wxStrncmp(buffer, _T("\\end{verbatim}"), 14) != 0) &&
- (wxStrncmp(buffer, _T("\\end{toocomplex}"), 16) != 0)
- )
- {
- wxStrcat(BigBuffer, buffer);
- buf_ptr += wxStrlen(buffer);
- eof = read_a_line(buffer);
- }
- eof = read_a_line(buffer);
- buf_ptr = 0;
-
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_MACRO, VerbatimMacroDef);
- chunk->no_args = 1;
- chunk->macroId = ltVERBATIM;
- TexChunk *arg = new TexChunk(CHUNK_TYPE_ARG, VerbatimMacroDef);
- arg->argn = 1;
- arg->macroId = ltVERBATIM;
- TexChunk *str = new TexChunk(CHUNK_TYPE_STRING);
- str->value = copystring(BigBuffer);
-
- children.Append((wxObject *)chunk);
- chunk->children.Append((wxObject *)arg);
- arg->children.Append((wxObject *)str);
-
- // Also want to include the following newline (is always a newline
- // after a verbatim): EXCEPT in HTML
- if (convertMode != TEX_HTML)
- {
- TexMacroDef *parDef = (TexMacroDef *)MacroDefs.Get(_T("\\"));
- TexChunk *parChunk = new TexChunk(CHUNK_TYPE_MACRO, parDef);
- parChunk->no_args = 0;
- parChunk->macroId = ltBACKSLASHCHAR;
- children.Append((wxObject *)parChunk);
- }
- }
- }
-
- wxChar wxCh = buffer[pos];
- // End of optional argument -- pretend it's right brace for simplicity
- if (thisArg->optional && (wxCh == _T(']')))
- wxCh = _T('}');
-
- switch (wxCh)
- {
- case 0:
- case _T('}'): // End of argument
- {
- if (buf_ptr > 0)
- {
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_STRING);
- BigBuffer[buf_ptr] = 0;
- chunk->value = copystring(BigBuffer);
- children.Append((wxObject *)chunk);
- }
- if (wxCh == _T('}')) pos ++;
- return pos;
- }
- case _T('\\'):
- {
- if (buf_ptr > 0) // Finish off the string we've read so far
- {
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_STRING);
- BigBuffer[buf_ptr] = 0;
- buf_ptr = 0;
- chunk->value = copystring(BigBuffer);
- children.Append((wxObject *)chunk);
- }
- pos ++;
-
- // Try matching \end{environment}
- if (environment && FindEndEnvironment(buffer, &pos, environment))
- {
- // Eliminate newline after an \end{} if possible
- if (buffer[pos] == 13)
- {
- pos ++;
- if (buffer[pos] == 10)
- pos ++;
- }
- return pos;
- }
-
- if (ParseNewCommand(buffer, &pos))
- break;
-
- if (wxStrncmp(buffer+pos, _T("special"), 7) == 0)
- {
- pos += 7;
-
- // Discard {
- pos ++;
- int noBraces = 1;
-
- wxTex2RTFBuffer[0] = 0;
- int i = 0;
- bool end = false;
- while (!end)
- {
- wxChar ch = buffer[pos];
- if (ch == _T('}'))
- {
- noBraces --;
- if (noBraces == 0)
- {
- wxTex2RTFBuffer[i] = 0;
- end = true;
- }
- else
- {
- wxTex2RTFBuffer[i] = _T('}');
- i ++;
- }
- pos ++;
- }
- else if (ch == _T('{'))
- {
- wxTex2RTFBuffer[i] = _T('{');
- i ++;
- pos ++;
- }
- else if (ch == _T('\\') && buffer[pos+1] == _T('}'))
- {
- wxTex2RTFBuffer[i] = _T('}');
- pos += 2;
- i++;
- }
- else if (ch == _T('\\') && buffer[pos+1] == _T('{'))
- {
- wxTex2RTFBuffer[i] = _T('{');
- pos += 2;
- i++;
- }
- else
- {
- wxTex2RTFBuffer[i] = ch;
- pos ++;
- i ++;
- if (ch == 0)
- end = true;
- }
- }
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_MACRO);
- chunk->no_args = 1;
- chunk->macroId = ltSPECIAL;
- TexMacroDef *specialDef = (TexMacroDef *)MacroDefs.Get(_T("special"));
- chunk->def = specialDef;
- TexChunk *arg = new TexChunk(CHUNK_TYPE_ARG, specialDef);
- chunk->children.Append((wxObject *)arg);
- arg->argn = 1;
- arg->macroId = chunk->macroId;
-
- // The value in the first argument.
- TexChunk *argValue = new TexChunk(CHUNK_TYPE_STRING);
- arg->children.Append((wxObject *)argValue);
- argValue->argn = 1;
- argValue->value = copystring(wxTex2RTFBuffer);
-
- children.Append((wxObject *)chunk);
- }
- else if (wxStrncmp(buffer+pos, _T("verb"), 4) == 0)
- {
- pos += 4;
- if (buffer[pos] == _T('*'))
- pos ++;
-
- // Find the delimiter character
- wxChar ch = buffer[pos];
- pos ++;
- // Now at start of verbatim text
- int j = pos;
- while ((buffer[pos] != ch) && buffer[pos] != 0)
- pos ++;
- wxChar *val = new wxChar[pos - j + 1];
- int i;
- for (i = j; i < pos; i++)
- {
- val[i-j] = buffer[i];
- }
- val[i-j] = 0;
-
- pos ++;
-
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_MACRO);
- chunk->no_args = 1;
- chunk->macroId = ltVERB;
- TexMacroDef *verbDef = (TexMacroDef *)MacroDefs.Get(_T("verb"));
- chunk->def = verbDef;
- TexChunk *arg = new TexChunk(CHUNK_TYPE_ARG, verbDef);
- chunk->children.Append((wxObject *)arg);
- arg->argn = 1;
- arg->macroId = chunk->macroId;
-
- // The value in the first argument.
- TexChunk *argValue = new TexChunk(CHUNK_TYPE_STRING);
- arg->children.Append((wxObject *)argValue);
- argValue->argn = 1;
- argValue->value = val;
-
- children.Append((wxObject *)chunk);
- }
- else
- {
- wxChar *env = NULL;
- bool tmpParseToBrace = true;
- TexMacroDef *def = MatchMacro(buffer, &pos, &env, &tmpParseToBrace);
- if (def)
- {
- CustomMacro *customMacro = FindCustomMacro(def->name);
-
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_MACRO, def);
-
- chunk->no_args = def->no_args;
-// chunk->name = copystring(def->name);
- chunk->macroId = def->macroId;
-
- if (!customMacro)
- children.Append((wxObject *)chunk);
-
- // Eliminate newline after a \begin{} or a \\ if possible
- if ((env || wxStrcmp(def->name, _T("\\")) == 0) && (buffer[pos] == 13))
- {
- pos ++;
- if (buffer[pos] == 10)
- pos ++;
- }
-
- pos = ParseMacroBody(def->name,
- chunk, chunk->no_args,
- buffer,
- pos,
- env,
- tmpParseToBrace,
- customMacroArgs);
-
- // If custom macro, parse the body substituting the above found args.
- if (customMacro)
- {
- if (customMacro->macroBody)
- {
- wxChar macroBuf[300];
-// wxStrcpy(macroBuf, _T("{"));
- wxStrcpy(macroBuf, customMacro->macroBody);
- wxStrcat(macroBuf, _T("}"));
- ParseArg(thisArg, children, macroBuf, 0, NULL, true, chunk);
- }
-
-// delete chunk; // Might delete children
- }
- }
- else
- {
- MacroError(buffer+pos);
- }
- }
- break;
- }
- // Parse constructs like {\bf thing} as if they were
- // \bf{thing}
- case _T('{'):
- {
- pos ++;
- if (buffer[pos] == _T('\\'))
- {
- if (buf_ptr > 0)
- {
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_STRING);
- BigBuffer[buf_ptr] = 0;
- buf_ptr = 0;
- chunk->value = copystring(BigBuffer);
- children.Append((wxObject *)chunk);
- }
- pos ++;
-
- wxChar *env;
- bool tmpParseToBrace;
- TexMacroDef *def = MatchMacro(buffer, &pos, &env, &tmpParseToBrace);
- if (def)
- {
- CustomMacro *customMacro = FindCustomMacro(def->name);
-
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_MACRO, def);
- chunk->no_args = def->no_args;
-// chunk->name = copystring(def->name);
- chunk->macroId = def->macroId;
- if (!customMacro)
- children.Append((wxObject *)chunk);
-
- pos = ParseMacroBody(def->name, chunk, chunk->no_args,
- buffer, pos, NULL, true, customMacroArgs);
-
- // If custom macro, parse the body substituting the above found args.
- if (customMacro)
- {
- if (customMacro->macroBody)
- {
- wxChar macroBuf[300];
-// wxStrcpy(macroBuf, _T("{"));
- wxStrcpy(macroBuf, customMacro->macroBody);
- wxStrcat(macroBuf, _T("}"));
- ParseArg(thisArg, children, macroBuf, 0, NULL, true, chunk);
- }
-
-// delete chunk; // Might delete children
- }
- }
- else
- {
- MacroError(buffer+pos);
- }
- }
- else
- {
- /*
- * If all else fails, we assume that we have
- * a pair of braces on their own, so return a `dummy' macro
- * definition with just one argument to parse.
- */
- if (!SoloBlockDef)
- {
- SoloBlockDef = new TexMacroDef(ltSOLO_BLOCK, _T("solo block"), 1, false);
- }
- // Save text so far
- if (buf_ptr > 0)
- {
- TexChunk *chunk1 = new TexChunk(CHUNK_TYPE_STRING);
- BigBuffer[buf_ptr] = 0;
- buf_ptr = 0;
- chunk1->value = copystring(BigBuffer);
- children.Append((wxObject *)chunk1);
- }
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_MACRO, SoloBlockDef);
- chunk->no_args = SoloBlockDef->no_args;
-// chunk->name = copystring(SoloBlockDef->name);
- chunk->macroId = SoloBlockDef->macroId;
- children.Append((wxObject *)chunk);
-
- TexChunk *arg = new TexChunk(CHUNK_TYPE_ARG, SoloBlockDef);
-
- chunk->children.Append((wxObject *)arg);
-// arg->name = copystring(SoloBlockDef->name);
- arg->argn = 1;
- arg->macroId = chunk->macroId;
-
- pos = ParseArg(arg, arg->children, buffer, pos, NULL, true, customMacroArgs);
- }
- break;
- }
- case _T('$'):
- {
- if (buf_ptr > 0)
- {
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_STRING);
- BigBuffer[buf_ptr] = 0;
- buf_ptr = 0;
- chunk->value = copystring(BigBuffer);
- children.Append((wxObject *)chunk);
- }
-
- pos ++;
-
- if (buffer[pos] == _T('$'))
- {
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_MACRO);
- chunk->no_args = 0;
-// chunk->name = copystring(_T("$$"));
- chunk->macroId = ltSPECIALDOUBLEDOLLAR;
- children.Append((wxObject *)chunk);
- pos ++;
- }
- else
- {
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_MACRO);
- chunk->no_args = 0;
-// chunk->name = copystring(_T("_$"));
- chunk->macroId = ltSPECIALDOLLAR;
- children.Append((wxObject *)chunk);
- }
- break;
- }
- case _T('~'):
- {
- if (buf_ptr > 0)
- {
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_STRING);
- BigBuffer[buf_ptr] = 0;
- buf_ptr = 0;
- chunk->value = copystring(BigBuffer);
- children.Append((wxObject *)chunk);
- }
-
- pos ++;
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_MACRO);
- chunk->no_args = 0;
-// chunk->name = copystring(_T("_~"));
- chunk->macroId = ltSPECIALTILDE;
- children.Append((wxObject *)chunk);
- break;
- }
- case _T('#'): // Either treat as a special TeX character or as a macro arg
- {
- if (buf_ptr > 0)
- {
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_STRING);
- BigBuffer[buf_ptr] = 0;
- buf_ptr = 0;
- chunk->value = copystring(BigBuffer);
- children.Append((wxObject *)chunk);
- }
-
- pos ++;
- if (!customMacroArgs)
- {
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_MACRO);
- chunk->no_args = 0;
-// chunk->name = copystring(_T("_#"));
- chunk->macroId = ltSPECIALHASH;
- children.Append((wxObject *)chunk);
- }
- else
- {
- if (isdigit(buffer[pos]))
- {
- int n = buffer[pos] - 48;
- pos ++;
- wxNode *node = customMacroArgs->children.Item(n-1);
- if (node)
- {
- TexChunk *argChunk = (TexChunk *)node->GetData();
- children.Append((wxObject *)new TexChunk(*argChunk));
- }
- }
- }
- break;
- }
- case _T('&'):
- {
- // Remove white space before and after the ampersand,
- // since this is probably a table column separator with
- // some convenient -- but useless -- white space in the text.
- while ((buf_ptr > 0) && ((BigBuffer[buf_ptr-1] == _T(' ')) || (BigBuffer[buf_ptr-1] == 9)))
- buf_ptr --;
-
- if (buf_ptr > 0)
- {
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_STRING);
- BigBuffer[buf_ptr] = 0;
- buf_ptr = 0;
- chunk->value = copystring(BigBuffer);
- children.Append((wxObject *)chunk);
- }
-
- pos ++;
-
- while (buffer[pos] == _T(' ') || buffer[pos] == 9)
- pos ++;
-
- TexChunk *chunk = new TexChunk(CHUNK_TYPE_MACRO);
- chunk->no_args = 0;
-// chunk->name = copystring(_T("_&"));
- chunk->macroId = ltSPECIALAMPERSAND;
- children.Append((wxObject *)chunk);
- break;
- }
- // Eliminate end-of-line comment
- case _T('%'):
- {
- wxCh = buffer[pos];
- while (wxCh != 10 && wxCh != 13 && wxCh != 0)
- {
- pos ++;
- wxCh = buffer[pos];
- }
- if (buffer[pos] == 10 || buffer[pos] == 13)
- {
- pos ++;
- if (buffer[pos] == 10) pos ++; // Eliminate newline following DOS line feed
- }
- break;
- }
- // Eliminate tab
- case 9:
- {
- BigBuffer[buf_ptr] = _T(' ');
- BigBuffer[buf_ptr+1] = 0;
- buf_ptr ++;
- pos ++;
- break;
- }
- default:
- {
- BigBuffer[buf_ptr] = wxCh;
- BigBuffer[buf_ptr+1] = 0;
- buf_ptr ++;
- pos ++;
- break;
- }
- }
- }
- return pos;
-}
-
-/*
- * Consume as many arguments as the macro definition specifies
- *
- */
-
-int ParseMacroBody(const wxChar *WXUNUSED(macro_name), TexChunk *parent,
- int no_args, wxChar *buffer, int pos,
- wxChar *environment, bool parseToBrace,
- TexChunk *customMacroArgs)
-{
- Tex2RTFYield();
- if (stopRunning) return pos;
-
- // Check for a first optional argument
- if (buffer[pos] == ' ' && buffer[pos+1] == '[')
- {
- // Fool following code into thinking that this is definitely
- // an optional first argument. (If a space before a non-first argument,
- // [ is interpreted as a [, not an optional argument.)
- buffer[pos] = '!';
- pos ++;
- no_args ++;
- }
- else
- if (buffer[pos] == '[')
- no_args ++;
-
- int maxArgs = 0;
-
- int i;
- for (i = 0; i < no_args; i++)
- {
- maxArgs ++;
- TexChunk *arg = new TexChunk(CHUNK_TYPE_ARG, parent->def);
-
- parent->children.Append((wxObject *)arg);
-// arg->name = copystring(macro_name);
- arg->argn = maxArgs;
- arg->macroId = parent->macroId;
-
- // To parse the first arg of a 2 arg \begin{thing}{arg} ... \end{thing}
- // have to fool parser into thinking this is a regular kind of block.
- wxChar *actualEnv;
- if ((no_args == 2) && (i == 0))
- actualEnv = NULL;
- else
- actualEnv = environment;
-
- bool isOptional = false;
-
- // Remove the first { of the argument so it doesn't get recognized as { ... }
-// EatWhiteSpace(buffer, &pos);
- if (!actualEnv)
- {
- // The reason for these tests is to not consume braces that don't
- // belong to this macro.
- // E.g. {\bf {\small thing}}
- if ((pos > 0) && (buffer[pos-1] != ' ') && buffer[pos] == '{')
- pos ++;
- else
- if ((pos > 0) && (buffer[pos-1] != ' ') && (buffer[pos] == '['))
- {
- isOptional = true;
- pos ++;
- }
- else if ((pos > 1) && (buffer[pos-1] != ' ') && (buffer[pos+1] == '['))
- {
- isOptional = true;
- pos += 2;
- }
- else if (i > 0)
- {
- wxString errBuf;
- wxString tmpBuffer(buffer);
- if (tmpBuffer.length() > 4)
- {
- if (tmpBuffer.Right(4) == _T("\\par"))
- tmpBuffer = tmpBuffer.Mid(0,tmpBuffer.length()-4);
- }
- errBuf.Printf(_T("Missing macro argument in the line:\n\t%s\n"),tmpBuffer.c_str());
- OnError(errBuf);
- }
-
- }
- arg->optional = isOptional;
-
- pos = ParseArg(arg, arg->children, buffer, pos, actualEnv, parseToBrace, customMacroArgs);
-
- // If we've encountered an OPTIONAL argument, go another time around
- // the loop, because we've got more than we thought.
- // Hopefully optional args don't occur at the end of a macro use
- // or we might miss it.
- // Don't increment no of times round loop if the first optional arg
- // -- we already did it before the loop.
- if (arg->optional && (i > 0))
- i --;
- }
- parent->no_args = maxArgs;
-
- // Tell each argument how many args there are (useful when processing an arg)
- wxNode *node = parent->children.GetFirst();
- while (node)
- {
- TexChunk *chunk = (TexChunk *)node->GetData();
- chunk->no_args = maxArgs;
- node = node->GetNext();
- }
- return pos;
-}
-
-bool TexLoadFile(const wxString& filename)
-{
- static wxChar *line_buffer;
- stopRunning = false;
- wxStrcpy(TexFileRoot, filename);
- StripExtension(TexFileRoot);
- wxSnprintf(TexBibName, 300, _T("%s.bb"), TexFileRoot);
- wxSnprintf(TexTmpBibName, 300, _T("%s.bb1"), TexFileRoot);
-
- TexPathList.EnsureFileAccessible(filename);
-
- if (line_buffer)
- delete line_buffer;
-
- line_buffer = new wxChar[MAX_LINE_BUFFER_SIZE];
-
- Inputs[0] = wxFopen(filename, _T("r"));
- LineNumbers[0] = 1;
- FileNames[0] = copystring(filename);
- if (Inputs[0])
- {
- read_a_line(line_buffer);
- ParseMacroBody(_T("toplevel"), TopLevel, 1, line_buffer, 0, NULL, true);
- if (Inputs[0]) fclose(Inputs[0]);
- return true;
- }
-
- return false;
-}
-
-TexMacroDef::TexMacroDef(int the_id, const wxChar *the_name, int n, bool ig, bool forbidLevel)
-{
- name = copystring(the_name);
- no_args = n;
- ignore = ig;
- macroId = the_id;
- forbidden = forbidLevel;
-}
-
-TexMacroDef::~TexMacroDef(void)
-{
- if (name) delete[] name;
-}
-
-TexChunk::TexChunk(int the_type, TexMacroDef *the_def)
-{
- type = the_type;
- no_args = 0;
- argn = 0;
-// name = NULL;
- def = the_def;
- macroId = 0;
- value = NULL;
- optional = false;
-}
-
-TexChunk::TexChunk(TexChunk& toCopy)
-{
- type = toCopy.type;
- no_args = toCopy.no_args;
- argn = toCopy.argn;
- macroId = toCopy.macroId;
-
-// if (toCopy.name)
-// name = copystring(toCopy.name);
-// else
-// name = NULL;
- def = toCopy.def;
-
- if (toCopy.value)
- value = copystring(toCopy.value);
- else
- value = NULL;
-
- optional = toCopy.optional;
- wxNode *node = toCopy.children.GetFirst();
- while (node)
- {
- TexChunk *child = (TexChunk *)node->GetData();
- children.Append((wxObject *)new TexChunk(*child));
- node = node->GetNext();
- }
-}
-
-TexChunk::~TexChunk(void)
-{
-// if (name) delete[] name;
- if (value) delete[] value;
- wxNode *node = children.GetFirst();
- while (node)
- {
- TexChunk *child = (TexChunk *)node->GetData();
- delete child;
- wxNode *next = node->GetNext();
- delete node;
- node = next;
- }
-}
-
-bool IsArgOptional(void) // Is this argument an optional argument?
-{
- return isArgOptional;
-}
-
-int GetNoArgs(void) // Number of args for this macro
-{
- return noArgs;
-}
-
-/* Gets the text of a chunk on request (must be for small arguments
- * only!)
- *
- */
-
-void GetArgData1(TexChunk *chunk)
-{
- switch (chunk->type)
- {
- case CHUNK_TYPE_MACRO:
- {
- TexMacroDef *def = chunk->def;
- if (def && def->ignore)
- return;
-
- if (def && (wxStrcmp(def->name, _T("solo block")) != 0))
- {
- wxStrcat(currentArgData, _T("\\"));
- wxStrcat(currentArgData, def->name);
- }
-
- wxNode *node = chunk->children.GetFirst();
- while (node)
- {
- TexChunk *child_chunk = (TexChunk *)node->GetData();
- wxStrcat(currentArgData, _T("{"));
- GetArgData1(child_chunk);
- wxStrcat(currentArgData, _T("}"));
- node = node->GetNext();
- }
- break;
- }
- case CHUNK_TYPE_ARG:
- {
- wxNode *node = chunk->children.GetFirst();
- while (node)
- {
- TexChunk *child_chunk = (TexChunk *)node->GetData();
- GetArgData1(child_chunk);
- node = node->GetNext();
- }
- break;
- }
- case CHUNK_TYPE_STRING:
- {
- if (chunk->value)
- wxStrcat(currentArgData, chunk->value);
- break;
- }
- }
-}
-
-wxChar *GetArgData(TexChunk *WXUNUSED(chunk))
-{
- currentArgData[0] = 0;
- GetArgData1(currentArgument);
- haveArgData = false;
- return currentArgData;
-}
-
-wxChar *GetArgData(void)
-{
- if (!haveArgData)
- {
- currentArgData[0] = 0;
- GetArgData1(currentArgument);
- }
- return currentArgData;
-}
-
-TexChunk *GetArgChunk(void)
-{
- return currentArgument;
-}
-
-TexChunk *GetNextChunk(void) // Look ahead to the next chunk
-{
- return nextChunk;
-}
-
-TexChunk *GetTopLevelChunk(void)
-{
- return TopLevel;
-}
-
-int GetCurrentColumn(void)
-{
- return currentColumn;
-}
-
-/*
- * Traverses document calling functions to allow the client to
- * write out the appropriate stuff
- */
-
-
-void TraverseFromChunk(TexChunk *chunk, wxNode *thisNode, bool childrenOnly)
-{
- Tex2RTFYield();
- if (stopRunning) return;
-
- switch (chunk->type)
- {
- case CHUNK_TYPE_MACRO:
- {
- TexMacroDef *def = chunk->def;
- if (def && def->ignore)
- return;
-
- if (!childrenOnly)
- OnMacro(chunk->macroId, chunk->no_args, true);
-
- wxNode *node = chunk->children.GetFirst();
- while (node)
- {
- TexChunk *child_chunk = (TexChunk *)node->GetData();
- TraverseFromChunk(child_chunk, node);
- node = node->GetNext();
- }
-
- if (thisNode && thisNode->GetNext())
- nextChunk = (TexChunk *)thisNode->GetNext()->GetData();
-
- if (!childrenOnly)
- OnMacro(chunk->macroId, chunk->no_args, false);
- break;
- }
- case CHUNK_TYPE_ARG:
- {
- currentArgument = chunk;
-
- isArgOptional = chunk->optional;
- noArgs = chunk->no_args;
-
- // If OnArgument returns false, don't output.
-
- if (childrenOnly || OnArgument(chunk->macroId, chunk->argn, true))
- {
- wxNode *node = chunk->children.GetFirst();
- while (node)
- {
- TexChunk *child_chunk = (TexChunk *)node->GetData();
- TraverseFromChunk(child_chunk, node);
- node = node->GetNext();
- }
- }
-
- currentArgument = chunk;
-
- if (thisNode && thisNode->GetNext())
- nextChunk = (TexChunk *)thisNode->GetNext()->GetData();
-
- isArgOptional = chunk->optional;
- noArgs = chunk->no_args;
-
- if (!childrenOnly)
- (void)OnArgument(chunk->macroId, chunk->argn, false);
- break;
- }
- case CHUNK_TYPE_STRING:
- {
- extern int issuedNewParagraph;
- extern int forbidResetPar;
- if (chunk->value && (forbidResetPar == 0))
- {
- // If non-whitespace text, we no longer have a new paragraph.
- if (issuedNewParagraph && !((chunk->value[0] == 10 || chunk->value[0] == 13 || chunk->value[0] == 32)
- && chunk->value[1] == 0))
- {
- issuedNewParagraph = false;
- }
- TexOutput(chunk->value, true);
- }
- break;
- }
- }
-}
-
-void TraverseDocument(void)
-{
- TraverseFromChunk(TopLevel, NULL);
-}
-
-void SetCurrentOutput(FILE *fd)
-{
- CurrentOutput1 = fd;
- CurrentOutput2 = NULL;
-}
-
-void SetCurrentOutputs(FILE *fd1, FILE *fd2)
-{
- CurrentOutput1 = fd1;
- CurrentOutput2 = fd2;
-}
-
-void AddMacroDef(int the_id, const wxChar *name, int n, bool ignore, bool forbid)
-{
- MacroDefs.Put(name, new TexMacroDef(the_id, name, n, ignore, forbid));
-}
-
-void TexInitialize(int bufSize)
-{
- InitialiseColourTable();
-#ifdef __WXMSW__
- TexPathList.AddEnvList(_T("TEXINPUT"));
-#endif
-#ifdef __UNIX__
- TexPathList.AddEnvList(_T("TEXINPUTS"));
-#endif
- int i;
- for (i = 0; i < 15; i++)
- {
- Inputs[i] = NULL;
- LineNumbers[i] = 1;
- FileNames[i] = NULL;
- }
-
- IgnorableInputFiles.Add(_T("psbox.tex"));
- BigBuffer = new wxChar[(bufSize*1000)];
- currentArgData = new wxChar[2000];
- TexFileRoot = new wxChar[300];
- TexBibName = new wxChar[300];
- TexTmpBibName = new wxChar[300];
- AddMacroDef(ltTOPLEVEL, _T("toplevel"), 1);
- TopLevel = new TexChunk(CHUNK_TYPE_MACRO);
-// TopLevel->name = copystring(_T("toplevel"));
- TopLevel->macroId = ltTOPLEVEL;
- TopLevel->no_args = 1;
- VerbatimMacroDef = (TexMacroDef *)MacroDefs.Get(_T("verbatim"));
-}
-
-void TexCleanUp(void)
-{
- int i;
- for (i = 0; i < 15; i++)
- Inputs[i] = NULL;
-
- chapterNo = 0;
- sectionNo = 0;
- subsectionNo = 0;
- subsubsectionNo = 0;
- figureNo = 0;
-
- CurrentOutput1 = NULL;
- CurrentOutput2 = NULL;
- CurrentInputIndex = 0;
- haveArgData = false;
- noArgs = 0;
-
- if (TopLevel)
- delete TopLevel;
- TopLevel = new TexChunk(CHUNK_TYPE_MACRO);
-// TopLevel->name = copystring(_T("toplevel"));
- TopLevel->macroId = ltTOPLEVEL;
- TopLevel->no_args = 1;
-
- DocumentTitle = NULL;
- DocumentAuthor = NULL;
- DocumentDate = NULL;
- DocumentStyle = LATEX_REPORT;
- MinorDocumentStyle = 0;
- BibliographyStyleString = copystring(_T("plain"));
- DocumentStyleString = copystring(_T("report"));
- MinorDocumentStyleString = NULL;
-
- // gt - Changed this so if this is the final pass
- // then we DO want to remove these macros, so that
- // memory is not MASSIVELY leaked if the user
- // does not exit the program, but instead runs
- // the program again
- if ((passNumber == 1 && !runTwice) ||
- (passNumber == 2 && runTwice))
- {
-/* Don't want to remove custom macros after each pass.*/
- SetFontSizes(10);
- wxNode *node = CustomMacroList.GetFirst();
- while (node)
- {
- CustomMacro *macro = (CustomMacro *)node->GetData();
- delete macro;
- delete node;
- node = CustomMacroList.GetFirst();
- }
- }
-/**/
- TexReferences.BeginFind();
- wxHashTable::Node *refNode = TexReferences.Next();
- while (refNode)
- {
- TexRef *ref = (TexRef *)refNode->GetData();
- delete ref;
- refNode = TexReferences.Next();
- }
- TexReferences.Clear();
-
- wxNode* bibNode = BibList.GetFirst();
- while (bibNode)
- {
- BibEntry *entry = (BibEntry *)bibNode->GetData();
- delete entry;
- delete bibNode;
- bibNode = BibList.GetFirst();
- }
- CitationList.Clear();
- ResetTopicCounter();
-}
-
-// There is likely to be one set of macros used by all utilities.
-void DefineDefaultMacros(void)
-{
- // Put names which subsume other names at the TOP
- // so they get recognized first
-
- AddMacroDef(ltACCENT_GRAVE, _T("`"), 1);
- AddMacroDef(ltACCENT_ACUTE, _T("'"), 1);
- AddMacroDef(ltACCENT_CARET, _T("^"), 1);
- AddMacroDef(ltACCENT_UMLAUT, _T("\""), 1);
- AddMacroDef(ltACCENT_TILDE, _T("~"), 1);
- AddMacroDef(ltACCENT_DOT, _T("."), 1);
- AddMacroDef(ltACCENT_CADILLA, _T("c"), 1);
- AddMacroDef(ltSMALLSPACE1, _T(","), 0);
- AddMacroDef(ltSMALLSPACE2, _T(";"), 0);
-
- AddMacroDef(ltABSTRACT, _T("abstract"), 1);
- AddMacroDef(ltADDCONTENTSLINE, _T("addcontentsline"), 3);
- AddMacroDef(ltADDTOCOUNTER, _T("addtocounter"), 2);
- AddMacroDef(ltALEPH, _T("aleph"), 0);
- AddMacroDef(ltALPHA, _T("alpha"), 0);
- AddMacroDef(ltALPH1, _T("alph"), 1);
- AddMacroDef(ltALPH2, _T("Alph"), 1);
- AddMacroDef(ltANGLE, _T("angle"), 0);
- AddMacroDef(ltAPPENDIX, _T("appendix"), 0);
- AddMacroDef(ltAPPROX, _T("approx"), 0);
- AddMacroDef(ltARABIC, _T("arabic"), 1);
- AddMacroDef(ltARRAY, _T("array"), 1);
- AddMacroDef(ltAST, _T("ast"), 0);
- AddMacroDef(ltASYMP, _T("asymp"), 0);
- AddMacroDef(ltAUTHOR, _T("author"), 1);
-
- AddMacroDef(ltBACKGROUNDCOLOUR, _T("backgroundcolour"), 1);
- AddMacroDef(ltBACKGROUNDIMAGE, _T("backgroundimage"), 1);
- AddMacroDef(ltBACKGROUND, _T("background"), 1);
- AddMacroDef(ltBACKSLASHRAW, _T("backslashraw"), 0);
- AddMacroDef(ltBACKSLASH, _T("backslash"), 0);
- AddMacroDef(ltBASELINESKIP, _T("baselineskip"), 1);
- AddMacroDef(ltBCOL, _T("bcol"), 2);
- AddMacroDef(ltBETA, _T("beta"), 0);
- AddMacroDef(ltBFSERIES, _T("bfseries"), 1);
- AddMacroDef(ltBF, _T("bf"), 1);
- AddMacroDef(ltBIBITEM, _T("bibitem"), 2);
- // For convenience, bibitem has 2 args: label and item.
- // The Latex syntax permits writing as 2 args.
- AddMacroDef(ltBIBLIOGRAPHYSTYLE, _T("bibliographystyle"), 1);
- AddMacroDef(ltBIBLIOGRAPHY, _T("bibliography"), 1);
- AddMacroDef(ltBIGTRIANGLEDOWN, _T("bigtriangledown"), 0);
- AddMacroDef(ltBOT, _T("bot"), 0);
- AddMacroDef(ltBOXIT, _T("boxit"), 1);
- AddMacroDef(ltBOX, _T("box"), 0);
- AddMacroDef(ltBRCLEAR, _T("brclear"), 0);
- AddMacroDef(ltBULLET, _T("bullet"), 0);
-
- AddMacroDef(ltCAPTIONSTAR, _T("caption*"), 1);
- AddMacroDef(ltCAPTION, _T("caption"), 1);
- AddMacroDef(ltCAP, _T("cap"), 0);
- AddMacroDef(ltCDOTS, _T("cdots"), 0);
- AddMacroDef(ltCDOT, _T("cdot"), 0);
- AddMacroDef(ltCENTERLINE, _T("centerline"), 1);
- AddMacroDef(ltCENTERING, _T("centering"), 0);
- AddMacroDef(ltCENTER, _T("center"), 1);
- AddMacroDef(ltCEXTRACT, _T("cextract"), 0);
- AddMacroDef(ltCHAPTERHEADING, _T("chapterheading"), 1);
- AddMacroDef(ltCHAPTERSTAR, _T("chapter*"), 1);
- AddMacroDef(ltCHAPTER, _T("chapter"), 1);
- AddMacroDef(ltCHI, _T("chi"), 0);
- AddMacroDef(ltCINSERT, _T("cinsert"), 0);
- AddMacroDef(ltCIRC, _T("circ"), 0);
- AddMacroDef(ltCITE, _T("cite"), 1);
- AddMacroDef(ltCLASS, _T("class"), 1);
- AddMacroDef(ltCLEARDOUBLEPAGE, _T("cleardoublepage"), 0);
- AddMacroDef(ltCLEARPAGE, _T("clearpage"), 0);
- AddMacroDef(ltCLINE, _T("cline"), 1);
- AddMacroDef(ltCLIPSFUNC, _T("clipsfunc"), 3);
- AddMacroDef(ltCLUBSUIT, _T("clubsuit"), 0);
- AddMacroDef(ltCOLUMNSEP, _T("columnsep"), 1);
- AddMacroDef(ltCOMMENT, _T("comment"), 1, true);
- AddMacroDef(ltCONG, _T("cong"), 0);
- AddMacroDef(ltCOPYRIGHT, _T("copyright"), 0);
- AddMacroDef(ltCPARAM, _T("cparam"), 2);
- AddMacroDef(ltCHEAD, _T("chead"), 1);
- AddMacroDef(ltCFOOT, _T("cfoot"), 1);
- AddMacroDef(ltCUP, _T("cup"), 0);
-
- AddMacroDef(ltDASHV, _T("dashv"), 0);
- AddMacroDef(ltDATE, _T("date"), 1);
- AddMacroDef(ltDELTA, _T("delta"), 0);
- AddMacroDef(ltCAP_DELTA, _T("Delta"), 0);
- AddMacroDef(ltDEFINECOLOUR, _T("definecolour"), 4);
- AddMacroDef(ltDEFINECOLOR, _T("definecolor"), 4);
- AddMacroDef(ltDESCRIPTION, _T("description"), 1);
- AddMacroDef(ltDESTRUCT, _T("destruct"), 1);
- AddMacroDef(ltDIAMOND2, _T("diamond2"), 0);
- AddMacroDef(ltDIAMOND, _T("diamond"), 0);
- AddMacroDef(ltDIV, _T("div"), 0);
- AddMacroDef(ltDOCUMENTCLASS, _T("documentclass"), 1);
- AddMacroDef(ltDOCUMENTSTYLE, _T("documentstyle"), 1);
- AddMacroDef(ltDOCUMENT, _T("document"), 1);
- AddMacroDef(ltDOUBLESPACE, _T("doublespace"), 1);
- AddMacroDef(ltDOTEQ, _T("doteq"), 0);
- AddMacroDef(ltDOWNARROW, _T("downarrow"), 0);
- AddMacroDef(ltDOWNARROW2, _T("Downarrow"), 0);
-
- AddMacroDef(ltEMPTYSET, _T("emptyset"), 0);
- AddMacroDef(ltEMPH, _T("emph"), 1);
- AddMacroDef(ltEM, _T("em"), 1);
- AddMacroDef(ltENUMERATE, _T("enumerate"), 1);
- AddMacroDef(ltEPSILON, _T("epsilon"), 0);
- AddMacroDef(ltEQUATION, _T("equation"), 1);
- AddMacroDef(ltEQUIV, _T("equiv"), 0);
- AddMacroDef(ltETA, _T("eta"), 0);
- AddMacroDef(ltEVENSIDEMARGIN, _T("evensidemargin"), 1);
- AddMacroDef(ltEXISTS, _T("exists"), 0);
-
- AddMacroDef(ltFBOX, _T("fbox"), 1);
- AddMacroDef(ltFCOL, _T("fcol"), 2);
- AddMacroDef(ltFIGURE, _T("figure"), 1);
- AddMacroDef(ltFIGURESTAR, _T("figure*"), 1);
- AddMacroDef(ltFLUSHLEFT, _T("flushleft"), 1);
- AddMacroDef(ltFLUSHRIGHT, _T("flushright"), 1);
- AddMacroDef(ltFOLLOWEDLINKCOLOUR, _T("followedlinkcolour"), 1);
- AddMacroDef(ltFOOTHEIGHT, _T("footheight"), 1);
- AddMacroDef(ltFOOTNOTEPOPUP, _T("footnotepopup"), 2);
- AddMacroDef(ltFOOTNOTE, _T("footnote"), 1);
- AddMacroDef(ltFOOTSKIP, _T("footskip"), 1);
- AddMacroDef(ltFORALL, _T("forall"), 0);
- AddMacroDef(ltFRAMEBOX, _T("framebox"), 1);
- AddMacroDef(ltFROWN, _T("frown"), 0);
- AddMacroDef(ltFUNCTIONSECTION, _T("functionsection"), 1);
- AddMacroDef(ltFUNC, _T("func"), 3);
- AddMacroDef(ltFOOTNOTESIZE, _T("footnotesize"), 0);
- AddMacroDef(ltFANCYPLAIN, _T("fancyplain"), 2);
-
- AddMacroDef(ltGAMMA, _T("gamma"), 0);
- AddMacroDef(ltCAP_GAMMA, _T("Gamma"), 0);
- AddMacroDef(ltGEQ, _T("geq"), 0);
- AddMacroDef(ltGE, _T("ge"), 0);
- AddMacroDef(ltGG, _T("gg"), 0);
- AddMacroDef(ltGLOSSARY, _T("glossary"), 1);
- AddMacroDef(ltGLOSS, _T("gloss"), 1);
-
- AddMacroDef(ltHEADHEIGHT, _T("headheight"), 1);
- AddMacroDef(ltHEARTSUIT, _T("heartsuit"), 0);
- AddMacroDef(ltHELPGLOSSARY, _T("helpglossary"), 1);
- AddMacroDef(ltHELPIGNORE, _T("helpignore"), 1, true);
- AddMacroDef(ltHELPONLY, _T("helponly"), 1);
- AddMacroDef(ltHELPINPUT, _T("helpinput"), 1);
- AddMacroDef(ltHELPFONTFAMILY, _T("helpfontfamily"), 1);
- AddMacroDef(ltHELPFONTSIZE, _T("helpfontsize"), 1);
- AddMacroDef(ltHELPREFN, _T("helprefn"), 2);
- AddMacroDef(ltHELPREF, _T("helpref"), 2);
- AddMacroDef(ltHFILL, _T("hfill"), 0);
- AddMacroDef(ltHLINE, _T("hline"), 0);
- AddMacroDef(ltHRULE, _T("hrule"), 0);
- AddMacroDef(ltHSPACESTAR, _T("hspace*"), 1);
- AddMacroDef(ltHSPACE, _T("hspace"), 1);
- AddMacroDef(ltHSKIPSTAR, _T("hskip*"), 1);
- AddMacroDef(ltHSKIP, _T("hskip"), 1);
- AddMacroDef(lthuge, _T("huge"), 1);
- AddMacroDef(ltHuge, _T("Huge"), 1);
- AddMacroDef(ltHUGE, _T("HUGE"), 1);
- AddMacroDef(ltHTMLIGNORE, _T("htmlignore"), 1);
- AddMacroDef(ltHTMLONLY, _T("htmlonly"), 1);
-
- AddMacroDef(ltIM, _T("im"), 0);
- AddMacroDef(ltINCLUDEONLY, _T("includeonly"), 1);
- AddMacroDef(ltINCLUDE, _T("include"), 1);
- AddMacroDef(ltINDENTED, _T("indented"), 2);
- AddMacroDef(ltINDEX, _T("index"), 1);
- AddMacroDef(ltINPUT, _T("input"), 1, true);
- AddMacroDef(ltIOTA, _T("iota"), 0);
- AddMacroDef(ltITEMIZE, _T("itemize"), 1);
- AddMacroDef(ltITEM, _T("item"), 0);
- AddMacroDef(ltIMAGEMAP, _T("imagemap"), 3);
- AddMacroDef(ltIMAGEL, _T("imagel"), 2);
- AddMacroDef(ltIMAGER, _T("imager"), 2);
- AddMacroDef(ltIMAGE, _T("image"), 2);
- AddMacroDef(ltIN, _T("in"), 0);
- AddMacroDef(ltINFTY, _T("infty"), 0);
- AddMacroDef(ltITSHAPE, _T("itshape"), 1);
- AddMacroDef(ltIT, _T("it"), 1);
- AddMacroDef(ltITEMSEP, _T("itemsep"), 1);
- AddMacroDef(ltINSERTATLEVEL, _T("insertatlevel"), 2);
-
- AddMacroDef(ltKAPPA, _T("kappa"), 0);
- AddMacroDef(ltKILL, _T("kill"), 0);
-
- AddMacroDef(ltLABEL, _T("label"), 1);
- AddMacroDef(ltLAMBDA, _T("lambda"), 0);
- AddMacroDef(ltCAP_LAMBDA, _T("Lambda"), 0);
- AddMacroDef(ltlarge, _T("large"), 1);
- AddMacroDef(ltLarge, _T("Large"), 1);
- AddMacroDef(ltLARGE, _T("LARGE"), 1);
- AddMacroDef(ltLATEXIGNORE, _T("latexignore"), 1);
- AddMacroDef(ltLATEXONLY, _T("latexonly"), 1);
- AddMacroDef(ltLATEX, _T("LaTeX"), 0);
- AddMacroDef(ltLBOX, _T("lbox"), 1);
- AddMacroDef(ltLBRACERAW, _T("lbraceraw"), 0);
- AddMacroDef(ltLDOTS, _T("ldots"), 0);
- AddMacroDef(ltLEQ, _T("leq"), 0);
- AddMacroDef(ltLE, _T("le"), 0);
- AddMacroDef(ltLEFTARROW, _T("leftarrow"), 0);
- AddMacroDef(ltLEFTRIGHTARROW, _T("leftrightarrow"), 0);
- AddMacroDef(ltLEFTARROW2, _T("Leftarrow"), 0);
- AddMacroDef(ltLEFTRIGHTARROW2, _T("Leftrightarrow"), 0);
- AddMacroDef(ltLINEBREAK, _T("linebreak"), 0);
- AddMacroDef(ltLINKCOLOUR, _T("linkcolour"), 1);
- AddMacroDef(ltLISTOFFIGURES, _T("listoffigures"), 0);
- AddMacroDef(ltLISTOFTABLES, _T("listoftables"), 0);
- AddMacroDef(ltLHEAD, _T("lhead"), 1);
- AddMacroDef(ltLFOOT, _T("lfoot"), 1);
- AddMacroDef(ltLOWERCASE, _T("lowercase"), 1);
- AddMacroDef(ltLL, _T("ll"), 0);
-
- AddMacroDef(ltMAKEGLOSSARY, _T("makeglossary"), 0);
- AddMacroDef(ltMAKEINDEX, _T("makeindex"), 0);
- AddMacroDef(ltMAKETITLE, _T("maketitle"), 0);
- AddMacroDef(ltMARKRIGHT, _T("markright"), 1);
- AddMacroDef(ltMARKBOTH, _T("markboth"), 2);
- AddMacroDef(ltMARGINPARWIDTH, _T("marginparwidth"), 1);
- AddMacroDef(ltMARGINPARSEP, _T("marginparsep"), 1);
- AddMacroDef(ltMARGINPARODD, _T("marginparodd"), 1);
- AddMacroDef(ltMARGINPAREVEN, _T("marginpareven"), 1);
- AddMacroDef(ltMARGINPAR, _T("marginpar"), 1);
- AddMacroDef(ltMBOX, _T("mbox"), 1);
- AddMacroDef(ltMDSERIES, _T("mdseries"), 1);
- AddMacroDef(ltMEMBERSECTION, _T("membersection"), 1);
- AddMacroDef(ltMEMBER, _T("member"), 2);
- AddMacroDef(ltMID, _T("mid"), 0);
- AddMacroDef(ltMODELS, _T("models"), 0);
- AddMacroDef(ltMP, _T("mp"), 0);
- AddMacroDef(ltMULTICOLUMN, _T("multicolumn"), 3);
- AddMacroDef(ltMU, _T("mu"), 0);
-
- AddMacroDef(ltNABLA, _T("nabla"), 0);
- AddMacroDef(ltNEG, _T("neg"), 0);
- AddMacroDef(ltNEQ, _T("neq"), 0);
- AddMacroDef(ltNEWCOUNTER, _T("newcounter"), 1, false, (bool)FORBID_ABSOLUTELY);
- AddMacroDef(ltNEWLINE, _T("newline"), 0);
- AddMacroDef(ltNEWPAGE, _T("newpage"), 0);
- AddMacroDef(ltNI, _T("ni"), 0);
- AddMacroDef(ltNOCITE, _T("nocite"), 1);
- AddMacroDef(ltNOINDENT, _T("noindent"), 0);
- AddMacroDef(ltNOLINEBREAK, _T("nolinebreak"), 0);
- AddMacroDef(ltNOPAGEBREAK, _T("nopagebreak"), 0);
- AddMacroDef(ltNORMALSIZE, _T("normalsize"), 1);
- AddMacroDef(ltNORMALBOX, _T("normalbox"), 1);
- AddMacroDef(ltNORMALBOXD, _T("normalboxd"), 1);
- AddMacroDef(ltNOTEQ, _T("noteq"), 0);
- AddMacroDef(ltNOTIN, _T("notin"), 0);
- AddMacroDef(ltNOTSUBSET, _T("notsubset"), 0);
- AddMacroDef(ltNU, _T("nu"), 0);
-
- AddMacroDef(ltODDSIDEMARGIN, _T("oddsidemargin"), 1);
- AddMacroDef(ltOMEGA, _T("omega"), 0);
- AddMacroDef(ltCAP_OMEGA, _T("Omega"), 0);
- AddMacroDef(ltONECOLUMN, _T("onecolumn"), 0);
- AddMacroDef(ltOPLUS, _T("oplus"), 0);
- AddMacroDef(ltOSLASH, _T("oslash"), 0);
- AddMacroDef(ltOTIMES, _T("otimes"), 0);
-
- AddMacroDef(ltPAGEBREAK, _T("pagebreak"), 0);
- AddMacroDef(ltPAGEREF, _T("pageref"), 1);
- AddMacroDef(ltPAGESTYLE, _T("pagestyle"), 1);
- AddMacroDef(ltPAGENUMBERING, _T("pagenumbering"), 1);
- AddMacroDef(ltPARAGRAPHSTAR, _T("paragraph*"), 1);
- AddMacroDef(ltPARAGRAPH, _T("paragraph"), 1);
- AddMacroDef(ltPARALLEL, _T("parallel"), 0);
- AddMacroDef(ltPARAM, _T("param"), 2);
- AddMacroDef(ltPARINDENT, _T("parindent"), 1);
- AddMacroDef(ltPARSKIP, _T("parskip"), 1);
- AddMacroDef(ltPARTIAL, _T("partial"), 0);
- AddMacroDef(ltPARTSTAR, _T("part*"), 1);
- AddMacroDef(ltPART, _T("part"), 1);
- AddMacroDef(ltPAR, _T("par"), 0);
- AddMacroDef(ltPERP, _T("perp"), 0);
- AddMacroDef(ltPHI, _T("phi"), 0);
- AddMacroDef(ltCAP_PHI, _T("Phi"), 0);
- AddMacroDef(ltPFUNC, _T("pfunc"), 3);
- AddMacroDef(ltPICTURE, _T("picture"), 1);
- AddMacroDef(ltPI, _T("pi"), 0);
- AddMacroDef(ltCAP_PI, _T("Pi"), 0);
- AddMacroDef(ltPM, _T("pm"), 0);
- AddMacroDef(ltPOPREFONLY, _T("poprefonly"), 1);
- AddMacroDef(ltPOPREF, _T("popref"), 2);
- AddMacroDef(ltPOUNDS, _T("pounds"), 0);
- AddMacroDef(ltPREC, _T("prec"), 0);
- AddMacroDef(ltPRECEQ, _T("preceq"), 0);
- AddMacroDef(ltPRINTINDEX, _T("printindex"), 0);
- AddMacroDef(ltPROPTO, _T("propto"), 0);
- AddMacroDef(ltPSBOXTO, _T("psboxto"), 1, false, (bool)FORBID_ABSOLUTELY);
- AddMacroDef(ltPSBOX, _T("psbox"), 1, false, (bool)FORBID_ABSOLUTELY);
- AddMacroDef(ltPSI, _T("psi"), 0);
- AddMacroDef(ltCAP_PSI, _T("Psi"), 0);
-
- AddMacroDef(ltQUOTE, _T("quote"), 1);
- AddMacroDef(ltQUOTATION, _T("quotation"), 1);
-
- AddMacroDef(ltRAGGEDBOTTOM, _T("raggedbottom"), 0);
- AddMacroDef(ltRAGGEDLEFT, _T("raggedleft"), 0);
- AddMacroDef(ltRAGGEDRIGHT, _T("raggedright"), 0);
- AddMacroDef(ltRBRACERAW, _T("rbraceraw"), 0);
- AddMacroDef(ltREF, _T("ref"), 1);
- AddMacroDef(ltREGISTERED, _T("registered"), 0);
- AddMacroDef(ltRE, _T("we"), 0);
- AddMacroDef(ltRHO, _T("rho"), 0);
- AddMacroDef(ltRIGHTARROW, _T("rightarrow"), 0);
- AddMacroDef(ltRIGHTARROW2, _T("rightarrow2"), 0);
- AddMacroDef(ltRMFAMILY, _T("rmfamily"), 1);
- AddMacroDef(ltRM, _T("rm"), 1);
- AddMacroDef(ltROMAN, _T("roman"), 1);
- AddMacroDef(ltROMAN2, _T("Roman"), 1);
-// AddMacroDef(lt"row", 1);
- AddMacroDef(ltRTFSP, _T("rtfsp"), 0);
- AddMacroDef(ltRTFIGNORE, _T("rtfignore"), 1);
- AddMacroDef(ltRTFONLY, _T("rtfonly"), 1);
- AddMacroDef(ltRULEDROW, _T("ruledrow"), 1);
- AddMacroDef(ltDRULED, _T("druled"), 1);
- AddMacroDef(ltRULE, _T("rule"), 2);
- AddMacroDef(ltRHEAD, _T("rhead"), 1);
- AddMacroDef(ltRFOOT, _T("rfoot"), 1);
- AddMacroDef(ltROW, _T("row"), 1);
-
- AddMacroDef(ltSCSHAPE, _T("scshape"), 1);
- AddMacroDef(ltSC, _T("sc"), 1);
- AddMacroDef(ltSECTIONHEADING, _T("sectionheading"), 1);
- AddMacroDef(ltSECTIONSTAR, _T("section*"), 1);
- AddMacroDef(ltSECTION, _T("section"), 1);
- AddMacroDef(ltSETCOUNTER, _T("setcounter"), 2);
- AddMacroDef(ltSFFAMILY, _T("sffamily"), 1);
- AddMacroDef(ltSF, _T("sf"), 1);
- AddMacroDef(ltSHARP, _T("sharp"), 0);
- AddMacroDef(ltSHORTCITE, _T("shortcite"), 1);
- AddMacroDef(ltSIGMA, _T("sigma"), 0);
- AddMacroDef(ltCAP_SIGMA, _T("Sigma"), 0);
- AddMacroDef(ltSIM, _T("sim"), 0);
- AddMacroDef(ltSIMEQ, _T("simeq"), 0);
- AddMacroDef(ltSINGLESPACE, _T("singlespace"), 1);
- AddMacroDef(ltSIZEDBOX, _T("sizedbox"), 2);
- AddMacroDef(ltSIZEDBOXD, _T("sizedboxd"), 2);
- AddMacroDef(ltSLOPPYPAR, _T("sloppypar"), 1);
- AddMacroDef(ltSLOPPY, _T("sloppy"), 0);
- AddMacroDef(ltSLSHAPE, _T("slshape"), 1);
- AddMacroDef(ltSL, _T("sl"), 1);
- AddMacroDef(ltSMALL, _T("small"), 1);
- AddMacroDef(ltSMILE, _T("smile"), 0);
- AddMacroDef(ltSS, _T("ss"), 0);
- AddMacroDef(ltSTAR, _T("star"), 0);
- AddMacroDef(ltSUBITEM, _T("subitem"), 0);
- AddMacroDef(ltSUBPARAGRAPHSTAR, _T("subparagraph*"), 1);
- AddMacroDef(ltSUBPARAGRAPH, _T("subparagraph"), 1);
- AddMacroDef(ltSPECIAL, _T("special"), 1);
- AddMacroDef(ltSUBSECTIONSTAR, _T("subsection*"), 1);
- AddMacroDef(ltSUBSECTION, _T("subsection"), 1);
- AddMacroDef(ltSUBSETEQ, _T("subseteq"), 0);
- AddMacroDef(ltSUBSET, _T("subset"), 0);
- AddMacroDef(ltSUCC, _T("succ"), 0);
- AddMacroDef(ltSUCCEQ, _T("succeq"), 0);
- AddMacroDef(ltSUPSETEQ, _T("supseteq"), 0);
- AddMacroDef(ltSUPSET, _T("supset"), 0);
- AddMacroDef(ltSUBSUBSECTIONSTAR, _T("subsubsection*"), 1);
- AddMacroDef(ltSUBSUBSECTION, _T("subsubsection"), 1);
- AddMacroDef(ltSUPERTABULAR, _T("supertabular"), 2, false);
- AddMacroDef(ltSURD, _T("surd"), 0);
- AddMacroDef(ltSCRIPTSIZE, _T("scriptsize"), 1);
- AddMacroDef(ltSETHEADER, _T("setheader"), 6);
- AddMacroDef(ltSETFOOTER, _T("setfooter"), 6);
- AddMacroDef(ltSETHOTSPOTCOLOUR, _T("sethotspotcolour"), 1);
- AddMacroDef(ltSETHOTSPOTCOLOR, _T("sethotspotcolor"), 1);
- AddMacroDef(ltSETHOTSPOTUNDERLINE, _T("sethotspotunderline"), 1);
- AddMacroDef(ltSETTRANSPARENCY, _T("settransparency"), 1);
- AddMacroDef(ltSPADESUIT, _T("spadesuit"), 0);
-
- AddMacroDef(ltTABBING, _T("tabbing"), 2);
- AddMacroDef(ltTABLEOFCONTENTS, _T("tableofcontents"), 0);
- AddMacroDef(ltTABLE, _T("table"), 1);
- AddMacroDef(ltTABULAR, _T("tabular"), 2, false);
- AddMacroDef(ltTAB, _T("tab"), 0);
- AddMacroDef(ltTAU, _T("tau"), 0);
- AddMacroDef(ltTEXTRM, _T("textrm"), 1);
- AddMacroDef(ltTEXTSF, _T("textsf"), 1);
- AddMacroDef(ltTEXTTT, _T("texttt"), 1);
- AddMacroDef(ltTEXTBF, _T("textbf"), 1);
- AddMacroDef(ltTEXTIT, _T("textit"), 1);
- AddMacroDef(ltTEXTSL, _T("textsl"), 1);
- AddMacroDef(ltTEXTSC, _T("textsc"), 1);
- AddMacroDef(ltTEXTWIDTH, _T("textwidth"), 1);
- AddMacroDef(ltTEXTHEIGHT, _T("textheight"), 1);
- AddMacroDef(ltTEXTCOLOUR, _T("textcolour"), 1);
- AddMacroDef(ltTEX, _T("TeX"), 0);
- AddMacroDef(ltTHEBIBLIOGRAPHY, _T("thebibliography"), 2);
- AddMacroDef(ltTHETA, _T("theta"), 0);
- AddMacroDef(ltTIMES, _T("times"), 0);
- AddMacroDef(ltCAP_THETA, _T("Theta"), 0);
- AddMacroDef(ltTITLEPAGE, _T("titlepage"), 1);
- AddMacroDef(ltTITLE, _T("title"), 1);
- AddMacroDef(ltTINY, _T("tiny"), 1);
- AddMacroDef(ltTODAY, _T("today"), 0);
- AddMacroDef(ltTOPMARGIN, _T("topmargin"), 1);
- AddMacroDef(ltTOPSKIP, _T("topskip"), 1);
- AddMacroDef(ltTRIANGLE, _T("triangle"), 0);
- AddMacroDef(ltTTFAMILY, _T("ttfamily"), 1);
- AddMacroDef(ltTT, _T("tt"), 1);
- AddMacroDef(ltTYPEIN, _T("typein"), 1);
- AddMacroDef(ltTYPEOUT, _T("typeout"), 1);
- AddMacroDef(ltTWOCOLWIDTHA, _T("twocolwidtha"), 1);
- AddMacroDef(ltTWOCOLWIDTHB, _T("twocolwidthb"), 1);
- AddMacroDef(ltTWOCOLSPACING, _T("twocolspacing"), 1);
- AddMacroDef(ltTWOCOLITEMRULED, _T("twocolitemruled"), 2);
- AddMacroDef(ltTWOCOLITEM, _T("twocolitem"), 2);
- AddMacroDef(ltTWOCOLLIST, _T("twocollist"), 1);
- AddMacroDef(ltTWOCOLUMN, _T("twocolumn"), 0);
- AddMacroDef(ltTHEPAGE, _T("thepage"), 0);
- AddMacroDef(ltTHECHAPTER, _T("thechapter"), 0);
- AddMacroDef(ltTHESECTION, _T("thesection"), 0);
- AddMacroDef(ltTHISPAGESTYLE, _T("thispagestyle"), 1);
-
- AddMacroDef(ltUNDERLINE, _T("underline"), 1);
- AddMacroDef(ltUPSILON, _T("upsilon"), 0);
- AddMacroDef(ltCAP_UPSILON, _T("Upsilon"), 0);
- AddMacroDef(ltUPARROW, _T("uparrow"), 0);
- AddMacroDef(ltUPARROW2, _T("Uparrow"), 0);
- AddMacroDef(ltUPPERCASE, _T("uppercase"), 1);
- AddMacroDef(ltUPSHAPE, _T("upshape"), 1);
- AddMacroDef(ltURLREF, _T("urlref"), 2);
- AddMacroDef(ltUSEPACKAGE, _T("usepackage"), 1);
-
- AddMacroDef(ltVAREPSILON, _T("varepsilon"), 0);
- AddMacroDef(ltVARPHI, _T("varphi"), 0);
- AddMacroDef(ltVARPI, _T("varpi"), 0);
- AddMacroDef(ltVARRHO, _T("varrho"), 0);
- AddMacroDef(ltVARSIGMA, _T("varsigma"), 0);
- AddMacroDef(ltVARTHETA, _T("vartheta"), 0);
- AddMacroDef(ltVDOTS, _T("vdots"), 0);
- AddMacroDef(ltVEE, _T("vee"), 0);
- AddMacroDef(ltVERBATIMINPUT, _T("verbatiminput"), 1);
- AddMacroDef(ltVERBATIM, _T("verbatim"), 1);
- AddMacroDef(ltVERBSTAR, _T("verb*"), 1);
- AddMacroDef(ltVERB, _T("verb"), 1);
- AddMacroDef(ltVERSE, _T("verse"), 1);
- AddMacroDef(ltVFILL, _T("vfill"), 0);
- AddMacroDef(ltVLINE, _T("vline"), 0);
- AddMacroDef(ltVOID, _T("void"), 0);
- AddMacroDef(ltVDASH, _T("vdash"), 0);
- AddMacroDef(ltVRULE, _T("vrule"), 0);
- AddMacroDef(ltVSPACESTAR, _T("vspace*"), 1);
- AddMacroDef(ltVSKIPSTAR, _T("vskip*"), 1);
- AddMacroDef(ltVSPACE, _T("vspace"), 1);
- AddMacroDef(ltVSKIP, _T("vskip"), 1);
-
- AddMacroDef(ltWEDGE, _T("wedge"), 0);
- AddMacroDef(ltWXCLIPS, _T("wxclips"), 0);
- AddMacroDef(ltWINHELPIGNORE, _T("winhelpignore"), 1);
- AddMacroDef(ltWINHELPONLY, _T("winhelponly"), 1);
- AddMacroDef(ltWP, _T("wp"), 0);
-
- AddMacroDef(ltXI, _T("xi"), 0);
- AddMacroDef(ltCAP_XI, _T("Xi"), 0);
- AddMacroDef(ltXLPIGNORE, _T("xlpignore"), 1);
- AddMacroDef(ltXLPONLY, _T("xlponly"), 1);
-
- AddMacroDef(ltZETA, _T("zeta"), 0);
-
- AddMacroDef(ltSPACE, _T(" "), 0);
- AddMacroDef(ltBACKSLASHCHAR, _T("\\"), 0);
- AddMacroDef(ltPIPE, _T("|"), 0);
- AddMacroDef(ltFORWARDSLASH, _T("/"), 0);
- AddMacroDef(ltUNDERSCORE, _T("_"), 0);
- AddMacroDef(ltAMPERSAND, _T("&"), 0);
- AddMacroDef(ltPERCENT, _T("%"), 0);
- AddMacroDef(ltDOLLAR, _T("$"), 0);
- AddMacroDef(ltHASH, _T("#"), 0);
- AddMacroDef(ltLPARENTH, _T("("), 0);
- AddMacroDef(ltRPARENTH, _T(")"), 0);
- AddMacroDef(ltLBRACE, _T("{"), 0);
- AddMacroDef(ltRBRACE, _T("}"), 0);
-// AddMacroDef(ltEQUALS, _T("="), 0);
- AddMacroDef(ltRANGLEBRA, _T(">"), 0);
- AddMacroDef(ltLANGLEBRA, _T("<"), 0);
- AddMacroDef(ltPLUS, _T("+"), 0);
- AddMacroDef(ltDASH, _T("-"), 0);
- AddMacroDef(ltAT_SYMBOL, _T("@"), 0);
-// AddMacroDef(ltSINGLEQUOTE, _T("'"), 0);
-// AddMacroDef(ltBACKQUOTE, _T("`"), 0);
-}
-
-/*
- * Default behaviour, should be called by client if can't match locally.
- *
- */
-
-// Called on start/end of macro examination
-void DefaultOnMacro(int macroId, int no_args, bool start)
-{
- switch (macroId)
- {
- // Default behaviour for abstract
- case ltABSTRACT:
- {
- if (start)
- {
- // Write the heading
- FakeCurrentSection(AbstractNameString);
- OnMacro(ltPAR, 0, true);
- OnMacro(ltPAR, 0, false);
- }
- else
- {
- if (DocumentStyle == LATEX_ARTICLE)
- sectionNo --;
- else
- chapterNo --;
- }
- break;
- }
-
- // Default behaviour for glossary
- case ltHELPGLOSSARY:
- {
- if (start)
- {
- // Write the heading
- FakeCurrentSection(GlossaryNameString);
- OnMacro(ltPAR, 0, true);
- OnMacro(ltPAR, 0, false);
- if ((convertMode == TEX_RTF) && !winHelp)
- {
- OnMacro(ltPAR, 0, true);
- OnMacro(ltPAR, 0, false);
- }
- }
- break;
- }
- case ltSPECIALAMPERSAND:
- if (start)
- TexOutput(_T(" "));
- break;
-
- case ltCINSERT:
- if (start)
- {
- if (convertMode == TEX_HTML)
- TexOutput(_T("<<"));
- else
- TexOutput(_T("<<"), true);
- }
- break;
- case ltCEXTRACT:
- if (start)
- {
- if (convertMode == TEX_HTML)
- TexOutput(_T(">>"));
- else
- TexOutput(_T(">>"), true);
- }
- break;
- case ltDESTRUCT:
- if (start)
- TexOutput(_T("~"), true);
- break;
- case ltTILDE:
- if (start)
- TexOutput(_T("~"), true);
- break;
- case ltSPECIALTILDE:
- if (start)
- TexOutput(_T(" "), true);
- break;
- case ltUNDERSCORE:
- if (start)
- TexOutput(_T("_"), true);
- break;
- case ltHASH:
- if (start)
- TexOutput(_T("#"), true);
- break;
- case ltAMPERSAND:
- if (start)
- TexOutput(_T("&"), true);
- break;
- case ltSPACE:
- if (start)
- TexOutput(_T(" "), true);
- break;
- case ltPIPE:
- if (start)
- TexOutput(_T("|"), true);
- break;
- case ltPERCENT:
- if (start)
- TexOutput(_T("%"), true);
- break;
- case ltDOLLAR:
- if (start)
- TexOutput(_T("$"), true);
- break;
- case ltLPARENTH:
- if (start)
- TexOutput(_T(""), true);
- break;
- case ltRPARENTH:
- if (start)
- TexOutput(_T(""), true);
- break;
- case ltLBRACE:
- if (start)
- TexOutput(_T("{"), true);
- break;
- case ltRBRACE:
- if (start)
- TexOutput(_T("}"), true);
- break;
- case ltCOPYRIGHT:
- if (start)
- TexOutput(_T("(c)"), true);
- break;
- case ltREGISTERED:
- if (start)
- TexOutput(_T("(r)"), true);
- break;
- case ltBACKSLASH:
- if (start)
- TexOutput(_T("\\"), true);
- break;
- case ltLDOTS:
- case ltCDOTS:
- if (start)
- TexOutput(_T("..."), true);
- break;
- case ltVDOTS:
- if (start)
- TexOutput(_T("|"), true);
- break;
- case ltLATEX:
- if (start)
- TexOutput(_T("LaTeX"), true);
- break;
- case ltTEX:
- if (start)
- TexOutput(_T("TeX"), true);
- break;
- case ltPOUNDS:
- if (start)
- // FIXME: this is valid only if the output is iso-8859-1
- TexOutput(wxString::FromAscii("£"), true);
- break;
- case ltSPECIALDOUBLEDOLLAR: // Interpret as center
- OnMacro(ltCENTER, no_args, start);
- break;
- case ltEMPH:
- case ltTEXTSL:
- case ltSLSHAPE:
- case ltSL:
- OnMacro(ltIT, no_args, start);
- break;
- case ltPARAGRAPH:
- case ltPARAGRAPHSTAR:
- case ltSUBPARAGRAPH:
- case ltSUBPARAGRAPHSTAR:
- OnMacro(ltSUBSUBSECTION, no_args, start);
- break;
- case ltTODAY:
- {
- if (start)
- {
- time_t when;
- (void) time(&when);
- TexOutput(wxCtime(&when), true);
- }
- break;
- }
- case ltNOINDENT:
- if (start)
- ParIndent = 0;
- break;
-
- // Symbols
- case ltALPHA:
- if (start) TexOutput(_T("alpha"));
- break;
- case ltBETA:
- if (start) TexOutput(_T("beta"));
- break;
- case ltGAMMA:
- if (start) TexOutput(_T("gamma"));
- break;
- case ltDELTA:
- if (start) TexOutput(_T("delta"));
- break;
- case ltEPSILON:
- case ltVAREPSILON:
- if (start) TexOutput(_T("epsilon"));
- break;
- case ltZETA:
- if (start) TexOutput(_T("zeta"));
- break;
- case ltETA:
- if (start) TexOutput(_T("eta"));
- break;
- case ltTHETA:
- case ltVARTHETA:
- if (start) TexOutput(_T("theta"));
- break;
- case ltIOTA:
- if (start) TexOutput(_T("iota"));
- break;
- case ltKAPPA:
- if (start) TexOutput(_T("kappa"));
- break;
- case ltLAMBDA:
- if (start) TexOutput(_T("lambda"));
- break;
- case ltMU:
- if (start) TexOutput(_T("mu"));
- break;
- case ltNU:
- if (start) TexOutput(_T("nu"));
- break;
- case ltXI:
- if (start) TexOutput(_T("xi"));
- break;
- case ltPI:
- case ltVARPI:
- if (start) TexOutput(_T("pi"));
- break;
- case ltRHO:
- case ltVARRHO:
- if (start) TexOutput(_T("rho"));
- break;
- case ltSIGMA:
- case ltVARSIGMA:
- if (start) TexOutput(_T("sigma"));
- break;
- case ltTAU:
- if (start) TexOutput(_T("tau"));
- break;
- case ltUPSILON:
- if (start) TexOutput(_T("upsilon"));
- break;
- case ltPHI:
- case ltVARPHI:
- if (start) TexOutput(_T("phi"));
- break;
- case ltCHI:
- if (start) TexOutput(_T("chi"));
- break;
- case ltPSI:
- if (start) TexOutput(_T("psi"));
- break;
- case ltOMEGA:
- if (start) TexOutput(_T("omega"));
- break;
- case ltCAP_GAMMA:
- if (start) TexOutput(_T("GAMMA"));
- break;
- case ltCAP_DELTA:
- if (start) TexOutput(_T("DELTA"));
- break;
- case ltCAP_THETA:
- if (start) TexOutput(_T("THETA"));
- break;
- case ltCAP_LAMBDA:
- if (start) TexOutput(_T("LAMBDA"));
- break;
- case ltCAP_XI:
- if (start) TexOutput(_T("XI"));
- break;
- case ltCAP_PI:
- if (start) TexOutput(_T("PI"));
- break;
- case ltCAP_SIGMA:
- if (start) TexOutput(_T("SIGMA"));
- break;
- case ltCAP_UPSILON:
- if (start) TexOutput(_T("UPSILON"));
- break;
- case ltCAP_PHI:
- if (start) TexOutput(_T("PHI"));
- break;
- case ltCAP_PSI:
- if (start) TexOutput(_T("PSI"));
- break;
- case ltCAP_OMEGA:
- if (start) TexOutput(_T("OMEGA"));
- break;
-
- // Binary operation symbols
- case ltLE:
- case ltLEQ:
- if (start)
- {
- if (convertMode == TEX_HTML)
- TexOutput(_T("<="));
- else
- TexOutput(_T("<="));
- }
- break;
- case ltLL:
- if (start)
- {
- if (convertMode == TEX_HTML)
- TexOutput(_T("<<"));
- else
- TexOutput(_T("<<"));
- }
- break;
- case ltSUBSET:
- if (start) TexOutput(_T("SUBSET"));
- break;
- case ltSUBSETEQ:
- if (start) TexOutput(_T("SUBSETEQ"));
- break;
- case ltIN:
- if (start) TexOutput(_T("IN"));
- break;
- case ltVDASH:
- if (start) TexOutput(_T("VDASH"));
- break;
- case ltMODELS:
- if (start) TexOutput(_T("MODELS"));
- break;
- case ltGE:
- case ltGEQ:
- {
- if (start)
- {
- if (convertMode == TEX_HTML)
- TexOutput(_T(">="));
- else
- TexOutput(_T(">="));
- }
- break;
- }
- case ltGG:
- if (start)
- {
- if (convertMode == TEX_HTML)
- TexOutput(_T(">>"));
- else
- TexOutput(_T(">>"));
- }
- break;
- case ltSUPSET:
- if (start) TexOutput(_T("SUPSET"));
- break;
- case ltSUPSETEQ:
- if (start) TexOutput(_T("SUPSETEQ"));
- break;
- case ltNI:
- if (start) TexOutput(_T("NI"));
- break;
- case ltDASHV:
- if (start) TexOutput(_T("DASHV"));
- break;
- case ltPERP:
- if (start) TexOutput(_T("PERP"));
- break;
- case ltNEQ:
- if (start) TexOutput(_T("NEQ"));
- break;
- case ltDOTEQ:
- if (start) TexOutput(_T("DOTEQ"));
- break;
- case ltAPPROX:
- if (start) TexOutput(_T("APPROX"));
- break;
- case ltCONG:
- if (start) TexOutput(_T("CONG"));
- break;
- case ltEQUIV:
- if (start) TexOutput(_T("EQUIV"));
- break;
- case ltPROPTO:
- if (start) TexOutput(_T("PROPTO"));
- break;
- case ltPREC:
- if (start) TexOutput(_T("PREC"));
- break;
- case ltPRECEQ:
- if (start) TexOutput(_T("PRECEQ"));
- break;
- case ltPARALLEL:
- if (start) TexOutput(_T("|"));
- break;
- case ltSIM:
- if (start) TexOutput(_T("~"));
- break;
- case ltSIMEQ:
- if (start) TexOutput(_T("SIMEQ"));
- break;
- case ltASYMP:
- if (start) TexOutput(_T("ASYMP"));
- break;
- case ltSMILE:
- if (start) TexOutput(_T(":-)"));
- break;
- case ltFROWN:
- if (start) TexOutput(_T(":-("));
- break;
- case ltSUCC:
- if (start) TexOutput(_T("SUCC"));
- break;
- case ltSUCCEQ:
- if (start) TexOutput(_T("SUCCEQ"));
- break;
- case ltMID:
- if (start) TexOutput(_T("|"));
- break;
-
- // Negated relation symbols
- case ltNOTEQ:
- if (start) TexOutput(_T("!="));
- break;
- case ltNOTIN:
- if (start) TexOutput(_T("NOTIN"));
- break;
- case ltNOTSUBSET:
- if (start) TexOutput(_T("NOTSUBSET"));
- break;
-
- // Arrows
- case ltLEFTARROW:
- if (start)
- {
- if (convertMode == TEX_HTML)
- TexOutput(_T("<--"));
- else
- TexOutput(_T("<--"));
- }
- break;
- case ltLEFTARROW2:
- if (start)
- {
- if (convertMode == TEX_HTML)
- TexOutput(_T("<=="));
- else
- TexOutput(_T("<=="));
- }
- break;
- case ltRIGHTARROW:
- if (start)
- {
- if (convertMode == TEX_HTML)
- TexOutput(_T("-->"));
- else
- TexOutput(_T("-->"));
- }
- break;
- case ltRIGHTARROW2:
- if (start)
- {
- if (convertMode == TEX_HTML)
- TexOutput(_T("==>"));
- else
- TexOutput(_T("==>"));
- }
- break;
- case ltLEFTRIGHTARROW:
- if (start)
- {
- if (convertMode == TEX_HTML)
- TexOutput(_T("<-->"));
- else
- TexOutput(_T("<-->"));
- }
- break;
- case ltLEFTRIGHTARROW2:
- if (start)
- {
- if (convertMode == TEX_HTML)
- TexOutput(_T("<==>"));
- else
- TexOutput(_T("<==>"));
- }
- break;
- case ltUPARROW:
- if (start) TexOutput(_T("UPARROW"));
- break;
- case ltUPARROW2:
- if (start) TexOutput(_T("UPARROW2"));
- break;
- case ltDOWNARROW:
- if (start) TexOutput(_T("DOWNARROW"));
- break;
- case ltDOWNARROW2:
- if (start) TexOutput(_T("DOWNARROW2"));
- break;
- // Miscellaneous symbols
- case ltALEPH:
- if (start) TexOutput(_T("ALEPH"));
- break;
- case ltWP:
- if (start) TexOutput(_T("WP"));
- break;
- case ltRE:
- if (start) TexOutput(_T("RE"));
- break;
- case ltIM:
- if (start) TexOutput(_T("IM"));
- break;
- case ltEMPTYSET:
- if (start) TexOutput(_T("EMPTYSET"));
- break;
- case ltNABLA:
- if (start) TexOutput(_T("NABLA"));
- break;
- case ltSURD:
- if (start) TexOutput(_T("SURD"));
- break;
- case ltPARTIAL:
- if (start) TexOutput(_T("PARTIAL"));
- break;
- case ltBOT:
- if (start) TexOutput(_T("BOT"));
- break;
- case ltFORALL:
- if (start) TexOutput(_T("FORALL"));
- break;
- case ltEXISTS:
- if (start) TexOutput(_T("EXISTS"));
- break;
- case ltNEG:
- if (start) TexOutput(_T("NEG"));
- break;
- case ltSHARP:
- if (start) TexOutput(_T("SHARP"));
- break;
- case ltANGLE:
- if (start) TexOutput(_T("ANGLE"));
- break;
- case ltTRIANGLE:
- if (start) TexOutput(_T("TRIANGLE"));
- break;
- case ltCLUBSUIT:
- if (start) TexOutput(_T("CLUBSUIT"));
- break;
- case ltDIAMONDSUIT:
- if (start) TexOutput(_T("DIAMONDSUIT"));
- break;
- case ltHEARTSUIT:
- if (start) TexOutput(_T("HEARTSUIT"));
- break;
- case ltSPADESUIT:
- if (start) TexOutput(_T("SPADESUIT"));
- break;
- case ltINFTY:
- if (start) TexOutput(_T("INFTY"));
- break;
- case ltPM:
- if (start) TexOutput(_T("PM"));
- break;
- case ltMP:
- if (start) TexOutput(_T("MP"));
- break;
- case ltTIMES:
- if (start) TexOutput(_T("TIMES"));
- break;
- case ltDIV:
- if (start) TexOutput(_T("DIV"));
- break;
- case ltCDOT:
- if (start) TexOutput(_T("CDOT"));
- break;
- case ltAST:
- if (start) TexOutput(_T("AST"));
- break;
- case ltSTAR:
- if (start) TexOutput(_T("STAR"));
- break;
- case ltCAP:
- if (start) TexOutput(_T("CAP"));
- break;
- case ltCUP:
- if (start) TexOutput(_T("CUP"));
- break;
- case ltVEE:
- if (start) TexOutput(_T("VEE"));
- break;
- case ltWEDGE:
- if (start) TexOutput(_T("WEDGE"));
- break;
- case ltCIRC:
- if (start) TexOutput(_T("CIRC"));
- break;
- case ltBULLET:
- if (start) TexOutput(_T("BULLET"));
- break;
- case ltDIAMOND:
- if (start) TexOutput(_T("DIAMOND"));
- break;
- case ltOSLASH:
- if (start) TexOutput(_T("OSLASH"));
- break;
- case ltBOX:
- if (start) TexOutput(_T("BOX"));
- break;
- case ltDIAMOND2:
- if (start) TexOutput(_T("DIAMOND2"));
- break;
- case ltBIGTRIANGLEDOWN:
- if (start) TexOutput(_T("BIGTRIANGLEDOWN"));
- break;
- case ltOPLUS:
- if (start) TexOutput(_T("OPLUS"));
- break;
- case ltOTIMES:
- if (start) TexOutput(_T("OTIMES"));
- break;
- case ltSS:
- if (start) TexOutput(_T("s"));
- break;
- case ltBACKSLASHRAW:
- if (start) TexOutput(_T("\\"));
- break;
- case ltLBRACERAW:
- if (start) TexOutput(_T("{"));
- break;
- case ltRBRACERAW:
- if (start) TexOutput(_T("}"));
- break;
- case ltSMALLSPACE1:
- case ltSMALLSPACE2:
- if (start) TexOutput(_T(" "));
- break;
- default:
- break;
- }
-}
-
-// Called on start/end of argument examination
-bool DefaultOnArgument(int macroId, int arg_no, bool start)
-{
- switch (macroId)
- {
- case ltREF:
- {
- if (arg_no == 1 && start)
- {
- wxChar *refName = GetArgData();
- if (refName)
- {
- TexRef *texRef = FindReference(refName);
- if (texRef)
- {
- // Must strip the 'section' or 'chapter' or 'figure' text
- // from a normal 'ref' reference
- wxChar buf[150];
- wxStrcpy(buf, texRef->sectionNumber);
- int len = wxStrlen(buf);
- int i = 0;
- if (wxStrcmp(buf, _T("??")) != 0)
- {
- while (i < len)
- {
- if (buf[i] == ' ')
- {
- i ++;
- break;
- }
- else i ++;
- }
- }
- TexOutput(texRef->sectionNumber + i, true);
- }
- else
- {
- wxString informBuf;
- informBuf.Printf(_T("Warning: unresolved reference '%s'"), refName);
- OnInform(informBuf);
- }
- }
- else TexOutput(_T("??"), true);
- return false;
- }
- break;
- }
- case ltLABEL:
- {
- return false;
- }
- case ltAUTHOR:
- {
- if (start && (arg_no == 1))
- DocumentAuthor = GetArgChunk();
- return false;
- }
- case ltDATE:
- {
- if (start && (arg_no == 1))
- DocumentDate = GetArgChunk();
- return false;
- }
- case ltTITLE:
- {
- if (start && (arg_no == 1))
- DocumentTitle = GetArgChunk();
- return false;
- }
- case ltDOCUMENTCLASS:
- case ltDOCUMENTSTYLE:
- {
- if (start && !IsArgOptional())
- {
- DocumentStyleString = copystring(GetArgData());
- if (wxStrncmp(DocumentStyleString, _T("art"), 3) == 0)
- DocumentStyle = LATEX_ARTICLE;
- else if (wxStrncmp(DocumentStyleString, _T("rep"), 3) == 0)
- DocumentStyle = LATEX_REPORT;
- else if (wxStrncmp(DocumentStyleString, _T("book"), 4) == 0 ||
- wxStrncmp(DocumentStyleString, _T("thesis"), 6) == 0)
- DocumentStyle = LATEX_BOOK;
- else if (wxStrncmp(DocumentStyleString, _T("letter"), 6) == 0)
- DocumentStyle = LATEX_LETTER;
- else if (wxStrncmp(DocumentStyleString, _T("slides"), 6) == 0)
- DocumentStyle = LATEX_SLIDES;
-
- if (StringMatch(_T("10"), DocumentStyleString))
- SetFontSizes(10);
- else if (StringMatch(_T("11"), DocumentStyleString))
- SetFontSizes(11);
- else if (StringMatch(_T("12"), DocumentStyleString))
- SetFontSizes(12);
-
- OnMacro(ltHELPFONTSIZE, 1, true);
- wxSnprintf(currentArgData, 2000, _T("%d"), normalFont);
- haveArgData = true;
- OnArgument(ltHELPFONTSIZE, 1, true);
- OnArgument(ltHELPFONTSIZE, 1, false);
- haveArgData = false;
- OnMacro(ltHELPFONTSIZE, 1, false);
- }
- else if (start && IsArgOptional())
- {
- MinorDocumentStyleString = copystring(GetArgData());
-
- if (StringMatch(_T("10"), MinorDocumentStyleString))
- SetFontSizes(10);
- else if (StringMatch(_T("11"), MinorDocumentStyleString))
- SetFontSizes(11);
- else if (StringMatch(_T("12"), MinorDocumentStyleString))
- SetFontSizes(12);
- }
- return false;
- }
- case ltBIBLIOGRAPHYSTYLE:
- {
- if (start && !IsArgOptional())
- BibliographyStyleString = copystring(GetArgData());
- return false;
- }
- case ltPAGESTYLE:
- {
- if (start && !IsArgOptional())
- {
- if (PageStyle) delete[] PageStyle;
- PageStyle = copystring(GetArgData());
- }
- return false;
- }
-/*
- case ltLHEAD:
- {
- if (start && !IsArgOptional())
- LeftHeader = GetArgChunk();
- return false;
- break;
- }
- case ltLFOOT:
- {
- if (start && !IsArgOptional())
- LeftFooter = GetArgChunk();
- return false;
- break;
- }
- case ltCHEAD:
- {
- if (start && !IsArgOptional())
- CentreHeader = GetArgChunk();
- return false;
- break;
- }
- case ltCFOOT:
- {
- if (start && !IsArgOptional())
- CentreFooter = GetArgChunk();
- return false;
- break;
- }
- case ltRHEAD:
- {
- if (start && !IsArgOptional())
- RightHeader = GetArgChunk();
- return false;
- break;
- }
- case ltRFOOT:
- {
- if (start && !IsArgOptional())
- RightFooter = GetArgChunk();
- return false;
- break;
- }
-*/
- case ltCITE:
- case ltSHORTCITE:
- {
- if (start && !IsArgOptional())
- {
- wxChar *citeKeys = GetArgData();
- int pos = 0;
- wxChar *citeKey = ParseMultifieldString(citeKeys, &pos);
- while (citeKey)
- {
- AddCitation(citeKey);
- TexRef *ref = FindReference(citeKey);
- if (ref)
- {
- TexOutput(ref->sectionNumber, true);
- if (wxStrcmp(ref->sectionNumber, _T("??")) == 0)
- {
- wxString informBuf;
- informBuf.Printf(_T("Warning: unresolved citation %s."), citeKey);
- OnInform(informBuf);
- }
- }
- citeKey = ParseMultifieldString(citeKeys, &pos);
- if (citeKey)
- {
- TexOutput(_T(", "), true);
- }
- }
- return false;
- }
- break;
- }
- case ltNOCITE:
- {
- if (start && !IsArgOptional())
- {
- wxChar *citeKey = GetArgData();
- AddCitation(citeKey);
- return false;
- }
- break;
- }
- case ltHELPFONTSIZE:
- {
- if (start)
- {
- wxChar *data = GetArgData();
- if (wxStrcmp(data, _T("10")) == 0)
- SetFontSizes(10);
- else if (wxStrcmp(data, _T("11")) == 0)
- SetFontSizes(11);
- else if (wxStrcmp(data, _T("12")) == 0)
- SetFontSizes(12);
- return false;
- }
- break;
- }
- case ltPAGEREF:
- {
- if (start)
- {
- TexOutput(_T(" ??"), true);
- return false;
- }
- break;
- }
- case ltPARSKIP:
- {
- if (start && arg_no == 1)
- {
- wxChar *data = GetArgData();
- ParSkip = ParseUnitArgument(data);
- return false;
- }
- break;
- }
- case ltPARINDENT:
- {
- if (start && arg_no == 1)
- {
- wxChar *data = GetArgData();
- ParIndent = ParseUnitArgument(data);
- return false;
- }
- break;
- }
- case ltSL:
- {
- return OnArgument(ltIT, arg_no, start);
- }
- case ltSPECIALDOUBLEDOLLAR:
- {
- return OnArgument(ltCENTER, arg_no, start);
- }
- case ltPARAGRAPH:
- case ltPARAGRAPHSTAR:
- case ltSUBPARAGRAPH:
- case ltSUBPARAGRAPHSTAR:
- {
- return OnArgument(ltSUBSUBSECTION, arg_no, start);
- }
- case ltTYPEOUT:
- {
- if (start)
- OnInform(GetArgData());
- break;
- }
- case ltFOOTNOTE:
- {
- if (start)
- TexOutput(_T(" ("), true);
- else
- TexOutput(_T(")"), true);
- break;
- }
- case ltBIBLIOGRAPHY:
- {
- if (start)
- {
- int ch;
- wxChar smallBuf[2];
- smallBuf[1] = 0;
- FILE *fd = wxFopen(TexBibName, _T("r"));
- if (fd)
- {
- ch = getc(fd);
- smallBuf[0] = (wxChar)ch;
- while (ch != EOF)
- {
- TexOutput(smallBuf);
- ch = getc(fd);
- smallBuf[0] = (wxChar)ch;
- }
- fclose(fd);
- }
- else
- {
- OnInform(_T("Run Tex2RTF again to include bibliography."));
- }
-
- // Read in the .bib file, resolve all known references, write out the RTF.
- wxChar *allFiles = GetArgData();
- int pos = 0;
- wxChar *bibFile = ParseMultifieldString(allFiles, &pos);
- while (bibFile)
- {
- wxChar fileBuf[300];
- wxStrcpy(fileBuf, bibFile);
- wxString actualFile = TexPathList.FindValidPath(fileBuf);
- if (actualFile.empty())
- {
- wxStrcat(fileBuf, _T(".bib"));
- actualFile = TexPathList.FindValidPath(fileBuf);
- }
- if (!actualFile.empty())
- {
- if (!ReadBib((wxChar*) (const wxChar*) actualFile))
- {
- wxString errBuf;
- errBuf.Printf(_T(".bib file %s not found or malformed"), (const wxChar*) actualFile);
- OnError(errBuf);
- }
- }
- else
- {
- wxString errBuf;
- errBuf.Printf(_T(".bib file %s not found"), fileBuf);
- OnError(errBuf);
- }
- bibFile = ParseMultifieldString(allFiles, &pos);
- }
-
- ResolveBibReferences();
-
- // Write it a new bib section in the appropriate format.
- FILE *save1 = CurrentOutput1;
- FILE *save2 = CurrentOutput2;
- FILE *Biblio = wxFopen(TexTmpBibName, _T("w"));
- SetCurrentOutput(Biblio);
- OutputBib();
- fclose(Biblio);
- if (wxFileExists(TexTmpBibName))
- {
- if (wxFileExists(TexBibName)) wxRemoveFile(TexBibName);
- wxRenameFile(TexTmpBibName, TexBibName);
- }
- SetCurrentOutputs(save1, save2);
- return false;
- }
- break;
- }
- case ltMULTICOLUMN:
- return (start && (arg_no == 3));
- case ltSCSHAPE:
- case ltTEXTSC:
- case ltSC:
- {
- if (start && (arg_no == 1))
- {
- wxChar *s = GetArgData();
- if (s)
- {
- wxChar *s1 = copystring(s);
- int i;
- for (i = 0; i < (int)wxStrlen(s); i++)
- s1[i] = (wxChar)wxToupper(s[i]);
- TexOutput(s1);
- delete[] s1;
- return false;
- }
- else return true;
-
- }
- return true;
- }
- case ltLOWERCASE:
- {
- if (start && (arg_no == 1))
- {
- wxChar *s = GetArgData();
- if (s)
- {
- wxChar *s1 = copystring(s);
- int i;
- for (i = 0; i < (int)wxStrlen(s); i++)
- s1[i] = (wxChar)wxTolower(s[i]);
- TexOutput(s1);
- delete[] s1;
- return false;
- }
- else return true;
-
- }
- return true;
- }
- case ltUPPERCASE:
- {
- if (start && (arg_no == 1))
- {
- wxChar *s = GetArgData();
- if (s)
- {
- wxChar *s1 = copystring(s);
- int i;
- for (i = 0; i < (int)wxStrlen(s); i++)
- s1[i] = (wxChar)wxToupper(s[i]);
- TexOutput(s1);
- delete[] s1;
- return false;
- }
- else return true;
-
- }
- return true;
- }
- case ltPOPREF: // Ignore second argument by default
- return (start && (arg_no == 1));
- case ltTWOCOLUMN:
- return true;
- case ltXLPIGNORE:
- return ((convertMode == TEX_XLP) ? false : true);
- case ltXLPONLY:
- return ((convertMode != TEX_XLP) ? false : true);
- case ltHTMLIGNORE:
- return ((convertMode == TEX_HTML) ? false : true);
- case ltHTMLONLY:
- return ((convertMode != TEX_HTML) ? false : true);
- case ltRTFIGNORE:
- return (((convertMode == TEX_RTF) && !winHelp) ? false : true);
- case ltRTFONLY:
- return (!((convertMode == TEX_RTF) && !winHelp) ? false : true);
- case ltWINHELPIGNORE:
- return (winHelp ? false : true);
- case ltWINHELPONLY:
- return (!winHelp ? false : true);
- case ltLATEXIGNORE:
- return true;
- case ltLATEXONLY:
- return false;
- case ltCLINE:
- case ltARABIC:
- case ltALPH1:
- case ltALPH2:
- case ltROMAN:
- case ltROMAN2:
- case ltSETCOUNTER:
- case ltADDTOCOUNTER:
- case ltADDCONTENTSLINE:
- case ltNEWCOUNTER:
- case ltTEXTWIDTH:
- case ltTEXTHEIGHT:
- case ltBASELINESKIP:
- case ltVSPACESTAR:
- case ltHSPACESTAR:
- case ltVSPACE:
- case ltHSPACE:
- case ltVSKIPSTAR:
- case ltHSKIPSTAR:
- case ltVSKIP:
- case ltHSKIP:
- case ltPAGENUMBERING:
- case ltTHEPAGE:
- case ltTHECHAPTER:
- case ltTHESECTION:
- case ltITEMSEP:
- case ltFANCYPLAIN:
- case ltCHEAD:
- case ltRHEAD:
- case ltLHEAD:
- case ltCFOOT:
- case ltRFOOT:
- case ltLFOOT:
- case ltTHISPAGESTYLE:
- case ltMARKRIGHT:
- case ltMARKBOTH:
- case ltEVENSIDEMARGIN:
- case ltODDSIDEMARGIN:
- case ltMARGINPAR:
- case ltMARGINPARWIDTH:
- case ltMARGINPARSEP:
- case ltMARGINPAREVEN:
- case ltMARGINPARODD:
- case ltTWOCOLWIDTHA:
- case ltTWOCOLWIDTHB:
- case ltTWOCOLSPACING:
- case ltSETHEADER:
- case ltSETFOOTER:
- case ltINDEX:
- case ltITEM:
- case ltBCOL:
- case ltFCOL:
- case ltSETHOTSPOTCOLOUR:
- case ltSETHOTSPOTCOLOR:
- case ltSETHOTSPOTUNDERLINE:
- case ltSETTRANSPARENCY:
- case ltUSEPACKAGE:
- case ltBACKGROUND:
- case ltBACKGROUNDCOLOUR:
- case ltBACKGROUNDIMAGE:
- case ltLINKCOLOUR:
- case ltFOLLOWEDLINKCOLOUR:
- case ltTEXTCOLOUR:
- case ltIMAGE:
- case ltIMAGEMAP:
- case ltIMAGEL:
- case ltIMAGER:
- case ltPOPREFONLY:
- case ltINSERTATLEVEL:
- return false;
- case ltTABULAR:
- case ltSUPERTABULAR:
- case ltINDENTED:
- case ltSIZEDBOX:
- case ltSIZEDBOXD:
- return (arg_no == 2);
- case ltDEFINECOLOUR:
- case ltDEFINECOLOR:
- {
- static int redVal = 0;
- static int greenVal = 0;
- static int blueVal = 0;
- static wxChar *colourName = NULL;
- if (start)
- {
- switch (arg_no)
- {
- case 1:
- {
- if (colourName) delete[] colourName;
- colourName = copystring(GetArgData());
- break;
- }
- case 2:
- {
- redVal = wxAtoi(GetArgData());
- break;
- }
- case 3:
- {
- greenVal = wxAtoi(GetArgData());
- break;
- }
- case 4:
- {
- blueVal = wxAtoi(GetArgData());
- AddColour(colourName, redVal, greenVal, blueVal);
- break;
- }
- default:
- break;
- }
- }
- return false;
- }
- case ltFIGURE:
- case ltFIGURESTAR:
- case ltNORMALBOX:
- case ltNORMALBOXD:
- default:
- return (!IsArgOptional());
- }
- return true;
-}
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: tex2any.h
-// Purpose: Latex conversion header
-// Author: Julian Smart
-// Modified by:
-// Created: 7.9.93
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#include <stdio.h>
-#include "wx/utils.h"
-#include "wx/list.h"
-#include "wx/hash.h"
-#include "wx/tokenzr.h"
-#include "wx/wfstream.h"
-#include "wx/txtstrm.h"
-#include "wxhlpblk.h"
-
-/*
- * Conversion modes
- *
- */
-
-#define TEX_RTF 1
-#define TEX_XLP 2
-#define TEX_HTML 3
-
-/*
- * We have a list of macro definitions which we must define
- * in advance to enable the parsing to recognize macros.
- */
-
-#define FORBID_OK 0
-#define FORBID_WARN 1
-#define FORBID_ABSOLUTELY 2
-
-
-#ifdef __WXMSW__
- const unsigned long MAX_LINE_BUFFER_SIZE = 600;
-#else
- const unsigned long MAX_LINE_BUFFER_SIZE = 11000;
-#endif
-
-class TexMacroDef: public wxObject
-{
- public:
- int no_args;
- wxChar *name;
- bool ignore;
- int forbidden;
- int macroId;
-
- TexMacroDef(int the_id, const wxChar *the_name, int n, bool ig, bool forbidLevel = FORBID_OK);
- virtual ~TexMacroDef(void);
-};
-
-#define CHUNK_TYPE_MACRO 1
-#define CHUNK_TYPE_ARG 2
-#define CHUNK_TYPE_STRING 3
-
-/*
- We have nested lists to represent the Tex document.
- Each element of a list of chunks can be one of:
- - a plain string
- - a macro with/without arguments. Arguments are lists of TexChunks.
-
-Example (\toplevel is implicit but made explicit here):
-
-AddMacroDef(ltMYMAT, "mymat", 2);
-
-\toplevel{The cat sat on the \mymat{very coarse and {\it cheap}}{mat}}.
-
-Parsed as:
-
-TexChunk: type = macro, name = toplevel, no_args = 1
- Children:
-
- TexChunk: type = argument
-
- Children:
- TexChunk: type = string, value = "The cat sat on the "
- TexChunk: type = macro, name = mymat, no_args = 2
-
- Children:
- TexChunk: type = argument
-
- Children:
- TexChunk: type = string, value = "very coarse and "
- TexChunk: type = macro, name = it, no_args = 1
-
- Children:
- TexChunk: type = argument
-
- Children:
- TexChunk: type = string, value = "cheap"
-
- TexChunk: type = argument
-
- Children:
- TexChunk: type = string, value = mat
- */
-
-class TexChunk
-{
- public:
- int type;
-// char *name;
- TexMacroDef *def;
- wxChar *value;
- int macroId;
- int no_args;
- int argn;
- bool optional; // Is an optional argument
-
- wxList children;
- TexChunk(int the_type, TexMacroDef *the_def = NULL);
- TexChunk(TexChunk& toCopy);
- virtual ~TexChunk(void);
-};
-
-// Represents a topic, used for generating a table of contents file (.cnt).
-// Also for storing keywords found in a topic, a list of which is then inserted
-// into the topic in the next pass.
-class TexTopic: public wxObject
-{
- public:
- // This flag is set to indicate that the topic has children.
- // If this is the case, we know to insert a 'book' icon at this level,
- // not just a 'page' icon. We don't want to have to open a book only
- // to find there's only one page in it. We might force a book to be used if
- // a top-level topic has no children (?)
- bool hasChildren;
- wxChar *filename;
- wxStringList *keywords;
- TexTopic(wxChar *f = NULL);
- virtual ~TexTopic(void);
-};
-extern wxHashTable TopicTable;
-void AddKeyWordForTopic(wxChar *topic, wxChar *entry, wxChar *filename = NULL);
-void ClearKeyWordTable(void);
-
-extern wxChar wxTex2RTFBuffer[];
-extern TexChunk *TopLevel;
-extern wxHashTable MacroDefs;
-extern wxStringList IgnorableInputFiles; // Ignorable \input files, e.g. psbox.tex
-
-bool read_a_line(wxChar *buf);
-bool TexLoadFile(const wxString& filename);
-int ParseArg(TexChunk *thisArg, wxList& children, wxChar *buffer, int pos,
- wxChar *environment = NULL, bool parseArgToBrace = true, TexChunk *customMacroArgs = NULL);
-int ParseMacroBody(const wxChar *macro_name, TexChunk *parent, int no_args,
- wxChar *buffer, int pos, wxChar *environment = NULL, bool parseArgToBrace = true, TexChunk *customMacroArgs = NULL);
-void TraverseDocument(void);
-void TraverseFromChunk(TexChunk *chunk, wxNode *thisNode = NULL, bool childrenOnly = false);
-#define TraverseChildrenFromChunk(arg) TraverseFromChunk(arg, NULL, true)
-void SetCurrentOutput(FILE *fd);
-void SetCurrentOutputs(FILE *fd1, FILE *fd2);
-extern FILE *CurrentOutput1;
-extern FILE *CurrentOutput2;
-void AddMacroDef(int the_id, const wxChar *name, int n, bool ignore = false, bool forbidden = false);
-void TexInitialize(int bufSize);
-void TexCleanUp(void);
-void TexOutput(const wxString& s, bool ordinaryText = false);
-wxChar *GetArgData(TexChunk *chunk);
-wxChar *GetArgData(void); // Get the string for the current argument
-int GetNoArgs(void); // Get the number of arguments for the current macro
-TexChunk *GetArgChunk(void); // Get the chunk for the current argument
-TexChunk *GetTopLevelChunk(void); // Get the chunk for the top level
-TexChunk *GetNextChunk(void); // Look ahead to the next chunk
-bool IsArgOptional(void); // Is this argument an optional argument?
-void DefineDefaultMacros(void); // Optional set of default macros
-int GetCurrentColumn(void); // number of characters on current line
-wxChar *ConvertCase(wxChar *s); // Convert case, according to upperCaseNames setting.
-extern wxPathList TexPathList; // Path list, can be used for file searching.
-
-extern bool StringMatch(const wxChar *one, const wxChar *two, bool subString = true, bool exact = false);
-
-// Define a variable value from the .ini file
-wxChar *RegisterSetting(const wxString& settingName, const wxString& settingValue, bool interactive = true);
-
-// Major document styles
-#define LATEX_REPORT 1
-#define LATEX_ARTICLE 2
-#define LATEX_LETTER 3
-#define LATEX_BOOK 4
-#define LATEX_SLIDES 5
-
-extern TexChunk *DocumentTitle;
-extern TexChunk *DocumentAuthor;
-extern TexChunk *DocumentDate;
-extern int DocumentStyle;
-extern int MinorDocumentStyle;
-extern wxChar *BibliographyStyleString;
-extern wxChar *DocumentStyleString;
-extern wxChar *MinorDocumentStyleString;
-
-extern int normalFont;
-extern int smallFont;
-extern int tinyFont;
-extern int largeFont1;
-extern int LargeFont2;
-extern int LARGEFont3;
-extern int hugeFont1;
-extern int HugeFont2;
-extern int HUGEFont3;
-
-/*
- * USER-ADJUSTABLE SETTINGS
- *
- */
-
-// Section font sizes
-extern int chapterFont;
-extern int sectionFont;
-extern int subsectionFont;
-extern int titleFont;
-extern int authorFont;
-extern bool winHelp; // Output in Windows Help format if true, linear otherwise
-extern bool isInteractive;
-extern bool runTwice;
-extern int convertMode;
-extern bool checkCurlyBraces;
-extern bool checkSyntax;
-extern bool stopRunning;
-extern int mirrorMargins;
-extern bool headerRule;
-extern bool footerRule;
-extern int labelIndentTab; // From left indent to item label (points)
-extern int itemIndentTab; // From left indent to item (points)
-extern bool useUpButton;
-extern int htmlBrowseButtons;
-extern bool useHeadingStyles; // Insert \s1, s2 etc.
-extern bool useWord; // Insert Word table of contents, etc. etc.
-extern bool indexSubsections; // put subsections in index
-extern bool compatibilityMode;
-extern bool generateHPJ; // Generate WinHelp HPJ file
-extern wxChar *winHelpTitle; // Title for Windows Help file
-extern int defaultTableColumnWidth;
-extern wxChar *bitmapMethod;
-extern bool truncateFilenames; // Truncate for DOS
-extern int winHelpVersion; // Version e.g. 4 for Win95
-extern bool winHelpContents; // Generate .cnt file
-extern bool htmlIndex; // Generate .htx HTML index file
-extern bool htmlFrameContents; // Use frames for HTML contents page
-extern wxChar *htmlStylesheet; // Use this CSS stylesheet for HTML pages
-extern int contentsDepth; // Depth of contents for linear RTF files
-extern bool upperCaseNames; // Filenames; default is lower case
-extern wxChar *backgroundImageString; // HTML background image
-extern wxChar *backgroundColourString; // HTML background colour
-extern wxChar *textColourString; // HTML text colour
-extern wxChar *linkColourString; // HTML link colour
-extern wxChar *followedLinkColourString; // HTML followed link colour
-extern bool combineSubSections; // Stop splitting files below section
-extern bool htmlWorkshopFiles; // generate HTML Help Workshop project files
-extern bool ignoreBadRefs; // Don't insert (REF NOT FOUND)
-extern wxChar *htmlFaceName; // HTML face name
-
-// Names to help with internationalisation
-extern wxChar *ContentsNameString;
-extern wxChar *AbstractNameString;
-extern wxChar *GlossaryNameString;
-extern wxChar *ReferencesNameString;
-extern wxChar *FiguresNameString;
-extern wxChar *TablesNameString;
-extern wxChar *FigureNameString;
-extern wxChar *TableNameString;
-extern wxChar *IndexNameString;
-extern wxChar *ChapterNameString;
-extern wxChar *SectionNameString;
-extern wxChar *SubsectionNameString;
-extern wxChar *SubsubsectionNameString;
-extern wxChar *UpNameString;
-
-/*
- * HTML button identifiers: what kind of browse buttons
- * are placed in HTML files, if any.
- *
- */
-
-#define HTML_BUTTONS_NONE 0
-#define HTML_BUTTONS_BITMAP 1
-#define HTML_BUTTONS_TEXT 2
-
-/*
- * Section numbering
- *
- */
-
-extern int chapterNo;
-extern int sectionNo;
-extern int subsectionNo;
-extern int subsubsectionNo;
-extern int figureNo;
-extern int tableNo;
-
-extern int ParSkip;
-extern int ParIndent;
-
-extern bool isSync;
-
-// Set by client and by Tex2Any
-extern TexChunk *currentSection;
-
-// Header/footers/pagestyle
-extern TexChunk * LeftHeaderOdd;
-extern TexChunk * LeftFooterOdd;
-extern TexChunk * CentreHeaderOdd;
-extern TexChunk * CentreFooterOdd;
-extern TexChunk * RightHeaderOdd;
-extern TexChunk * RightFooterOdd;
-extern TexChunk * LeftHeaderEven;
-extern TexChunk * LeftFooterEven;
-extern TexChunk * CentreHeaderEven;
-extern TexChunk * CentreFooterEven;
-extern TexChunk * RightHeaderEven;
-extern TexChunk * RightFooterEven;
-extern wxChar * PageStyle;
-
-// Repeat the currentSection, either real (Chapter) or simulated (References)
-extern void OutputCurrentSection(void);
-extern void OutputCurrentSectionToString(wxChar *buf);
-extern void OutputChunkToString(TexChunk *chunk, wxChar *buf);
-
-// Called by Tex2Any to simulate a section
-extern void FakeCurrentSection(wxChar *fakeSection, bool addToContents = true);
-
-/*
- * Local to Tex2Any library
- *
- */
-
-extern wxChar *currentArgData;
-extern bool haveArgData; // If true, we're simulating the data.
-void StartSimulateArgument(wxChar *data);
-void EndSimulateArgument(void);
-
-/*
- * Client-defined
- *
- */
-
-// Called on start/end of macro examination
-void OnMacro(int macroId, int no_args, bool start);
-
-// Called on start/end of argument examination.
-// Return true at the start of an argument to traverse
-// (output) the argument.
-bool OnArgument(int macroId, int arg_no, bool start);
-
-// Default: library-defined
-void DefaultOnMacro(int macroId, int no_args, bool start);
-
-// Default: library-defined
-bool DefaultOnArgument(int macroId, int arg_no, bool start);
-
-// Called on error
-void OnError(const wxString& msg);
-
-// Called for information
-void OnInform(const wxString& msg);
-
-// Special yield wrapper
-void Tex2RTFYield(bool force = false);
-
-/*
- * Useful utilities
- *
- */
-
-// Look for \label macro, use this ref name if found or
-// make up a topic name otherwise.
-wxChar *FindTopicName(TexChunk *chunk);
-// Force the current topic to be this (e.g. force 'references' label).
-void ForceTopicName(const wxChar *name);
-void ResetTopicCounter(void);
-
-// Parse unit eg. 14, 12pt, 34cm and return value in points.
-int ParseUnitArgument(const wxChar *unitArg);
-
-// Set small, large, normal etc. point sizes for reference size
-void SetFontSizes(int pointSize);
-
-/*
- * Strip off any extension (dot something) from end of file,
- * IF one exists. Inserts zero into buffer.
- *
- */
-
-void StripExtension(wxChar *buffer);
-
-/*
- * Reference structure
- *
- */
-
-class TexRef: public wxObject
-{
- public:
- wxChar *refLabel; // Reference label
- wxChar *refFile; // Reference filename (can be NULL)
- wxChar *sectionNumber; // Section or figure number (as a string)
- wxChar *sectionName; // name e.g. 'section'
- TexRef(const wxChar *label, const wxChar *file, const wxChar *section, const wxChar *sectionN = NULL);
- virtual ~TexRef(void);
-};
-
-/*
- * Add a reference
- *
- */
-
-void AddTexRef(wxChar *name, wxChar *file = NULL, wxChar *sectionName = NULL,
- int chapter = 0, int section = 0, int subsection = 0, int subsubsection = 0);
-
-/*
- * Read and write reference file (.ref), to resolve refs for second pass.
- *
- */
-void WriteTexReferences(wxChar *filename);
-void ReadTexReferences(wxChar *filename);
-
-/*
- * Bibliography stuff
- *
- */
-
-class BibEntry: public wxObject
-{
- public:
- wxChar *key;
-
- /*
- * book, inbook, article, phdthesis, inproceedings, techreport
- */
- wxChar *type;
-
- /*
- * Possible fields
- *
- */
- wxChar *editor;
- wxChar *title;
- wxChar *booktitle;
- wxChar *author;
- wxChar *journal;
- wxChar *volume;
- wxChar *number;
- wxChar *year;
- wxChar *month;
- wxChar *pages;
- wxChar *chapter;
- wxChar *publisher;
- wxChar *address;
- wxChar *institution;
- wxChar *organization;
- wxChar *comment;
-
- inline BibEntry(void)
- {
- key = NULL;
- type = NULL;
- editor = NULL;
- title = NULL;
- booktitle = NULL;
- author = NULL;
- journal = NULL;
- volume = NULL;
- number = NULL;
- chapter = NULL;
- year = NULL;
- month = NULL;
- pages = NULL;
- publisher = NULL;
- address = NULL;
- institution = NULL;
- organization = NULL;
- comment = NULL;
- }
-};
-
-extern wxList BibList;
-extern wxStringList CitationList;
-
-bool ReadBib(const wxChar *filename);
-void OutputBib(void);
-void ResolveBibReferences(void);
-void AddCitation(const wxChar *citeKey);
-TexRef *FindReference(const wxChar *key);
-
-/*
- * Ability to customize, or at least suppress unknown macro errors
- *
- */
-
-extern wxList CustomMacroList;
-
-#define CUSTOM_MACRO_IGNORE 0
-#define CUSTOM_MACRO_OUTPUT 1
-#define CUSTOM_MACRO_MARK 2
-
-class CustomMacro: public wxObject
-{
-public:
- wxChar *macroName;
- wxChar *macroBody;
- int noArgs;
- inline CustomMacro(const wxChar *name, int args, wxChar *body)
- {
- noArgs = args;
- macroName = wxStrcpy(new wxChar[wxStrlen(name) + 1], name);
- if (body)
- macroBody = wxStrcpy(new wxChar[wxStrlen(body) + 1], body);
- else
- macroBody = NULL;
- }
- virtual ~CustomMacro();
-};
-
-bool ReadCustomMacros(const wxString& filename);
-void ShowCustomMacros(void);
-CustomMacro *FindCustomMacro(wxChar *name);
-wxChar *ParseMultifieldString(wxChar *s, int *pos);
-
-/*
- * Colour table stuff
- *
- */
-
-class ColourTableEntry: public wxObject
-{
- public:
- wxChar *name;
- unsigned int red;
- unsigned int green;
- unsigned int blue;
-
- ColourTableEntry(const wxChar *theName, unsigned int r, unsigned int g, unsigned int b);
- virtual ~ColourTableEntry(void);
-};
-
-extern wxList ColourTable;
-extern void AddColour(const wxChar *theName, unsigned int r, unsigned int g, unsigned int b);
-extern int FindColourPosition(wxChar *theName);
-// Converts e.g. "red" -> "#FF0000"
-extern bool FindColourHTMLString(wxChar *theName, wxChar *buf);
-extern void InitialiseColourTable(void);
-
-#define ltABSTRACT 1
-#define ltADDCONTENTSLINE 2
-#define ltADDTOCOUNTER 3
-#define ltALPH1 4
-#define ltALPH2 5
-#define ltAPPENDIX 6
-#define ltARABIC 7
-#define ltARRAY 8
-#define ltAUTHOR 9
-
-#define ltBACKSLASH 30
-#define ltBASELINESKIP 31
-#define ltBF 32
-#define ltBIBITEM 33
-#define ltBIBLIOGRAPHYSTYLE 34
-#define ltBIBLIOGRAPHY 35
-#define ltBOXIT 36
-#define ltBACKSLASHRAW 37
-#define ltBACKGROUND 38
-#define ltBACKGROUNDCOLOUR 39
-#define ltBACKGROUNDIMAGE 40
-#define ltBRCLEAR 41
-
-#define ltCAPTIONSTAR 50
-#define ltCAPTION 51
-#define ltCDOTS 52
-#define ltCENTERLINE 53
-#define ltCENTERING 54
-#define ltCENTER 55
-#define ltCEXTRACT 56
-#define ltCHAPTERHEADING 57
-#define ltCHAPTERSTAR 58
-#define ltCHAPTER 59
-#define ltCINSERT 60
-#define ltCITE 61
-#define ltCLASS 62
-#define ltCLEARDOUBLEPAGE 63
-#define ltCLEARPAGE 64
-#define ltCLINE 65
-#define ltCLIPSFUNC 66
-#define ltCOLUMNSEP 67
-#define ltCOMMENT 68
-#define ltCOPYRIGHT 69
-#define ltCPARAM 70
-
-#define ltCHEAD 71
-#define ltCFOOT 72
-
-#define ltCHAPTERHEADINGSTAR 73
-
-#define ltDATE 90
-#define ltDESCRIPTION 91
-#define ltDESTRUCT 92
-#define ltDOCUMENTSTYLE 93
-#define ltDOCUMENT 94
-#define ltDOUBLESPACE 95
-#define ltDEFINECOLOUR 96
-#define ltDEFINECOLOR 97
-
-#define ltEM 120
-#define ltENUMERATE 121
-#define ltEQUATION 122
-#define ltEVENSIDEMARGIN 123
-
-#define ltFBOX 150
-#define ltFIGURE 151
-#define ltFLUSHLEFT 152
-#define ltFLUSHRIGHT 153
-#define ltFOOTHEIGHT 154
-#define ltFOOTNOTE 155
-#define ltFOOTSKIP 156
-#define ltFRAMEBOX 157
-#define ltFUNCTIONSECTION 158
-#define ltFUNC 159
-#define ltFIGURESTAR 160
-#define ltFOOTNOTESIZE 161
-#define ltFOOTNOTEPOPUP 162
-#define ltFANCYPLAIN 163
-#define ltFCOL 164
-#define ltBCOL 165
-#define ltFOLLOWEDLINKCOLOUR 166
-
-#define ltGLOSSARY 180
-#define ltGLOSS 181
-
-#define ltHEADHEIGHT 200
-#define ltHELPGLOSSARY 201
-#define ltHELPIGNORE 202
-#define ltHELPONLY 203
-#define ltHELPINPUT 204
-#define ltHELPFONTFAMILY 205
-#define ltHELPFONTSIZE 206
-#define ltHELPREFN 207
-#define ltHELPREF 208
-#define ltHFILL 209
-#define ltHLINE 210
-#define ltHRULE 211
-#define ltHSPACESTAR 212
-#define ltHSPACE 213
-#define ltHSKIPSTAR 214
-#define ltHSKIP 215
-#define lthuge 216
-#define ltHuge 217
-#define ltHUGE 218
-#define ltHTMLIGNORE 219
-#define ltHTMLONLY 220
-
-#define ltINCLUDEONLY 240
-#define ltINCLUDE 241
-#define ltINDEX 242
-#define ltINPUT 243
-#define ltITEMIZE 244
-#define ltITEM 245
-#define ltIMAGE 246
-#define ltIT 247
-#define ltITEMSEP 248
-#define ltINDENTED 249
-#define ltIMAGEMAP 250
-#define ltIMAGER 251
-#define ltIMAGEL 252
-#define ltINSERTATLEVEL 253
-
-#define ltKILL 260
-
-#define ltLABEL 280
-#define ltlarge 281
-#define ltLarge 282
-#define ltLARGE 283
-#define ltLATEX 284
-#define ltLBOX 285
-#define ltLDOTS 286
-#define ltLINEBREAK 287
-#define ltLISTOFFIGURES 288
-#define ltLISTOFTABLES 289
-#define ltLHEAD 290
-#define ltLFOOT 291
-#define ltLATEXIGNORE 292
-#define ltLATEXONLY 293
-#define ltLOWERCASE 294
-#define ltLBRACERAW 295
-#define ltLINKCOLOUR 296
-
-#define ltMAKEGLOSSARY 300
-#define ltMAKEINDEX 301
-#define ltMAKETITLE 302
-#define ltMARKRIGHT 303
-#define ltMARKBOTH 304
-#define ltMARGINPARWIDTH 305
-#define ltMARGINPAR 306
-#define ltMARGINPARODD 307
-#define ltMARGINPAREVEN 308
-#define ltMBOX 309
-#define ltMEMBERSECTION 310
-#define ltMEMBER 311
-#define ltMULTICOLUMN 312
-#define ltMARGINPARSEP 313
-
-#define ltNEWCOUNTER 330
-#define ltNEWLINE 331
-#define ltNEWPAGE 332
-#define ltNOCITE 333
-#define ltNOINDENT 334
-#define ltNOLINEBREAK 335
-#define ltNOPAGEBREAK 336
-#define ltNORMALSIZE 337
-#define ltNORMALBOX 338
-#define ltNORMALBOXD 339
-#define ltNUMBEREDBIBITEM 340
-
-#define ltONECOLUMN 360
-#define ltODDSIDEMARGIN 361
-
-#define ltPAGEBREAK 380
-#define ltPAGEREF 381
-#define ltPAGESTYLE 382
-#define ltPAGENUMBERING 383
-#define ltPARAGRAPHSTAR 384
-#define ltPARAGRAPH 385
-#define ltPARAM 386
-#define ltPARINDENT 387
-#define ltPARSKIP 388
-#define ltPARTSTAR 389
-#define ltPART 390
-#define ltPAR 391
-#define ltPFUNC 392
-#define ltPICTURE 393
-#define ltPOPREF 394
-#define ltPOUNDS 395
-#define ltPRINTINDEX 396
-#define ltPSBOXTO 397
-#define ltPSBOX 398
-#define ltPOPREFONLY 399
-
-#define ltQUOTE 420
-#define ltQUOTATION 421
-
-#define ltRAGGEDBOTTOM 440
-#define ltRAGGEDLEFT 441
-#define ltRAGGEDRIGHT 442
-#define ltREF 443
-#define ltRM 444
-#define ltROMAN 445
-#define ltROMAN2 446
-#define ltRTFSP 447
-#define ltRULE 448
-#define ltRULEDROW 449
-#define ltDRULED 450
-#define ltRHEAD 451
-#define ltRFOOT 452
-#define ltROW 453
-#define ltRTFIGNORE 454
-#define ltRTFONLY 455
-#define ltRBRACERAW 456
-#define ltREGISTERED 457
-
-#define ltSC 470
-#define ltSECTIONHEADING 471
-#define ltSECTIONSTAR 472
-#define ltSECTION 473
-#define ltSETCOUNTER 474
-#define ltSF 475
-#define ltSHORTCITE 476
-#define ltSINGLESPACE 477
-#define ltSLOPPYPAR 478
-#define ltSLOPPY 479
-#define ltSL 480
-#define ltSMALL 481
-#define ltSUBITEM 482
-#define ltSUBPARAGRAPHSTAR 483
-#define ltSUBPARAGRAPH 484
-#define ltSPECIAL 485
-#define ltSUBSECTIONSTAR 486
-#define ltSUBSECTION 487
-#define ltSUBSUBSECTIONSTAR 488
-#define ltSUBSUBSECTION 489
-#define ltSCRIPTSIZE 490
-#define ltSETHEADER 491
-#define ltSETFOOTER 492
-#define ltSIZEDBOX 493
-#define ltSIZEDBOXD 494
-#define ltSECTIONHEADINGSTAR 495
-#define ltSS 496
-#define ltSETHOTSPOTCOLOUR 497
-#define ltSETHOTSPOTCOLOR 498
-#define ltSETHOTSPOTUNDERLINE 499
-#define ltSETTRANSPARENCY 500
-
-#define ltTABBING 510
-#define ltTABLEOFCONTENTS 511
-#define ltTABLE 512
-#define ltTABULAR 513
-#define ltTAB 514
-#define ltTEX 515
-#define ltTEXTWIDTH 516
-#define ltTEXTHEIGHT 517
-#define ltTHEBIBLIOGRAPHY 518
-#define ltTITLEPAGE 519
-#define ltTITLE 520
-#define ltTINY 521
-#define ltTODAY 522
-#define ltTOPMARGIN 523
-#define ltTOPSKIP 524
-#define ltTT 525
-#define ltTYPEIN 526
-#define ltTYPEOUT 527
-#define ltTWOCOLUMN 528
-#define ltTHEPAGE 529
-#define ltTHECHAPTER 530
-#define ltTHESECTION 531
-#define ltTHISPAGESTYLE 532
-
-#define ltTWOCOLWIDTHA 533
-#define ltTWOCOLWIDTHB 534
-#define ltTWOCOLSPACING 535
-#define ltTWOCOLITEM 536
-#define ltTWOCOLITEMRULED 537
-#define ltTWOCOLLIST 538
-#define ltTEXTCOLOUR 539
-
-#define ltUNDERLINE 550
-#define ltURLREF 551
-#define ltUPPERCASE 552
-#define ltUSEPACKAGE 553
-
-#define ltVDOTS 570
-#define ltVERBATIMINPUT 571
-#define ltVERBATIM 572
-#define ltVERB 573
-#define ltVERSE 574
-#define ltVFILL 575
-#define ltVLINE 576
-#define ltVOID 577
-#define ltVRULE 578
-#define ltVSPACESTAR 579
-#define ltVSKIPSTAR 580
-#define ltVSPACE 581
-#define ltVSKIP 582
-#define ltVERBSTAR 583
-
-#define ltWXCLIPS 600
-#define ltWINHELPIGNORE 601
-#define ltWINHELPONLY 602
-
-#define ltXLPIGNORE 603
-#define ltXLPONLY 604
-
-#define ltSPACE 620
-#define ltBACKSLASHCHAR 621
-#define ltPIPE 622
-#define ltFORWARDSLASH 623
-#define ltUNDERSCORE 624
-#define ltAMPERSAND 625
-#define ltPERCENT 626
-#define ltDOLLAR 627
-#define ltHASH 628
-#define ltLPARENTH 629
-#define ltRPARENTH 630
-#define ltLBRACE 631
-#define ltRBRACE 632
-#define ltEQUALS 633
-#define ltRANGLEBRA 634
-#define ltLANGLEBRA 635
-#define ltPLUS 636
-#define ltDASH 637
-#define ltSINGLEQUOTE 638
-#define ltBACKQUOTE 639
-#define ltTILDE 640
-#define ltAT_SYMBOL 641
-
-// Characters, not macros but with special Latex significance
-#define ltSPECIALDOLLAR 660
-#define ltSPECIALDOUBLEDOLLAR 661
-#define ltSPECIALTILDE 662
-#define ltSPECIALHASH 663
-#define ltSPECIALAMPERSAND 664
-#define ltSUPERTABULAR 665
-
-// Accents
-#define ltACCENT_GRAVE 700
-#define ltACCENT_ACUTE 701
-#define ltACCENT_CARET 702
-#define ltACCENT_UMLAUT 703
-#define ltACCENT_TILDE 704
-#define ltACCENT_DOT 705
-#define ltACCENT_CADILLA 706
-
-// Symbols
-#define ltALPHA 800
-#define ltBETA 801
-#define ltGAMMA 802
-#define ltDELTA 803
-#define ltEPSILON 804
-#define ltVAREPSILON 805
-#define ltZETA 806
-#define ltETA 807
-#define ltTHETA 808
-#define ltVARTHETA 809
-#define ltIOTA 810
-#define ltKAPPA 811
-#define ltLAMBDA 812
-#define ltMU 813
-#define ltNU 814
-#define ltXI 815
-#define ltPI 816
-#define ltVARPI 817
-#define ltRHO 818
-#define ltVARRHO 819
-#define ltSIGMA 820
-#define ltVARSIGMA 821
-#define ltTAU 822
-#define ltUPSILON 823
-#define ltPHI 824
-#define ltVARPHI 825
-#define ltCHI 826
-#define ltPSI 827
-#define ltOMEGA 828
-
-#define ltCAP_GAMMA 830
-#define ltCAP_DELTA 831
-#define ltCAP_THETA 832
-#define ltCAP_LAMBDA 833
-#define ltCAP_XI 834
-#define ltCAP_PI 835
-#define ltCAP_SIGMA 836
-#define ltCAP_UPSILON 837
-#define ltCAP_PHI 838
-#define ltCAP_PSI 839
-#define ltCAP_OMEGA 840
-
-// Binary operation symbols
-#define ltLE 850
-#define ltLEQ 851
-#define ltLL 852
-#define ltSUBSET 853
-#define ltSUBSETEQ 854
-#define ltSQSUBSET 855
-#define ltSQSUBSETEQ 856
-#define ltIN 857
-#define ltVDASH 858
-#define ltMODELS 859
-#define ltGE 860
-#define ltGEQ 861
-#define ltGG 862
-#define ltSUPSET 863
-#define ltSUPSETEQ 864
-#define ltSQSUPSET 865
-#define ltSQSUPSETEQ 866
-#define ltNI 867
-#define ltDASHV 868
-#define ltPERP 869
-#define ltNEQ 870
-#define ltDOTEQ 871
-#define ltAPPROX 872
-#define ltCONG 873
-#define ltEQUIV 874
-#define ltPROPTO 875
-#define ltPREC 876
-#define ltPRECEQ 877
-#define ltPARALLEL 878
-#define ltSIM 879
-#define ltSIMEQ 880
-#define ltASYMP 881
-#define ltSMILE 882
-#define ltFROWN 883
-#define ltBOWTIE 884
-#define ltSUCC 885
-#define ltSUCCEQ 886
-#define ltMID 887
-
-// Negated relation symbols (selected)
-#define ltNOTEQ 890
-#define ltNOTIN 891
-#define ltNOTSUBSET 892
-
-// Arrows
-#define ltLEFTARROW 900
-#define ltLEFTARROW2 901
-#define ltRIGHTARROW 902
-#define ltRIGHTARROW2 903
-#define ltLEFTRIGHTARROW 904
-#define ltLEFTRIGHTARROW2 905
-#define ltUPARROW 906
-#define ltUPARROW2 907
-#define ltDOWNARROW 908
-#define ltDOWNARROW2 909
-
-// Miscellaneous symbols
-#define ltALEPH 1000
-#define ltWP 1001
-#define ltRE 1002
-#define ltIM 1003
-#define ltEMPTYSET 1004
-#define ltNABLA 1005
-#define ltSURD 1006
-#define ltPARTIAL 1007
-#define ltBOT 1008
-#define ltFORALL 1009
-#define ltEXISTS 1010
-#define ltNEG 1011
-#define ltSHARP 1012
-#define ltANGLE 1013
-#define ltTRIANGLE 1014
-#define ltCLUBSUIT 1015
-#define ltDIAMONDSUIT 1016
-#define ltHEARTSUIT 1017
-#define ltSPADESUIT 1018
-#define ltINFTY 1019
-
-// Binary operation symbols
-#define ltPM 1030
-#define ltMP 1031
-#define ltTIMES 1032
-#define ltDIV 1033
-#define ltCDOT 1034
-#define ltAST 1035
-#define ltSTAR 1036
-#define ltCAP 1037
-#define ltCUP 1038
-#define ltVEE 1039
-#define ltWEDGE 1040
-#define ltCIRC 1041
-#define ltBULLET 1042
-#define ltDIAMOND 1043
-#define ltOSLASH 1044
-#define ltBOX 1045
-#define ltDIAMOND2 1046
-#define ltBIGTRIANGLEDOWN 1047
-#define ltOPLUS 1048
-#define ltOTIMES 1049
-
-// Latex2e commands
-#define ltRMFAMILY 1200
-#define ltSFFAMILY 1201
-#define ltTTFAMILY 1202
-#define ltBFSERIES 1203
-#define ltITSHAPE 1204
-#define ltSLSHAPE 1205
-#define ltSCSHAPE 1206
-
-#define ltMDSERIES 1207
-#define ltUPSHAPE 1208
-
-#define ltTEXTRM 1209
-#define ltTEXTSF 1210
-#define ltTEXTTT 1211
-#define ltTEXTBF 1212
-#define ltTEXTIT 1213
-#define ltTEXTSL 1214
-#define ltTEXTSC 1215
-#define ltEMPH 1216
-
-#define ltDOCUMENTCLASS 1217
-
-// Space macros
-#define ltSMALLSPACE1 1250
-#define ltSMALLSPACE2 1251
-
-// Pseudo-macros
-#define ltTOPLEVEL 15000
-#define ltCUSTOM_MACRO 15001
-#define ltSOLO_BLOCK 15002
+++ /dev/null
-<?xml version="1.0" ?>
-<!-- $Id$ -->
-
-<makefile>
-
- <include file="../../../build/bakefiles/common_samples.bkl"/>
-
- <set var="TEX2RTF_SRC">
- tex2rtf.cpp
- tex2any.cpp
- texutils.cpp
- rtfutils.cpp
- xlputils.cpp
- htmlutil.cpp
- readshg.cpp
- table.cpp
- </set>
-
- <exe id="tex2rtf" template="wx_util_console"
- template_append="wx_append_base"
- cond="FORMAT!='msevc4prj'">
- <define>NO_GUI</define>
- <sources>$(TEX2RTF_SRC)</sources>
- <wx-lib>base</wx-lib>
- <install-to>$(BINDIR)</install-to>
- </exe>
-
- <exe id="tex2rtf_gui" template="wx_util"
- template_append="wx_append"
- cond="USE_GUI=='1'">
- <sources>$(TEX2RTF_SRC)</sources>
- <wx-lib>html</wx-lib>
- <wx-lib>core</wx-lib>
- <wx-lib>base</wx-lib>
- <install-to>$(BINDIR)</install-to>
- </exe>
-
-</makefile>
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: tex2rtf.cpp
-// Purpose: Converts Latex to linear/WinHelp RTF, HTML, wxHelp.
-// Author: Julian Smart
-// Modified by: Wlodzimiez ABX Skiba 2003/2004 Unicode support
-// Ron Lee
-// Created: 7.9.93
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#if defined(__WXMSW__)
- #include "wx/msw/wrapwin.h"
-#endif
-
-#ifndef WX_PRECOMP
- #ifndef NO_GUI
- #include "wx/menu.h"
- #include "wx/textctrl.h"
- #include "wx/filedlg.h"
- #include "wx/msgdlg.h"
- #include "wx/icon.h"
- #endif
-#endif
-
-#include "wx/log.h"
-
-#ifndef NO_GUI
- #include "wx/timer.h"
- #include "wx/help.h"
- #include "wx/cshelp.h"
- #include "wx/helphtml.h"
- #ifdef __WXMSW__
- #include "wx/msw/helpchm.h"
- #else
- #include "wx/html/helpctrl.h"
- #endif
-#endif // !NO_GUI
-
-#include "wx/utils.h"
-
-#include "wx/beforestd.h"
-#if wxUSE_IOSTREAMH
-#include <iostream.h>
-#include <fstream.h>
-#else
-#include <iostream>
-#include <fstream>
-#endif
-#include "wx/afterstd.h"
-
-#include <ctype.h>
-#include <stdlib.h>
-#include "tex2any.h"
-#include "tex2rtf.h"
-#include "rtfutils.h"
-#include "symbols.h"
-
-#if (defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXX11__) || defined(__WXMGL__)) && !defined(NO_GUI)
-#include "tex2rtf.xpm"
-#endif
-
-static inline wxChar* copystring(const wxChar* s)
- { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
-
-const float versionNo = float(TEX2RTF_VERSION_NUMBER);
-
-TexChunk *currentMember = NULL;
-bool startedSections = false;
-wxChar *contentsString = NULL;
-bool suppressNameDecoration = false;
-bool OkToClose = true;
-int passNumber = 1;
-unsigned long errorCount = 0;
-
-#ifndef NO_GUI
-
-extern wxChar *BigBuffer;
-extern wxChar *TexFileRoot;
-extern wxChar *TexBibName; // Bibliography output file name
-extern wxChar *TexTmpBibName; // Temporary bibliography output file name
-extern wxList ColourTable;
-extern TexChunk *TopLevel;
-
-#if wxUSE_HELP
-wxHelpControllerBase *HelpInstance = NULL;
-#endif // wxUSE_HELP
-
-#ifdef __WXMSW__
-static wxChar *ipc_buffer = NULL;
-static wxChar Tex2RTFLastStatus[100];
-Tex2RTFServer *TheTex2RTFServer = NULL;
-#endif // __WXMSW__
-
-#endif // !NO_GUI
-
-wxChar *bulletFile = NULL;
-
-FILE *Contents = NULL; // Contents page
-FILE *Chapters = NULL; // Chapters (WinHelp RTF) or rest of file (linear RTF)
-FILE *Sections = NULL;
-FILE *Subsections = NULL;
-FILE *Subsubsections = NULL;
-FILE *Popups = NULL;
-FILE *WinHelpContentsFile = NULL;
-
-wxString InputFile;
-wxString OutputFile;
-wxChar *MacroFile = copystring(_T("tex2rtf.ini"));
-
-wxChar *FileRoot = NULL;
-wxChar *ContentsName = NULL; // Contents page from last time around
-wxChar *TmpContentsName = NULL; // Current contents page
-wxChar *TmpFrameContentsName = NULL; // Current frame contents page
-wxChar *WinHelpContentsFileName = NULL; // WinHelp .cnt file
-wxChar *RefFileName = NULL; // Reference file name
-
-wxChar *RTFCharset = copystring(_T("ansi"));
-
-#ifdef __WXMSW__
-int BufSize = 100; // Size of buffer in K
-#else
-int BufSize = 500;
-#endif
-
-bool Go(void);
-void ShowOptions(void);
-void ShowVersion(void);
-
-wxChar wxTex2RTFBuffer[1500];
-
-#ifdef NO_GUI
- IMPLEMENT_APP_CONSOLE(MyApp)
-#else
- wxMenuBar *menuBar = NULL;
- MyFrame *frame = NULL;
- // DECLARE_APP(MyApp)
- IMPLEMENT_APP(MyApp)
-#endif
-
-// `Main program' equivalent, creating windows and returning main app frame
-bool MyApp::OnInit()
-{
- // Use default list of macros defined in tex2any.cc
- DefineDefaultMacros();
- AddMacroDef(ltHARDY, _T("hardy"), 0);
-
- FileRoot = new wxChar[300];
- ContentsName = new wxChar[300];
- TmpContentsName = new wxChar[300];
- TmpFrameContentsName = new wxChar[300];
- WinHelpContentsFileName = new wxChar[300];
- RefFileName = new wxChar[300];
-
- WX_CLEAR_LIST(wxList,ColourTable);
-
- int n = 1;
-
- // Read input/output files
- if (argc > 1)
- {
- if (argv[1][0] != _T('-'))
- {
- InputFile = argv[1];
- n ++;
-
- if (argc > 2)
- {
- if (argv[2][0] != _T('-'))
- {
- OutputFile = argv[2];
- n ++;
- }
- }
- }
- }
-
- TexPathList.Add(::wxGetCwd());
-
- int i;
- for (i = n; i < argc;)
- {
- if (wxStrcmp(argv[i], _T("-winhelp")) == 0)
- {
- i ++;
- convertMode = TEX_RTF;
- winHelp = true;
- }
-#ifndef NO_GUI
- else if (wxStrcmp(argv[i], _T("-interactive")) == 0)
- {
- i ++;
- isInteractive = true;
- }
-#endif
- else if (wxStrcmp(argv[i], _T("-sync")) == 0) // Don't yield
- {
- i ++;
- isSync = true;
- }
- else if (wxStrcmp(argv[i], _T("-rtf")) == 0)
- {
- i ++;
- convertMode = TEX_RTF;
- }
- else if (wxStrcmp(argv[i], _T("-html")) == 0)
- {
- i ++;
- convertMode = TEX_HTML;
- }
- else if (wxStrcmp(argv[i], _T("-xlp")) == 0)
- {
- i ++;
- convertMode = TEX_XLP;
- }
- else if (wxStrcmp(argv[i], _T("-twice")) == 0)
- {
- i ++;
- runTwice = true;
- }
- else if (wxStrcmp(argv[i], _T("-macros")) == 0)
- {
- i ++;
- if (i < argc)
- {
- MacroFile = copystring(argv[i]);
- i ++;
- }
- }
- else if (wxStrcmp(argv[i], _T("-bufsize")) == 0)
- {
- i ++;
- if (i < argc)
- {
- BufSize = wxAtoi(argv[i]);
- i ++;
- }
- }
- else if (wxStrcmp(argv[i], _T("-charset")) == 0)
- {
- i ++;
- if (i < argc)
- {
- const wxChar *s = argv[i];
- i ++;
- if (wxStrcmp(s, _T("ansi")) == 0 || wxStrcmp(s, _T("pc")) == 0 || wxStrcmp(s, _T("mac")) == 0 ||
- wxStrcmp(s, _T("pca")) == 0)
- RTFCharset = copystring(s);
- else
- {
- OnError(_T("Incorrect argument for -charset"));
- return false;
- }
- }
- }
- else if (wxStrcmp(argv[i], _T("-checkcurlybraces")) == 0)
- {
- i ++;
- checkCurlyBraces = true;
- }
- else if (wxStrcmp(argv[i], _T("-checkcurleybraces")) == 0)
- {
- // Support the old, incorrectly spelled version of -checkcurlybraces
- // so that old scripts which run tex2rtf -checkcurleybraces still work.
- i ++;
- checkCurlyBraces = true;
- }
- else if (wxStrcmp(argv[i], _T("-checksyntax")) == 0)
- {
- i ++;
- checkSyntax = true;
- }
- else if (wxStrcmp(argv[i], _T("-version")) == 0)
- {
- i ++;
- ShowVersion();
-#ifdef NO_GUI
- exit(1);
-#else
- return false;
-#endif
- }
- else
- {
- wxString buf;
- buf.Printf(_T("Invalid switch %s.\n"), argv[i]);
- OnError(buf);
-#ifdef NO_GUI
- ShowOptions();
- exit(1);
-#else
- return false;
-#endif
- }
- }
-
-#ifdef NO_GUI
- if (InputFile.empty() || OutputFile.empty())
- {
- wxSTD cout << "Tex2RTF: input or output file is missing.\n";
- ShowOptions();
- exit(1);
- }
-#endif
-
- if (!InputFile.empty())
- {
- TexPathList.EnsureFileAccessible(InputFile);
- }
- if (InputFile.empty() || OutputFile.empty())
- isInteractive = true;
-
-#if defined(__WXMSW__) && !defined(NO_GUI)
- wxDDEInitialize();
- Tex2RTFLastStatus[0] = 0; // DDE connection return value
- TheTex2RTFServer = new Tex2RTFServer;
- TheTex2RTFServer->Create(_T("TEX2RTF"));
-#endif
-
- TexInitialize(BufSize);
- ResetContentsLevels(0);
-
-#ifndef NO_GUI
-
- if (isInteractive)
- {
- // Create the main frame window
- frame = new MyFrame(NULL, wxID_ANY, _T("Tex2RTF"), wxDefaultPosition, wxSize(400, 300));
-#if wxUSE_STATUSBAR
- frame->CreateStatusBar(2);
-#endif // wxUSE_STATUSBAR
-
- // Give it an icon
- // TODO: uncomment this when we have tex2rtf.xpm
- frame->SetIcon(wxICON(tex2rtf));
-
- if (!InputFile.empty())
- {
- wxString title;
- title.Printf( _T("Tex2RTF [%s]"), wxFileNameFromPath(InputFile).c_str());
- frame->SetTitle(title);
- }
-
- // Make a menubar
- wxMenu *file_menu = new wxMenu;
- file_menu->Append(TEX_GO, _T("&Go"), _T("Run converter"));
- file_menu->Append(TEX_SET_INPUT, _T("Set &Input File"), _T("Set the LaTeX input file"));
- file_menu->Append(TEX_SET_OUTPUT, _T("Set &Output File"), _T("Set the output file"));
- file_menu->AppendSeparator();
- file_menu->Append(TEX_VIEW_LATEX, _T("View &LaTeX File"), _T("View the LaTeX input file"));
- file_menu->Append(TEX_VIEW_OUTPUT, _T("View Output &File"), _T("View output file"));
- file_menu->Append(TEX_SAVE_FILE, _T("&Save log file"), _T("Save displayed text into file"));
- file_menu->AppendSeparator();
- file_menu->Append(TEX_QUIT, _T("E&xit"), _T("Exit Tex2RTF"));
-
- wxMenu *macro_menu = new wxMenu;
-
- macro_menu->Append(TEX_LOAD_CUSTOM_MACROS, _T("&Load Custom Macros"), _T("Load custom LaTeX macro file"));
- macro_menu->Append(TEX_VIEW_CUSTOM_MACROS, _T("View &Custom Macros"), _T("View custom LaTeX macros"));
-
- wxMenu *mode_menu = new wxMenu;
-
- mode_menu->Append(TEX_MODE_RTF, _T("Output linear &RTF"), _T("Wordprocessor-compatible RTF"));
- mode_menu->Append(TEX_MODE_WINHELP, _T("Output &WinHelp RTF"), _T("WinHelp-compatible RTF"));
- mode_menu->Append(TEX_MODE_HTML, _T("Output &HTML"), _T("HTML World Wide Web hypertext file"));
- mode_menu->Append(TEX_MODE_XLP, _T("Output &XLP"), _T("wxHelp hypertext help file"));
-
- wxMenu *options_menu = new wxMenu;
-
- options_menu->Append(TEX_OPTIONS_CURLY_BRACE, _T("Curly brace matching"), _T("Checks for mismatched curly braces"),true);
- options_menu->Append(TEX_OPTIONS_SYNTAX_CHECKING, _T("Syntax checking"), _T("Syntax checking for common errors"),true);
-
- options_menu->Check(TEX_OPTIONS_CURLY_BRACE, checkCurlyBraces);
- options_menu->Check(TEX_OPTIONS_SYNTAX_CHECKING, checkSyntax);
-
- wxMenu *help_menu = new wxMenu;
-
- help_menu->Append(TEX_HELP, _T("&Help"), _T("Tex2RTF Contents Page"));
- help_menu->Append(TEX_ABOUT, _T("&About Tex2RTF"), _T("About Tex2RTF"));
-
- menuBar = new wxMenuBar;
- menuBar->Append(file_menu, _T("&File"));
- menuBar->Append(macro_menu, _T("&Macros"));
- menuBar->Append(mode_menu, _T("&Conversion Mode"));
- menuBar->Append(options_menu, _T("&Options"));
- menuBar->Append(help_menu, _T("&Help"));
-
- frame->SetMenuBar(menuBar);
- frame->textWindow = new wxTextCtrl(frame, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_MULTILINE);
-
- (*frame->textWindow) << _T("Welcome to Tex2RTF.\n");
-// ShowOptions();
-
-#if wxUSE_HELP
-#if wxUSE_MS_HTML_HELP && !defined(__WXUNIVERSAL__)
- HelpInstance = new wxCHMHelpController;
-#else
- HelpInstance = new wxHelpController;
-#endif
- HelpInstance->Initialize(_T("tex2rtf"));
-#endif // wxUSE_HELP
-
- /*
- * Read macro/initialisation file
- *
- */
-
- wxString path = TexPathList.FindValidPath(MacroFile);
- if (!path.empty())
- ReadCustomMacros(path);
-
-#if wxUSE_STATUSBAR
- wxString inStr(_T("In "));
- switch (convertMode)
- {
- case TEX_RTF:
- if(winHelp)
- inStr += _T("WinHelp RTF");
- else
- inStr += _T("linear RTF");
- break;
-
- case TEX_HTML:
- inStr += _T("HTML");
- break;
-
- case TEX_XLP:
- inStr += _T("XLP");
- break;
-
- default:
- inStr += _T("unknown");
- break;
- }
- inStr += _T(" mode.");
- frame->SetStatusText(inStr, 1);
-#endif // wxUSE_STATUSBAR
-
- frame->Show(true);
- return true;
- }
- else
-#endif // NO_GUI
- {
- /*
- * Read macro/initialisation file
- *
- */
-
- wxString path = TexPathList.FindValidPath(MacroFile);
- if (!path.empty())
- ReadCustomMacros(path);
-
- bool rc = Go();
- if ( rc && runTwice )
- {
- rc = Go();
- }
-#ifdef NO_GUI
- return rc;
-#else
- OnExit(); // Do cleanup since OnExit won't be called now
- return false;
-#endif
- }
-}
-
-#ifndef NO_GUI
-int MyApp::OnExit()
-{
- wxNode *node = CustomMacroList.GetFirst();
- while (node)
- {
- CustomMacro *macro = (CustomMacro *)node->GetData();
- delete macro;
- delete node;
- node = CustomMacroList.GetFirst();
- }
- MacroDefs.BeginFind();
- wxHashTable::Node* mNode = MacroDefs.Next();
- while (mNode)
- {
- TexMacroDef* def = (TexMacroDef*) mNode->GetData();
- delete def;
- mNode = MacroDefs.Next();
- }
- MacroDefs.Clear();
-#ifdef __WXMSW__
- delete TheTex2RTFServer;
- wxDDECleanUp();
-#endif
-
-#if wxUSE_HELP
- delete HelpInstance;
-#endif // wxUSE_HELP
-
- if (BigBuffer)
- {
- delete BigBuffer;
- BigBuffer = NULL;
- }
- if (currentArgData)
- {
- delete currentArgData;
- currentArgData = NULL;
- }
- if (TexFileRoot)
- {
- delete TexFileRoot;
- TexFileRoot = NULL;
- }
- if (TexBibName)
- {
- delete TexBibName;
- TexBibName = NULL;
- }
- if (TexTmpBibName)
- {
- delete TexTmpBibName;
- TexTmpBibName = NULL;
- }
- if (FileRoot)
- {
- delete FileRoot;
- FileRoot = NULL;
- }
- if (ContentsName)
- {
- delete ContentsName;
- ContentsName = NULL;
- }
- if (TmpContentsName)
- {
- delete TmpContentsName;
- TmpContentsName = NULL;
- }
- if (TmpFrameContentsName)
- {
- delete TmpFrameContentsName;
- TmpFrameContentsName = NULL;
- }
- if (WinHelpContentsFileName)
- {
- delete WinHelpContentsFileName;
- WinHelpContentsFileName = NULL;
- }
- if (RefFileName)
- {
- delete RefFileName;
- RefFileName = NULL;
- }
- if (TopLevel)
- {
- delete TopLevel;
- TopLevel = NULL;
- }
- if (MacroFile)
- {
- delete MacroFile;
- MacroFile = NULL;
- }
- if (RTFCharset)
- {
- delete RTFCharset;
- RTFCharset = NULL;
- }
-
- delete [] PageStyle;
- delete [] BibliographyStyleString;
- delete [] DocumentStyleString;
- delete [] bitmapMethod;
- delete [] backgroundColourString;
- delete [] ContentsNameString;
- delete [] AbstractNameString;
- delete [] GlossaryNameString;
- delete [] ReferencesNameString;
- delete [] FiguresNameString;
- delete [] TablesNameString;
- delete [] FigureNameString;
- delete [] TableNameString;
- delete [] IndexNameString;
- delete [] ChapterNameString;
- delete [] SectionNameString;
- delete [] SubsectionNameString;
- delete [] SubsubsectionNameString;
- delete [] UpNameString;
- if (winHelpTitle)
- delete[] winHelpTitle;
-
- // TODO: this simulates zero-memory leaks!
- // Otherwise there are just too many...
-#ifndef __WXGTK__
-#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
- wxDebugContext::SetCheckpoint();
-#endif
-#endif
-
- return 0;
-}
-#endif
-
-void ShowVersion(void)
-{
- wxChar buf[100];
- wxSnprintf(buf, sizeof(buf), _T("Tex2RTF version %.2f"), versionNo);
- OnInform(buf);
-}
-
-void ShowOptions(void)
-{
- ShowVersion();
- OnInform(_T("Usage: tex2rtf [input] [output] [switches]\n"));
- OnInform(_T("where valid switches are"));
-#ifndef NO_GUI
- OnInform(_T(" -interactive"));
-#endif
- OnInform(_T(" -bufsize <size in K>"));
- OnInform(_T(" -charset <pc | pca | ansi | mac> (default ansi)"));
- OnInform(_T(" -twice"));
- OnInform(_T(" -sync"));
- OnInform(_T(" -checkcurlybraces"));
- OnInform(_T(" -checksyntax"));
- OnInform(_T(" -version"));
- OnInform(_T(" -macros <filename>"));
- OnInform(_T(" -winhelp"));
- OnInform(_T(" -rtf"));
- OnInform(_T(" -html"));
- OnInform(_T(" -xlp\n"));
-}
-
-#ifndef NO_GUI
-
-BEGIN_EVENT_TABLE(MyFrame, wxFrame)
- EVT_CLOSE(MyFrame::OnCloseWindow)
- EVT_MENU(TEX_QUIT, MyFrame::OnExit)
- EVT_MENU(TEX_GO, MyFrame::OnGo)
- EVT_MENU(TEX_SET_INPUT, MyFrame::OnSetInput)
- EVT_MENU(TEX_SET_OUTPUT, MyFrame::OnSetOutput)
- EVT_MENU(TEX_SAVE_FILE, MyFrame::OnSaveFile)
- EVT_MENU(TEX_VIEW_LATEX, MyFrame::OnViewLatex)
- EVT_MENU(TEX_VIEW_OUTPUT, MyFrame::OnViewOutput)
- EVT_MENU(TEX_VIEW_CUSTOM_MACROS, MyFrame::OnShowMacros)
- EVT_MENU(TEX_LOAD_CUSTOM_MACROS, MyFrame::OnLoadMacros)
- EVT_MENU(TEX_MODE_RTF, MyFrame::OnModeRTF)
- EVT_MENU(TEX_MODE_WINHELP, MyFrame::OnModeWinHelp)
- EVT_MENU(TEX_MODE_HTML, MyFrame::OnModeHTML)
- EVT_MENU(TEX_MODE_XLP, MyFrame::OnModeXLP)
- EVT_MENU(TEX_OPTIONS_CURLY_BRACE, MyFrame::OnOptionsCurlyBrace)
- EVT_MENU(TEX_OPTIONS_SYNTAX_CHECKING, MyFrame::OnOptionsSyntaxChecking)
- EVT_MENU(TEX_HELP, MyFrame::OnHelp)
- EVT_MENU(TEX_ABOUT, MyFrame::OnAbout)
-END_EVENT_TABLE()
-
-// My frame constructor
-MyFrame::MyFrame(wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size):
- wxFrame(frame, id, title, pos, size)
-{}
-
-void MyFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
-{
- if (!stopRunning && !OkToClose)
- {
- stopRunning = true;
- runTwice = false;
- return;
- }
- else if (OkToClose)
- {
- this->Destroy();
- }
-}
-
-void MyFrame::OnExit(wxCommandEvent& WXUNUSED(event))
-{
- Close();
-// this->Destroy();
-}
-
-void MyFrame::OnGo(wxCommandEvent& WXUNUSED(event))
-{
- passNumber = 1;
- errorCount = 0;
- menuBar->EnableTop(0, false);
- menuBar->EnableTop(1, false);
- menuBar->EnableTop(2, false);
- menuBar->EnableTop(3, false);
- textWindow->Clear();
- Tex2RTFYield(true);
- Go();
-
- if (stopRunning)
- {
-#if wxUSE_STATUSBAR
- SetStatusText(_T("Build aborted!"));
-#endif // wxUSE_STATUSBAR
- wxString errBuf;
- errBuf.Printf(_T("\nErrors encountered during this pass: %lu\n"), errorCount);
- OnInform(errBuf);
- }
-
-
- if (runTwice && !stopRunning)
- {
- Tex2RTFYield(true);
- Go();
- }
- menuBar->EnableTop(0, true);
- menuBar->EnableTop(1, true);
- menuBar->EnableTop(2, true);
- menuBar->EnableTop(3, true);
-}
-
-void MyFrame::OnSetInput(wxCommandEvent& WXUNUSED(event))
-{
- ChooseInputFile(true);
-}
-
-void MyFrame::OnSetOutput(wxCommandEvent& WXUNUSED(event))
-{
- ChooseOutputFile(true);
-}
-
-void MyFrame::OnSaveFile(wxCommandEvent& WXUNUSED(event))
-{
-#if wxUSE_FILEDLG
- wxString s = wxFileSelector(_T("Save text to file"), wxEmptyString, wxEmptyString, _T("txt"), _T("*.txt"));
- if (!s.empty())
- {
- textWindow->SaveFile(s);
-#if wxUSE_STATUSBAR
- wxChar buf[350];
- wxSnprintf(buf, sizeof(buf), _T("Saved text to %s"), (const wxChar*) s.c_str());
- frame->SetStatusText(buf, 0);
-#endif // wxUSE_STATUSBAR
- }
-#endif // wxUSE_FILEDLG
-}
-
-void MyFrame::OnViewOutput(wxCommandEvent& WXUNUSED(event))
-{
- ChooseOutputFile();
- if (!OutputFile.empty() && wxFileExists(OutputFile))
- {
- textWindow->LoadFile(OutputFile);
- wxChar buf[300];
- wxString str(wxFileNameFromPath(OutputFile));
- wxSnprintf(buf, sizeof(buf), _T("Tex2RTF [%s]"), (const wxChar*) str.c_str());
- frame->SetTitle(buf);
- }
-}
-
-void MyFrame::OnViewLatex(wxCommandEvent& WXUNUSED(event))
-{
- ChooseInputFile();
- if (!InputFile.empty() && wxFileExists(InputFile))
- {
- textWindow->LoadFile(InputFile);
- wxChar buf[300];
- wxString str(wxFileNameFromPath(OutputFile));
- wxSnprintf(buf, sizeof(buf), _T("Tex2RTF [%s]"), (const wxChar*) str.c_str());
- frame->SetTitle(buf);
- }
-}
-
-void MyFrame::OnLoadMacros(wxCommandEvent& WXUNUSED(event))
-{
- textWindow->Clear();
-#if wxUSE_FILEDLG
- wxString s = wxFileSelector(_T("Choose custom macro file"), wxPathOnly(MacroFile), wxFileNameFromPath(MacroFile), _T("ini"), _T("*.ini"));
- if (!s.empty() && wxFileExists(s))
- {
- MacroFile = copystring(s);
- ReadCustomMacros(s);
- ShowCustomMacros();
- }
-#endif // wxUSE_FILEDLG
-}
-
-void MyFrame::OnShowMacros(wxCommandEvent& WXUNUSED(event))
-{
- textWindow->Clear();
- Tex2RTFYield(true);
- ShowCustomMacros();
-}
-
-void MyFrame::OnModeRTF(wxCommandEvent& WXUNUSED(event))
-{
- convertMode = TEX_RTF;
- winHelp = false;
- InputFile = wxEmptyString;
- OutputFile = wxEmptyString;
-#if wxUSE_STATUSBAR
- SetStatusText(_T("In linear RTF mode."), 1);
-#endif // wxUSE_STATUSBAR
-}
-
-void MyFrame::OnModeWinHelp(wxCommandEvent& WXUNUSED(event))
-{
- convertMode = TEX_RTF;
- winHelp = true;
- InputFile = wxEmptyString;
- OutputFile = wxEmptyString;
-#if wxUSE_STATUSBAR
- SetStatusText(_T("In WinHelp RTF mode."), 1);
-#endif // wxUSE_STATUSBAR
-}
-
-void MyFrame::OnModeHTML(wxCommandEvent& WXUNUSED(event))
-{
- convertMode = TEX_HTML;
- winHelp = false;
- InputFile = wxEmptyString;
- OutputFile = wxEmptyString;
-#if wxUSE_STATUSBAR
- SetStatusText(_T("In HTML mode."), 1);
-#endif // wxUSE_STATUSBAR
-}
-
-void MyFrame::OnModeXLP(wxCommandEvent& WXUNUSED(event))
-{
- convertMode = TEX_XLP;
- InputFile = wxEmptyString;
- OutputFile = wxEmptyString;
-#if wxUSE_STATUSBAR
- SetStatusText(_T("In XLP mode."), 1);
-#endif // wxUSE_STATUSBAR
-}
-
-void MyFrame::OnOptionsCurlyBrace(wxCommandEvent& WXUNUSED(event))
-{
- checkCurlyBraces = !checkCurlyBraces;
-#if wxUSE_STATUSBAR
- if (checkCurlyBraces)
- {
- SetStatusText(_T("Checking curly braces: YES"), 1);
- }
- else
- {
- SetStatusText(_T("Checking curly braces: NO"), 1);
- }
-#endif // wxUSE_STATUSBAR
-}
-
-
-void MyFrame::OnOptionsSyntaxChecking(wxCommandEvent& WXUNUSED(event))
-{
- checkSyntax = !checkSyntax;
-#if wxUSE_STATUSBAR
- if (checkSyntax)
- {
- SetStatusText(_T("Checking syntax: YES"), 1);
- }
- else
- {
- SetStatusText(_T("Checking syntax: NO"), 1);
- }
-#endif // wxUSE_STATUSBAR
-}
-
-
-void MyFrame::OnHelp(wxCommandEvent& WXUNUSED(event))
-{
-#if wxUSE_HELP
- HelpInstance->LoadFile();
- HelpInstance->DisplayContents();
-#endif // wxUSE_HELP
-}
-
-void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
-{
- wxChar buf[300];
- wxString platform = wxGetOsDescription();
- wxSnprintf(buf, sizeof(buf), _T("Tex2RTF Version %.2f %s\nLaTeX to RTF, WinHelp, and HTML Conversion\n\n(c) Julian Smart, George Tasker and others, 1999-2005"), versionNo, platform.c_str());
- wxMessageBox(buf, _T("About Tex2RTF"));
-}
-
-void ChooseInputFile(bool force)
-{
-#if wxUSE_FILEDLG
- if (force || InputFile.empty())
- {
- wxString s = wxFileSelector(_T("Choose LaTeX input file"), wxPathOnly(InputFile), wxFileNameFromPath(InputFile), _T("tex"), _T("*.tex"));
- if (!s.empty())
- {
- // Different file, so clear index entries.
- ClearKeyWordTable();
- ResetContentsLevels(0);
- passNumber = 1;
- errorCount = 0;
-
- InputFile = s;
- wxString str = wxFileNameFromPath(InputFile);
- wxString buf;
- buf.Printf(_T("Tex2RTF [%s]"), str.c_str());
- frame->SetTitle(buf);
- OutputFile = wxEmptyString;
- }
- }
-#else
- wxUnusedVar(force);
-#endif // wxUSE_FILEDLG
-}
-
-void ChooseOutputFile(bool force)
-{
- wxChar extensionBuf[10];
- wxChar wildBuf[10];
- wxStrcpy(wildBuf, _T("*."));
- wxString path;
- if (!OutputFile.empty())
- path = wxPathOnly(OutputFile);
- else if (!InputFile.empty())
- path = wxPathOnly(InputFile);
-
- switch (convertMode)
- {
- case TEX_RTF:
- {
- wxStrcpy(extensionBuf, _T("rtf"));
- wxStrcat(wildBuf, _T("rtf"));
- break;
- }
- case TEX_XLP:
- {
- wxStrcpy(extensionBuf, _T("xlp"));
- wxStrcat(wildBuf, _T("xlp"));
- break;
- }
- case TEX_HTML:
- {
- wxStrcpy(extensionBuf, _T("html"));
- wxStrcat(wildBuf, _T("html"));
- break;
- }
- }
-#if wxUSE_FILEDLG
- if (force || OutputFile.empty())
- {
- wxString s = wxFileSelector(_T("Choose output file"), path, wxFileNameFromPath(OutputFile),
- extensionBuf, wildBuf);
- if (!s.empty())
- OutputFile = s;
- }
-#else
- wxUnusedVar(force);
-#endif // wxUSE_FILEDLG
-}
-#endif
-
-bool Go(void)
-{
-#ifndef NO_GUI
- ChooseInputFile();
- ChooseOutputFile();
-#endif
-
- if (InputFile.empty() || OutputFile.empty() || stopRunning)
- return false;
-
-#ifndef NO_GUI
- if (isInteractive)
- {
- wxChar buf[300];
- wxString str = wxFileNameFromPath(InputFile);
-
- wxSnprintf(buf, sizeof(buf), _T("Tex2RTF [%s]"), (const wxChar*) str);
- frame->SetTitle(buf);
- }
-
- wxLongLong localTime = wxGetLocalTimeMillis();
-#endif
-
- // Find extension-less filename
- wxStrcpy(FileRoot, OutputFile.c_str());
- StripExtension(FileRoot);
-
- if (truncateFilenames && convertMode == TEX_HTML)
- {
- // Truncate to five characters. This ensures that
- // we can generate DOS filenames such as thing999. But 1000 files
- // may not be enough, of course...
- wxChar* sName = wxFileNameFromPath( FileRoot); // this Julian's method is non-destructive reference
-
- if(sName)
- if(wxStrlen( sName) > 5)
- sName[5] = '\0'; // that should do!
- }
-
- wxSnprintf(ContentsName, 300, _T("%s.con"), FileRoot);
- wxSnprintf(TmpContentsName, 300, _T("%s.cn1"), FileRoot);
- wxSnprintf(TmpFrameContentsName, 300, _T("%s.frc"), FileRoot);
- wxSnprintf(WinHelpContentsFileName, 300, _T("%s.cnt"), FileRoot);
- wxSnprintf(RefFileName, 300, _T("%s.ref"), FileRoot);
-
- TexPathList.EnsureFileAccessible(InputFile);
- if (!bulletFile)
- {
- wxString s = TexPathList.FindValidPath(_T("bullet.bmp"));
- if (!s.empty())
- {
- wxString str = wxFileNameFromPath(s);
- bulletFile = copystring(str);
- }
- }
-
- if (wxFileExists(RefFileName))
- ReadTexReferences(RefFileName);
-
- bool success = false;
-
- if (!InputFile.empty() && !OutputFile.empty())
- {
- if (!wxFileExists(InputFile))
- {
- OnError(_T("Cannot open input file!"));
- TexCleanUp();
- return false;
- }
-#if !defined(NO_GUI) && wxUSE_STATUSBAR
- if (isInteractive)
- {
- wxString buf;
- buf.Printf(_T("Working, pass %d...Click CLOSE to abort"), passNumber);
- frame->SetStatusText(buf);
- }
-#endif
- OkToClose = false;
- OnInform(_T("Reading LaTeX file..."));
- TexLoadFile(InputFile);
-
- if (stopRunning)
- {
- OkToClose = true;
- return false;
- }
-
- switch (convertMode)
- {
- case TEX_RTF:
- {
- success = RTFGo();
- break;
- }
- case TEX_XLP:
- {
- success = XLPGo();
- break;
- }
- case TEX_HTML:
- {
- success = HTMLGo();
- break;
- }
- }
- }
- if (stopRunning)
- {
- OnInform(_T("*** Aborted by user."));
- success = false;
- stopRunning = false;
- OkToClose = true;
- }
-
- if (success)
- {
- WriteTexReferences(RefFileName);
- TexCleanUp();
- startedSections = false;
-
- wxString buf;
-#ifndef NO_GUI
- wxLongLong elapsed = wxGetLocalTimeMillis() - localTime;
- buf.Printf(_T("Finished PASS #%d in %ld seconds.\n"), passNumber, (long)(elapsed.GetLo()/1000.0));
- OnInform(buf);
-
- if (errorCount)
- {
- buf.Printf(_T("Errors encountered during this pass: %lu\n"), errorCount);
- OnInform(buf);
- }
-
-#if wxUSE_STATUSBAR
- if (isInteractive)
- {
- buf.Printf(_T("Done, %d %s."), passNumber, (passNumber > 1) ? _T("passes") : _T("pass"));
- frame->SetStatusText(buf);
- }
-#endif // wxUSE_STATUSBAR
-#else
- buf.Printf(_T("Done, %d %s."), passNumber, (passNumber > 1) ? _T("passes") : _T("pass"));
- OnInform(buf);
- if (errorCount)
- {
- buf.Printf(_T("Errors encountered during this pass: %lu\n"), errorCount);
- OnInform(buf.c_str());
- }
-#endif
- passNumber ++;
- errorCount = 0;
- OkToClose = true;
- return true;
- }
-
- TexCleanUp();
- startedSections = false;
-
-#if !defined(NO_GUI) && wxUSE_STATUSBAR
- frame->SetStatusText(_T("Aborted by user."));
-#endif // GUI
-
- OnInform(_T("Sorry, unsuccessful."));
- OkToClose = true;
- return false;
-}
-
-void OnError(const wxString& msg)
-{
- errorCount++;
-
-#ifdef NO_GUI
- wxSTD cerr << "Error: " << msg.mb_str() << "\n";
- wxSTD cerr.flush();
-#else
- if (isInteractive && frame)
- {
- (*frame->textWindow) << _T("Error: ") << msg << _T("\n");
- }
- else
- {
-#if defined(__UNIX__)
- wxSTD cerr << "Error: " << msg.mb_str() << "\n";
- wxSTD cerr.flush();
-#elif defined(__WXMSW__)
- wxLogError(msg);
-#endif
- }
-
- Tex2RTFYield(true);
-#endif // NO_GUI
-}
-
-void OnInform(const wxString& msg)
-{
-#ifdef NO_GUI
- wxSTD cout << msg.mb_str() << "\n";
- wxSTD cout.flush();
-#else
- if (isInteractive && frame)
- {
- (*frame->textWindow) << msg << _T("\n");
- }
- else
- {
-#if defined(__UNIX__)
- wxSTD cout << msg.mb_str() << "\n";
- wxSTD cout.flush();
-#elif defined(__WXMSW__)
- wxLogInfo(msg);
-#endif
- }
-
- if (isInteractive)
- {
- Tex2RTFYield(true);
- }
-#endif // NO_GUI
-}
-
-void OnMacro(int macroId, int no_args, bool start)
-{
- switch (convertMode)
- {
- case TEX_RTF:
- {
- RTFOnMacro(macroId, no_args, start);
- break;
- }
- case TEX_XLP:
- {
- XLPOnMacro(macroId, no_args, start);
- break;
- }
- case TEX_HTML:
- {
- HTMLOnMacro(macroId, no_args, start);
- break;
- }
- }
-}
-
-bool OnArgument(int macroId, int arg_no, bool start)
-{
- switch (convertMode)
- {
- case TEX_RTF:
- {
- return RTFOnArgument(macroId, arg_no, start);
- // break;
- }
- case TEX_XLP:
- {
- return XLPOnArgument(macroId, arg_no, start);
- // break;
- }
- case TEX_HTML:
- {
- return HTMLOnArgument(macroId, arg_no, start);
- // break;
- }
- }
- return true;
-}
-
-/*
- * DDE Stuff
- */
-#if defined(__WXMSW__) && !defined(NO_GUI)
-
-/*
- * Server
- */
-
-wxConnectionBase *Tex2RTFServer::OnAcceptConnection(const wxString& topic)
-{
- if (topic == _T("TEX2RTF"))
- {
- if (!ipc_buffer)
- ipc_buffer = new wxChar[1000];
-
- return new Tex2RTFConnection(ipc_buffer, 4000);
- }
- else
- return NULL;
-}
-
- /*
- * Connection
- */
-
-Tex2RTFConnection::Tex2RTFConnection(wxChar *buf, int size):wxDDEConnection(buf, size)
-{
-}
-
-bool SplitCommand(wxChar *data, wxChar *firstArg, wxChar *secondArg)
-{
- firstArg[0] = 0;
- secondArg[0] = 0;
- int i = 0;
- bool stop = false;
- // Find first argument (command name)
- while (!stop)
- {
- if (data[i] == ' ' || data[i] == 0)
- stop = true;
- else
- {
- firstArg[i] = data[i];
- i ++;
- }
- }
- firstArg[i] = 0;
- if (data[i] == ' ')
- {
- // Find second argument
- i ++;
- int j = 0;
- while (data[i] != 0)
- {
- secondArg[j] = data[i];
- i ++;
- j ++;
- }
- secondArg[j] = 0;
- }
- return true;
-}
-
-bool Tex2RTFConnection::OnExecute(const wxString& WXUNUSED(topic), wxChar *data, int WXUNUSED(size), wxIPCFormat WXUNUSED(format))
-{
- wxStrcpy(Tex2RTFLastStatus, _T("OK"));
-
- wxChar firstArg[50];
- wxChar secondArg[300];
- if (SplitCommand(data, firstArg, secondArg))
- {
- bool hasArg = (wxStrlen(secondArg) > 0);
- if (wxStrcmp(firstArg, _T("INPUT")) == 0 && hasArg)
- {
- InputFile = secondArg;
- if (frame)
- {
- wxChar buf[100];
- wxString str = wxFileNameFromPath(InputFile);
- wxSnprintf(buf, sizeof(buf), _T("Tex2RTF [%s]"), (const wxChar*) str);
- frame->SetTitle(buf);
- }
- }
- else if (wxStrcmp(firstArg, _T("OUTPUT")) == 0 && hasArg)
- {
- OutputFile = secondArg;
- }
- else if (wxStrcmp(firstArg, _T("GO")) == 0)
- {
- wxStrcpy(Tex2RTFLastStatus, _T("WORKING"));
- if (!Go())
- wxStrcpy(Tex2RTFLastStatus, _T("CONVERSION ERROR"));
- else
- wxStrcpy(Tex2RTFLastStatus, _T("OK"));
- }
- else if (wxStrcmp(firstArg, _T("EXIT")) == 0)
- {
- if (frame) frame->Close();
- }
- else if (wxStrcmp(firstArg, _T("MINIMIZE")) == 0 || wxStrcmp(firstArg, _T("ICONIZE")) == 0)
- {
- if (frame)
- frame->Iconize(true);
- }
- else if (wxStrcmp(firstArg, _T("SHOW")) == 0 || wxStrcmp(firstArg, _T("RESTORE")) == 0)
- {
- if (frame)
- {
- frame->Iconize(false);
- frame->Show(true);
- }
- }
- else
- {
- // Try for a setting
- wxStrcpy(Tex2RTFLastStatus, RegisterSetting(firstArg, secondArg, false));
-#if !defined(NO_GUI) && wxUSE_STATUSBAR
- if (frame && wxStrcmp(firstArg, _T("conversionMode")) == 0)
- {
- wxChar buf[100];
- wxStrcpy(buf, _T("In "));
-
- if (winHelp && (convertMode == TEX_RTF))
- wxStrcat(buf, _T("WinHelp RTF"));
- else if (!winHelp && (convertMode == TEX_RTF))
- wxStrcat(buf, _T("linear RTF"));
- else if (convertMode == TEX_HTML) wxStrcat(buf, _T("HTML"));
- else if (convertMode == TEX_XLP) wxStrcat(buf, _T("XLP"));
- wxStrcat(buf, _T(" mode."));
- frame->SetStatusText(buf, 1);
- }
-#endif
- }
- }
- return true;
-}
-
-wxChar *Tex2RTFConnection::OnRequest(const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item), int *WXUNUSED(size), wxIPCFormat WXUNUSED(format))
-{
- return Tex2RTFLastStatus;
-}
-
-#endif
-
-#ifndef NO_GUI
-#ifndef __WXGTK__
-//void wxObject::Dump(wxSTD ostream& str)
-//{
-// if (GetClassInfo() && GetClassInfo()->GetClassName())
-// str << GetClassInfo()->GetClassName();
-// else
-// str << "unknown object class";
-//}
-#endif
-#endif
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: tex2any.h
-// Purpose: tex2RTF conversion header
-// Author: Julian Smart
-// Modified by: Wlodzimiez ABX Skiba 2003/2004 Unicode support
-// Created: 7.9.93
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#include "wx/app.h"
-
-#ifndef NO_GUI
- #include "wx/frame.h"
- #include "wx/textctrl.h"
-
-#ifdef __WXMSW__
- #include "wx/dde.h"
-#endif
-
-#endif
-
-// Define a new application type
-class MyApp: public
- #ifndef NO_GUI
- wxApp
- #else
- wxAppConsole
- #endif
-{ public:
- bool OnInit();
-#ifdef NO_GUI
- int OnRun() { return EXIT_SUCCESS; }
-#else
- int OnExit();
-#endif
-};
-
-#ifndef NO_GUI
-
-// Define a new frame type
-class MyFrame: public wxFrame
-{ public:
- wxTextCtrl *textWindow;
- MyFrame(wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size);
-
- void OnCloseWindow(wxCloseEvent& event);
- void OnExit(wxCommandEvent& event);
- void OnGo(wxCommandEvent& event);
- void OnSetInput(wxCommandEvent& event);
- void OnSetOutput(wxCommandEvent& event);
- void OnSaveFile(wxCommandEvent& event);
- void OnViewOutput(wxCommandEvent& event);
- void OnViewLatex(wxCommandEvent& event);
- void OnLoadMacros(wxCommandEvent& event);
- void OnShowMacros(wxCommandEvent& event);
- void OnModeRTF(wxCommandEvent& event);
- void OnModeWinHelp(wxCommandEvent& event);
- void OnModeHTML(wxCommandEvent& event);
- void OnModeXLP(wxCommandEvent& event);
- void OnOptionsCurlyBrace(wxCommandEvent& event);
- void OnOptionsSyntaxChecking(wxCommandEvent& event);
- void OnHelp(wxCommandEvent& event);
- void OnAbout(wxCommandEvent& event);
-
-DECLARE_EVENT_TABLE()
-};
-
-#ifdef __WXMSW__
-
-class Tex2RTFConnection: public wxDDEConnection
-{
- public:
- Tex2RTFConnection(wxChar *buf, int size);
- virtual ~Tex2RTFConnection(void){}
- bool OnExecute(const wxString& topic, wxChar *data, int size, wxIPCFormat format);
- wxChar *OnRequest(const wxString& topic, const wxString& item, int *size, wxIPCFormat format);
-};
-
-class Tex2RTFServer: public wxDDEServer
-{
- public:
- wxConnectionBase *OnAcceptConnection(const wxString& topic);
-};
-
-#endif // __WXMSW__
-
-#endif // NO_GUI
-
-/*
- * Itemize/enumerate structure: put on a stack for
- * getting the indentation right
- *
- */
-
-#define LATEX_ENUMERATE 1
-#define LATEX_ITEMIZE 2
-#define LATEX_DESCRIPTION 3
-#define LATEX_TWOCOL 5
-#define LATEX_INDENT 6
-
-class ItemizeStruc: public wxObject
-{
- public:
- int listType;
- int currentItem;
- int indentation;
- int labelIndentation;
- inline ItemizeStruc(int lType, int indent = 0, int labIndent = 0)
- { listType = lType; currentItem = 0;
- indentation = indent; labelIndentation = labIndent; }
-};
-
-// ID for the menu quit command
-#define TEX_QUIT wxID_EXIT
-#define TEX_GO 2
-
-#define TEX_SET_INPUT 3
-#define TEX_SET_OUTPUT 4
-
-#define TEX_VIEW_LATEX 5
-#define TEX_VIEW_OUTPUT 6
-
-#define TEX_VIEW_CUSTOM_MACROS 7
-#define TEX_LOAD_CUSTOM_MACROS 8
-
-#define TEX_MODE_RTF 9
-#define TEX_MODE_WINHELP 10
-#define TEX_MODE_HTML 11
-#define TEX_MODE_XLP 12
-
-#define TEX_OPTIONS_CURLY_BRACE 13
-#define TEX_OPTIONS_SYNTAX_CHECKING 14
-
-#define TEX_HELP 15
-#define TEX_ABOUT wxID_ABOUT
-#define TEX_SAVE_FILE 17
-
-extern TexChunk *currentMember;
-extern bool startedSections;
-extern wxChar *contentsString;
-extern bool suppressNameDecoration;
-extern wxList itemizeStack;
-
-extern FILE *Contents;
-extern FILE *Chapters;
-extern FILE *Sections;
-extern FILE *Subsections;
-extern FILE *Subsubsections;
-
-extern wxString InputFile;
-extern wxString OutputFile;
-extern wxChar *MacroFile;
-
-extern wxChar *FileRoot;
-extern wxChar *ContentsName; // Contents page from last time around
-extern wxChar *TmpContentsName; // Current contents page
-extern wxChar *TmpFrameContentsName; // Current frame contents page
-extern wxChar *WinHelpContentsFileName; // WinHelp .cnt file
-extern wxChar *RefName; // Reference file name
-extern wxChar *bulletFile;
-
-#ifndef NO_GUI
-void ChooseOutputFile(bool force = false);
-void ChooseInputFile(bool force = false);
-#endif
-
-void RTFOnMacro(int macroId, int no_args, bool start);
-bool RTFOnArgument(int macroId, int arg_no, bool start);
-
-void HTMLOnMacro(int macroId, int no_args, bool start);
-bool HTMLOnArgument(int macroId, int arg_no, bool start);
-
-void XLPOnMacro(int macroId, int no_args, bool start);
-bool XLPOnArgument(int macroId, int arg_no, bool start);
-
-bool RTFGo(void);
-bool HTMLGo(void);
-bool XLPGo(void);
-
-#define ltHARDY 10000
+++ /dev/null
-; Tex2RTF initialisation file
-runTwice = yes
-titleFontSize = 12
-authorFontSize = 10
-chapterFontSize = 12
-sectionFontSize = 12
-subsectionFontSize = 12
-headerRule = yes
-footerRule = yes
-useHeadingStyles = yes
-contentsDepth = 2
-listItemIndent=40
-winHelpContents = yes
-winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95
-generateHPJ = no
-htmlBrowseButtons = bitmap
-winHelpTitle = "Help Demo Document"
-truncateFilenames = yes
-combineSubSections = yes
-htmlIndex = yes
-htmlFrameContents = no
-htmlWorkshopFiles = yes
+++ /dev/null
-aaa ICON "tex2rtf.ico"
-tex2rtf ICON "tex2rtf.ico"
-#include "wx/msw/wx.rc"
-
+++ /dev/null
-/* XPM */\r
-static const char *const tex2rtf_xpm[] = {\r
-/* width height num_colors chars_per_pixel */\r
-" 32 32 3 1",\r
-/* colors */\r
-". c #000000",\r
-"# c #c0c0c0",\r
-"a c #ffffff",\r
-/* pixels */\r
-"aaaaaaaaaaaaaaaaaaaaa.aaaaaaa..a",\r
-"aaaaaaaaaaaaaaaaaaaaa..aaaaa.aa.",\r
-"aaaaaaaaaaaaaaaaaaaa#.a.aaaa.aa.",\r
-"aaaaaaaaaaaaaaaaaaaa#..a.aaaaa.a",\r
-"aaaaaaaaaaaaaaaaaaaa#...a.aaaa.a",\r
-"aaaaaaaaaaaaaaaaa........a.aaaaa",\r
-"aaaaaaaaaaaaa....aaaa.....a.aa.a",\r
-"aaaaaaaaaaa..aaaa..........a.aaa",\r
-"aaaaaaaaa..aa...............a.aa",\r
-"aaaaaaaa.aa..................a.a",\r
-"aaaaaaa.a.....................#a",\r
-"aaaaaa.a.....................###",\r
-"aaaaa.a.....................###a",\r
-"aaaa.......................###aa",\r
-"aaaa..............###.....###aaa",\r
-"aaa...........#######....###aaaa",\r
-"aaa.........#####aaa#...###aaaaa",\r
-"aa........###aaaaaaaa..a##aaaaaa",\r
-"aa.......##aaaaaaaaaa.aa#aaaaaaa",\r
-"aa......##aaaaaaaaaaaaaaaaaaaaaa",\r
-"a......##aaaaaaaaaaaaaaaaaaaaaaa",\r
-"a.....##aaaaaaaaaaaaaaaaaaaaaaaa",\r
-"a.....#aaaaaaaaaaaaaaaaaaaaaaaaa",\r
-"a....#aaaaaaaaaaaaaaaaaaaaaaaaaa",\r
-"a....aaaa.aaaaaaaaaaaaaaaaaaaaaa",\r
-"a......a.a.a...aaa..a..aaaaaaaaa",\r
-"a...a.aa...aa.aaaaa.a.aaaaaaaaaa",\r
-"a...a.a.aaa.a.....aa.aaaaaaaaaaa",\r
-"aa.aa.aa.aaaa.a.aaa.a.aaaaaaaaaa",\r
-"aa.a.....aaaa.a..a..a..aaaaaaaaa",\r
-"aaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaa",\r
-"aaaaaaaaaaaaaa....aaaaaaaaaaaaaa"\r
-};\r
+++ /dev/null
-# Microsoft Developer Studio Project File - Name="tex2rtf_tex2rtf" - Package Owner=<4>\r
-# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
-# ** DO NOT EDIT **\r
-\r
-# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
-\r
-CFG=tex2rtf - Win32 Debug\r
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
-!MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "tex2rtf_tex2rtf.mak".\r
-!MESSAGE \r
-!MESSAGE You can specify a configuration when running NMAKE\r
-!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "tex2rtf_tex2rtf.mak" CFG="tex2rtf - Win32 Debug"\r
-!MESSAGE \r
-!MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
-!MESSAGE "tex2rtf - Win32 DLL Universal Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "tex2rtf - Win32 DLL Universal Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "tex2rtf - Win32 DLL Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "tex2rtf - Win32 DLL Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "tex2rtf - Win32 Universal Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "tex2rtf - Win32 Universal Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "tex2rtf - Win32 Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "tex2rtf - Win32 Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE \r
-\r
-# Begin Project\r
-# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName ""\r
-# PROP Scc_LocalPath ""\r
-CPP=cl.exe\r
-RSC=rc.exe\r
-\r
-!IF "$(CFG)" == "tex2rtf - Win32 DLL Universal Release"\r
-\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\tex2rtf"\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\tex2rtf"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswunivudll\tex2rtf.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 /D "NO_GUI" /c\r
-# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswunivudll\tex2rtf.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 /D "NO_GUI" /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 /d NO_GUI\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 /d NO_GUI\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\tex2rtf.exe" /debug /pdb:"vc_mswunivudll\tex2rtf.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\tex2rtf.exe" /debug /pdb:"vc_mswunivudll\tex2rtf.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "tex2rtf - 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\tex2rtf"\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\tex2rtf"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswunivuddll\tex2rtf.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 /D "NO_GUI" /c\r
-# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswunivuddll\tex2rtf.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 /D "NO_GUI" /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 /d NO_GUI\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 /d NO_GUI\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\tex2rtf.exe" /debug /pdb:"vc_mswunivuddll\tex2rtf.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\tex2rtf.exe" /debug /pdb:"vc_mswunivuddll\tex2rtf.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "tex2rtf - 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\tex2rtf"\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\tex2rtf"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswudll\tex2rtf.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 /D "NO_GUI" /c\r
-# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswudll\tex2rtf.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 /D "NO_GUI" /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 /d NO_GUI\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 /d NO_GUI\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\tex2rtf.exe" /debug /pdb:"vc_mswudll\tex2rtf.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\tex2rtf.exe" /debug /pdb:"vc_mswudll\tex2rtf.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "tex2rtf - 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\tex2rtf"\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\tex2rtf"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswuddll\tex2rtf.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 /D "NO_GUI" /c\r
-# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswuddll\tex2rtf.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 /D "NO_GUI" /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 /d NO_GUI\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 /d NO_GUI\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\tex2rtf.exe" /debug /pdb:"vc_mswuddll\tex2rtf.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\tex2rtf.exe" /debug /pdb:"vc_mswuddll\tex2rtf.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "tex2rtf - 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\tex2rtf"\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\tex2rtf"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswunivu\tex2rtf.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 /D "NO_GUI" /c\r
-# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswunivu\tex2rtf.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 /D "NO_GUI" /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 /d NO_GUI\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 /d NO_GUI\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\tex2rtf.exe" /debug /pdb:"vc_mswunivu\tex2rtf.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\tex2rtf.exe" /debug /pdb:"vc_mswunivu\tex2rtf.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "tex2rtf - 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\tex2rtf"\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\tex2rtf"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswunivud\tex2rtf.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 /D "NO_GUI" /c\r
-# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswunivud\tex2rtf.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 /D "NO_GUI" /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 /d NO_GUI\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 /d NO_GUI\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\tex2rtf.exe" /debug /pdb:"vc_mswunivud\tex2rtf.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\tex2rtf.exe" /debug /pdb:"vc_mswunivud\tex2rtf.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "tex2rtf - 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\tex2rtf"\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\tex2rtf"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswu\tex2rtf.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 /D "NO_GUI" /c\r
-# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswu\tex2rtf.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 /D "NO_GUI" /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 /d NO_GUI\r
-# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswu" /i ".\..\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0 /d NO_GUI\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\tex2rtf.exe" /debug /pdb:"vc_mswu\tex2rtf.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\tex2rtf.exe" /debug /pdb:"vc_mswu\tex2rtf.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ELSEIF "$(CFG)" == "tex2rtf - 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\tex2rtf"\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\tex2rtf"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswud\tex2rtf.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 /D "NO_GUI" /c\r
-# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswud\tex2rtf.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 /D "NO_GUI" /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 /d NO_GUI\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 /d NO_GUI\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\tex2rtf.exe" /debug /pdb:"vc_mswud\tex2rtf.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\tex2rtf.exe" /debug /pdb:"vc_mswud\tex2rtf.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:console\r
-\r
-!ENDIF\r
-\r
-# Begin Target\r
-\r
-# Name "tex2rtf - Win32 DLL Universal Release"\r
-# Name "tex2rtf - Win32 DLL Universal Debug"\r
-# Name "tex2rtf - Win32 DLL Release"\r
-# Name "tex2rtf - Win32 DLL Debug"\r
-# Name "tex2rtf - Win32 Universal Release"\r
-# Name "tex2rtf - Win32 Universal Debug"\r
-# Name "tex2rtf - Win32 Release"\r
-# Name "tex2rtf - Win32 Debug"\r
-# Begin Group "Source Files"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\htmlutil.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\readshg.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\rtfutils.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\table.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\tex2any.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\tex2rtf.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\texutils.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\xlputils.cpp\r
-# End Source File\r
-# End Group\r
-# End Target\r
-# End Project\r
-\r
+++ /dev/null
-# Microsoft Developer Studio Project File - Name="tex2rtf_tex2rtf_gui" - Package Owner=<4>\r
-# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
-# ** DO NOT EDIT **\r
-\r
-# TARGTYPE "Win32 (x86) Application" 0x0101\r
-\r
-CFG=tex2rtf_gui - Win32 Debug\r
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
-!MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "tex2rtf_tex2rtf_gui.mak".\r
-!MESSAGE \r
-!MESSAGE You can specify a configuration when running NMAKE\r
-!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "tex2rtf_tex2rtf_gui.mak" CFG="tex2rtf_gui - Win32 Debug"\r
-!MESSAGE \r
-!MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
-!MESSAGE "tex2rtf_gui - Win32 DLL Universal Release" (based on "Win32 (x86) Application")\r
-!MESSAGE "tex2rtf_gui - Win32 DLL Universal Debug" (based on "Win32 (x86) Application")\r
-!MESSAGE "tex2rtf_gui - Win32 DLL Release" (based on "Win32 (x86) Application")\r
-!MESSAGE "tex2rtf_gui - Win32 DLL Debug" (based on "Win32 (x86) Application")\r
-!MESSAGE "tex2rtf_gui - Win32 Universal Release" (based on "Win32 (x86) Application")\r
-!MESSAGE "tex2rtf_gui - Win32 Universal Debug" (based on "Win32 (x86) Application")\r
-!MESSAGE "tex2rtf_gui - Win32 Release" (based on "Win32 (x86) Application")\r
-!MESSAGE "tex2rtf_gui - Win32 Debug" (based on "Win32 (x86) Application")\r
-!MESSAGE \r
-\r
-# Begin Project\r
-# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName ""\r
-# PROP Scc_LocalPath ""\r
-CPP=cl.exe\r
-MTL=midl.exe\r
-RSC=rc.exe\r
-\r
-!IF "$(CFG)" == "tex2rtf_gui - Win32 DLL Universal Release"\r
-\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\tex2rtf_gui"\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\tex2rtf_gui"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswunivudll\tex2rtf_gui.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswunivu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswunivudll\tex2rtf_gui.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswunivu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\..\lib\vc_dll\mswunivu" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\r
-# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\..\lib\vc_dll\mswunivu" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxmswuniv29u_html.lib wxmswuniv29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswunivudll\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows\r
-# ADD LINK32 wxmswuniv29u_html.lib wxmswuniv29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswunivudll\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows\r
-\r
-!ELSEIF "$(CFG)" == "tex2rtf_gui - 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\tex2rtf_gui"\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\tex2rtf_gui"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswunivuddll\tex2rtf_gui.pdb /Od /Gm /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswunivud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswunivuddll\tex2rtf_gui.pdb /Od /Gm /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswunivud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\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 "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\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 "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxmswuniv29ud_html.lib wxmswuniv29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswunivuddll\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows\r
-# ADD LINK32 wxmswuniv29ud_html.lib wxmswuniv29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswunivuddll\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows\r
-\r
-!ELSEIF "$(CFG)" == "tex2rtf_gui - 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\tex2rtf_gui"\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\tex2rtf_gui"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswudll\tex2rtf_gui.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswudll\tex2rtf_gui.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\..\lib\vc_dll\mswu" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\r
-# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\..\lib\vc_dll\mswu" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxmsw29u_html.lib wxmsw29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswudll\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows\r
-# ADD LINK32 wxmsw29u_html.lib wxmsw29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswudll\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows\r
-\r
-!ELSEIF "$(CFG)" == "tex2rtf_gui - 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\tex2rtf_gui"\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\tex2rtf_gui"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswuddll\tex2rtf_gui.pdb /Od /Gm /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswuddll\tex2rtf_gui.pdb /Od /Gm /GR /EHsc /I ".\..\..\..\lib\vc_dll\mswud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "WXUSINGDLL" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\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 "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\r
-# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\..\lib\vc_dll\mswud" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxmsw29ud_html.lib wxmsw29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswuddll\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows\r
-# ADD LINK32 wxmsw29ud_html.lib wxmsw29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswuddll\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_dll" /subsystem:windows\r
-\r
-!ELSEIF "$(CFG)" == "tex2rtf_gui - 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\tex2rtf_gui"\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\tex2rtf_gui"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswunivu\tex2rtf_gui.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswunivu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswunivu\tex2rtf_gui.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswunivu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswunivu" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\r
-# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswunivu" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxmswuniv29u_html.lib wxmswuniv29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswunivu\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows\r
-# ADD LINK32 wxmswuniv29u_html.lib wxmswuniv29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswunivu\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows\r
-\r
-!ELSEIF "$(CFG)" == "tex2rtf_gui - 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\tex2rtf_gui"\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\tex2rtf_gui"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswunivud\tex2rtf_gui.pdb /Od /Gm /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswunivud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswunivud\tex2rtf_gui.pdb /Od /Gm /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswunivud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXUNIVERSAL__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\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 "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\r
-# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswunivud" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxmswuniv29ud_html.lib wxmswuniv29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswunivud\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows\r
-# ADD LINK32 wxmswuniv29ud_html.lib wxmswuniv29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswunivud\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows\r
-\r
-!ELSEIF "$(CFG)" == "tex2rtf_gui - 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\tex2rtf_gui"\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\tex2rtf_gui"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MD /Zi /Fdvc_mswu\tex2rtf_gui.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD CPP /nologo /FD /MD /Zi /Fdvc_mswu\tex2rtf_gui.pdb /O2 /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswu" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD BASE MTL /nologo /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "WIN32" /D "__WXMSW__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
-# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswu" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\r
-# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswu" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxmsw29u_html.lib wxmsw29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswu\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows\r
-# ADD LINK32 wxmsw29u_html.lib wxmsw29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswu\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows\r
-\r
-!ELSEIF "$(CFG)" == "tex2rtf_gui - 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\tex2rtf_gui"\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\tex2rtf_gui"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /FD /MDd /Zi /Fdvc_mswud\tex2rtf_gui.pdb /Od /Gm /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD CPP /nologo /FD /MDd /Zi /Fdvc_mswud\tex2rtf_gui.pdb /Od /Gm /GR /EHsc /I ".\..\..\..\lib\vc_lib\mswud" /I ".\..\..\..\include" /W4 /I "." /I ".\..\..\..\samples" /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /c\r
-# ADD BASE MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
-# ADD MTL /nologo /D "WIN32" /D "_DEBUG" /D "__WXMSW__" /D "__WXDEBUG__" /D "_UNICODE" /D "_WINDOWS" /D "NOPCH" /mktyplib203 /win32\r
-# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswud" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\r
-# ADD RSC /l 0x409 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswud" /i ".\..\..\..\include" /i "." /d "_WINDOWS" /i ".\..\..\..\samples" /d NOPCH\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 wxmsw29ud_html.lib wxmsw29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswud\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows\r
-# ADD LINK32 wxmsw29ud_html.lib wxmsw29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe" /debug /pdb:"vc_mswud\tex2rtf_gui.pdb" /libpath:".\..\..\..\lib\vc_lib" /subsystem:windows\r
-\r
-!ENDIF\r
-\r
-# Begin Target\r
-\r
-# Name "tex2rtf_gui - Win32 DLL Universal Release"\r
-# Name "tex2rtf_gui - Win32 DLL Universal Debug"\r
-# Name "tex2rtf_gui - Win32 DLL Release"\r
-# Name "tex2rtf_gui - Win32 DLL Debug"\r
-# Name "tex2rtf_gui - Win32 Universal Release"\r
-# Name "tex2rtf_gui - Win32 Universal Debug"\r
-# Name "tex2rtf_gui - Win32 Release"\r
-# Name "tex2rtf_gui - Win32 Debug"\r
-# Begin Group "Source Files"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\htmlutil.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\readshg.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\rtfutils.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\..\..\..\samples\sample.rc\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\table.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\tex2any.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\tex2rtf.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\texutils.cpp\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\xlputils.cpp\r
-# End Source File\r
-# End Group\r
-# End Target\r
-# End Project\r
-\r
+++ /dev/null
-<?xml version="1.0" ?>\r
-<!--\r
-\r
- This makefile was generated by\r
- Bakefile 0.2.3 (http://www.bakefile.org)\r
- Do not modify, all changes will be overwritten!\r
-\r
--->\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="7.10"\r
- Name="tex2rtf"\r
- ProjectGUID="{D99AE97B-CB4C-5F55-B993-841C06D4CF39}">\r
- <Platforms>\r
- <Platform\r
- Name="Win32"/>\r
- </Platforms>\r
- <Configurations>\r
- <Configuration\r
- Name="DLL Universal Release|Win32"\r
- OutputDirectory="vc_mswunivudll"\r
- IntermediateDirectory="vc_mswunivudll\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivudll\tex2rtf\"\r
- ObjectFile="vc_mswunivudll\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswunivudll\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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;NO_GUI"/>\r
- <Tool\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivudll\tex2rtf.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivudll\tex2rtf_vc7_tex2rtf.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Universal Debug|Win32"\r
- OutputDirectory="vc_mswunivuddll"\r
- IntermediateDirectory="vc_mswunivuddll\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivuddll\tex2rtf\"\r
- ObjectFile="vc_mswunivuddll\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswunivuddll\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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;NO_GUI"/>\r
- <Tool\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivuddll\tex2rtf.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivuddll\tex2rtf_vc7_tex2rtf.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Release|Win32"\r
- OutputDirectory="vc_mswudll"\r
- IntermediateDirectory="vc_mswudll\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswudll\tex2rtf\"\r
- ObjectFile="vc_mswudll\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswudll\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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;NO_GUI"/>\r
- <Tool\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswudll\tex2rtf.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswudll\tex2rtf_vc7_tex2rtf.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Debug|Win32"\r
- OutputDirectory="vc_mswuddll"\r
- IntermediateDirectory="vc_mswuddll\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswuddll\tex2rtf\"\r
- ObjectFile="vc_mswuddll\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswuddll\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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;NO_GUI"/>\r
- <Tool\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswuddll\tex2rtf.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswuddll\tex2rtf_vc7_tex2rtf.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="Universal Release|Win32"\r
- OutputDirectory="vc_mswunivu"\r
- IntermediateDirectory="vc_mswunivu\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivu\tex2rtf\"\r
- ObjectFile="vc_mswunivu\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswunivu\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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;NO_GUI"/>\r
- <Tool\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivu\tex2rtf.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivu\tex2rtf_vc7_tex2rtf.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="Universal Debug|Win32"\r
- OutputDirectory="vc_mswunivud"\r
- IntermediateDirectory="vc_mswunivud\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivud\tex2rtf\"\r
- ObjectFile="vc_mswunivud\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswunivud\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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;NO_GUI"/>\r
- <Tool\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivud\tex2rtf.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivud\tex2rtf_vc7_tex2rtf.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="vc_mswu"\r
- IntermediateDirectory="vc_mswu\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswu\tex2rtf\"\r
- ObjectFile="vc_mswu\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswu\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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;NO_GUI"/>\r
- <Tool\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswu\tex2rtf.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswu\tex2rtf_vc7_tex2rtf.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="vc_mswud"\r
- IntermediateDirectory="vc_mswud\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswud\tex2rtf\"\r
- ObjectFile="vc_mswud\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswud\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\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;NO_GUI"/>\r
- <Tool\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswud\tex2rtf.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswud\tex2rtf_vc7_tex2rtf.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- \r
- </References>\r
- <Files>\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
- <File\r
- RelativePath=".\htmlutil.cpp"/>\r
- <File\r
- RelativePath=".\readshg.cpp"/>\r
- <File\r
- RelativePath=".\rtfutils.cpp"/>\r
- <File\r
- RelativePath=".\table.cpp"/>\r
- <File\r
- RelativePath=".\tex2any.cpp"/>\r
- <File\r
- RelativePath=".\tex2rtf.cpp"/>\r
- <File\r
- RelativePath=".\texutils.cpp"/>\r
- <File\r
- RelativePath=".\xlputils.cpp"/>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- \r
- </Globals>\r
-</VisualStudioProject>\r
-\r
+++ /dev/null
-<?xml version="1.0" ?>\r
-<!--\r
-\r
- This makefile was generated by\r
- Bakefile 0.2.3 (http://www.bakefile.org)\r
- Do not modify, all changes will be overwritten!\r
-\r
--->\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="7.10"\r
- Name="tex2rtf_gui"\r
- ProjectGUID="{3207D5A1-FB43-528B-9886-46FD3C672069}">\r
- <Platforms>\r
- <Platform\r
- Name="Win32"/>\r
- </Platforms>\r
- <Configurations>\r
- <Configuration\r
- Name="DLL Universal Release|Win32"\r
- OutputDirectory="vc_mswunivudll"\r
- IntermediateDirectory="vc_mswunivudll\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivu;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivudll\tex2rtf_gui\"\r
- ObjectFile="vc_mswunivudll\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswunivudll\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"/>\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivu;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"/>\r
- <Tool\r
- Name="VCPreLinkEventTool"/>\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmswuniv29u_html.lib wxmswuniv29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivudll\tex2rtf_gui.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivudll\tex2rtf_vc7_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Universal Debug|Win32"\r
- OutputDirectory="vc_mswunivuddll"\r
- IntermediateDirectory="vc_mswunivuddll\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivud;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivuddll\tex2rtf_gui\"\r
- ObjectFile="vc_mswunivuddll\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswunivuddll\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"/>\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivud;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"/>\r
- <Tool\r
- Name="VCPreLinkEventTool"/>\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmswuniv29ud_html.lib wxmswuniv29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivuddll\tex2rtf_gui.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivuddll\tex2rtf_vc7_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Release|Win32"\r
- OutputDirectory="vc_mswudll"\r
- IntermediateDirectory="vc_mswudll\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswu;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswudll\tex2rtf_gui\"\r
- ObjectFile="vc_mswudll\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswudll\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"/>\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswu;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"/>\r
- <Tool\r
- Name="VCPreLinkEventTool"/>\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmsw29u_html.lib wxmsw29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswudll\tex2rtf_gui.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswudll\tex2rtf_vc7_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Debug|Win32"\r
- OutputDirectory="vc_mswuddll"\r
- IntermediateDirectory="vc_mswuddll\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswud;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswuddll\tex2rtf_gui\"\r
- ObjectFile="vc_mswuddll\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswuddll\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"/>\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswud;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"/>\r
- <Tool\r
- Name="VCPreLinkEventTool"/>\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmsw29ud_html.lib wxmsw29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswuddll\tex2rtf_gui.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswuddll\tex2rtf_vc7_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="Universal Release|Win32"\r
- OutputDirectory="vc_mswunivu"\r
- IntermediateDirectory="vc_mswunivu\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivu;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivu\tex2rtf_gui\"\r
- ObjectFile="vc_mswunivu\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswunivu\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"/>\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivu;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;_WINDOWS;NOPCH"/>\r
- <Tool\r
- Name="VCPreLinkEventTool"/>\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmswuniv29u_html.lib wxmswuniv29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivu\tex2rtf_gui.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivu\tex2rtf_vc7_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="Universal Debug|Win32"\r
- OutputDirectory="vc_mswunivud"\r
- IntermediateDirectory="vc_mswunivud\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivud;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivud\tex2rtf_gui\"\r
- ObjectFile="vc_mswunivud\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswunivud\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"/>\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivud;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;_WINDOWS;NOPCH"/>\r
- <Tool\r
- Name="VCPreLinkEventTool"/>\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmswuniv29ud_html.lib wxmswuniv29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivud\tex2rtf_gui.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivud\tex2rtf_vc7_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="vc_mswu"\r
- IntermediateDirectory="vc_mswu\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswu;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswu\tex2rtf_gui\"\r
- ObjectFile="vc_mswu\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswu\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"/>\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswu;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;_WINDOWS;NOPCH"/>\r
- <Tool\r
- Name="VCPreLinkEventTool"/>\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmsw29u_html.lib wxmsw29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswu\tex2rtf_gui.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswu\tex2rtf_vc7_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="vc_mswud"\r
- IntermediateDirectory="vc_mswud\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1">\r
- <Tool\r
- Name="VCPreBuildEventTool"/>\r
- <Tool\r
- Name="VCCustomBuildTool"/>\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"/>\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"/>\r
- <Tool\r
- Name="VCIDLTool"/>\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswud;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswud\tex2rtf_gui\"\r
- ObjectFile="vc_mswud\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswud\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"/>\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswud;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;_WINDOWS;NOPCH"/>\r
- <Tool\r
- Name="VCPreLinkEventTool"/>\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmsw29ud_html.lib wxmsw29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswud\tex2rtf_gui.pdb"\r
- TargetMachine="1"/>\r
- <Tool\r
- Name="VCALinkTool"/>\r
- <Tool\r
- Name="VCXDCMakeTool"/>\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswud\tex2rtf_vc7_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"/>\r
- <Tool\r
- Name="VCFxCopTool"/>\r
- <Tool\r
- Name="VCAppVerifierTool"/>\r
- <Tool\r
- Name="VCWebDeploymentTool"/>\r
- <Tool\r
- Name="VCPostBuildEventTool"/>\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- \r
- </References>\r
- <Files>\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
- <File\r
- RelativePath=".\htmlutil.cpp"/>\r
- <File\r
- RelativePath=".\readshg.cpp"/>\r
- <File\r
- RelativePath=".\rtfutils.cpp"/>\r
- <File\r
- RelativePath=".\table.cpp"/>\r
- <File\r
- RelativePath=".\tex2any.cpp"/>\r
- <File\r
- RelativePath=".\tex2rtf.cpp"/>\r
- <File\r
- RelativePath=".\texutils.cpp"/>\r
- <File\r
- RelativePath=".\xlputils.cpp"/>\r
- </Filter>\r
- <Filter\r
- Name="Resource Files"\r
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav">\r
- <File\r
- RelativePath=".\..\..\..\samples\sample.rc"/>\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- \r
- </Globals>\r
-</VisualStudioProject>\r
-\r
+++ /dev/null
-<?xml version="1.0" ?>\r
-<!--\r
-\r
- This makefile was generated by\r
- Bakefile 0.2.3 (http://www.bakefile.org)\r
- Do not modify, all changes will be overwritten!\r
-\r
--->\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="tex2rtf"\r
- ProjectGUID="{C5F450E8-D0A4-555B-9729-BB3C7C57188A}"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\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\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivudll\tex2rtf\"\r
- ObjectFile="vc_mswunivudll\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswunivudll\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\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;NO_GUI"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivudll\tex2rtf.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivudll\tex2rtf_vc8_tex2rtf.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Universal Debug|Win32"\r
- OutputDirectory="vc_mswunivuddll"\r
- IntermediateDirectory="vc_mswunivuddll\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivuddll\tex2rtf\"\r
- ObjectFile="vc_mswunivuddll\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswunivuddll\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\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;NO_GUI"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivuddll\tex2rtf.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivuddll\tex2rtf_vc8_tex2rtf.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Release|Win32"\r
- OutputDirectory="vc_mswudll"\r
- IntermediateDirectory="vc_mswudll\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswudll\tex2rtf\"\r
- ObjectFile="vc_mswudll\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswudll\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswu;.\..\..\..\include;."\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswudll\tex2rtf.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswudll\tex2rtf_vc8_tex2rtf.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Debug|Win32"\r
- OutputDirectory="vc_mswuddll"\r
- IntermediateDirectory="vc_mswuddll\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswuddll\tex2rtf\"\r
- ObjectFile="vc_mswuddll\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswuddll\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\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;NO_GUI"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswuddll\tex2rtf.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswuddll\tex2rtf_vc8_tex2rtf.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Universal Release|Win32"\r
- OutputDirectory="vc_mswunivu"\r
- IntermediateDirectory="vc_mswunivu\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivu\tex2rtf\"\r
- ObjectFile="vc_mswunivu\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswunivu\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivu;.\..\..\..\include;."\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivu\tex2rtf.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivu\tex2rtf_vc8_tex2rtf.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Universal Debug|Win32"\r
- OutputDirectory="vc_mswunivud"\r
- IntermediateDirectory="vc_mswunivud\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivud\tex2rtf\"\r
- ObjectFile="vc_mswunivud\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswunivud\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\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;NO_GUI"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivud\tex2rtf.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivud\tex2rtf_vc8_tex2rtf.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="vc_mswu"\r
- IntermediateDirectory="vc_mswu\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswu;.\..\..\..\include;."\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswu\tex2rtf\"\r
- ObjectFile="vc_mswu\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswu\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswu;.\..\..\..\include;."\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswu\tex2rtf.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswu\tex2rtf_vc8_tex2rtf.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="vc_mswud"\r
- IntermediateDirectory="vc_mswud\tex2rtf"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswud;.\..\..\..\include;."\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0;NO_GUI"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswud\tex2rtf\"\r
- ObjectFile="vc_mswud\tex2rtf\"\r
- ProgramDataBaseFileName="vc_mswud\tex2rtf.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\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;NO_GUI"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\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\tex2rtf.exe"\r
- LinkIncremental="2"\r
- SubSystem="1"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswud\tex2rtf.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswud\tex2rtf_vc8_tex2rtf.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- \r
- </References>\r
- <Files>\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
- <File\r
- RelativePath=".\htmlutil.cpp"\r
- />\r
- <File\r
- RelativePath=".\readshg.cpp"\r
- />\r
- <File\r
- RelativePath=".\rtfutils.cpp"\r
- />\r
- <File\r
- RelativePath=".\table.cpp"\r
- />\r
- <File\r
- RelativePath=".\tex2any.cpp"\r
- />\r
- <File\r
- RelativePath=".\tex2rtf.cpp"\r
- />\r
- <File\r
- RelativePath=".\texutils.cpp"\r
- />\r
- <File\r
- RelativePath=".\xlputils.cpp"\r
- />\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- \r
- </Globals>\r
-</VisualStudioProject>\r
-\r
+++ /dev/null
-<?xml version="1.0" ?>\r
-<!--\r
-\r
- This makefile was generated by\r
- Bakefile 0.2.3 (http://www.bakefile.org)\r
- Do not modify, all changes will be overwritten!\r
-\r
--->\r
-<VisualStudioProject\r
- ProjectType="Visual C++"\r
- Version="8.00"\r
- Name="tex2rtf_gui"\r
- ProjectGUID="{BC3AA7EB-D4F2-5715-BABB-909B7F1DFF59}"\r
- >\r
- <Platforms>\r
- <Platform\r
- Name="Win32"\r
- />\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\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivu;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivudll\tex2rtf_gui\"\r
- ObjectFile="vc_mswunivudll\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswunivudll\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivu;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmswuniv29u_html.lib wxmswuniv29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivudll\tex2rtf_gui.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivudll\tex2rtf_vc8_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Universal Debug|Win32"\r
- OutputDirectory="vc_mswunivuddll"\r
- IntermediateDirectory="vc_mswunivuddll\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivud;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivuddll\tex2rtf_gui\"\r
- ObjectFile="vc_mswunivuddll\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswunivuddll\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivud;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmswuniv29ud_html.lib wxmswuniv29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivuddll\tex2rtf_gui.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivuddll\tex2rtf_vc8_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Release|Win32"\r
- OutputDirectory="vc_mswudll"\r
- IntermediateDirectory="vc_mswudll\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswu;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswudll\tex2rtf_gui\"\r
- ObjectFile="vc_mswudll\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswudll\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswu;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmsw29u_html.lib wxmsw29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswudll\tex2rtf_gui.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswudll\tex2rtf_vc8_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="DLL Debug|Win32"\r
- OutputDirectory="vc_mswuddll"\r
- IntermediateDirectory="vc_mswuddll\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswud;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswuddll\tex2rtf_gui\"\r
- ObjectFile="vc_mswuddll\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswuddll\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswud;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmsw29ud_html.lib wxmsw29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswuddll\tex2rtf_gui.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswuddll\tex2rtf_vc8_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Universal Release|Win32"\r
- OutputDirectory="vc_mswunivu"\r
- IntermediateDirectory="vc_mswunivu\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivu;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivu\tex2rtf_gui\"\r
- ObjectFile="vc_mswunivu\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswunivu\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivu;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;_WINDOWS;NOPCH"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmswuniv29u_html.lib wxmswuniv29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivu\tex2rtf_gui.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivu\tex2rtf_vc8_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Universal Debug|Win32"\r
- OutputDirectory="vc_mswunivud"\r
- IntermediateDirectory="vc_mswunivud\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivud;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswunivud\tex2rtf_gui\"\r
- ObjectFile="vc_mswunivud\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswunivud\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivud;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;_WINDOWS;NOPCH"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmswuniv29ud_html.lib wxmswuniv29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswunivud\tex2rtf_gui.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswunivud\tex2rtf_vc8_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Release|Win32"\r
- OutputDirectory="vc_mswu"\r
- IntermediateDirectory="vc_mswu\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="2"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswu;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="false"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="2"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswu\tex2rtf_gui\"\r
- ObjectFile="vc_mswu\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswu\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswu;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="__WXMSW__;_UNICODE;_WINDOWS;NOPCH"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmsw29u_html.lib wxmsw29u_core.lib wxbase29u.lib wxtiff.lib wxjpeg.lib wxpng.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswu\tex2rtf_gui.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswu\tex2rtf_vc8_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- <Configuration\r
- Name="Debug|Win32"\r
- OutputDirectory="vc_mswud"\r
- IntermediateDirectory="vc_mswud\tex2rtf_gui"\r
- ConfigurationType="1"\r
- UseOfMFC="0"\r
- ATLMinimizesCRunTimeLibraryUsage="false"\r
- CharacterSet="1"\r
- >\r
- <Tool\r
- Name="VCPreBuildEventTool"\r
- />\r
- <Tool\r
- Name="VCCustomBuildTool"\r
- />\r
- <Tool\r
- Name="VCXMLDataGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCWebServiceProxyGeneratorTool"\r
- />\r
- <Tool\r
- Name="VCIDLTool"\r
- />\r
- <Tool\r
- Name="VCCLCompilerTool"\r
- Optimization="0"\r
- InlineFunctionExpansion="1"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswud;.\..\..\..\include;.;.\..\..\..\samples"\r
- MinimalRebuild="true"\r
- ExceptionHandling="1"\r
- AdditionalOptions=""\r
- RuntimeLibrary="3"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;_WINDOWS;NOPCH"\r
- BasicRuntimeChecks="3"\r
- DebugInformationFormat="3"\r
- Detect64BitPortabilityProblems="true"\r
- RuntimeTypeInfo="true"\r
- AssemblerListingLocation="vc_mswud\tex2rtf_gui\"\r
- ObjectFile="vc_mswud\tex2rtf_gui\"\r
- ProgramDataBaseFileName="vc_mswud\tex2rtf_gui.pdb"\r
- WarningLevel="4"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCManagedResourceCompilerTool"\r
- />\r
- <Tool\r
- Name="VCResourceCompilerTool"\r
- Culture="1033"\r
- AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswud;.\..\..\..\include;.;.\..\..\..\samples"\r
- PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;_WINDOWS;NOPCH"\r
- />\r
- <Tool\r
- Name="VCPreLinkEventTool"\r
- />\r
- <Tool\r
- Name="VCLinkerTool"\r
- AdditionalDependencies="wxmsw29ud_html.lib wxmsw29ud_core.lib wxbase29ud.lib wxtiffd.lib wxjpegd.lib wxpngd.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\tex2rtf_gui.exe"\r
- LinkIncremental="2"\r
- SubSystem="2"\r
- SuppressStartupBanner="true"\r
- AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"\r
- GenerateManifest="true"\r
- GenerateDebugInformation="true"\r
- ProgramDatabaseFile="vc_mswud\tex2rtf_gui.pdb"\r
- TargetMachine="1"\r
- />\r
- <Tool\r
- Name="VCALinkTool"\r
- />\r
- <Tool\r
- Name="VCXDCMakeTool"\r
- />\r
- <Tool\r
- Name="VCBscMakeTool"\r
- OutputFile="vc_mswud\tex2rtf_vc8_tex2rtf_gui.bsc"\r
- SuppressStartupBanner="true"\r
- />\r
- <Tool\r
- Name="VCFxCopTool"\r
- />\r
- <Tool\r
- Name="VCAppVerifierTool"\r
- />\r
- <Tool\r
- Name="VCWebDeploymentTool"\r
- />\r
- <Tool\r
- Name="VCPostBuildEventTool"\r
- />\r
- </Configuration>\r
- </Configurations>\r
- <References>\r
- \r
- </References>\r
- <Files>\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
- <File\r
- RelativePath=".\htmlutil.cpp"\r
- />\r
- <File\r
- RelativePath=".\readshg.cpp"\r
- />\r
- <File\r
- RelativePath=".\rtfutils.cpp"\r
- />\r
- <File\r
- RelativePath=".\table.cpp"\r
- />\r
- <File\r
- RelativePath=".\tex2any.cpp"\r
- />\r
- <File\r
- RelativePath=".\tex2rtf.cpp"\r
- />\r
- <File\r
- RelativePath=".\texutils.cpp"\r
- />\r
- <File\r
- RelativePath=".\xlputils.cpp"\r
- />\r
- </Filter>\r
- <Filter\r
- Name="Resource Files"\r
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
- >\r
- <File\r
- RelativePath=".\..\..\..\samples\sample.rc"\r
- />\r
- </Filter>\r
- </Files>\r
- <Globals>\r
- \r
- </Globals>\r
-</VisualStudioProject>\r
-\r
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: texutils.cpp
-// Purpose: Miscellaneous utilities
-// Author: Julian Smart
-// Modified by: Wlodzimiez ABX Skiba 2003/2004 Unicode support
-// Ron Lee
-// Created: 7.9.93
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
- #include "wx/log.h"
-#endif
-
-#include "wx/app.h"
-#include "wx/hash.h"
-#include "wx/textfile.h"
-
-#ifdef new
-#undef new
-#endif
-
-#include "wx/beforestd.h"
-#if wxUSE_IOSTREAMH
-#include <iostream.h>
-#include <fstream.h>
-#else
-#include <iostream>
-#include <fstream>
-using namespace std;
-#endif
-#include "wx/afterstd.h"
-
-#include <ctype.h>
-#include "tex2any.h"
-
-static inline wxChar* copystring(const wxChar* s)
- { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
-
-wxHashTable TexReferences(wxKEY_STRING);
-wxList BibList(wxKEY_STRING);
-wxStringList CitationList;
-wxList ColourTable(wxKEY_STRING);
-wxHashTable BibStringTable(wxKEY_STRING);
-wxList CustomMacroList(wxKEY_STRING);
-TexChunk *currentSection = NULL;
-wxChar *fakeCurrentSection = NULL;
-
-static long BibLine = 1;
-
-void OutputCurrentSection(void)
-{
- if (fakeCurrentSection)
- TexOutput(fakeCurrentSection);
- else if (currentSection)
- TraverseChildrenFromChunk(currentSection);
-}
-
-// Nasty but the way things are done now, necessary,
-// in order to output a chunk properly to a string (macros and all).
-void OutputCurrentSectionToString(wxChar *buf)
-{
- if (fakeCurrentSection)
- wxStrcpy(buf, fakeCurrentSection);
- else
- OutputChunkToString(currentSection, buf);
-}
-
-void OutputChunkToString(TexChunk *chunk, wxChar *buf)
-{
- FILE *tempfd = wxFopen(_T("tmp.tmp"), _T("w"));
- if (!tempfd)
- return;
-
- FILE *old1 = CurrentOutput1;
- FILE *old2 = CurrentOutput2;
-
- CurrentOutput1 = tempfd;
- CurrentOutput2 = NULL;
-
- TraverseChildrenFromChunk(chunk);
-
- CurrentOutput1 = old1;
- CurrentOutput2 = old2;
-
- fclose(tempfd);
-
- // Read from file into string
- tempfd = wxFopen(_T("tmp.tmp"), _T("r"));
- if (!tempfd)
- return;
-
- buf[0] = 0;
- int ch = -2;
- int i = 0;
- while (ch != EOF)
- {
- ch = getc(tempfd);
- if (ch == EOF)
- buf[i] = 0;
- else
- {
- buf[i] = (wxChar)ch;
- i ++;
- }
- }
- fclose(tempfd);
- wxRemoveFile(_T("tmp.tmp"));
-}
-
-// Called by Tex2Any to simulate a section
-void FakeCurrentSection(wxChar *fakeSection, bool addToContents)
-{
- currentSection = NULL;
- if (fakeCurrentSection) delete[] fakeCurrentSection;
- fakeCurrentSection = copystring(fakeSection);
-
- if (DocumentStyle == LATEX_ARTICLE)
- {
- int mac = ltSECTIONHEADING;
- if (!addToContents)
- mac = ltSECTIONHEADINGSTAR;
- OnMacro(mac, 0, true);
- OnMacro(mac, 0, false);
- }
- else
- {
- int mac = ltCHAPTERHEADING;
- if (!addToContents)
- mac = ltCHAPTERHEADINGSTAR;
- OnMacro(mac, 0, true);
- OnMacro(mac, 0, false);
- }
- if (fakeCurrentSection) delete[] fakeCurrentSection;
- fakeCurrentSection = NULL;
-}
-
-// Look for \label macro, use this ref name if found or
-// make up a topic name otherwise.
-static long topicCounter = 0;
-
-void ResetTopicCounter(void)
-{
- topicCounter = 0;
-}
-
-static wxChar *forceTopicName = NULL;
-
-void ForceTopicName(const wxChar *name)
-{
- if (forceTopicName)
- delete[] forceTopicName;
- if (name)
- forceTopicName = copystring(name);
- else
- forceTopicName = NULL;
-}
-
-wxChar *FindTopicName(TexChunk *chunk)
-{
- if (forceTopicName)
- return forceTopicName;
-
- wxChar *topicName = NULL;
- static wxChar topicBuf[100];
-
- if (chunk && (chunk->type == CHUNK_TYPE_MACRO) &&
- (chunk->macroId == ltLABEL))
- {
- wxNode *node = chunk->children.GetFirst();
- if (node)
- {
- TexChunk *child = (TexChunk *)node->GetData();
- if (child->type == CHUNK_TYPE_ARG)
- {
- wxNode *snode = child->children.GetFirst();
- if (snode)
- {
- TexChunk *schunk = (TexChunk *)snode->GetData();
- if (schunk->type == CHUNK_TYPE_STRING)
- topicName = schunk->value;
- }
- }
- }
- }
- if (topicName)
- return topicName;
- else
- {
- wxSnprintf(topicBuf, sizeof(topicBuf), _T("topic%ld"), topicCounter);
- topicCounter ++;
- return topicBuf;
- }
-}
-
-/*
- * Simulate argument data, so we can 'drive' clients which implement
- * certain basic formatting behaviour.
- * Snag is that some save a TexChunk, so don't use yet...
- *
- */
-
-void StartSimulateArgument(const wxChar *data)
-{
- wxStrcpy(currentArgData, data);
- haveArgData = true;
-}
-
-void EndSimulateArgument(void)
-{
- haveArgData = false;
-}
-
-/*
- * Parse and convert unit arguments to points
- *
- */
-
-int ParseUnitArgument(const wxChar *unitArg_)
-{
- wxWxCharBuffer unitBuf(unitArg_);
- wxChar *unitArg = unitBuf.data();
-
- float conversionFactor = 1.0;
- float unitValue = 0.0;
- int len = wxStrlen(unitArg);
- // Get rid of any accidentally embedded commands
- for (int i = 0; i < len; i++)
- if (unitArg[i] == '\\')
- unitArg[i] = 0;
- len = wxStrlen(unitArg);
-
- if (unitArg && (len > 0) && (isdigit(unitArg[0]) || unitArg[0] == '-'))
- {
- wxSscanf(unitArg, _T("%f"), &unitValue);
- if (len > 1)
- {
- wxChar units[3];
- units[0] = unitArg[len-2];
- units[1] = unitArg[len-1];
- units[2] = 0;
- if (wxStrcmp(units, _T("in")) == 0)
- conversionFactor = 72.0;
- else if (wxStrcmp(units, _T("cm")) == 0)
- conversionFactor = (float)72.0/(float)2.51;
- else if (wxStrcmp(units, _T("mm")) == 0)
- conversionFactor = (float)72.0/(float)25.1;
- else if (wxStrcmp(units, _T("pt")) == 0)
- conversionFactor = 1;
- }
- return (int)(unitValue*conversionFactor);
- }
- else return 0;
-}
-
-/*
- * Strip off any extension (dot something) from end of file,
- * IF one exists. Inserts zero into buffer.
- *
- */
-
-void StripExtension(wxChar *buffer)
-{
- int len = wxStrlen(buffer);
- int i = len-1;
- while (i > 0)
- {
- if (buffer[i] == '.')
- {
- buffer[i] = 0;
- break;
- }
- i --;
- }
-}
-
-/*
- * Latex font setting
- *
- */
-
-void SetFontSizes(int pointSize)
-{
- switch (pointSize)
- {
- case 12:
- {
- normalFont = 12;
- smallFont = 10;
- tinyFont = 8;
- largeFont1 = 14;
- LargeFont2 = 16;
- LARGEFont3 = 20;
- hugeFont1 = 24;
- HugeFont2 = 28;
- HUGEFont3 = 32;
- break;
- }
- case 11:
- {
- normalFont = 11;
- smallFont = 9;
- tinyFont = 7;
- largeFont1 = 13;
- LargeFont2 = 16;
- LARGEFont3 = 19;
- hugeFont1 = 22;
- HugeFont2 = 26;
- HUGEFont3 = 30;
- break;
- }
- case 10:
- {
- normalFont = 10;
- smallFont = 8;
- tinyFont = 6;
- largeFont1 = 12;
- LargeFont2 = 14;
- LARGEFont3 = 18;
- hugeFont1 = 20;
- HugeFont2 = 24;
- HUGEFont3 = 28;
- break;
- }
- }
-}
-
-
-/*
- * Latex references
- *
- */
-
-void AddTexRef(wxChar *name, wxChar *file, wxChar *sectionName,
- int chapter, int section, int subsection, int subsubsection)
-{
- TexRef *texRef = (TexRef *)TexReferences.Get(name);
- if (texRef) TexReferences.Delete(name);
-
- wxChar buf[100];
- buf[0] = 0;
-/*
- if (sectionName)
- {
- wxStrcat(buf, sectionName);
- wxStrcat(buf, " ");
- }
-*/
- if (chapter)
- {
- wxChar buf2[10];
- wxSnprintf(buf2, sizeof(buf2), _T("%d"), chapter);
- wxStrcat(buf, buf2);
- }
- if (section)
- {
- wxChar buf2[10];
- if (chapter)
- wxStrcat(buf, _T("."));
-
- wxSnprintf(buf2, sizeof(buf2), _T("%d"), section);
- wxStrcat(buf, buf2);
- }
- if (subsection)
- {
- wxChar buf2[10];
- wxStrcat(buf, _T("."));
- wxSnprintf(buf2, sizeof(buf2), _T("%d"), subsection);
- wxStrcat(buf, buf2);
- }
- if (subsubsection)
- {
- wxChar buf2[10];
- wxStrcat(buf, _T("."));
- wxSnprintf(buf2, sizeof(buf2), _T("%d"), subsubsection);
- wxStrcat(buf, buf2);
- }
- wxChar *tmp = ((wxStrlen(buf) > 0) ? buf : (wxChar *)NULL);
- TexReferences.Put(name, new TexRef(name, file, tmp, sectionName));
-}
-
-void WriteTexReferences(wxChar *filename)
-{
- wxString name = filename;
- wxTextFile file;
-
- if (!(wxFileExists(name)?file.Open(name):file.Create(name)))
- return;
-
- file.Clear();
-
- TexReferences.BeginFind();
- wxHashTable::Node *node = TexReferences.Next();
- while (node)
- {
- Tex2RTFYield();
- TexRef *ref = (TexRef *)node->GetData();
- wxString converter = ref->refLabel;
- converter << wxT(" ");
- converter << (ref->refFile ? ref->refFile : _T("??"));
- converter << wxT(" ");
- converter << (ref->sectionName ? ref->sectionName : _T("??")) ;
- converter << wxT(" ");
- converter << (ref->sectionNumber ? ref->sectionNumber : _T("??")) ;
- file.AddLine(converter);
-
- if (!ref->sectionNumber || (wxStrcmp(ref->sectionNumber, _T("??")) == 0 && wxStrcmp(ref->sectionName, _T("??")) == 0))
- {
- wxChar buf[200];
- wxSnprintf(buf, sizeof(buf), _T("Warning: reference %s not resolved."), ref->refLabel);
- OnInform(buf);
- }
- node = TexReferences.Next();
- }
-
- file.Write();
- file.Close();
-}
-
-void ReadTexReferences(wxChar *filename)
-{
- wxString name = filename;
-
- if (!wxFileExists(name))
- return;
-
- wxTextFile file;
- if (!file.Open(name))
- return;
-
- wxString line;
- for ( line = file.GetFirstLine(); !file.Eof(); line = file.GetNextLine() )
- {
- wxString labelStr = line.BeforeFirst(wxT(' '));
- line = line.AfterFirst(wxT(' '));
- wxString fileStr = line.BeforeFirst(wxT(' '));
- line = line.AfterFirst(wxT(' '));
- wxString sectionNameStr = line.BeforeFirst(wxT(' '));
- wxString sectionStr = line.AfterFirst(wxT(' '));
-
- // gt - needed to trick the hash table "TexReferences" into deleting the key
- // strings it creates in the Put() function, but not the item that is
- // created here, as that is destroyed elsewhere. Without doing this, there
- // were massive memory leaks
- TexReferences.DeleteContents(true);
- TexReferences.Put(
- labelStr,
- new TexRef(
- labelStr.c_str(),
- fileStr.c_str(),
- sectionStr.c_str(),
- sectionNameStr.c_str()
- )
- );
- TexReferences.DeleteContents(false);
- }
-}
-
-
-/*
- * Bibliography-handling code
- *
- */
-
-void BibEatWhiteSpace(wxString& line)
-{
- while(!line.empty() && (line[0] == _T(' ') || line[0] == _T('\t') || line[0] == (wxChar)EOF))
- {
- if (line[0] == '\r')
- BibLine ++;
- line = line.substr(1);
- }
-
- // Ignore end-of-line comments
- if ( !line.empty() && (line[0] == _T('%') || line[0] == _T(';') || line[0] == _T('#')))
- {
- line.clear();
- }
-}
-
-void BibEatWhiteSpace(wxSTD istream& str)
-{
- char ch = (char)str.peek();
-
- while (!str.eof() && (ch == ' ' || ch == '\t' || ch == 13 || ch == 10 || ch == (char)EOF))
- {
- if (ch == 10)
- BibLine ++;
- str.get(ch);
- if ((ch == (char)EOF) || str.eof()) return;
- ch = (char)str.peek();
- }
-
- // Ignore end-of-line comments
- if (ch == '%' || ch == ';' || ch == '#')
- {
- str.get(ch);
- ch = (char)str.peek();
- while (ch != 10 && ch != 13 && !str.eof())
- {
- str.get(ch);
- ch = (char)str.peek();
- }
- BibEatWhiteSpace(str);
- }
-}
-
-// Read word up to { or , or space
-wxString BibReadWord(wxString& line)
-{
- wxString val;
-
- while (!line.empty() &&
- line[0] != _T('\t') &&
- line[0] != _T(' ') &&
- line[0] != _T('{') &&
- line[0] != _T('(') &&
- line[0] != _T(',') &&
- line[0] != _T('='))
- {
- val << line[0];
- line = line.substr(1);
- }
- return val;
-}
-
-void BibReadWord(wxSTD istream& istr, wxChar *buffer)
-{
- int i = 0;
- buffer[i] = 0;
- char ch = (char)istr.peek();
- while (!istr.eof() && ch != ' ' && ch != '{' && ch != '(' && ch != 13 && ch != 10 && ch != '\t' &&
- ch != ',' && ch != '=')
- {
- istr.get(ch);
- buffer[i] = ch;
- i ++;
- ch = (char)istr.peek();
- }
- buffer[i] = 0;
-}
-
-// Read string (double-quoted or not) to end quote or EOL
-wxString BibReadToEOL(wxString& line)
-{
- if(line.empty())
- return wxEmptyString;
-
- wxString val;
- bool inQuotes = false;
- if (line[0] == _T('"'))
- {
- line = line.substr(1);
- inQuotes = true;
- }
- // If in quotes, read white space too. If not,
- // stop at white space or comment.
- while (!line.empty() && line[0] != _T('"') &&
- (inQuotes || ((line[0] != _T(' ')) && (line[0] != '\t') &&
- (line[0] != _T(';')) && (line[0] != _T('%')) && (line[0] != _T('#')))))
- {
- val << line[0];
- line = line.substr(1);
- }
- if (!line.empty() && line[0] == '"')
- line = line.substr(1);
-
- return val;
-}
-
-void BibReadToEOL(wxSTD istream& istr, wxChar *buffer)
-{
- int i = 0;
- buffer[i] = 0;
- char ch = (char)istr.peek();
- bool inQuotes = false;
- if (ch == '"')
- {
- istr.get(ch);
- ch = (char)istr.peek();
- inQuotes = true;
- }
- // If in quotes, read white space too. If not,
- // stop at white space or comment.
- while (!istr.eof() && ch != 13 && ch != 10 && ch != _T('"') &&
- (inQuotes || ((ch != _T(' ')) && (ch != 9) &&
- (ch != _T(';')) && (ch != _T('%')) && (ch != _T('#')))))
- {
- istr.get(ch);
- buffer[i] = ch;
- i ++;
- ch = (char)istr.peek();
- }
- if (ch == '"')
- istr.get(ch);
- buffer[i] = 0;
-}
-
-// Read }-terminated value, taking nested braces into account.
-wxString BibReadValue(wxString& line,
- bool ignoreBraces = true,
- bool quotesMayTerminate = true)
-{
- wxString val;
- int braceCount = 1;
- bool stopping = false;
-
- if (line.length() >= 4000)
- {
- wxChar buf[100];
- wxSnprintf(buf, sizeof(buf), _T("Sorry, value > 4000 chars in bib file at line %ld."), BibLine);
- wxLogError(buf, "Tex2RTF Fatal Error");
- return wxEmptyString;
- }
-
- while (!line.empty() && !stopping)
- {
- wxChar ch = line[0];
- line = line.substr(1);
-
- if (ch == _T('{'))
- braceCount ++;
-
- if (ch == _T('}'))
- {
- braceCount --;
- if (braceCount == 0)
- {
- stopping = true;
- break;
- }
- }
- else if (quotesMayTerminate && ch == _T('"'))
- {
- stopping = true;
- break;
- }
-
- if (!stopping)
- {
- if (!ignoreBraces || (ch != _T('{') && ch != _T('}')))
- {
- val << ch;
- }
- }
- }
-
- return val;
-}
-
-void BibReadValue(wxSTD istream& istr, wxChar *buffer, bool ignoreBraces = true,
- bool quotesMayTerminate = true)
-{
- int braceCount = 1;
- int i = 0;
- buffer[i] = 0;
- char ch = (char)istr.peek();
- bool stopping = false;
- while (!istr.eof() && !stopping)
- {
-// i ++;
- if (i >= 4000)
- {
- wxChar buf[100];
- wxSnprintf(buf, sizeof(buf), _T("Sorry, value > 4000 chars in bib file at line %ld."), BibLine);
- wxLogError(buf, "Tex2RTF Fatal Error");
- return;
- }
- istr.get(ch);
-
- if (ch == '{')
- braceCount ++;
-
- if (ch == '}')
- {
- braceCount --;
- if (braceCount == 0)
- {
- stopping = true;
- break;
- }
- }
- else if (quotesMayTerminate && ch == '"')
- {
- stopping = true;
- break;
- }
- if (!stopping)
- {
- if (!ignoreBraces || (ch != '{' && ch != '}'))
- {
- buffer[i] = ch;
- i ++;
- }
- }
- if (ch == 10)
- BibLine ++;
- }
- buffer[i] = 0;
- wxUnusedVar(stopping);
-}
-
-bool ReadBib(const wxChar *filename)
-{
- if (!wxFileExists(filename))
- return false;
-
- wxString name = filename;
- wxChar buf[300];
- wxSTD ifstream istr((char const *)name.fn_str(), wxSTD ios::in);
- if (istr.bad()) return false;
-
- BibLine = 1;
-
- OnInform(_T("Reading .bib file..."));
-
- char ch;
- wxChar fieldValue[4000];
- wxChar recordType[100];
- wxChar recordKey[100];
- wxChar recordField[100];
- while (!istr.eof())
- {
- Tex2RTFYield();
-
- BibEatWhiteSpace(istr);
- istr.get(ch);
- if (ch != '@')
- {
- wxSnprintf(buf, sizeof(buf), _T("Expected @: malformed bib file at line %ld (%s)"), BibLine, filename);
- OnError(buf);
- return false;
- }
- BibReadWord(istr, recordType);
- BibEatWhiteSpace(istr);
- istr.get(ch);
- if (ch != '{' && ch != '(')
- {
- wxSnprintf(buf, sizeof(buf), _T("Expected { or ( after record type: malformed .bib file at line %ld (%s)"), BibLine, filename);
- OnError(buf);
- return false;
- }
- BibEatWhiteSpace(istr);
- if (StringMatch(recordType, _T("string"), false, true))
- {
- BibReadWord(istr, recordType);
- BibEatWhiteSpace(istr);
- istr.get(ch);
- if (ch != '=')
- {
- wxSnprintf(buf, sizeof(buf), _T("Expected = after string key: malformed .bib file at line %ld (%s)"), BibLine, filename);
- OnError(buf);
- return false;
- }
- BibEatWhiteSpace(istr);
- istr.get(ch);
- if (ch != '"' && ch != '{')
- {
- wxSnprintf(buf, sizeof(buf), _T("Expected = after string key: malformed .bib file at line %ld (%s)"), BibLine, filename);
- OnError(buf);
- return false;
- }
- BibReadValue(istr, fieldValue);
-
- // Now put in hash table if necesary
- if (!BibStringTable.Get(recordType))
- BibStringTable.Put(recordType, (wxObject *)copystring(fieldValue));
-
- // Read closing ) or }
- BibEatWhiteSpace(istr);
- istr.get(ch);
- BibEatWhiteSpace(istr);
- }
- else
- {
- BibReadWord(istr, recordKey);
-
- BibEntry *bibEntry = new BibEntry;
- bibEntry->key = copystring(recordKey);
- bibEntry->type = copystring(recordType);
-
- bool moreRecords = true;
- while (moreRecords && !istr.eof())
- {
- BibEatWhiteSpace(istr);
- istr.get(ch);
- if (ch == '}' || ch == ')')
- {
- moreRecords = false;
- }
- else if (ch == ',')
- {
- BibEatWhiteSpace(istr);
- BibReadWord(istr, recordField);
- BibEatWhiteSpace(istr);
- istr.get(ch);
- if (ch != '=')
- {
- wxSnprintf(buf, sizeof(buf), _T("Expected = after field type: malformed .bib file at line %ld (%s)"), BibLine, filename);
- OnError(buf);
- return false;
- }
- BibEatWhiteSpace(istr);
- istr.get(ch);
- if (ch != '{' && ch != '"')
- {
- fieldValue[0] = ch;
- BibReadWord(istr, fieldValue+1);
-
- // If in the table of strings, replace with string from table.
- wxChar *s = (wxChar *)BibStringTable.Get(fieldValue);
- if (s)
- {
- wxStrcpy(fieldValue, s);
- }
- }
- else
- BibReadValue(istr, fieldValue, true, (ch == _T('"') ? true : false));
-
- // Now we can add a field
- if (StringMatch(recordField, _T("author"), false, true))
- bibEntry->author = copystring(fieldValue);
- else if (StringMatch(recordField, _T("key"), false, true))
- {}
- else if (StringMatch(recordField, _T("annotate"), false, true))
- {}
- else if (StringMatch(recordField, _T("abstract"), false, true))
- {}
- else if (StringMatch(recordField, _T("edition"), false, true))
- {}
- else if (StringMatch(recordField, _T("howpublished"), false, true))
- {}
- else if (StringMatch(recordField, _T("note"), false, true) || StringMatch(recordField, _T("notes"), false, true))
- {}
- else if (StringMatch(recordField, _T("series"), false, true))
- {}
- else if (StringMatch(recordField, _T("type"), false, true))
- {}
- else if (StringMatch(recordField, _T("keywords"), false, true))
- {}
- else if (StringMatch(recordField, _T("editor"), false, true) || StringMatch(recordField, _T("editors"), false, true))
- bibEntry->editor= copystring(fieldValue);
- else if (StringMatch(recordField, _T("title"), false, true))
- bibEntry->title= copystring(fieldValue);
- else if (StringMatch(recordField, _T("booktitle"), false, true))
- bibEntry->booktitle= copystring(fieldValue);
- else if (StringMatch(recordField, _T("journal"), false, true))
- bibEntry->journal= copystring(fieldValue);
- else if (StringMatch(recordField, _T("volume"), false, true))
- bibEntry->volume= copystring(fieldValue);
- else if (StringMatch(recordField, _T("number"), false, true))
- bibEntry->number= copystring(fieldValue);
- else if (StringMatch(recordField, _T("year"), false, true))
- bibEntry->year= copystring(fieldValue);
- else if (StringMatch(recordField, _T("month"), false, true))
- bibEntry->month= copystring(fieldValue);
- else if (StringMatch(recordField, _T("pages"), false, true))
- bibEntry->pages= copystring(fieldValue);
- else if (StringMatch(recordField, _T("publisher"), false, true))
- bibEntry->publisher= copystring(fieldValue);
- else if (StringMatch(recordField, _T("address"), false, true))
- bibEntry->address= copystring(fieldValue);
- else if (StringMatch(recordField, _T("institution"), false, true) || StringMatch(recordField, _T("school"), false, true))
- bibEntry->institution= copystring(fieldValue);
- else if (StringMatch(recordField, _T("organization"), false, true) || StringMatch(recordField, _T("organisation"), false, true))
- bibEntry->organization= copystring(fieldValue);
- else if (StringMatch(recordField, _T("comment"), false, true) || StringMatch(recordField, _T("comments"), false, true))
- bibEntry->comment= copystring(fieldValue);
- else if (StringMatch(recordField, _T("annote"), false, true))
- bibEntry->comment= copystring(fieldValue);
- else if (StringMatch(recordField, _T("chapter"), false, true))
- bibEntry->chapter= copystring(fieldValue);
- else
- {
- wxSnprintf(buf, sizeof(buf), _T("Unrecognised bib field type %s at line %ld (%s)"), recordField, BibLine, filename);
- OnError(buf);
- }
- }
- }
- BibList.Append(recordKey, bibEntry);
- BibEatWhiteSpace(istr);
- }
- }
- return true;
-}
-
-void OutputBibItem(TexRef *ref, BibEntry *bib)
-{
- Tex2RTFYield();
-
- OnMacro(ltNUMBEREDBIBITEM, 2, true);
- OnArgument(ltNUMBEREDBIBITEM, 1, true);
- TexOutput(ref->sectionNumber);
- OnArgument(ltNUMBEREDBIBITEM, 1, false);
- OnArgument(ltNUMBEREDBIBITEM, 2, true);
-
- TexOutput(_T(" "));
- OnMacro(ltBF, 1, true);
- OnArgument(ltBF, 1, true);
- if (bib->author)
- TexOutput(bib->author);
- OnArgument(ltBF, 1, false);
- OnMacro(ltBF, 1, false);
- if (bib->author && (wxStrlen(bib->author) > 0) && (bib->author[wxStrlen(bib->author) - 1] != '.'))
- TexOutput(_T(". "));
- else
- TexOutput(_T(" "));
-
- if (bib->year)
- {
- TexOutput(bib->year);
- }
- if (bib->month)
- {
- TexOutput(_T(" ("));
- TexOutput(bib->month);
- TexOutput(_T(")"));
- }
- if (bib->year || bib->month)
- TexOutput(_T(". "));
-
- if (StringMatch(bib->type, _T("article"), false, true))
- {
- if (bib->title)
- {
- TexOutput(bib->title);
- TexOutput(_T(". "));
- }
- if (bib->journal)
- {
- OnMacro(ltIT, 1, true);
- OnArgument(ltIT, 1, true);
- TexOutput(bib->journal);
- OnArgument(ltIT, 1, false);
- OnMacro(ltIT, 1, false);
- }
- if (bib->volume)
- {
- TexOutput(_T(", "));
- OnMacro(ltBF, 1, true);
- OnArgument(ltBF, 1, true);
- TexOutput(bib->volume);
- OnArgument(ltBF, 1, false);
- OnMacro(ltBF, 1, false);
- }
- if (bib->number)
- {
- TexOutput(_T("("));
- TexOutput(bib->number);
- TexOutput(_T(")"));
- }
- if (bib->pages)
- {
- TexOutput(_T(", pages "));
- TexOutput(bib->pages);
- }
- TexOutput(_T("."));
- }
- else if (StringMatch(bib->type, _T("book"), false, true) ||
- StringMatch(bib->type, _T("unpublished"), false, true) ||
- StringMatch(bib->type, _T("manual"), false, true) ||
- StringMatch(bib->type, _T("phdthesis"), false, true) ||
- StringMatch(bib->type, _T("mastersthesis"), false, true) ||
- StringMatch(bib->type, _T("misc"), false, true) ||
- StringMatch(bib->type, _T("techreport"), false, true) ||
- StringMatch(bib->type, _T("booklet"), false, true))
- {
- if (bib->title || bib->booktitle)
- {
- OnMacro(ltIT, 1, true);
- OnArgument(ltIT, 1, true);
- TexOutput(bib->title ? bib->title : bib->booktitle);
- TexOutput(_T(". "));
- OnArgument(ltIT, 1, false);
- OnMacro(ltIT, 1, false);
- }
- if (StringMatch(bib->type, _T("phdthesis"), false, true))
- TexOutput(_T("PhD thesis. "));
- if (StringMatch(bib->type, _T("techreport"), false, true))
- TexOutput(_T("Technical report. "));
- if (bib->editor)
- {
- TexOutput(_T("Ed. "));
- TexOutput(bib->editor);
- TexOutput(_T(". "));
- }
- if (bib->institution)
- {
- TexOutput(bib->institution);
- TexOutput(_T(". "));
- }
- if (bib->organization)
- {
- TexOutput(bib->organization);
- TexOutput(_T(". "));
- }
- if (bib->publisher)
- {
- TexOutput(bib->publisher);
- TexOutput(_T(". "));
- }
- if (bib->address)
- {
- TexOutput(bib->address);
- TexOutput(_T(". "));
- }
- }
- else if (StringMatch(bib->type, _T("inbook"), false, true) ||
- StringMatch(bib->type, _T("inproceedings"), false, true) ||
- StringMatch(bib->type, _T("incollection"), false, true) ||
- StringMatch(bib->type, _T("conference"), false, true))
- {
- if (bib->title)
- {
- TexOutput(bib->title);
- }
- if (bib->booktitle)
- {
- TexOutput(_T(", from "));
- OnMacro(ltIT, 1, true);
- OnArgument(ltIT, 1, true);
- TexOutput(bib->booktitle);
- TexOutput(_T("."));
- OnArgument(ltIT, 1, false);
- OnMacro(ltIT, 1, false);
- }
- if (bib->editor)
- {
- TexOutput(_T(", ed. "));
- TexOutput(bib->editor);
- }
- if (bib->publisher)
- {
- TexOutput(_T(" "));
- TexOutput(bib->publisher);
- }
- if (bib->address)
- {
- if (bib->publisher) TexOutput(_T(", "));
- else TexOutput(_T(" "));
- TexOutput(bib->address);
- }
- if (bib->publisher || bib->address)
- TexOutput(_T("."));
-
- if (bib->volume)
- {
- TexOutput(_T(" "));
- OnMacro(ltBF, 1, true);
- OnArgument(ltBF, 1, true);
- TexOutput(bib->volume);
- OnArgument(ltBF, 1, false);
- OnMacro(ltBF, 1, false);
- }
- if (bib->number)
- {
- if (bib->volume)
- {
- TexOutput(_T("("));
- TexOutput(bib->number);
- TexOutput(_T(")."));
- }
- else
- {
- TexOutput(_T(" Number "));
- TexOutput(bib->number);
- TexOutput(_T("."));
- }
- }
- if (bib->chapter)
- {
- TexOutput(_T(" Chap. "));
- TexOutput(bib->chapter);
- }
- if (bib->pages)
- {
- if (bib->chapter) TexOutput(_T(", pages "));
- else TexOutput(_T(" Pages "));
- TexOutput(bib->pages);
- TexOutput(_T("."));
- }
- }
- OnArgument(ltNUMBEREDBIBITEM, 2, false);
- OnMacro(ltNUMBEREDBIBITEM, 2, false);
-}
-
-void OutputBib(void)
-{
- // Write the heading
- ForceTopicName(_T("bibliography"));
- FakeCurrentSection(ReferencesNameString);
- ForceTopicName(NULL);
-
- OnMacro(ltPAR, 0, true);
- OnMacro(ltPAR, 0, false);
-
- if ((convertMode == TEX_RTF) && !winHelp)
- {
- OnMacro(ltPAR, 0, true);
- OnMacro(ltPAR, 0, false);
- }
-
- wxStringListNode *node = CitationList.GetFirst();
- while (node)
- {
- wxChar *citeKey = (wxChar *)node->GetData();
-// wxNode *texNode = TexReferences.Find(citeKey);
- TexRef *ref = (TexRef *)TexReferences.Get(citeKey);
- wxNode *bibNode = BibList.Find(citeKey);
- if (bibNode && ref)
- {
- BibEntry *entry = (BibEntry *)bibNode->GetData();
- OutputBibItem(ref, entry);
- }
- node = node->GetNext();
- }
-}
-
-static int citeCount = 1;
-
-void ResolveBibReferences(void)
-{
- if (CitationList.GetCount() > 0)
- OnInform(_T("Resolving bibliographic references..."));
-
- citeCount = 1;
- wxChar buf[200];
- wxStringListNode *node = CitationList.GetFirst();
- while (node)
- {
- Tex2RTFYield();
- wxChar *citeKey = (wxChar *)node->GetData();
-// wxNode *texNode = TexReferences.Find(citeKey);
- TexRef *ref = (TexRef *)TexReferences.Get(citeKey);
- wxNode *bibNode = BibList.Find(citeKey);
- if (bibNode && ref)
- {
- // Unused Variable
- //BibEntry *entry = (BibEntry *)bibNode->GetData();
- if (ref->sectionNumber) delete[] ref->sectionNumber;
- wxSnprintf(buf, sizeof(buf), _T("[%d]"), citeCount);
- ref->sectionNumber = copystring(buf);
- citeCount ++;
- }
- else
- {
- wxSnprintf(buf, sizeof(buf), _T("Warning: bib ref %s not resolved."), citeKey);
- OnInform(buf);
- }
- node = node->GetNext();
- }
-}
-
-// Remember we need to resolve this citation
-void AddCitation(const wxChar *citeKey)
-{
- if (!CitationList.Member(citeKey))
- CitationList.Add(citeKey);
-
- if (!TexReferences.Get(citeKey))
- {
- TexReferences.Put(citeKey, new TexRef(citeKey, _T("??"), NULL));
- }
-}
-
-TexRef *FindReference(const wxChar *key)
-{
- return (TexRef *)TexReferences.Get(key);
-}
-
-/*
- * Custom macro stuff
- *
- */
-
-bool StringTobool(const wxString& val)
-{
- wxString up(val);
- up.MakeUpper();
-
- if (up.IsSameAs(_T("YES")) ||
- up.IsSameAs(_T("TRUE")) ||
- up.IsSameAs(_T("ON")) ||
- up.IsSameAs(_T("OK")) |
- up.IsSameAs(_T("1")))
- return true;
-
- return false;
-}
-
-void RegisterIntSetting (const wxString& s, int *number)
-{
- if (number)
- {
- long val;
- s.ToLong(&val);
- *number = (int)val;
- }
-}
-
-// Define a variable value from the .ini file
-wxChar *RegisterSetting(const wxString& settingName, const wxString& settingValue, bool interactive)
-{
- wxString settingValueStr( settingValue );
-
- static wxChar errorCode[100];
- wxStrcpy(errorCode, _T("OK"));
- if (StringMatch(settingName, _T("chapterName"), false, true))
- {
- delete[] ChapterNameString;
- ChapterNameString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("sectionName"), false, true))
- {
- delete[] SectionNameString;
- SectionNameString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("subsectionName"), false, true))
- {
- delete[] SubsectionNameString;
- SubsectionNameString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("subsubsectionName"), false, true))
- {
- delete[] SubsubsectionNameString;
- SubsubsectionNameString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("indexName"), false, true))
- {
- delete[] IndexNameString;
- IndexNameString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("contentsName"), false, true))
- {
- delete[] ContentsNameString;
- ContentsNameString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("glossaryName"), false, true))
- {
- delete[] GlossaryNameString;
- GlossaryNameString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("referencesName"), false, true))
- {
- delete[] ReferencesNameString;
- ReferencesNameString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("tablesName"), false, true))
- {
- delete[] TablesNameString;
- TablesNameString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("figuresName"), false, true))
- {
- delete[] FiguresNameString;
- FiguresNameString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("tableName"), false, true))
- {
- delete[] TableNameString;
- TableNameString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("figureName"), false, true))
- {
- delete[] FigureNameString;
- FigureNameString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("abstractName"), false, true))
- {
- delete[] AbstractNameString;
- AbstractNameString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("chapterFontSize"), false, true))
- RegisterIntSetting(settingValueStr, &chapterFont);
- else if (StringMatch(settingName, _T("sectionFontSize"), false, true))
- RegisterIntSetting(settingValueStr, §ionFont);
- else if (StringMatch(settingName, _T("subsectionFontSize"), false, true))
- RegisterIntSetting(settingValueStr, &subsectionFont);
- else if (StringMatch(settingName, _T("titleFontSize"), false, true))
- RegisterIntSetting(settingValueStr, &titleFont);
- else if (StringMatch(settingName, _T("authorFontSize"), false, true))
- RegisterIntSetting(settingValueStr, &authorFont);
- else if (StringMatch(settingName, _T("ignoreInput"), false, true))
- IgnorableInputFiles.Add(wxFileNameFromPath(settingValue));
- else if (StringMatch(settingName, _T("mirrorMargins"), false, true))
- mirrorMargins = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("runTwice"), false, true))
- runTwice = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("isInteractive"), false, true))
- isInteractive = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("headerRule"), false, true))
- headerRule = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("footerRule"), false, true))
- footerRule = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("combineSubSections"), false, true))
- combineSubSections = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("listLabelIndent"), false, true))
- RegisterIntSetting(settingValueStr, &labelIndentTab);
- else if (StringMatch(settingName, _T("listItemIndent"), false, true))
- RegisterIntSetting(settingValueStr, &itemIndentTab);
- else if (StringMatch(settingName, _T("useUpButton"), false, true))
- useUpButton = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("useHeadingStyles"), false, true))
- useHeadingStyles = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("useWord"), false, true))
- useWord = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("contentsDepth"), false, true))
- RegisterIntSetting(settingValueStr, &contentsDepth);
- else if (StringMatch(settingName, _T("generateHPJ"), false, true))
- generateHPJ = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("truncateFilenames"), false, true))
- truncateFilenames = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("winHelpVersion"), false, true))
- RegisterIntSetting(settingValueStr, &winHelpVersion);
- else if (StringMatch(settingName, _T("winHelpContents"), false, true))
- winHelpContents = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("htmlIndex"), false, true))
- htmlIndex = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("htmlWorkshopFiles"), false, true))
- htmlWorkshopFiles = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("htmlFrameContents"), false, true))
- htmlFrameContents = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("htmlStylesheet"), false, true))
- {
- if (htmlStylesheet)
- delete[] htmlStylesheet;
- htmlStylesheet = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("upperCaseNames"), false, true))
- upperCaseNames = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("ignoreBadRefs"), false, true))
- ignoreBadRefs = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("htmlFaceName"), false, true))
- {
- delete[] htmlFaceName;
- htmlFaceName = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("winHelpTitle"), false, true))
- {
- if (winHelpTitle)
- delete[] winHelpTitle;
- winHelpTitle = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("indexSubsections"), false, true))
- indexSubsections = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("compatibility"), false, true))
- compatibilityMode = StringTobool(settingValue);
- else if (StringMatch(settingName, _T("defaultColumnWidth"), false, true))
- {
- RegisterIntSetting(settingValueStr, &defaultTableColumnWidth);
- defaultTableColumnWidth = 20*defaultTableColumnWidth;
- }
- else if (StringMatch(settingName, _T("bitmapMethod"), false, true))
- {
- if ((wxStrcmp(settingValue, _T("includepicture")) != 0) && (wxStrcmp(settingValue, _T("hex")) != 0) &&
- (wxStrcmp(settingValue, _T("import")) != 0))
- {
- if (interactive)
- OnError(_T("Unknown bitmapMethod"));
- wxStrcpy(errorCode, _T("Unknown bitmapMethod"));
- }
- else
- {
- delete[] bitmapMethod;
- bitmapMethod = copystring(settingValue);
- }
- }
- else if (StringMatch(settingName, _T("htmlBrowseButtons"), false, true))
- {
- if (wxStrcmp(settingValue, _T("none")) == 0)
- htmlBrowseButtons = HTML_BUTTONS_NONE;
- else if (wxStrcmp(settingValue, _T("bitmap")) == 0)
- htmlBrowseButtons = HTML_BUTTONS_BITMAP;
- else if (wxStrcmp(settingValue, _T("text")) == 0)
- htmlBrowseButtons = HTML_BUTTONS_TEXT;
- else
- {
- if (interactive)
- OnInform(_T("Initialisation file error: htmlBrowseButtons must be one of none, bitmap, or text."));
- wxStrcpy(errorCode, _T("Initialisation file error: htmlBrowseButtons must be one of none, bitmap, or text."));
- }
- }
- else if (StringMatch(settingName, _T("backgroundImage"), false, true))
- {
- backgroundImageString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("backgroundColour"), false, true))
- {
- delete[] backgroundColourString;
- backgroundColourString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("textColour"), false, true))
- {
- textColourString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("linkColour"), false, true))
- {
- linkColourString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("followedLinkColour"), false, true))
- {
- followedLinkColourString = copystring(settingValue);
- }
- else if (StringMatch(settingName, _T("conversionMode"), false, true))
- {
- if (StringMatch(settingValue, _T("RTF"), false, true))
- {
- winHelp = false; convertMode = TEX_RTF;
- }
- else if (StringMatch(settingValue, _T("WinHelp"), false, true))
- {
- winHelp = true; convertMode = TEX_RTF;
- }
- else if (StringMatch(settingValue, _T("XLP"), false, true) ||
- StringMatch(settingValue, _T("wxHelp"), false, true))
- {
- convertMode = TEX_XLP;
- }
- else if (StringMatch(settingValue, _T("HTML"), false, true))
- {
- convertMode = TEX_HTML;
- }
- else
- {
- if (interactive)
- OnInform(_T("Initialisation file error: conversionMode must be one of\nRTF, WinHelp, XLP (or wxHelp), HTML."));
- wxStrcpy(errorCode, _T("Initialisation file error: conversionMode must be one of\nRTF, WinHelp, XLP (or wxHelp), HTML."));
- }
- }
- else if (StringMatch(settingName, _T("documentFontSize"), false, true))
- {
- int n;
- RegisterIntSetting(settingValueStr, &n);
- if (n == 10 || n == 11 || n == 12)
- SetFontSizes(n);
- else
- {
- wxChar buf[200];
- wxSnprintf(buf, sizeof(buf), _T("Initialisation file error: nonstandard document font size %d."), n);
- if (interactive)
- OnInform(buf);
- wxStrcpy(errorCode, buf);
- }
- }
- else
- {
- wxChar buf[200];
- wxSnprintf(buf, sizeof(buf), _T("Initialisation file error: unrecognised setting %s."), settingName.c_str());
- if (interactive)
- OnInform(buf);
- wxStrcpy(errorCode, buf);
- }
- return errorCode;
-}
-
-bool ReadCustomMacros(const wxString& filename)
-{
- if (!wxFileExists(filename))
- return false;
-
- wxFileInputStream input( filename );
- if(!input.Ok()) return false;
- wxTextInputStream ini( input );
-
- CustomMacroList.Clear();
-
- while (!input.Eof())
- {
- wxString line = ini.ReadLine();
- BibEatWhiteSpace(line);
- if (line.empty()) continue;
-
- if (line[0] != _T('\\')) // Not a macro definition, so must be NAME=VALUE
- {
- wxString settingName = BibReadWord(line);
- BibEatWhiteSpace(line);
- if (line.empty() || line[0] != _T('='))
- {
- OnError(_T("Expected = following name: malformed tex2rtf.ini file."));
- return false;
- }
- else
- {
- line = line.substr(1);
- BibEatWhiteSpace(line);
- wxString settingValue = BibReadToEOL(line);
- RegisterSetting(settingName, settingValue);
- }
- }
- else
- {
- line = line.substr(1);
- wxString macroName = BibReadWord(line);
- BibEatWhiteSpace(line);
- if (line[0] != _T('['))
- {
- OnError(_T("Expected [ followed by number of arguments: malformed tex2rtf.ini file."));
- return false;
- }
- line = line.substr(1);
- wxString noAargStr = line.BeforeFirst(_T(']'));
- line = line.AfterFirst(_T(']'));
- long noArgs;
- if (!noAargStr.ToLong(&noArgs) || line.empty())
- {
- OnError(_T("Expected ] following number of arguments: malformed tex2rtf.ini file."));
- return false;
- }
- BibEatWhiteSpace(line);
- if (line[0] != _T('{'))
- {
- OnError(_T("Expected { followed by macro body: malformed tex2rtf.ini file."));
- return false;
- }
-
- CustomMacro *macro = new CustomMacro(macroName.c_str(), noArgs, NULL);
- wxString macroBody = BibReadValue(line, false, false); // Don't ignore extra braces
- if (!macroBody.empty())
- macro->macroBody = copystring(macroBody.c_str());
-
- BibEatWhiteSpace(line);
- CustomMacroList.Append(macroName, macro);
- AddMacroDef(ltCUSTOM_MACRO, macroName.c_str(), noArgs);
- }
-
- }
- wxChar mbuf[200];
- wxSnprintf(mbuf, sizeof(mbuf), _T("Read initialization file %s."), filename.c_str());
- OnInform(mbuf);
- return true;
-}
-
-CustomMacro *FindCustomMacro(wxChar *name)
-{
- wxNode *node = CustomMacroList.Find(name);
- if (node)
- {
- CustomMacro *macro = (CustomMacro *)node->GetData();
- return macro;
- }
- return NULL;
-}
-
-// Display custom macros
-void ShowCustomMacros(void)
-{
- wxNode *node = CustomMacroList.GetFirst();
- if (!node)
- {
- OnInform(_T("No custom macros loaded.\n"));
- return;
- }
-
- wxChar buf[400];
- while (node)
- {
- CustomMacro *macro = (CustomMacro *)node->GetData();
- wxSnprintf(buf, sizeof(buf), _T("\\%s[%d]\n {%s}"), macro->macroName, macro->noArgs,
- macro->macroBody ? macro->macroBody : _T(""));
- OnInform(buf);
- node = node->GetNext();
- }
-}
-
-// Parse a string into several comma-separated fields
-wxChar *ParseMultifieldString(wxChar *allFields, int *pos)
-{
- static wxChar buffer[300];
- int i = 0;
- int fieldIndex = *pos;
- int len = wxStrlen(allFields);
- int oldPos = *pos;
- bool keepGoing = true;
- while ((fieldIndex <= len) && keepGoing)
- {
- if (allFields[fieldIndex] == _T(' '))
- {
- // Skip
- fieldIndex ++;
- }
- else if (allFields[fieldIndex] == _T(','))
- {
- *pos = fieldIndex + 1;
- keepGoing = false;
- }
- else if (allFields[fieldIndex] == 0)
- {
- *pos = fieldIndex + 1;
- keepGoing = false;
- }
- else
- {
- buffer[i] = allFields[fieldIndex];
- fieldIndex ++;
- i++;
- }
- }
- buffer[i] = 0;
- if (oldPos == (*pos))
- *pos = len + 1;
-
- if (i == 0)
- return NULL;
- else
- return buffer;
-}
-
-/*
- * Colour tables
- *
- */
-
-ColourTableEntry::ColourTableEntry(const wxChar *theName, unsigned int r, unsigned int g, unsigned int b)
-{
- name = copystring(theName);
- red = r;
- green = g;
- blue = b;
-}
-
-ColourTableEntry::~ColourTableEntry(void)
-{
- delete[] name;
-}
-
-void AddColour(const wxChar *theName, unsigned int r, unsigned int g, unsigned int b)
-{
- wxNode *node = ColourTable.Find(theName);
- if (node)
- {
- ColourTableEntry *entry = (ColourTableEntry *)node->GetData();
- if (entry->red == r || entry->green == g || entry->blue == b)
- return;
- else
- {
- delete entry;
- delete node;
- }
- }
- ColourTableEntry *entry = new ColourTableEntry(theName, r, g, b);
- ColourTable.Append(theName, entry);
-}
-
-int FindColourPosition(wxChar *theName)
-{
- int i = 0;
- wxNode *node = ColourTable.GetFirst();
- while (node)
- {
- ColourTableEntry *entry = (ColourTableEntry *)node->GetData();
- if (wxStrcmp(theName, entry->name) == 0)
- return i;
- i ++;
- node = node->GetNext();
- }
- return -1;
-}
-
-// Converts e.g. "red" -> "#FF0000"
-extern void DecToHex(int, wxChar *);
-bool FindColourHTMLString(wxChar *theName, wxChar *buf)
-{
- wxNode *node = ColourTable.GetFirst();
- while (node)
- {
- ColourTableEntry *entry = (ColourTableEntry *)node->GetData();
- if (wxStrcmp(theName, entry->name) == 0)
- {
- wxStrcpy(buf, _T("#"));
-
- wxChar buf2[3];
- DecToHex(entry->red, buf2);
- wxStrcat(buf, buf2);
- DecToHex(entry->green, buf2);
- wxStrcat(buf, buf2);
- DecToHex(entry->blue, buf2);
- wxStrcat(buf, buf2);
-
- return true;
- }
- node = node->GetNext();
- }
- return false;
-}
-
-
-void InitialiseColourTable(void)
-{
- // \\red0\\green0\\blue0;
- AddColour(_T("black"), 0,0,0);
-
- // \\red0\\green0\\blue255;\\red0\\green255\\blue255;\n");
- AddColour(_T("cyan"), 0,255,255);
-
- // \\red0\\green255\\blue0;
- AddColour(_T("green"), 0,255,0);
-
- // \\red255\\green0\\blue255;
- AddColour(_T("magenta"), 255,0,255);
-
- // \\red255\\green0\\blue0;
- AddColour(_T("red"), 255,0,0);
-
- // \\red255\\green255\\blue0;
- AddColour(_T("yellow"), 255,255,0);
-
- // \\red255\\green255\\blue255;}");
- AddColour(_T("white"), 255,255,255);
-}
-
-/*
- * The purpose of this is to reduce the number of times wxYield is
- * called, since under Windows this can slow things down.
- */
-
-void Tex2RTFYield(bool force)
-{
-#ifdef __WINDOWS__
- static int yieldCount = 0;
-
- if (isSync)
- return;
-
- if (force)
- yieldCount = 0;
- if (yieldCount == 0)
- {
- if (wxTheApp)
- wxYield();
- yieldCount = 10;
- }
- yieldCount --;
-#else
- wxUnusedVar(force);
-#endif
-}
-
-// In both RTF generation and HTML generation for wxHelp version 2,
-// we need to associate \indexed keywords with the current filename/topics.
-
-// Hash table for lists of keywords for topics (WinHelp).
-wxHashTable TopicTable(wxKEY_STRING);
-void AddKeyWordForTopic(wxChar *topic, wxChar *entry, wxChar *filename)
-{
- TexTopic *texTopic = (TexTopic *)TopicTable.Get(topic);
- if (!texTopic)
- {
- texTopic = new TexTopic(filename);
- texTopic->keywords = new wxStringList;
- TopicTable.Put(topic, texTopic);
- }
-
- if (!texTopic->keywords->Member(entry))
- texTopic->keywords->Add(entry);
-}
-
-void ClearKeyWordTable(void)
-{
- TopicTable.BeginFind();
- wxHashTable::Node *node = TopicTable.Next();
- while (node)
- {
- TexTopic *texTopic = (TexTopic *)node->GetData();
- delete texTopic;
- node = TopicTable.Next();
- }
- TopicTable.Clear();
-}
-
-
-/*
- * TexTopic structure
- */
-
-TexTopic::TexTopic(wxChar *f)
-{
- if (f)
- filename = copystring(f);
- else
- filename = NULL;
- hasChildren = false;
- keywords = NULL;
-}
-
-TexTopic::~TexTopic(void)
-{
- if (keywords)
- delete keywords;
- if (filename)
- delete[] filename;
-}
-
-// Convert case, according to upperCaseNames setting.
-wxChar *ConvertCase(wxChar *s)
-{
- static wxChar buf[256];
- int len = wxStrlen(s);
- int i;
- if (upperCaseNames)
- for (i = 0; i < len; i ++)
- buf[i] = (wxChar)wxToupper(s[i]);
- else
- for (i = 0; i < len; i ++)
- buf[i] = (wxChar)wxTolower(s[i]);
- buf[i] = 0;
- return buf;
-}
-
-// if substring is true, search for str1 in str2
-bool StringMatch(const wxChar *str1, const wxChar *str2, bool subString,
- bool exact)
-{
- if (subString)
- {
- wxString Sstr1(str1);
- wxString Sstr2(str2);
- if (!exact)
- {
- Sstr1.MakeUpper();
- Sstr2.MakeUpper();
- }
- return Sstr2.Index(Sstr1) != (size_t)wxNOT_FOUND;
- }
- else
- return exact ? wxString(str2).Cmp(str1) == 0 :
- wxString(str2).CmpNoCase(str1) == 0;
-}
+++ /dev/null
-/*
- * File: wxhlpblk.h
- * Purpose: Text blocks used in wxHelp
- * Author: Julian Smart
- * Created: 1993
- * Updated:
- * Copyright: (c) 1993, AIAI, University of Edinburgh
- */
-
-/* sccsid[] = "%W% %G%" */
-
-#ifndef wxhlpblkh
-#define wxhlpblkh
-
-#define hyBLOCK_NORMAL 1
-#define hyBLOCK_RED 2
-#define hyBLOCK_BLUE 3
-#define hyBLOCK_GREEN 4
-#define hyBLOCK_LARGE_HEADING 5
-#define hyBLOCK_SMALL_HEADING 6
-#define hyBLOCK_ITALIC 7
-#define hyBLOCK_BOLD 8
-#define hyBLOCK_INVISIBLE_SECTION 9
-#define hyBLOCK_LARGE_VISIBLE_SECTION 10
-#define hyBLOCK_SMALL_VISIBLE_SECTION 11
-#define hyBLOCK_SMALL_TEXT 12
-#define hyBLOCK_RED_ITALIC 13
-#define hyBLOCK_TELETYPE 14
-
-#endif // wxhlpblkh
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: xlputils.cpp
-// Purpose: Converts Latex to obsolete XLP format
-// Author: Julian Smart
-// Modified by: Wlodzimiez ABX Skiba 2003/2004 Unicode support
-// Ron Lee
-// Created: 7.9.93
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#endif
-
-#include "tex2any.h"
-#include "tex2rtf.h"
-#include <ctype.h>
-
-static inline wxChar* copystring(const wxChar* s)
- { return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
-
-long currentBlockId = -1;
-static TexChunk *descriptionItemArg = NULL;
-static int indentLevel = 0;
-static int noColumns = 0;
-static int currentTab = 0;
-static bool tableVerticalLineLeft = false;
-static bool tableVerticalLineRight = false;
-static bool inTable = false;
-static int citeCount = 1;
-wxList hyperLinks(wxKEY_INTEGER);
-wxList hyperLabels(wxKEY_STRING);
-FILE *Index = NULL;
-
-
-extern wxHashTable TexReferences;
-
-
-void PadToTab(int tabPos)
-{
- int currentCol = GetCurrentColumn();
- for (int i = currentCol; i < tabPos; i++)
- TexOutput(_T(" "), true);
-}
-
-static long xlpBlockId = 0;
-long NewBlockId(void)
-{
- return xlpBlockId ++;
-}
-
-// Called on start/end of macro examination
-void XLPOnMacro(int macroId, int no_args, bool start)
-{
- wxChar buf[100];
- switch (macroId)
- {
- case ltCHAPTER:
- case ltCHAPTERSTAR:
- case ltCHAPTERHEADING:
- {
- if (!start)
- {
- sectionNo = 0;
- figureNo = 0;
- subsectionNo = 0;
- subsubsectionNo = 0;
- if (macroId != ltCHAPTERSTAR)
- chapterNo ++;
-
- SetCurrentOutputs(Contents, Chapters);
- long id1 = NewBlockId();
- currentBlockId = NewBlockId();
-
- startedSections = true;
- wxFprintf(Contents, _T("\\hy-%d{%ld}{"), hyBLOCK_SMALL_HEADING, id1);
- wxFprintf(Chapters, _T("\n\\hy-%d{%ld}{"), hyBLOCK_LARGE_VISIBLE_SECTION, currentBlockId);
- wxFprintf(Index, _T("%ld %ld\n"), id1, currentBlockId);
-
- OutputCurrentSection(); // Repeat section header
-
- wxFprintf(Contents, _T("}\n\n"));
- wxFprintf(Chapters, _T("}\n\n"));
- SetCurrentOutput(Chapters);
- wxChar *topicName = FindTopicName(GetNextChunk());
- hyperLabels.Append(topicName, (wxObject *)currentBlockId);
- }
- break;
- }
- case ltSECTION:
- case ltSECTIONSTAR:
- case ltSECTIONHEADING:
- case ltGLOSS:
- {
- if (!start)
- {
- subsectionNo = 0;
- subsubsectionNo = 0;
-
- if (macroId != ltSECTIONSTAR)
- sectionNo ++;
-
- SetCurrentOutputs(Chapters, Sections);
- long id1 = NewBlockId();
- currentBlockId = NewBlockId();
-
- startedSections = true;
-
- if (DocumentStyle == LATEX_ARTICLE)
- wxFprintf(Contents, _T("\\hy-%d{%ld}{"), hyBLOCK_LARGE_HEADING, id1);
- else
- wxFprintf(Chapters, _T("\\hy-%d{%ld}{"), hyBLOCK_BOLD, id1);
- wxFprintf(Sections, _T("\n\\hy-%d{%ld}{"), hyBLOCK_LARGE_VISIBLE_SECTION, currentBlockId);
- wxFprintf(Index, _T("%ld %ld\n"), id1, currentBlockId);
-
- OutputCurrentSection(); // Repeat section header
-
- if (DocumentStyle == LATEX_ARTICLE)
- wxFprintf(Contents, _T("}\n\n"));
- else
- wxFprintf(Chapters, _T("}\n\n"));
- wxFprintf(Sections, _T("}\n\n"));
- SetCurrentOutput(Sections);
- wxChar *topicName = FindTopicName(GetNextChunk());
- hyperLabels.Append(topicName, (wxObject *)currentBlockId);
- }
- break;
- }
- case ltSUBSECTION:
- case ltSUBSECTIONSTAR:
- case ltMEMBERSECTION:
- case ltFUNCTIONSECTION:
- {
- if (!start)
- {
- subsubsectionNo = 0;
-
- if (macroId != ltSUBSECTIONSTAR)
- subsectionNo ++;
-
- SetCurrentOutputs(Sections, Subsections);
- long id1 = NewBlockId();
- currentBlockId = NewBlockId();
- wxFprintf(Sections, _T("\\hy-%d{%ld}{"), hyBLOCK_BOLD, id1);
- wxFprintf(Subsections, _T("\n\\hy-%d{%ld}{"), hyBLOCK_LARGE_VISIBLE_SECTION, currentBlockId);
- wxFprintf(Index, _T("%ld %ld\n"), id1, currentBlockId);
-
- OutputCurrentSection(); // Repeat section header
-
- wxFprintf(Sections, _T("}\n\n"));
- wxFprintf(Subsections, _T("}\n\n"));
- SetCurrentOutput(Subsections);
- wxChar *topicName = FindTopicName(GetNextChunk());
- hyperLabels.Append(topicName, (wxObject *)currentBlockId);
- }
- break;
- }
- case ltSUBSUBSECTION:
- case ltSUBSUBSECTIONSTAR:
- {
- if (!start)
- {
- if (macroId != ltSUBSUBSECTIONSTAR)
- subsubsectionNo ++;
-
- SetCurrentOutputs(Subsections, Subsubsections);
- long id1 = NewBlockId();
- currentBlockId = NewBlockId();
- wxFprintf(Subsections, _T("\\hy-%d{%ld}{"), hyBLOCK_BOLD, id1);
- wxFprintf(Subsubsections, _T("\n\\hy-%d{%ld}{"), hyBLOCK_LARGE_VISIBLE_SECTION, currentBlockId);
- wxFprintf(Index, _T("%ld %ld\n"), id1, currentBlockId);
-
- OutputCurrentSection(); // Repeat section header
-
- wxFprintf(Subsections, _T("}\n\n"));
- wxFprintf(Subsubsections, _T("}\n\n"));
- SetCurrentOutput(Subsubsections);
- wxChar *topicName = FindTopicName(GetNextChunk());
- hyperLabels.Append(topicName, (wxObject *)currentBlockId);
- }
- break;
- }
- case ltFUNC:
- case ltPFUNC:
- case ltMEMBER:
- {
- SetCurrentOutput(Subsections);
- if (start)
- {
- long id = NewBlockId();
- wxFprintf(Subsections, _T("\\hy-%d{%ld}{"), hyBLOCK_BOLD, id);
- }
- else
- wxFprintf(Subsections, _T("}"));
- break;
- }
- case ltVOID:
-// if (start)
-// TexOutput(_T("void"), true);
- break;
- case ltBACKSLASHCHAR:
- if (start)
- TexOutput(_T("\n"), true);
- break;
- case ltPAR:
- {
- if (start)
- {
- if (ParSkip > 0)
- TexOutput(_T("\n"), true);
- TexOutput(_T("\n"), true);
- }
- break;
- }
- case ltRMFAMILY:
- case ltTEXTRM:
- case ltRM:
- {
- break;
- }
- case ltTEXTBF:
- case ltBFSERIES:
- case ltBF:
- {
- if (start)
- {
- wxChar buf[100];
- long id = NewBlockId();
- wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_BOLD, id);
- TexOutput(buf);
- }
- else TexOutput(_T("}"));
- break;
- }
- case ltTEXTIT:
- case ltITSHAPE:
- case ltIT:
- {
- if (start)
- {
- wxChar buf[100];
- long id = NewBlockId();
- wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_ITALIC, id);
- TexOutput(buf);
- }
- else TexOutput(_T("}"));
- break;
- }
- case ltTTFAMILY:
- case ltTEXTTT:
- case ltTT:
- {
- if (start)
- {
- long id = NewBlockId();
- wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_TELETYPE, id);
- TexOutput(buf);
- }
- else TexOutput(_T("}"));
- break;
- }
- case ltSMALL:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_SMALL_TEXT, NewBlockId());
- TexOutput(buf);
- }
- else TexOutput(_T("}"));
- break;
- }
- case ltTINY:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_SMALL_TEXT, NewBlockId());
- TexOutput(buf);
- }
- else TexOutput(_T("}"));
- break;
- }
- case ltNORMALSIZE:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_NORMAL, NewBlockId());
- TexOutput(buf);
- }
- else TexOutput(_T("}"));
- break;
- }
- case ltlarge:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_SMALL_HEADING, NewBlockId());
- TexOutput(buf);
- }
- else TexOutput(_T("}\n"));
- break;
- }
- case ltLARGE:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_LARGE_HEADING, NewBlockId());
- TexOutput(buf);
- }
- else TexOutput(_T("}\n"));
- break;
- }
- case ltITEMIZE:
- case ltENUMERATE:
- case ltDESCRIPTION:
- case ltTWOCOLLIST:
- {
- if (start)
- {
-// tabCount ++;
-
-// if (indentLevel > 0)
-// TexOutput(_T("\\par\\par\n"));
- indentLevel ++;
- int listType;
- if (macroId == ltENUMERATE)
- listType = LATEX_ENUMERATE;
- else if (macroId == ltITEMIZE)
- listType = LATEX_ITEMIZE;
- else
- listType = LATEX_DESCRIPTION;
- itemizeStack.Insert(new ItemizeStruc(listType));
-
- }
- else
- {
- indentLevel --;
-
- if (itemizeStack.GetFirst())
- {
- ItemizeStruc *struc = (ItemizeStruc *)itemizeStack.GetFirst()->GetData();
- delete struc;
- delete itemizeStack.GetFirst();
- }
- }
- break;
- }
- case ltITEM:
- {
- wxNode *node = itemizeStack.GetFirst();
- if (node)
- {
- ItemizeStruc *struc = (ItemizeStruc *)node->GetData();
- if (!start)
- {
- struc->currentItem += 1;
- wxChar indentBuf[30];
-
- switch (struc->listType)
- {
- case LATEX_ENUMERATE:
- {
- wxSnprintf(indentBuf, sizeof(indentBuf), _T("\\hy-%d{%ld}{%d.} "),
- hyBLOCK_BOLD, NewBlockId(), struc->currentItem);
- TexOutput(indentBuf);
- break;
- }
- case LATEX_ITEMIZE:
- {
- wxSnprintf(indentBuf, sizeof(indentBuf), _T("\\hy-%d{%ld}{o} "),
- hyBLOCK_BOLD, NewBlockId());
- TexOutput(indentBuf);
- break;
- }
- default:
- case LATEX_DESCRIPTION:
- {
- if (descriptionItemArg)
- {
- wxSnprintf(indentBuf, sizeof(indentBuf), _T("\\hy-%d{%ld}{"),
- hyBLOCK_BOLD, NewBlockId());
- TexOutput(indentBuf);
- TraverseChildrenFromChunk(descriptionItemArg);
- TexOutput(_T("} "));
- descriptionItemArg = NULL;
- }
- break;
- }
- }
- }
- }
- break;
- }
- case ltMAKETITLE:
- {
- if (start && DocumentTitle && DocumentAuthor)
- {
- wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_LARGE_HEADING, NewBlockId());
- TexOutput(buf);
- TraverseChildrenFromChunk(DocumentTitle);
- TexOutput(_T("}\n\n"));
- wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_SMALL_HEADING, NewBlockId());
- TexOutput(buf);
- TraverseChildrenFromChunk(DocumentAuthor);
- TexOutput(_T("}\n\n"));
- if (DocumentDate)
- {
- TraverseChildrenFromChunk(DocumentDate);
- TexOutput(_T("\n"));
- }
- }
- break;
- }
- case ltTABLEOFCONTENTS:
- {
- if (start)
- {
- FILE *fd = wxFopen(ContentsName, _T("r"));
- if (fd)
- {
- int ch = getc(fd);
- while (ch != EOF)
- {
- wxPutc(ch, Chapters);
- ch = getc(fd);
- }
- fclose(fd);
- }
- else
- {
- TexOutput(_T("RUN TEX2RTF AGAIN FOR CONTENTS PAGE\n"));
- OnInform(_T("Run Tex2RTF again to include contents page."));
- }
- }
- break;
- }
- case ltHARDY:
- {
- if (start)
- TexOutput(_T("HARDY"), true);
- break;
- }
- case ltWXCLIPS:
- {
- if (start)
- TexOutput(_T("wxCLIPS"), true);
- break;
- }
- case ltVERBATIM:
- {
- if (start)
- {
- wxChar buf[100];
- long id = NewBlockId();
- wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_TELETYPE, id);
- TexOutput(buf);
- }
- else TexOutput(_T("}"));
- break;
- }
- case ltHRULE:
- {
- if (start)
- {
- TexOutput(_T("\n------------------------------------------------------------------"), true);
- }
- break;
- }
- case ltHLINE:
- {
- if (start)
- {
- TexOutput(_T("--------------------------------------------------------------------------------"), true);
- }
- break;
- }
- case ltSPECIALAMPERSAND:
- {
- if (start)
- {
- currentTab ++;
- int tabPos = (80/noColumns)*currentTab;
- PadToTab(tabPos);
- }
- break;
- }
- case ltTABULAR:
- case ltSUPERTABULAR:
- {
- if (start)
- {
- wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_TELETYPE, NewBlockId());
- TexOutput(buf);
- }
- else
- TexOutput(_T("}"));
- break;
- }
- case ltNUMBEREDBIBITEM:
- {
- if (!start)
- TexOutput(_T("\n\n"), true);
- break;
- }
- case ltCAPTION:
- case ltCAPTIONSTAR:
- {
- if (start)
- {
- figureNo ++;
-
- wxChar figBuf[40];
- if (DocumentStyle != LATEX_ARTICLE)
- wxSnprintf(figBuf, sizeof(figBuf), _T("Figure %d.%d: "), chapterNo, figureNo);
- else
- wxSnprintf(figBuf, sizeof(figBuf), _T("Figure %d: "), figureNo);
-
- TexOutput(figBuf);
- }
- else
- {
- wxChar *topicName = FindTopicName(GetNextChunk());
-
- AddTexRef(topicName, NULL, NULL,
- ((DocumentStyle != LATEX_ARTICLE) ? chapterNo : figureNo),
- ((DocumentStyle != LATEX_ARTICLE) ? figureNo : 0));
- }
- break;
- }
- default:
- {
- DefaultOnMacro(macroId, no_args, start);
- break;
- }
- }
-}
-
-bool XLPOnArgument(int macroId, int arg_no, bool start)
-{
- wxChar buf[300];
- switch (macroId)
- {
- case ltCHAPTER:
- case ltCHAPTERSTAR:
- case ltCHAPTERHEADING:
- case ltSECTION:
- case ltSECTIONSTAR:
- case ltSECTIONHEADING:
- case ltSUBSECTION:
- case ltSUBSECTIONSTAR:
- case ltSUBSUBSECTION:
- case ltSUBSUBSECTIONSTAR:
- case ltGLOSS:
- case ltMEMBERSECTION:
- case ltFUNCTIONSECTION:
- {
- if (!start && (arg_no == 1))
- currentSection = GetArgChunk();
- return false;
- }
- case ltFUNC:
- {
- if (!start && (arg_no == 1))
- TexOutput(_T(" "), true);
- if (start && (arg_no == 3))
- TexOutput(_T("("), true);
- if (!start && (arg_no == 3))
- TexOutput(_T(")"), true);
- break;
- }
- case ltPFUNC:
- {
- if (!start && (arg_no == 1))
- TexOutput(_T(" "), true);
-
- if (start && (arg_no == 2))
- TexOutput(_T("(*"), true);
- if (!start && (arg_no == 2))
- TexOutput(_T(")"), true);
-
- if (start && (arg_no == 3))
- TexOutput(_T("("), true);
- if (!start && (arg_no == 3))
- TexOutput(_T(")"), true);
- break;
- }
- case ltCLIPSFUNC:
- {
- if (!start && (arg_no == 1))
- TexOutput(_T(" "), true);
- if (start && (arg_no == 2))
- {
- TexOutput(_T("("), true);
- long id = NewBlockId();
- wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_BOLD, id);
- TexOutput(buf);
- }
- if (!start && (arg_no == 2))
- {
- TexOutput(_T("}"));
- }
- if (!start && (arg_no == 3))
- TexOutput(_T(")"), true);
- break;
- }
- case ltPARAM:
- {
- if (start && (arg_no == 2))
- {
- long id = NewBlockId();
- wxSnprintf(buf, sizeof(buf), _T(" \\hy-%d{%ld}{"), hyBLOCK_BOLD, id);
- TexOutput(buf);
- }
- if (!start && (arg_no == 2))
- {
- TexOutput(_T("}"));
- }
- break;
- }
- case ltCPARAM:
- {
- if (start && (arg_no == 2))
- {
- long id = NewBlockId();
- wxSnprintf(buf, sizeof(buf), _T(" \\hy-%d{%ld}{"), hyBLOCK_BOLD, id);
- TexOutput(buf);
- }
- if (!start && (arg_no == 2))
- {
- TexOutput(_T("}"));
- }
- break;
- }
- case ltMEMBER:
- {
- if (!start && (arg_no == 1))
- TexOutput(_T(" "), true);
- break;
- }
- case ltLABEL:
- {
- return false;
- }
- case ltREF:
- {
- if (start)
- {
- wxChar *sec = NULL;
-
- wxChar *refName = GetArgData();
- if (refName)
- {
- TexRef *texRef = FindReference(refName);
- if (texRef)
- {
- sec = texRef->sectionNumber;
- }
- }
- if (sec)
- {
- TexOutput(sec);
- }
- return false;
- }
- break;
- }
- case ltHELPREF:
- case ltHELPREFN:
- case ltPOPREF:
- {
- if (arg_no == 1)
- {
- if (start)
- {
- currentBlockId = NewBlockId();
- wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_RED_ITALIC, currentBlockId);
- TexOutput(buf);
- }
- else TexOutput(_T("}"));
- }
- if (arg_no == 2)
- {
- if (start)
- {
- wxChar *label = GetArgData();
- hyperLinks.Append(currentBlockId, (wxObject *)copystring(label));
- }
-
- return false;
- }
- break;
- }
- case ltURLREF:
- {
- if (arg_no == 1)
- {
- return true;
- }
- else if (arg_no == 2)
- {
- if (start)
- TexOutput(_T(" ("));
- else
- TexOutput(_T(")"));
- return true;
- }
- break;
- }
- case ltITEM:
- {
- if (start && IsArgOptional())
- {
- descriptionItemArg = GetArgChunk();
- return false;
- }
- break;
- }
- case ltTABULAR:
- case ltSUPERTABULAR:
- {
- if (arg_no == 1)
- {
- if (start)
- {
- inTable = true;
- tableVerticalLineLeft = false;
- tableVerticalLineRight = false;
-
- wxChar *alignString = copystring(GetArgData());
-
- // Count the number of columns
- noColumns = 0;
- int len = wxStrlen(alignString);
- if (len > 0)
- {
- if (alignString[0] == '|')
- tableVerticalLineLeft = true;
- if (alignString[len-1] == '|')
- tableVerticalLineRight = true;
- }
-
- for (int i = 0; i < len; i++)
- if (isalpha(alignString[i]))
- noColumns ++;
-
-/*
- // Experimental
- TexOutput(_T("\\brdrt\\brdrs"));
- if (tableVerticalLineLeft)
- TexOutput(_T("\\brdrl\\brdrs"));
- if (tableVerticalLineRight)
- TexOutput(_T("\\brdrr\\brdrs"));
-*/
-
- // Calculate a rough size for each column
-// int tabPos = 80/noColumns;
- currentTab = 0;
-
- return false;
- }
- }
- else if (arg_no == 2 && !start)
- {
- inTable = false;
- }
- else if (arg_no == 2 && start)
- return true;
- break;
- }
- case ltMARGINPAR:
- case ltMARGINPAREVEN:
- case ltMARGINPARODD:
- case ltNORMALBOX:
- case ltNORMALBOXD:
- {
- if (start)
- {
- TexOutput(_T("----------------------------------------------------------------------\n"), true);
- return true;
- }
- else
- TexOutput(_T("\n----------------------------------------------------------------------\n"), true);
- break;
- }
- case ltBIBITEM:
- {
- wxChar buf[100];
- if (arg_no == 1 && start)
- {
- wxChar *citeKey = GetArgData();
- TexRef *ref = (TexRef *)TexReferences.Get(citeKey);
- if (ref)
- {
- if (ref->sectionNumber) delete[] ref->sectionNumber;
- wxSnprintf(buf, sizeof(buf), _T("[%d]"), citeCount);
- ref->sectionNumber = copystring(buf);
- }
-
- wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{[%d]} "), hyBLOCK_BOLD, NewBlockId(), citeCount);
- TexOutput(buf);
- citeCount ++;
- return false;
- }
- return true;
- }
- case ltTHEBIBLIOGRAPHY:
- {
- if (start && (arg_no == 1))
- {
- citeCount = 1;
-
- SetCurrentOutput(Chapters);
-
- SetCurrentOutputs(Contents, Chapters);
- long id1 = NewBlockId();
- long id2 = NewBlockId();
- wxFprintf(Contents, _T("\\hy-%d{%ld}{%s}\n"), hyBLOCK_SMALL_HEADING, id1, ReferencesNameString);
- wxFprintf(Chapters, _T("\\hy-%d{%ld}{%s}\n\n\n"), hyBLOCK_LARGE_VISIBLE_SECTION, id2, ReferencesNameString);
- wxFprintf(Index, _T("%ld %ld\n"), id1, id2);
-
- SetCurrentOutput(Chapters);
- return false;
- }
- if (!start && (arg_no == 2))
- {
- }
- return true;
- }
- case ltTWOCOLITEM:
- case ltTWOCOLITEMRULED:
- {
- if (start && (arg_no == 2))
- TexOutput(_T("\n "));
-
- if (!start && (arg_no == 2))
- TexOutput(_T("\n"));
- return true;
- }
- /*
- * Accents
- *
- */
- case ltACCENT_GRAVE:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case _T('a'):
- TexOutput(_T("a"));
- break;
- case _T('e'):
- TexOutput(_T("e"));
- break;
- case _T('i'):
- TexOutput(_T("i"));
- break;
- case _T('o'):
- TexOutput(_T("o"));
- break;
- case _T('u'):
- TexOutput(_T("u"));
- break;
- case _T('A'):
- TexOutput(_T("a"));
- break;
- case _T('E'):
- TexOutput(_T("E"));
- break;
- case _T('I'):
- TexOutput(_T("I"));
- break;
- case _T('O'):
- TexOutput(_T("O"));
- break;
- case _T('U'):
- TexOutput(_T("U"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_ACUTE:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case _T('a'):
- TexOutput(_T("a"));
- break;
- case _T('e'):
- TexOutput(_T("e"));
- break;
- case _T('i'):
- TexOutput(_T("i"));
- break;
- case _T('o'):
- TexOutput(_T("o"));
- break;
- case _T('u'):
- TexOutput(_T("u"));
- break;
- case _T('y'):
- TexOutput(_T("y"));
- break;
- case _T('A'):
- TexOutput(_T("A"));
- break;
- case _T('E'):
- TexOutput(_T("E"));
- break;
- case _T('I'):
- TexOutput(_T("I"));
- break;
- case _T('O'):
- TexOutput(_T("O"));
- break;
- case _T('U'):
- TexOutput(_T("U"));
- break;
- case _T('Y'):
- TexOutput(_T("Y"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_CARET:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case _T('a'):
- TexOutput(_T("a"));
- break;
- case _T('e'):
- TexOutput(_T("e"));
- break;
- case _T('i'):
- TexOutput(_T("i"));
- break;
- case _T('o'):
- TexOutput(_T("o"));
- break;
- case _T('u'):
- TexOutput(_T("u"));
- break;
- case _T('A'):
- TexOutput(_T("A"));
- break;
- case _T('E'):
- TexOutput(_T("E"));
- break;
- case _T('I'):
- TexOutput(_T("I"));
- break;
- case _T('O'):
- TexOutput(_T("O"));
- break;
- case _T('U'):
- TexOutput(_T("U"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_TILDE:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case _T('a'):
- TexOutput(_T("a"));
- break;
- case _T(' '):
- TexOutput(_T("~"));
- break;
- case _T('n'):
- TexOutput(_T("n"));
- break;
- case _T('o'):
- TexOutput(_T("o"));
- break;
- case _T('A'):
- TexOutput(_T("A"));
- break;
- case _T('N'):
- TexOutput(_T("N"));
- break;
- case _T('O'):
- TexOutput(_T("O"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_UMLAUT:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case _T('a'):
- TexOutput(_T("a"));
- break;
- case _T('e'):
- TexOutput(_T("e"));
- break;
- case _T('i'):
- TexOutput(_T("i"));
- break;
- case _T('o'):
- TexOutput(_T("o"));
- break;
- case _T('u'):
- TexOutput(_T("u"));
- break;
- case _T('y'):
- TexOutput(_T("y"));
- break;
- case _T('A'):
- TexOutput(_T("A"));
- break;
- case _T('E'):
- TexOutput(_T("E"));
- break;
- case _T('I'):
- TexOutput(_T("I"));
- break;
- case _T('O'):
- TexOutput(_T("O"));
- break;
- case _T('U'):
- TexOutput(_T("U"));
- break;
- case _T('Y'):
- TexOutput(_T("Y"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_DOT:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case _T('a'):
- TexOutput(_T("a"));
- break;
- case _T('A'):
- TexOutput(_T("A"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- case ltACCENT_CADILLA:
- {
- if (start)
- {
- wxChar *val = GetArgData();
- if (val)
- {
- switch (val[0])
- {
- case _T('c'):
- TexOutput(_T("c"));
- break;
- case _T('C'):
- TexOutput(_T("C"));
- break;
- default:
- break;
- }
- }
- }
- return false;
- }
- default:
- {
- return DefaultOnArgument(macroId, arg_no, start);
- }
- }
- return true;
-}
-
-bool XLPGo(void)
-{
- xlpBlockId = 0;
-
- if (!InputFile.empty() && !OutputFile.empty())
- {
- Contents = wxFopen(TmpContentsName, _T("w"));
- Chapters = wxFopen(_T("chapters.xlp"), _T("w"));
- Sections = wxFopen(_T("sections.xlp"), _T("w"));
- Subsections = wxFopen(_T("subsections.xlp"), _T("w"));
- Subsubsections = wxFopen(_T("subsubsections.xlp"), _T("w"));
- Index = wxFopen(_T("index.xlp"), _T("w"));
-
- // Insert invisible section marker at beginning
- wxFprintf(Chapters, _T("\\hy-%d{%ld}{%s}\n"),
- hyBLOCK_INVISIBLE_SECTION, NewBlockId(), _T("\n"));
-
- wxFprintf(Contents, _T("\\hy-%d{%ld}{%s}\n\n"),
-// hyBLOCK_LARGE_HEADING, NewBlockId(), "\n\n%s\n\n", ContentsNameString);
- hyBLOCK_LARGE_HEADING, NewBlockId(), ContentsNameString);
-
- SetCurrentOutput(Chapters);
-
- wxFprintf(Index, _T("\n\\hyindex{\n\"%s\"\n"),
- contentsString ? contentsString : _T("WXHELPCONTENTS"));
- TraverseDocument();
-
- wxNode *node = hyperLinks.GetFirst();
- while (node)
- {
- long from = node->GetKeyInteger();
- wxChar *label = (wxChar *)node->GetData();
- wxNode *otherNode = hyperLabels.Find(label);
- if (otherNode)
- {
- long to = (long)otherNode->GetData();
- wxFprintf(Index, _T("%ld %ld\n"), from, to);
- }
- node = node->GetNext();
- }
-
- wxFprintf(Index, _T("}\n"));
-
- fclose(Contents); Contents = NULL;
- fclose(Chapters); Chapters = NULL;
- fclose(Sections); Sections = NULL;
- fclose(Subsections); Subsections = NULL;
- fclose(Subsubsections); Subsubsections = NULL;
- fclose(Index); Index = NULL;
-
- if (wxFileExists(ContentsName)) wxRemoveFile(ContentsName);
-
- if (!wxRenameFile(TmpContentsName, ContentsName))
- {
- wxCopyFile(TmpContentsName, ContentsName);
- wxRemoveFile(TmpContentsName);
- }
-
- wxConcatFiles(_T("chapters.xlp"), _T("sections.xlp"), _T("tmp2.xlp"));
- wxConcatFiles(_T("tmp2.xlp"), _T("subsections.xlp"), _T("tmp1.xlp"));
- wxConcatFiles(_T("tmp1.xlp"), _T("subsubsections.xlp"), _T("tmp2.xlp"));
- wxConcatFiles(_T("tmp2.xlp"), _T("index.xlp"), OutputFile);
-
- wxRemoveFile(_T("tmp1.xlp"));
- wxRemoveFile(_T("tmp2.xlp"));
-
- wxRemoveFile(_T("chapters.xlp"));
- wxRemoveFile(_T("sections.xlp"));
- wxRemoveFile(_T("subsections.xlp"));
- wxRemoveFile(_T("subsubsections.xlp"));
- wxRemoveFile(_T("index.xlp"));
- return true;
- }
- return false;
-}
+++ /dev/null
-# Suppresses some of the more common warnings
-
-lacheck $1 | sed -e "/possible unwanted/d;/you may need/d;/TAB characyer/d;/Use \`/d;/missing \`\\\/d;/Dots/d;/Whitespace/d"
<installable>no</installable>
</subproject>
- <subproject id="tex2rtf" template="sub">
- <dir>tex2rtf/src</dir>
- <installable>yes</installable>
- </subproject>
-
- <subproject id="helpgen" template="sub">
- <dir>HelpGen/src</dir>
- <installable>yes</installable>
- </subproject>
-
<subproject id="ifacecheck" template="sub">
<dir>ifacecheck/src</dir>
<installable>yes</installable>
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: wxole.cpp
-// Purpose: wxOLE
-// Author: Robert Roebling
-// Modified by:
-// Created: 20/04/99
-// RCS-ID: $Id$
-// Copyright: (c) Robert Roebling
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#include "wx/defs.h"
-#include "wxole.h"
-
-#include "wx/app.h"
-#include "wx/menu.h"
-#include "wx/statusbr.h"
-#include "wx/toolbar.h"
-#include "wx/stream.h"
-
-#include "wx/gtk/win_gtk.h"
-
-extern "C" {
-#include "gtk/gtk.h"
-#include "gdk/gdk.h"
-
-#include <gnome.h>
-#include <libgnorba/gnorba.h>
-#include <bonobo/bonobo.h>
-#include <bonobo/gnome-main.h>
-#include <bonobo/gnome-component.h>
-#include <bonobo/gnome-component-factory.h>
-#include <bonobo/gnome-persist-stream.h>
-#include <bonobo/gtk-interfaces.h>
-}
-
-
-//-----------------------------------------------------------------------------
-// global data
-//-----------------------------------------------------------------------------
-
-const wxChar *wxOleNameStr = _T("olecontrol");
-
-//---------------------------------------------------------------------------
-// wxOleServerEnvPrivate
-//---------------------------------------------------------------------------
-
-class wxOleServerEnvPrivate
-{
-public:
-
- wxOleServerEnvPrivate() {}
- ~wxOleServerEnvPrivate() {}
-
- CORBA_Environment m_ev;
- CORBA_ORB m_orb;
-};
-
-//---------------------------------------------------------------------------
-// wxOleInputStream
-//---------------------------------------------------------------------------
-
-class wxOleInputStream : public wxInputStream
-{
-public:
-
- wxOleInputStream( GNOME_Stream stream );
- virtual ~wxOleInputStream();
-
- bool Ok() const { return m_error; }
-
-protected:
-
- bool m_error;
- GNOME_Stream m_gstream;
-
- size_t OnSysRead(void *buffer, size_t size);
- off_t OnSysSeek(off_t pos, wxSeekMode mode);
- off_t OnSysTell() const;
-};
-
-//---------------------------------------------------------------------------
-// wxOleServerEnv
-//---------------------------------------------------------------------------
-
-IMPLEMENT_CLASS(wxOleServerEnv,wxObject)
-
-wxOleServerEnv::wxOleServerEnv( const wxString &name, const wxString &version )
-{
- m_serverName = name;
- m_serverVersion = version;
-
- m_priv = new wxOleServerEnvPrivate();
-
- CORBA_exception_init( &(m_priv->m_ev) );
-
- gnome_CORBA_init(
- m_serverName.mb_str(),
- m_serverVersion.mb_str(),
- &wxTheApp->argc,
- wxTheApp->argv,
- GNORBA_INIT_SERVER_FUNC,
- &(m_priv->m_ev) );
-
- if (m_priv->m_ev._major != CORBA_NO_EXCEPTION)
- {
- return;
- }
-
- m_priv->m_orb = gnome_CORBA_ORB();
-
- if (bonobo_init( m_priv->m_orb, NULL, NULL ) == FALSE)
- {
- return;
- }
-
-}
-
-wxOleServerEnv::~wxOleServerEnv()
-{
- CORBA_exception_free( &(m_priv->m_ev) );
- delete m_priv;
-}
-
-//---------------------------------------------------------------------------
-// wxOleInputStream
-//---------------------------------------------------------------------------
-
-wxOleInputStream::wxOleInputStream( GNOME_Stream stream )
-{
- m_gstream = stream;
- m_error = (m_gstream);
-}
-
-wxOleInputStream::~wxOleInputStream()
-{
- /* we don't create the stream so we
- don't destroy it either. */
-}
-
-size_t wxOleInputStream::OnSysRead( void *buffer, size_t size )
-{
- GNOME_Stream_iobuf *gbuffer = GNOME_Stream_iobuf__alloc();
-
- CORBA_Environment ev;
- CORBA_exception_init( &ev );
-
- GNOME_Stream_read( m_gstream, size, &gbuffer, &ev );
-
- CORBA_exception_free( &ev );
-
- memcpy( buffer, gbuffer->_buffer, gbuffer->_length );
-
- m_error = (gbuffer->_length != size);
-
- CORBA_free( gbuffer );
-}
-
-off_t wxOleInputStream::OnSysSeek( off_t pos, wxSeekMode mode )
-{
- CORBA_Environment ev;
- CORBA_exception_init( &ev );
-
- GNOME_Stream_seek( m_gstream, pos /* offset */, 0 /* whence */, &ev );
-
- CORBA_exception_free( &ev );
-}
-
-off_t wxOleInputStream::OnSysTell() const
-{
- return 0; /* oh well */
-}
-
-
-//---------------------------------------------------------------------------
-// wxOleServerPrivate
-//---------------------------------------------------------------------------
-
-class wxOleServerPrivate
-{
-public:
-
- wxOleServerPrivate() {}
- ~wxOleServerPrivate() {}
-
- GnomeComponentFactory *m_factory;
-};
-
-//---------------------------------------------------------------------------
-// wxOleServer
-//---------------------------------------------------------------------------
-
-static GnomeView*
-gnome_view_factory_callback( GnomeComponent *component, wxOleServer *server )
-{
-/*
- printf( "Create OLE control.\n" );
-*/
-
- wxOleControl *ctx = server->CreateOleControl();
-
- if (!ctx) return (GnomeView*) NULL;
-
-/*
- printf( "Creating OLE control succeeded. Returning as GnomeView\n" );
-*/
-
- return gnome_view_new( ctx->m_widget );
-}
-
-static int
-gnome_load_from_stream_callback( GnomePersistStream *ps, GNOME_Stream stream, GnomeComponent* component )
-{
- wxOleInputStream wxstream( stream );
-
-
-}
-
-static GnomeComponent*
-gnome_component_factory_callback( GnomeComponentFactory *factory, const char *path, wxOleServer *server )
-{
-/*
- printf( "new component.\n" );
- if (path) printf( "path is %s.\n", path );
-*/
-
- GnomeComponent *component =
- gnome_component_new( gnome_view_factory_callback, (void*) server );
-
-/*
- if (!component)
- printf( "component creation failed.\n" );
- else
- printf( "component creation succeded.\n" );
-*/
-
- GnomePersistStream *stream =
- gnome_persist_stream_new( gnome_load_from_stream_callback, NULL /*save*/, (void*) component );
-
-/*
- if (!stream)
- printf( "stream creation failed.\n" );
- else
- printf( "stream creation succeded.\n" );
-*/
-
- gtk_object_add_interface( GTK_OBJECT(component), GTK_OBJECT(stream) );
-
- return component;
-}
-
-IMPLEMENT_CLASS(wxOleServer,wxObject)
-
-wxOleServer::wxOleServer( const wxString &id )
-{
- m_ID = "component:";
- m_ID += id;
-
- m_priv = new wxOleServerPrivate();
-
-/*
- printf( "new component factory.\n" );
-*/
-
- m_priv->m_factory =
- gnome_component_factory_new( m_ID.mb_str(), gnome_component_factory_callback, (void*) this );
-}
-
-wxOleServer::~wxOleServer()
-{
- delete m_priv;
-}
-
-wxOleControl *wxOleServer::CreateOleControl()
-{
- return new wxOleControl( -1 );
-}
-
-//-----------------------------------------------------------------------------
-// "size_allocate"
-//-----------------------------------------------------------------------------
-
-static void gtk_olectx_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxOleControl *win )
-{
- if (!win->m_hasVMT) return;
-
-/*
- printf( "OnFrameResize from " );
- if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
- printf( win->GetClassInfo()->GetClassName() );
- printf( ".\n" );
-*/
-
- if ((win->m_width != alloc->width) || (win->m_height != alloc->height))
- {
- win->m_sizeSet = FALSE;
- win->m_width = alloc->width;
- win->m_height = alloc->height;
- }
-}
-
-//-----------------------------------------------------------------------------
-// "delete_event"
-//-----------------------------------------------------------------------------
-
-static gint gtk_olectx_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxOleControl *win )
-{
-/*
- printf( "OnDelete from " );
- if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
- printf( win->GetClassInfo()->GetClassName() );
- printf( ".\n" );
-*/
-
- win->Close();
-
- return TRUE;
-}
-
-//-----------------------------------------------------------------------------
-// "configure_event"
-//-----------------------------------------------------------------------------
-
-static gint gtk_olectx_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventConfigure *event, wxOleControl *win )
-{
- if (!win->m_hasVMT) return FALSE;
-
- win->m_x = event->x;
- win->m_y = event->y;
-
- wxMoveEvent mevent( wxPoint(win->m_x,win->m_y), win->GetId() );
- mevent.SetEventObject( win );
- win->GetEventHandler()->ProcessEvent( mevent );
-
- return FALSE;
-}
-
-//---------------------------------------------------------------------------
-// wxOleControl
-//---------------------------------------------------------------------------
-
-IMPLEMENT_CLASS(wxOleControl,wxFrame)
-
-wxOleControl::wxOleControl( wxWindowID id, long style, const wxString &name )
-{
- Create( id, style, name );
-}
-
-bool wxOleControl::Create( wxWindowID id, long style, const wxString &name )
-{
- wxTopLevelWindows.Append( this );
-
- m_needParent = FALSE;
-
- PreCreation( (wxWindow*) NULL, id, wxDefaultPosition, wxDefaultSize, style, name );
-
- m_title = _T("wxWidgets OLE Server");
-
- /* any widget that can contain another widget and resizes it
- to its full size */
- m_widget = gtk_hbox_new(0,0);
-
- GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS );
-
- gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
- GTK_SIGNAL_FUNC(gtk_olectx_delete_callback), (gpointer)this );
-
- /* m_mainWidget holds the toolbar, the menubar and the client area */
- m_mainWidget = gtk_myfixed_new();
- gtk_widget_show( m_mainWidget );
- GTK_WIDGET_UNSET_FLAGS( m_mainWidget, GTK_CAN_FOCUS );
- gtk_container_add( GTK_CONTAINER(m_widget), m_mainWidget );
-
- /* m_wxwindow only represents the client area without toolbar and menubar */
- m_wxwindow = gtk_myfixed_new();
- gtk_widget_show( m_wxwindow );
- GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
- gtk_container_add( GTK_CONTAINER(m_mainWidget), m_wxwindow );
-
- PostCreation();
-
- /* the user resized the frame by dragging etc. */
- gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate",
- GTK_SIGNAL_FUNC(gtk_olectx_size_callback), (gpointer)this );
-
- /* the only way to get the window size is to connect to this event */
- gtk_signal_connect( GTK_OBJECT(m_widget), "configure_event",
- GTK_SIGNAL_FUNC(gtk_olectx_configure_callback), (gpointer)this );
-
- gtk_widget_show_all( m_widget );
-
- return TRUE;
-}
-
-wxOleControl::~wxOleControl()
-{
- if (m_frameMenuBar) delete m_frameMenuBar;
- m_frameMenuBar = (wxMenuBar *) NULL;
-
- if (m_frameStatusBar) delete m_frameStatusBar;
- m_frameStatusBar = (wxStatusBar *) NULL;
-
- if (m_frameToolBar) delete m_frameToolBar;
- m_frameToolBar = (wxToolBar *) NULL;
-
- wxTopLevelWindows.DeleteObject( this );
-
- if (wxTheApp->GetTopWindow() == this)
- wxTheApp->SetTopWindow( (wxWindow*) NULL );
-
- if (wxTopLevelWindows.Number() == 0)
- wxTheApp->ExitMainLoop();
-}
-
-
-void wxOleControl::DoSetSize( int x, int y, int width, int height, int sizeFlags )
-{
- // ignore
-}
-
-void wxOleControl::DoSetClientSize(int width, int height)
-{
- // ignore
-}
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: wxole.h
-// Purpose: wxOLE
-// Author: Robert Roebling
-// Modified by:
-// Created: 17/8/98
-// RCS-ID: $Id$
-// Copyright: (c) Robert Roebling
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef _WX_OLE_H_
-#define _WX_OLE_H_
-
-#include "wx/defs.h"
-#include "wx/object.h"
-#include "wx/frame.h"
-#include "wx/stream.h"
-
-//-----------------------------------------------------------------------------
-// global data
-//-----------------------------------------------------------------------------
-
-extern const wxChar *wxOleNameStr;
-
-//---------------------------------------------------------------------------
-// classes
-//---------------------------------------------------------------------------
-
-class wxOleServerEnv;
-class wxOleServer;
-class wxOleControl;
-
-//---------------------------------------------------------------------------
-// wxOleServerEnv
-//---------------------------------------------------------------------------
-
-class wxOleServerEnvPrivate;
-
-class wxOleServerEnv : public wxObject
-{
- DECLARE_CLASS(wxOleServerEnv)
-
-public:
-
- wxOleServerEnv( const wxString &name, const wxString &version );
- virtual ~wxOleServerEnv();
-
-private:
-
- wxString m_serverName;
- wxString m_serverVersion;
-
-protected:
- wxOleServerEnvPrivate *m_priv;
-};
-
-//---------------------------------------------------------------------------
-// wxOleServer
-//---------------------------------------------------------------------------
-
-class wxOleServerPrivate;
-
-class wxOleServer : public wxObject
-{
- DECLARE_CLASS(wxOleServer)
-
-public:
-
- wxOleServer( const wxString &id );
- virtual ~wxOleServer();
-
- virtual wxOleControl *CreateOleControl();
-
-private:
-
- wxString m_ID;
-
-protected:
- wxOleServerPrivate *m_priv;
-};
-
-//---------------------------------------------------------------------------
-// wxOleControl
-//---------------------------------------------------------------------------
-
-class wxOleControl : public wxFrame
-{
- DECLARE_CLASS(wxOleControl)
-
-public:
-
- wxOleControl( wxWindowID id, long style = 0, const wxString &name = wxOleNameStr );
- virtual ~wxOleControl();
- bool Create( wxWindowID id, long style = 0, const wxString &name = wxOleNameStr );
-
-protected:
- virtual void DoSetSize(int x, int y,
- int width, int height,
- int sizeFlags = wxSIZE_AUTO);
-
- virtual void DoSetClientSize(int width, int height);
-};
-
-#endif
+++ /dev/null
-/* XPM */\r
-static const char *const mondrian_xpm[] = {\r
-/* columns rows colors chars-per-pixel */\r
-"32 32 6 1",\r
-" c Black",\r
-". c Blue",\r
-"X c #00bf00",\r
-"o c Red",\r
-"O c Yellow",\r
-"+ c Gray100",\r
-/* pixels */\r
-" ",\r
-" oooooo +++++++++++++++++++++++ ",\r
-" oooooo +++++++++++++++++++++++ ",\r
-" oooooo +++++++++++++++++++++++ ",\r
-" oooooo +++++++++++++++++++++++ ",\r
-" oooooo +++++++++++++++++++++++ ",\r
-" oooooo +++++++++++++++++++++++ ",\r
-" oooooo +++++++++++++++++++++++ ",\r
-" ",\r
-" ++++++ ++++++++++++++++++ .... ",\r
-" ++++++ ++++++++++++++++++ .... ",\r
-" ++++++ ++++++++++++++++++ .... ",\r
-" ++++++ ++++++++++++++++++ .... ",\r
-" ++++++ ++++++++++++++++++ .... ",\r
-" ++++++ ++++++++++++++++++ ",\r
-" ++++++ ++++++++++++++++++ ++++ ",\r
-" ++++++ ++++++++++++++++++ ++++ ",\r
-" ++++++ ++++++++++++++++++ ++++ ",\r
-" ++++++ ++++++++++++++++++ ++++ ",\r
-" ++++++ ++++++++++++++++++ ++++ ",\r
-" ++++++ ++++++++++++++++++ ++++ ",\r
-" ++++++ ++++++++++++++++++ ++++ ",\r
-" ++++++ ++++++++++++++++++ ++++ ",\r
-" ++++++ ++++++++++++++++++ ++++ ",\r
-" ++++++ ++++ ",\r
-" ++++++ OOOOOOOOOOOO XXXXX ++++ ",\r
-" ++++++ OOOOOOOOOOOO XXXXX ++++ ",\r
-" ++++++ OOOOOOOOOOOO XXXXX ++++ ",\r
-" ++++++ OOOOOOOOOOOO XXXXX ++++ ",\r
-" ++++++ OOOOOOOOOOOO XXXXX ++++ ",\r
-" ++++++ OOOOOOOOOOOO XXXXX ++++ ",\r
-" "\r
-};\r
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: servlet.cpp
-// Purpose: Minimal wxWindows OLE server sample
-// Author: Robert Roebling
-// Modified by:
-// Created: 20/04/99
-// RCS-ID: $Id$
-// Copyright: (c) Robert Roebling
-// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
- #pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
- #include "wx/wx.h"
-#endif
-
-// For OLE stuff
-#include "wxole.h"
-
-#if defined(__WXGTK__) || defined(__WXMOTIF__)
- #include "mondrian.xpm"
-#endif
-
-//----------------------------------------------------------------------------
-// MyOleControl
-//----------------------------------------------------------------------------
-
-class MyOleControl : public wxOleControl
-{
-public:
-
- MyOleControl();
-
- void OnPaint( wxPaintEvent &event );
-
-private:
- DECLARE_EVENT_TABLE()
-};
-
-//----------------------------------------------------------------------------
-// MyOleServer
-//----------------------------------------------------------------------------
-
-class MyOleServer : public wxOleServer
-{
-public:
-
- MyOleServer() : wxOleServer( "servlet" ) { }
-
- wxOleControl *CreateOleControl() { return new MyOleControl(); }
-};
-
-//----------------------------------------------------------------------------
-// MyApp
-//----------------------------------------------------------------------------
-
-class MyApp : public wxApp
-{
-public:
-
- MyApp();
- virtual ~MyApp();
-
- virtual bool OnInit();
-
- wxOleServerEnv *m_oleEnv;
- MyOleServer *m_oleServer;
-};
-
-//----------------------------------------------------------------------------
-// main
-//----------------------------------------------------------------------------
-
-IMPLEMENT_APP(MyApp)
-
-//----------------------------------------------------------------------------
-// MyApp
-//----------------------------------------------------------------------------
-
-MyApp::MyApp()
-{
-}
-
-MyApp::~MyApp()
-{
- delete m_oleEnv;
- delete m_oleServer;
-}
-
-#include "gtk/gtk.h"
-
-bool MyApp::OnInit()
-{
- m_oleEnv = new wxOleServerEnv( "MyServer", "1.0" );
- m_oleServer = new MyOleServer();
-
- /* how do we get outta here ? */
- for (;;) wxYield();
-
- return TRUE;
-}
-
-//----------------------------------------------------------------------------
-// MyOleControl
-//----------------------------------------------------------------------------
-
-BEGIN_EVENT_TABLE(MyOleControl, wxOleControl)
- EVT_PAINT(MyOleControl::OnPaint)
-END_EVENT_TABLE()
-
-MyOleControl::MyOleControl() :
- wxOleControl( -1 )
-{
- (void)new wxButton( this, -1, "Ole, Ole", wxPoint(5,40), wxSize(120,-1) );
- (void)new wxButton( this, -1, "Greetings", wxPoint(5,70), wxSize(120,-1) );
-}
-
-void MyOleControl::OnPaint( wxPaintEvent &WXUNUSED(event) )
-{
- wxPaintDC dc(this);
- dc.SetFont( wxFont( 24, wxDECORATIVE, wxNORMAL, wxNORMAL, FALSE, "charter" ) );
- dc.DrawText( "wxWidgets rules!", 5, 5 );
-}
-
+++ /dev/null
-[component-factory:servlet]
-type=exe
-repo_id=IDL:GNOME/ComponentFactory:1.0 IDL:GNOME/GenericFactory:1.0
-description=wxOLE test object server factory
-location_info=servlet
-
-[component:servlet]
-type=factory
-repo_id=IDL:Component/servlet:1.0 IDL:GNOME/Component:1.0
-description=wxOLE Test server component
-location_info=component-factory:servlet
-
-
+++ /dev/null
-/////////////////////////////////////////////////////////////////////////////
-// Name: prop.cpp
-// Purpose: Propert sheet classes implementation
-// Author: Julian Smart
-// Modified by:
-// Created: 04/01/98
-// RCS-ID: $Id$
-// Copyright: (c) Julian Smart
-// Licence: wxWindows license
-/////////////////////////////////////////////////////////////////////////////
-
-#ifdef __GNUG__
-#pragma implementation "prop.h"
-#endif
-
-// For compilers that support precompilation, includes "wx/wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#include "wx/wx.h"
-#endif
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-#if wxUSE_IOSTREAMH
-#if defined(__WXMSW__) && !defined(__GNUWIN32__)
-#include <strstrea.h>
-#else
-#include <strstream.h>
-#endif
-#else
-#include <strstream>
-#endif
-
-#include "wx/window.h"
-#include "wx/utils.h"
-#include "wx/list.h"
-#include "prop.h"
-
-IMPLEMENT_DYNAMIC_CLASS(wxPropertyValue, wxObject)
-
-wxPropertyValue::wxPropertyValue(void)
-{
- m_type = wxPropertyValueNull;
- m_next = NULL;
- m_last = NULL;
- m_value.first = NULL;
- m_clientData = NULL;
- m_modifiedFlag = FALSE;
-}
-
-wxPropertyValue::wxPropertyValue(const wxPropertyValue& copyFrom)
-{
- m_modifiedFlag = FALSE;
- Copy((wxPropertyValue& )copyFrom);
-}
-
-wxPropertyValue::wxPropertyValue(const char *val)
-{
- m_modifiedFlag = FALSE;
- m_type = wxPropertyValueString;
-
- m_value.string = copystring(val);
- m_clientData = NULL;
- m_next = NULL;
- m_last = NULL;
-}
-
-wxPropertyValue::wxPropertyValue(const wxString& val)
-{
- m_modifiedFlag = FALSE;
- m_type = wxPropertyValueString;
-
- m_value.string = copystring((const char *)val);
- m_clientData = NULL;
- m_next = NULL;
- m_last = NULL;
-}
-
-wxPropertyValue::wxPropertyValue(long the_integer)
-{
- m_modifiedFlag = FALSE;
- m_type = wxPropertyValueInteger;
- m_value.integer = the_integer;
- m_clientData = NULL;
- m_next = NULL;
-}
-
-wxPropertyValue::wxPropertyValue(bool val)
-{
- m_modifiedFlag = FALSE;
- m_type = wxPropertyValuebool;
- m_value.integer = val;
- m_clientData = NULL;
- m_next = NULL;
-}
-
-wxPropertyValue::wxPropertyValue(float the_real)
-{
- m_modifiedFlag = FALSE;
- m_type = wxPropertyValueReal;
- m_value.real = the_real;
- m_clientData = NULL;
- m_next = NULL;
-}
-
-wxPropertyValue::wxPropertyValue(double the_real)
-{
- m_modifiedFlag = FALSE;
- m_type = wxPropertyValueReal;
- m_value.real = (float)the_real;
- m_clientData = NULL;
- m_next = NULL;
-}
-
-// Pointer versions: we have a pointer to the real C++ value.
-wxPropertyValue::wxPropertyValue(char **val)
-{
- m_modifiedFlag = FALSE;
- m_type = wxPropertyValueStringPtr;
-
- m_value.stringPtr = val;
- m_clientData = NULL;
- m_next = NULL;
- m_last = NULL;
-}
-
-wxPropertyValue::wxPropertyValue(long *val)
-{
- m_modifiedFlag = FALSE;
- m_type = wxPropertyValueIntegerPtr;
- m_value.integerPtr = val;
- m_clientData = NULL;
- m_next = NULL;
-}
-
-wxPropertyValue::wxPropertyValue(bool *val)
-{
- m_modifiedFlag = FALSE;
- m_type = wxPropertyValueboolPtr;
- m_value.boolPtr = val;
- m_clientData = NULL;
- m_next = NULL;
-}
-
-wxPropertyValue::wxPropertyValue(float *val)
-{
- m_modifiedFlag = FALSE;
- m_type = wxPropertyValueRealPtr;
- m_value.realPtr = val;
- m_clientData = NULL;
- m_next = NULL;
-}
-
-wxPropertyValue::wxPropertyValue(wxList *the_list)
-{
- m_modifiedFlag = FALSE;
- m_type = wxPropertyValueList;
- m_clientData = NULL;
- m_last = NULL;
- m_value.first = NULL;
-
- wxNode *node = the_list->First();
- while (node)
- {
- wxPropertyValue *expr = (wxPropertyValue *)node->Data();
- Append(expr);
- node = node->Next();
- }
-
- delete the_list;
-}
-
-wxPropertyValue::wxPropertyValue(wxStringList *the_list)
-{
- m_modifiedFlag = FALSE;
- m_type = wxPropertyValueList;
- m_clientData = NULL;
- m_last = NULL;
- m_value.first = NULL;
-
- wxNode *node = the_list->First();
- while (node)
- {
- char *s = (char *)node->Data();
- Append(new wxPropertyValue(s));
- node = node->Next();
- }
- delete the_list;
-}
-
-wxPropertyValue::~wxPropertyValue(void)
-{
- switch (m_type)
- {
- case wxPropertyValueInteger:
- case wxPropertyValuebool:
- case wxPropertyValueReal:
- {
- break;
- }
- case wxPropertyValueString:
- {
- delete[] m_value.string;
- break;
- }
- case wxPropertyValueList:
- {
- wxPropertyValue *expr = m_value.first;
- while (expr)
- {
- wxPropertyValue *expr1 = expr->m_next;
-
- delete expr;
- expr = expr1;
- }
- break;
- }
- default:
- case wxPropertyValueNull: break;
- }
-}
-
-void wxPropertyValue::Append(wxPropertyValue *expr)
-{
- m_modifiedFlag = TRUE;
- if (!m_value.first)
- m_value.first = expr;
-
- if (m_last)
- m_last->m_next = expr;
- m_last = expr;
-}
-
-void wxPropertyValue::Insert(wxPropertyValue *expr)
-{
- m_modifiedFlag = TRUE;
- expr->m_next = m_value.first;
- m_value.first = expr;
-
- if (!m_last)
- m_last = expr;
-}
-
-// Delete from list
-void wxPropertyValue::Delete(wxPropertyValue *node)
-{
- wxPropertyValue *expr = GetFirst();
-
- wxPropertyValue *previous = NULL;
- while (expr && (expr != node))
- {
- previous = expr;
- expr = expr->GetNext();
- }
-
- if (expr)
- {
- if (previous)
- previous->m_next = expr->m_next;
-
- // If node was the first in the list,
- // make the list point to the NEXT one.
- if (GetFirst() == expr)
- {
- m_value.first = expr->m_next;
- }
-
- // If node was the last in the list,
- // make the list 'last' pointer point to the PREVIOUS one.
- if (GetLast() == expr)
- {
- if (previous)
- m_last = previous;
- else
- m_last = NULL;
- }
- m_modifiedFlag = TRUE;
- delete expr;
- }
-
-}
-
-void wxPropertyValue::ClearList(void)
-{
- wxPropertyValue *val = GetFirst();
- if (val)
- m_modifiedFlag = TRUE;
-
- while (val)
- {
- wxPropertyValue *next = val->GetNext();
- delete val;
- val = next;
- }
- m_value.first = NULL;
- m_last = NULL;
-}
-
-wxPropertyValue *wxPropertyValue::NewCopy(void) const
-{
- switch (m_type)
- {
- case wxPropertyValueInteger:
- return new wxPropertyValue(m_value.integer);
- case wxPropertyValuebool:
- return new wxPropertyValue((bool) (m_value.integer != 0));
- case wxPropertyValueReal:
- return new wxPropertyValue(m_value.real);
- case wxPropertyValueString:
- return new wxPropertyValue(m_value.string);
- case wxPropertyValueList:
- {
- wxPropertyValue *expr = m_value.first;
- wxPropertyValue *new_list = new wxPropertyValue;
- new_list->SetType(wxPropertyValueList);
- while (expr)
- {
- wxPropertyValue *expr2 = expr->NewCopy();
- new_list->Append(expr2);
- expr = expr->m_next;
- }
- return new_list;
- }
- case wxPropertyValueIntegerPtr:
- return new wxPropertyValue(m_value.integerPtr);
- case wxPropertyValueRealPtr:
- return new wxPropertyValue(m_value.realPtr);
- case wxPropertyValueboolPtr:
- return new wxPropertyValue(m_value.boolPtr);
- case wxPropertyValueStringPtr:
- return new wxPropertyValue(m_value.stringPtr);
-
- case wxPropertyValueNull:
-#ifdef __X__
- cerr << "Should never get here!\n";
-#endif
- break;
- }
- return NULL;
-}
-
-void wxPropertyValue::Copy(wxPropertyValue& copyFrom)
-{
- m_type = copyFrom.Type();
-
- switch (m_type)
- {
- case wxPropertyValueInteger:
- (*this) = copyFrom.IntegerValue();
- return ;
-
- case wxPropertyValueReal:
- (*this) = copyFrom.RealValue();
- return ;
-
- case wxPropertyValueString:
- (*this) = wxString(copyFrom.StringValue());
- return ;
-
- case wxPropertyValuebool:
- (*this) = copyFrom.BoolValue();
- return ;
-
- // Pointers
- case wxPropertyValueboolPtr:
- (*this) = copyFrom.BoolValuePtr();
- return ;
- case wxPropertyValueRealPtr:
- (*this) = copyFrom.RealValuePtr();
- return ;
- case wxPropertyValueIntegerPtr:
- (*this) = copyFrom.IntegerValuePtr();
- return ;
- case wxPropertyValueStringPtr:
- {
- char** s = copyFrom.StringValuePtr();
- (*this) = s != 0;
- return ;
- }
-
- case wxPropertyValueList:
- {
- m_value.first = NULL;
- m_next = NULL;
- m_last = NULL;
- wxPropertyValue *expr = copyFrom.m_value.first;
- while (expr)
- {
- wxPropertyValue *expr2 = expr->NewCopy();
- Append(expr2);
- expr = expr->m_next;
- }
- return;
- }
- case wxPropertyValueNull:
-#ifdef __X__
- cerr << "Should never get here!\n";
-#endif
- break;
- }
-}
-
-// Return nth argument of a clause (starting from 1)
-wxPropertyValue *wxPropertyValue::Arg(wxPropertyValueType type, int arg) const
-{
- wxPropertyValue *expr = m_value.first;
- for (int i = 1; i < arg; i++)
- if (expr)
- expr = expr->m_next;
-
- if (expr && (expr->m_type == type))
- return expr;
- else
- return NULL;
-}
-
-// Return nth argument of a list expression (starting from zero)
-wxPropertyValue *wxPropertyValue::Nth(int arg) const
-{
- if (m_type != wxPropertyValueList)
- return NULL;
-
- wxPropertyValue *expr = m_value.first;
- for (int i = 0; i < arg; i++)
- if (expr)
- expr = expr->m_next;
- else return NULL;
-
- if (expr)
- return expr;
- else
- return NULL;
-}
-
- // Returns the number of elements in a list expression
-int wxPropertyValue::Number(void) const
-{
- if (m_type != wxPropertyValueList)
- return 0;
-
- int i = 0;
- wxPropertyValue *expr = m_value.first;
- while (expr)
- {
- expr = expr->m_next;
- i ++;
- }
- return i;
-}
-
-void wxPropertyValue::WritePropertyClause(ostream& stream) // Write this expression as a top-level clause
-{
- if (m_type != wxPropertyValueList)
- return;
-
- wxPropertyValue *node = m_value.first;
- if (node)
- {
- node->WritePropertyType(stream);
- stream << "(";
- node = node->m_next;
- bool first = TRUE;
- while (node)
- {
- if (!first)
- stream << " ";
- node->WritePropertyType(stream);
- node = node->m_next;
- if (node) stream << ",\n";
- first = FALSE;
- }
- stream << ").\n\n";
- }
-}
-
-void wxPropertyValue::WritePropertyType(ostream& stream) // Write as any other subexpression
-{
- switch (m_type)
- {
- case wxPropertyValueInteger:
- {
- stream << m_value.integer;
- break;
- }
- case wxPropertyValueIntegerPtr:
- {
- stream << *m_value.integerPtr;
- break;
- }
- case wxPropertyValuebool:
- {
- if (m_value.integer)
- stream << "True";
- else
- stream << "False";
- break;
- }
- case wxPropertyValueboolPtr:
- {
- if (*m_value.integerPtr)
- stream << "True";
- else
- stream << "False";
- break;
- }
- case wxPropertyValueReal:
- {
- float f = m_value.real;
- sprintf(wxBuffer, "%.6g", (double)f);
- stream << wxBuffer;
- break;
- }
- case wxPropertyValueRealPtr:
- {
- float f = *m_value.realPtr;
-/* Now the parser can cope with this.
- // Prevent printing in 'e' notation. Any better way?
- if (fabs(f) < 0.00001)
- f = 0.0;
-*/
- sprintf(wxBuffer, "%.6g", f);
- stream << wxBuffer;
- break;
- }
- case wxPropertyValueString:
- {
-// stream << "\"";
- int i;
- int len = strlen(m_value.string);
- for (i = 0; i < len; i++)
- {
- char ch = m_value.string[i];
-// if (ch == '"' || ch == '\\')
-// stream << "\\";
- stream << ch;
- }
-
-// stream << "\"";
- break;
- }
- case wxPropertyValueStringPtr:
- {
- int i;
- int len = strlen(*(m_value.stringPtr));
- for (i = 0; i < len; i++)
- {
- char ch = *(m_value.stringPtr)[i];
-
- }
- break;
- }
- case wxPropertyValueList:
- {
- if (!m_value.first)
- stream << "[]";
- else
- {
- wxPropertyValue *expr = m_value.first;
-
- stream << "[";
- while (expr)
- {
- expr->WritePropertyType(stream);
- expr = expr->m_next;
- if (expr) stream << ", ";
- }
- stream << "]";
- }
- break;
- }
- case wxPropertyValueNull: break;
- }
-}
-
-wxString wxPropertyValue::GetStringRepresentation(void)
-{
- char buf[500];
- buf[0] = 0;
-
- ostrstream str((char *)buf, (int)500, ios::out);
- WritePropertyType(str);
- str << '\0';
- str.flush();
-
- wxString theString(buf);
- return theString;
-}
-
-void wxPropertyValue::operator=(const wxPropertyValue& val)
-{
- m_modifiedFlag = TRUE;
- Copy((wxPropertyValue&)val);
-}
-
-// void wxPropertyValue::operator=(const char *val)
-void wxPropertyValue::operator=(const wxString& val1)
-{
- const char *val = (const char *)val1;
-
- m_modifiedFlag = TRUE;
- if (m_type == wxPropertyValueNull)
- m_type = wxPropertyValueString;
-
- if (m_type == wxPropertyValueString)
- {
- if (val)
- m_value.string = copystring(val);
- else
- m_value.string = NULL;
- }
- else if (m_type == wxPropertyValueStringPtr)
- {
- if (*m_value.stringPtr)
- delete[] *m_value.stringPtr;
- if (val)
- *m_value.stringPtr = copystring(val);
- else
- *m_value.stringPtr = NULL;
- }
-
- m_clientData = NULL;
- m_next = NULL;
- m_last = NULL;
-
-}
-
-void wxPropertyValue::operator=(const long val)
-{
- m_modifiedFlag = TRUE;
- if (m_type == wxPropertyValueNull)
- m_type = wxPropertyValueInteger;
-
- if (m_type == wxPropertyValueInteger)
- m_value.integer = val;
- else if (m_type == wxPropertyValueIntegerPtr)
- *m_value.integerPtr = val;
- else if (m_type == wxPropertyValueReal)
- m_value.real = (float)val;
- else if (m_type == wxPropertyValueRealPtr)
- *m_value.realPtr = (float)val;
-
- m_clientData = NULL;
- m_next = NULL;
-}
-
-void wxPropertyValue::operator=(const bool val)
-{
- m_modifiedFlag = TRUE;
- if (m_type == wxPropertyValueNull)
- m_type = wxPropertyValuebool;
-
- if (m_type == wxPropertyValuebool)
- m_value.integer = (long)val;
- else if (m_type == wxPropertyValueboolPtr)
- *m_value.boolPtr = val;
-
- m_clientData = NULL;
- m_next = NULL;
-}
-
-void wxPropertyValue::operator=(const float val)
-{
- m_modifiedFlag = TRUE;
- if (m_type == wxPropertyValueNull)
- m_type = wxPropertyValueReal;
-
- if (m_type == wxPropertyValueInteger)
- m_value.integer = (long)val;
- else if (m_type == wxPropertyValueIntegerPtr)
- *m_value.integerPtr = (long)val;
- else if (m_type == wxPropertyValueReal)
- m_value.real = val;
- else if (m_type == wxPropertyValueRealPtr)
- *m_value.realPtr = val;
-
- m_clientData = NULL;
- m_next = NULL;
-}
-
-void wxPropertyValue::operator=(const char **val)
-{
- m_modifiedFlag = TRUE;
- m_type = wxPropertyValueStringPtr;
-
- if (val)
- m_value.stringPtr = (char **)val;
- else
- m_value.stringPtr = NULL;
- m_clientData = NULL;
- m_next = NULL;
- m_last = NULL;
-
-}
-
-void wxPropertyValue::operator=(const long *val)
-{
- m_modifiedFlag = TRUE;
- m_type = wxPropertyValueIntegerPtr;
- m_value.integerPtr = (long *)val;
- m_clientData = NULL;
- m_next = NULL;
-}
-
-void wxPropertyValue::operator=(const bool *val)
-{
- m_modifiedFlag = TRUE;
- m_type = wxPropertyValueboolPtr;
- m_value.boolPtr = (bool *)val;
- m_clientData = NULL;
- m_next = NULL;
-}
-
-void wxPropertyValue::operator=(const float *val)
-{
- m_modifiedFlag = TRUE;
- m_type = wxPropertyValueRealPtr;
- m_value.realPtr = (float *)val;
- m_clientData = NULL;
- m_next = NULL;
-}
-
-long wxPropertyValue::IntegerValue(void) const
- {
- if (m_type == wxPropertyValueInteger)
- return m_value.integer;
- else if (m_type == wxPropertyValueReal)
- return (long)m_value.real;
- else if (m_type == wxPropertyValueIntegerPtr)
- return *m_value.integerPtr;
- else if (m_type == wxPropertyValueRealPtr)
- return (long)(*m_value.realPtr);
- else return 0;
- }
-
-long *wxPropertyValue::IntegerValuePtr(void) const
-{
- return m_value.integerPtr;
-}
-
-float wxPropertyValue::RealValue(void) const {
- if (m_type == wxPropertyValueReal)
- return m_value.real;
- else if (m_type == wxPropertyValueRealPtr)
- return *m_value.realPtr;
- else if (m_type == wxPropertyValueInteger)
- return (float)m_value.integer;
- else if (m_type == wxPropertyValueIntegerPtr)
- return (float)*(m_value.integerPtr);
- else return 0.0;
- }
-
-float *wxPropertyValue::RealValuePtr(void) const
-{
- return m_value.realPtr;
-}
-
-bool wxPropertyValue::BoolValue(void) const {
- if (m_type == wxPropertyValueReal)
- return (m_value.real != 0.0);
- if (m_type == wxPropertyValueRealPtr)
- return (*(m_value.realPtr) != 0.0);
- else if (m_type == wxPropertyValueInteger)
- return (m_value.integer != 0);
- else if (m_type == wxPropertyValueIntegerPtr)
- return (*(m_value.integerPtr) != 0);
- else if (m_type == wxPropertyValuebool)
- return (m_value.integer != 0);
- else if (m_type == wxPropertyValueboolPtr)
- return (*(m_value.boolPtr) != 0);
- else return FALSE;
- }
-
-bool *wxPropertyValue::BoolValuePtr(void) const
-{
- return m_value.boolPtr;
-}
-
-char *wxPropertyValue::StringValue(void) const {
- if (m_type == wxPropertyValueString)
- return m_value.string;
- else if (m_type == wxPropertyValueStringPtr)
- return *(m_value.stringPtr);
- else return NULL;
- }
-
-char **wxPropertyValue::StringValuePtr(void) const
-{
- return m_value.stringPtr;
-}
-
-/*
- * A property (name plus value)
- */
-
-IMPLEMENT_DYNAMIC_CLASS(wxProperty, wxObject)
-
-wxProperty::wxProperty(void)
-{
- m_propertyRole = (char *)NULL;
- m_propertyValidator = NULL;
- m_propertyWindow = NULL;
- m_enabled = TRUE;
-}
-
-wxProperty::wxProperty(wxProperty& copyFrom)
-{
- m_value = copyFrom.GetValue();
- m_name = copyFrom.GetName();
- m_propertyRole = copyFrom.GetRole();
- m_propertyValidator = copyFrom.GetValidator();
- m_enabled = copyFrom.IsEnabled();
- m_propertyWindow = NULL;
-}
-
-wxProperty::wxProperty(wxString nm, wxString role, wxPropertyValidator *ed):m_name(nm), m_propertyRole(role)
-{
- m_propertyValidator = ed;
- m_propertyWindow = NULL;
- m_enabled = TRUE;
-}
-
-wxProperty::wxProperty(wxString nm, const wxPropertyValue& val, wxString role, wxPropertyValidator *ed):
- m_name(nm), m_value(val), m_propertyRole(role)
-{
- m_propertyValidator = ed;
- m_propertyWindow = NULL;
- m_enabled = TRUE;
-}
-
-wxProperty::~wxProperty(void)
-{
- if (m_propertyValidator)
- delete m_propertyValidator;
-}
-
-wxPropertyValue& wxProperty::GetValue(void) const
-{
- return (wxPropertyValue&) m_value;
-}
-
-wxPropertyValidator *wxProperty::GetValidator(void) const
-{
- return m_propertyValidator;
-}
-
-wxString& wxProperty::GetName(void) const
-{
- return (wxString&) m_name;
-}
-
-wxString& wxProperty::GetRole(void) const
-{
- return (wxString&) m_propertyRole;
-}
-
-void wxProperty::SetValue(const wxPropertyValue& val)
-{
- m_value = val;
-}
-
-void wxProperty::SetValidator(wxPropertyValidator *ed)
-{
- m_propertyValidator = ed;
-}
-
-void wxProperty::SetRole(wxString& role)
-{
- m_propertyRole = role;
-}
-
-void wxProperty::SetName(wxString& nm)
-{
- m_name = nm;
-}
-
-void wxProperty::operator=(const wxPropertyValue& val)
-{
- m_value = val;
-}
-
-/*
- * Base property view class
- */
-
-IMPLEMENT_DYNAMIC_CLASS(wxPropertyView, wxEvtHandler)
-
-wxPropertyView::wxPropertyView(long flags)
-{
- m_buttonFlags = flags;
- m_propertySheet = NULL;
- m_currentValidator = NULL;
- m_currentProperty = NULL;
-}
-
-wxPropertyView::~wxPropertyView(void)
-{
-}
-
-void wxPropertyView::AddRegistry(wxPropertyValidatorRegistry *registry)
-{
- m_validatorRegistryList.Append(registry);
-}
-
-wxPropertyValidator *wxPropertyView::FindPropertyValidator(wxProperty *property)
-{
- if (property->GetValidator())
- return property->GetValidator();
-
- wxNode *node = m_validatorRegistryList.First();
- while (node)
- {
- wxPropertyValidatorRegistry *registry = (wxPropertyValidatorRegistry *)node->Data();
- wxPropertyValidator *validator = registry->GetValidator(property->GetRole());
- if (validator)
- return validator;
- node = node->Next();
- }
- return NULL;
-/*
- if (!wxDefaultPropertyValidator)
- wxDefaultPropertyValidator = new wxPropertyListValidator;
- return wxDefaultPropertyValidator;
-*/
-}
-
-/*
- * Property sheet
- */
-
-IMPLEMENT_DYNAMIC_CLASS(wxPropertySheet, wxObject)
-
-wxPropertySheet::wxPropertySheet(void):m_properties(wxKEY_STRING)
-{
-}
-
-wxPropertySheet::~wxPropertySheet(void)
-{
- Clear();
-}
-
-bool wxPropertySheet::Save( ostream& WXUNUSED(str) )
-{
- return FALSE;
-}
-
-bool wxPropertySheet::Load( ostream& WXUNUSED(str) )
-{
- return FALSE;
-}
-
-void wxPropertySheet::UpdateAllViews( wxPropertyView *WXUNUSED(thisView) )
-{
-}
-
-// Add a property
-void wxPropertySheet::AddProperty(wxProperty *property)
-{
- m_properties.Append((const char*) property->GetName(), property);
-}
-
-// Get property by name
-wxProperty *wxPropertySheet::GetProperty(wxString name)
-{
- wxNode *node = m_properties.Find((const char*) name);
- if (!node)
- return NULL;
- else
- return (wxProperty *)node->Data();
-}
-
-// Clear all properties
-void wxPropertySheet::Clear(void)
-{
- wxNode *node = m_properties.First();
- while (node)
- {
- wxProperty *prop = (wxProperty *)node->Data();
- wxNode *next = node->Next();
- delete prop;
- delete node;
- node = next;
- }
-}
-
-// Sets/clears the modified flag for each property value
-void wxPropertySheet::SetAllModified(bool flag)
-{
- wxNode *node = m_properties.First();
- while (node)
- {
- wxProperty *prop = (wxProperty *)node->Data();
- prop->GetValue().SetModified(flag);
- node = node->Next();
- }
-}
-
-/*
- * Property validator registry
- *
- */
-
-IMPLEMENT_DYNAMIC_CLASS(wxPropertyValidatorRegistry, wxHashTable)
-
-wxPropertyValidatorRegistry::wxPropertyValidatorRegistry(void):wxHashTable(wxKEY_STRING)
-{
-}
-
-wxPropertyValidatorRegistry::~wxPropertyValidatorRegistry(void)
-{
- ClearRegistry();
-}
-
-void wxPropertyValidatorRegistry::RegisterValidator(const wxString& typeName, wxPropertyValidator *validator)
-{
- Put((const char*) typeName, validator);
-}
-
-wxPropertyValidator *wxPropertyValidatorRegistry::GetValidator(const wxString& typeName)
-{
- return (wxPropertyValidator *)Get((const char*) typeName);
-}
-
-void wxPropertyValidatorRegistry::ClearRegistry(void)
-{
- BeginFind();
- wxNode *node;
- while (node = Next())
- {
- delete (wxPropertyValidator *)node->Data();
- }
-}
-
- /*
- * Property validator
- */
-
-
-IMPLEMENT_ABSTRACT_CLASS(wxPropertyValidator, wxEvtHandler)
-
-wxPropertyValidator::wxPropertyValidator(long flags)
-{
- m_validatorFlags = flags;
- m_validatorProperty = NULL;
-}
-
-wxPropertyValidator::~wxPropertyValidator(void)
-{}
-
-bool wxPropertyValidator::StringToFloat (char *s, float *number) {
- double num;
- bool ok = StringToDouble (s, &num);
- *number = (float) num;
- return ok;
-}
-
-bool wxPropertyValidator::StringToDouble (char *s, double *number) {
- bool ok = TRUE;
- char *value_ptr;
- *number = strtod (s, &value_ptr);
- if (value_ptr) {
- int len = strlen (value_ptr);
- for (int i = 0; i < len; i++) {
- ok = (isspace (value_ptr[i]) != 0);
- if (!ok) return FALSE;
- }
- }
- return ok;
-}
-
-bool wxPropertyValidator::StringToInt (char *s, int *number) {
- long num;
- bool ok = StringToLong (s, &num);
- *number = (int) num;
- return ok;
-}
-
-bool wxPropertyValidator::StringToLong (char *s, long *number) {
- bool ok = TRUE;
- char *value_ptr;
- *number = strtol (s, &value_ptr, 10);
- if (value_ptr) {
- int len = strlen (value_ptr);
- for (int i = 0; i < len; i++) {
- ok = (isspace (value_ptr[i]) != 0);
- if (!ok) return FALSE;
- }
- }
- return ok;
-}
-
-char *wxPropertyValidator::FloatToString (float number) {
- static char buf[20];
- sprintf (buf, "%.6g", number);
- return buf;
-}
-
-char *wxPropertyValidator::DoubleToString (double number) {
- static char buf[20];
- sprintf (buf, "%.6g", number);
- return buf;
-}
-
-char *wxPropertyValidator::IntToString (int number) {
- return ::IntToString (number);
-}
-
-char *wxPropertyValidator::LongToString (long number) {
- return ::LongToString (number);
- }
-
-