removed old utils (helpgen, tex2rtf, helphtml, nplugin, wxprop, wxole)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
9
configure
vendored
9
configure
vendored
@@ -1,5 +1,5 @@
|
||||
#! /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.
|
||||
#
|
||||
@@ -50315,7 +50315,7 @@ for subdir in $SUBDIRS; do
|
||||
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
|
||||
@@ -50324,10 +50324,9 @@ for subdir in $SUBDIRS; do
|
||||
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
|
||||
|
||||
@@ -7905,8 +7905,7 @@ for subdir in $SUBDIRS; do
|
||||
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
|
||||
@@ -7918,10 +7917,9 @@ for subdir in $SUBDIRS; do
|
||||
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
|
||||
|
||||
@@ -22,11 +22,9 @@ see the wxWidgets download page: http://www.wxwidgets.org/downloads
|
||||
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
|
||||
|
||||
|
||||
@@ -43,15 +41,6 @@ Xnest-based display emulator for X11-based PDA applications.
|
||||
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.
|
||||
@@ -85,17 +74,6 @@ to do the comparisons.
|
||||
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,
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
|
||||
all:
|
||||
cd src; $(MAKE)
|
||||
|
||||
clean:
|
||||
cd src; $(MAKE) clean
|
||||
|
||||
@@ -1,471 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="HelpGen" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=HelpGen - Win32 DLL Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "helpgen.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "helpgen.mak" CFG="HelpGen - Win32 DLL Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "HelpGen - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 Unicode Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 Unicode Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 Universal Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 Universal Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 Universal Unicode Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 Universal Unicode Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 DLL Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 DLL Unicode Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 DLL Unicode Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 DLL Universal Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 DLL Universal Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 DLL Universal Unicode Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 DLL Universal Unicode Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "HelpGen - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswd"
|
||||
# PROP BASE Intermediate_Dir "vc_mswd\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswd"
|
||||
# PROP Intermediate_Dir "vc_mswd\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# ADD BASE RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswd" /i "." /d _CONSOLE
|
||||
# ADD RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswd" /i "." /d _CONSOLE
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "vc_msw"
|
||||
# PROP BASE Intermediate_Dir "vc_msw\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "vc_msw"
|
||||
# PROP Intermediate_Dir "vc_msw\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# ADD BASE RSC /l 0x405 /d "__WXMSW__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\msw" /i "." /d _CONSOLE
|
||||
# ADD RSC /l 0x405 /d "__WXMSW__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\msw" /i "." /d _CONSOLE
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 Unicode Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswud"
|
||||
# PROP BASE Intermediate_Dir "vc_mswud\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswud"
|
||||
# PROP Intermediate_Dir "vc_mswud\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# ADD BASE RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswud" /i "." /d _CONSOLE
|
||||
# ADD RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswud" /i "." /d _CONSOLE
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 Unicode Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "vc_mswu"
|
||||
# PROP BASE Intermediate_Dir "vc_mswu\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "vc_mswu"
|
||||
# PROP Intermediate_Dir "vc_mswu\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# ADD BASE RSC /l 0x405 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswu" /i "." /d _CONSOLE
|
||||
# ADD RSC /l 0x405 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswu" /i "." /d _CONSOLE
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 Universal Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswunivd"
|
||||
# PROP BASE Intermediate_Dir "vc_mswunivd\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswunivd"
|
||||
# PROP Intermediate_Dir "vc_mswunivd\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# ADD BASE RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswunivd" /i "." /d _CONSOLE
|
||||
# ADD RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswunivd" /i "." /d _CONSOLE
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 Universal Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "vc_mswuniv"
|
||||
# PROP BASE Intermediate_Dir "vc_mswuniv\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "vc_mswuniv"
|
||||
# PROP Intermediate_Dir "vc_mswuniv\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# ADD BASE RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswuniv" /i "." /d _CONSOLE
|
||||
# ADD RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswuniv" /i "." /d _CONSOLE
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 Universal Unicode Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswunivud"
|
||||
# PROP BASE Intermediate_Dir "vc_mswunivud\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswunivud"
|
||||
# PROP Intermediate_Dir "vc_mswunivud\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# ADD RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswunivud" /i "." /d _CONSOLE
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 Universal Unicode Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "vc_mswunivu"
|
||||
# PROP BASE Intermediate_Dir "vc_mswunivu\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "vc_mswunivu"
|
||||
# PROP Intermediate_Dir "vc_mswunivu\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# ADD BASE RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswunivu" /i "." /d _CONSOLE
|
||||
# ADD RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_lib\mswunivu" /i "." /d _CONSOLE
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswddll"
|
||||
# PROP BASE Intermediate_Dir "vc_mswddll\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswddll"
|
||||
# PROP Intermediate_Dir "vc_mswddll\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# ADD BASE RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswd" /i "." /d "WXUSINGDLL" /d _CONSOLE
|
||||
# ADD RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswd" /i "." /d "WXUSINGDLL" /d _CONSOLE
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "vc_mswdll"
|
||||
# PROP BASE Intermediate_Dir "vc_mswdll\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "vc_mswdll"
|
||||
# PROP Intermediate_Dir "vc_mswdll\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# ADD BASE RSC /l 0x405 /d "__WXMSW__" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\msw" /i "." /d "WXUSINGDLL" /d _CONSOLE
|
||||
# ADD RSC /l 0x405 /d "__WXMSW__" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\msw" /i "." /d "WXUSINGDLL" /d _CONSOLE
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Unicode Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswuddll"
|
||||
# PROP BASE Intermediate_Dir "vc_mswuddll\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswuddll"
|
||||
# PROP Intermediate_Dir "vc_mswuddll\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# ADD RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXDEBUG__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswud" /i "." /d "WXUSINGDLL" /d _CONSOLE
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Unicode Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "vc_mswudll"
|
||||
# PROP BASE Intermediate_Dir "vc_mswudll\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "vc_mswudll"
|
||||
# PROP Intermediate_Dir "vc_mswudll\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# ADD BASE RSC /l 0x405 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswu" /i "." /d "WXUSINGDLL" /d _CONSOLE
|
||||
# ADD RSC /l 0x405 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswu" /i "." /d "WXUSINGDLL" /d _CONSOLE
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Universal Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswunivddll"
|
||||
# PROP BASE Intermediate_Dir "vc_mswunivddll\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswunivddll"
|
||||
# PROP Intermediate_Dir "vc_mswunivddll\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# ADD RSC /l 0x405 /d "_DEBUG" /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "__WXDEBUG__" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswunivd" /i "." /d "WXUSINGDLL" /d _CONSOLE
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Universal Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "vc_mswunivdll"
|
||||
# PROP BASE Intermediate_Dir "vc_mswunivdll\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "vc_mswunivdll"
|
||||
# PROP Intermediate_Dir "vc_mswunivdll\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# ADD BASE RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswuniv" /i "." /d "WXUSINGDLL" /d _CONSOLE
|
||||
# ADD RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswuniv" /i "." /d "WXUSINGDLL" /d _CONSOLE
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Universal Unicode Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswunivuddll"
|
||||
# PROP BASE Intermediate_Dir "vc_mswunivuddll\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswunivuddll"
|
||||
# PROP Intermediate_Dir "vc_mswunivuddll\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Universal Unicode Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "vc_mswunivudll"
|
||||
# PROP BASE Intermediate_Dir "vc_mswunivudll\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "vc_mswunivudll"
|
||||
# PROP Intermediate_Dir "vc_mswunivudll\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# ADD BASE RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswunivu" /i "." /d "WXUSINGDLL" /d _CONSOLE
|
||||
# ADD RSC /l 0x405 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\include" /i ".\..\..\lib\vc_dll\mswunivu" /i "." /d "WXUSINGDLL" /d _CONSOLE
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "HelpGen - Win32 Debug"
|
||||
# Name "HelpGen - Win32 Release"
|
||||
# Name "HelpGen - Win32 Unicode Debug"
|
||||
# Name "HelpGen - Win32 Unicode Release"
|
||||
# Name "HelpGen - Win32 Universal Debug"
|
||||
# Name "HelpGen - Win32 Universal Release"
|
||||
# Name "HelpGen - Win32 Universal Unicode Debug"
|
||||
# Name "HelpGen - Win32 Universal Unicode Release"
|
||||
# Name "HelpGen - Win32 DLL Debug"
|
||||
# Name "HelpGen - Win32 DLL Release"
|
||||
# Name "HelpGen - Win32 DLL Unicode Debug"
|
||||
# Name "HelpGen - Win32 DLL Unicode Release"
|
||||
# Name "HelpGen - Win32 DLL Universal Debug"
|
||||
# Name "HelpGen - Win32 DLL Universal Release"
|
||||
# Name "HelpGen - Win32 DLL Universal Unicode Debug"
|
||||
# Name "HelpGen - Win32 DLL Universal Unicode Release"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\HelpGen.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\cjparser.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\docripper.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\ifcontext.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\markup.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\scriptbinder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\sourcepainter.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\src\srcparser.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
|
||||
@@ -1,181 +0,0 @@
|
||||
# =========================================================================
|
||||
# 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
|
||||
@@ -1,166 +0,0 @@
|
||||
# =========================================================================
|
||||
# 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
|
||||
@@ -1,219 +0,0 @@
|
||||
# =========================================================================
|
||||
# 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
|
||||
@@ -1,225 +0,0 @@
|
||||
# =========================================================================
|
||||
# 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
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -1,139 +0,0 @@
|
||||
# =========================================================================
|
||||
# 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
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,130 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
@@ -1,559 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
@@ -1,23 +0,0 @@
|
||||
<?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>
|
||||
@@ -1,271 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="helpgen" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=HelpGen - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "helpgen.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "helpgen.mak" CFG="HelpGen - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "HelpGen - Win32 DLL Universal Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 DLL Universal Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 DLL Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 Universal Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 Universal Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "HelpGen - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "HelpGen - Win32 DLL Universal Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswunivudll"
|
||||
# PROP BASE Intermediate_Dir "vc_mswunivudll\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswunivudll"
|
||||
# PROP Intermediate_Dir "vc_mswunivudll\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Universal Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswunivuddll"
|
||||
# PROP BASE Intermediate_Dir "vc_mswunivuddll\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswunivuddll"
|
||||
# PROP Intermediate_Dir "vc_mswunivuddll\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswudll"
|
||||
# PROP BASE Intermediate_Dir "vc_mswudll\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswudll"
|
||||
# PROP Intermediate_Dir "vc_mswudll\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\..\lib\vc_dll\mswu" /i ".\..\..\..\include" /i "." /d "WXUSINGDLL" /d "_CONSOLE" /d wxUSE_GUI=0
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 DLL Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswuddll"
|
||||
# PROP BASE Intermediate_Dir "vc_mswuddll\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswuddll"
|
||||
# PROP Intermediate_Dir "vc_mswuddll\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 Universal Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswunivu"
|
||||
# PROP BASE Intermediate_Dir "vc_mswunivu\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswunivu"
|
||||
# PROP Intermediate_Dir "vc_mswunivu\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# ADD RSC /l 0x409 /d "__WXMSW__" /d "__WXUNIVERSAL__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswunivu" /i ".\..\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 Universal Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswunivud"
|
||||
# PROP BASE Intermediate_Dir "vc_mswunivud\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswunivud"
|
||||
# PROP Intermediate_Dir "vc_mswunivud\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswu"
|
||||
# PROP BASE Intermediate_Dir "vc_mswu\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswu"
|
||||
# PROP Intermediate_Dir "vc_mswu\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# ADD BASE RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswu" /i ".\..\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0
|
||||
# ADD RSC /l 0x409 /d "__WXMSW__" /d "_UNICODE" /i ".\..\..\..\lib\vc_lib\mswu" /i ".\..\..\..\include" /i "." /d "_CONSOLE" /d wxUSE_GUI=0
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ELSEIF "$(CFG)" == "HelpGen - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "vc_mswud"
|
||||
# PROP BASE Intermediate_Dir "vc_mswud\HelpGen"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "vc_mswud"
|
||||
# PROP Intermediate_Dir "vc_mswud\HelpGen"
|
||||
# PROP Target_Dir ""
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# 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
|
||||
# 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
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "HelpGen - Win32 DLL Universal Release"
|
||||
# Name "HelpGen - Win32 DLL Universal Debug"
|
||||
# Name "HelpGen - Win32 DLL Release"
|
||||
# Name "HelpGen - Win32 DLL Debug"
|
||||
# Name "HelpGen - Win32 Universal Release"
|
||||
# Name "HelpGen - Win32 Universal Debug"
|
||||
# Name "HelpGen - Win32 Release"
|
||||
# Name "HelpGen - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\HelpGen.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cjparser.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\docripper.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ifcontext.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\markup.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\scriptbinder.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\sourcepainter.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\srcparser.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
|
||||
@@ -1,650 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
|
||||
This makefile was generated by
|
||||
Bakefile 0.2.3 (http://www.bakefile.org)
|
||||
Do not modify, all changes will be overwritten!
|
||||
|
||||
-->
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="HelpGen"
|
||||
ProjectGUID="{C7F52383-60B2-5A7E-A909-145DA57B5577}">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="DLL Universal Release|Win32"
|
||||
OutputDirectory="vc_mswunivudll"
|
||||
IntermediateDirectory="vc_mswunivudll\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivu;.\..\..\..\include;."
|
||||
MinimalRebuild="false"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="2"
|
||||
PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswunivudll\HelpGen\"
|
||||
ObjectFile="vc_mswunivudll\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswunivudll\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivu;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswunivudll\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswunivudll\HelpGen.pdb"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswunivudll\helpgen_vc7.bsc"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="DLL Universal Debug|Win32"
|
||||
OutputDirectory="vc_mswunivuddll"
|
||||
IntermediateDirectory="vc_mswunivuddll\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivud;.\..\..\..\include;."
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="3"
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswunivuddll\HelpGen\"
|
||||
ObjectFile="vc_mswunivuddll\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswunivuddll\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivud;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswunivuddll\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswunivuddll\HelpGen.pdb"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswunivuddll\helpgen_vc7.bsc"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="DLL Release|Win32"
|
||||
OutputDirectory="vc_mswudll"
|
||||
IntermediateDirectory="vc_mswudll\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswu;.\..\..\..\include;."
|
||||
MinimalRebuild="false"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="2"
|
||||
PreprocessorDefinitions="__WXMSW__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswudll\HelpGen\"
|
||||
ObjectFile="vc_mswudll\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswudll\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswu;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="__WXMSW__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswudll\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswudll\HelpGen.pdb"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswudll\helpgen_vc7.bsc"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="DLL Debug|Win32"
|
||||
OutputDirectory="vc_mswuddll"
|
||||
IntermediateDirectory="vc_mswuddll\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswud;.\..\..\..\include;."
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="3"
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswuddll\HelpGen\"
|
||||
ObjectFile="vc_mswuddll\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswuddll\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswud;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswuddll\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswuddll\HelpGen.pdb"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswuddll\helpgen_vc7.bsc"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Universal Release|Win32"
|
||||
OutputDirectory="vc_mswunivu"
|
||||
IntermediateDirectory="vc_mswunivu\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivu;.\..\..\..\include;."
|
||||
MinimalRebuild="false"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="2"
|
||||
PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswunivu\HelpGen\"
|
||||
ObjectFile="vc_mswunivu\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswunivu\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivu;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;_CONSOLE;wxUSE_GUI=0"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswunivu\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswunivu\HelpGen.pdb"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswunivu\helpgen_vc7.bsc"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Universal Debug|Win32"
|
||||
OutputDirectory="vc_mswunivud"
|
||||
IntermediateDirectory="vc_mswunivud\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivud;.\..\..\..\include;."
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="3"
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswunivud\HelpGen\"
|
||||
ObjectFile="vc_mswunivud\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswunivud\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivud;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswunivud\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswunivud\HelpGen.pdb"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswunivud\helpgen_vc7.bsc"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="vc_mswu"
|
||||
IntermediateDirectory="vc_mswu\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswu;.\..\..\..\include;."
|
||||
MinimalRebuild="false"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="2"
|
||||
PreprocessorDefinitions="__WXMSW__;_UNICODE;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswu\HelpGen\"
|
||||
ObjectFile="vc_mswu\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswu\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswu;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="__WXMSW__;_UNICODE;_CONSOLE;wxUSE_GUI=0"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswu\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswu\HelpGen.pdb"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswu\helpgen_vc7.bsc"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="vc_mswud"
|
||||
IntermediateDirectory="vc_mswud\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1">
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCIDLTool"/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswud;.\..\..\..\include;."
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="3"
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswud\HelpGen\"
|
||||
ObjectFile="vc_mswud\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswud\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswud;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswud\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswud\HelpGen.pdb"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCALinkTool"/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswud\helpgen_vc7.bsc"
|
||||
SuppressStartupBanner="true"/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx">
|
||||
<File
|
||||
RelativePath=".\HelpGen.cpp"/>
|
||||
<File
|
||||
RelativePath=".\cjparser.cpp"/>
|
||||
<File
|
||||
RelativePath=".\docripper.cpp"/>
|
||||
<File
|
||||
RelativePath=".\ifcontext.cpp"/>
|
||||
<File
|
||||
RelativePath=".\markup.cpp"/>
|
||||
<File
|
||||
RelativePath=".\scriptbinder.cpp"/>
|
||||
<File
|
||||
RelativePath=".\sourcepainter.cpp"/>
|
||||
<File
|
||||
RelativePath=".\srcparser.cpp"/>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
|
||||
@@ -1,816 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!--
|
||||
|
||||
This makefile was generated by
|
||||
Bakefile 0.2.3 (http://www.bakefile.org)
|
||||
Do not modify, all changes will be overwritten!
|
||||
|
||||
-->
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="HelpGen"
|
||||
ProjectGUID="{89310150-233B-5DDC-9173-35B7F50CF9B4}"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="DLL Universal Release|Win32"
|
||||
OutputDirectory="vc_mswunivudll"
|
||||
IntermediateDirectory="vc_mswunivudll\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivu;.\..\..\..\include;."
|
||||
MinimalRebuild="false"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="2"
|
||||
PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswunivudll\HelpGen\"
|
||||
ObjectFile="vc_mswunivudll\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswunivudll\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivu;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswunivudll\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"
|
||||
GenerateManifest="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswunivudll\HelpGen.pdb"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswunivudll\helpgen_vc8.bsc"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="DLL Universal Debug|Win32"
|
||||
OutputDirectory="vc_mswunivuddll"
|
||||
IntermediateDirectory="vc_mswunivuddll\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivud;.\..\..\..\include;."
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="3"
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswunivuddll\HelpGen\"
|
||||
ObjectFile="vc_mswunivuddll\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswunivuddll\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswunivud;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswunivuddll\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"
|
||||
GenerateManifest="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswunivuddll\HelpGen.pdb"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswunivuddll\helpgen_vc8.bsc"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="DLL Release|Win32"
|
||||
OutputDirectory="vc_mswudll"
|
||||
IntermediateDirectory="vc_mswudll\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswu;.\..\..\..\include;."
|
||||
MinimalRebuild="false"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="2"
|
||||
PreprocessorDefinitions="__WXMSW__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswudll\HelpGen\"
|
||||
ObjectFile="vc_mswudll\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswudll\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswu;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="__WXMSW__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswudll\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"
|
||||
GenerateManifest="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswudll\HelpGen.pdb"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswudll\helpgen_vc8.bsc"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="DLL Debug|Win32"
|
||||
OutputDirectory="vc_mswuddll"
|
||||
IntermediateDirectory="vc_mswuddll\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswud;.\..\..\..\include;."
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="3"
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswuddll\HelpGen\"
|
||||
ObjectFile="vc_mswuddll\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswuddll\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_dll\mswud;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;WXUSINGDLL;_CONSOLE;wxUSE_GUI=0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswuddll\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_dll"
|
||||
GenerateManifest="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswuddll\HelpGen.pdb"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswuddll\helpgen_vc8.bsc"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Universal Release|Win32"
|
||||
OutputDirectory="vc_mswunivu"
|
||||
IntermediateDirectory="vc_mswunivu\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivu;.\..\..\..\include;."
|
||||
MinimalRebuild="false"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="2"
|
||||
PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswunivu\HelpGen\"
|
||||
ObjectFile="vc_mswunivu\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswunivu\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivu;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="__WXMSW__;__WXUNIVERSAL__;_UNICODE;_CONSOLE;wxUSE_GUI=0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswunivu\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"
|
||||
GenerateManifest="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswunivu\HelpGen.pdb"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswunivu\helpgen_vc8.bsc"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Universal Debug|Win32"
|
||||
OutputDirectory="vc_mswunivud"
|
||||
IntermediateDirectory="vc_mswunivud\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivud;.\..\..\..\include;."
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="3"
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswunivud\HelpGen\"
|
||||
ObjectFile="vc_mswunivud\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswunivud\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswunivud;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXUNIVERSAL__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswunivud\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"
|
||||
GenerateManifest="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswunivud\HelpGen.pdb"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswunivud\helpgen_vc8.bsc"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="vc_mswu"
|
||||
IntermediateDirectory="vc_mswu\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswu;.\..\..\..\include;."
|
||||
MinimalRebuild="false"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="2"
|
||||
PreprocessorDefinitions="__WXMSW__;_UNICODE;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswu\HelpGen\"
|
||||
ObjectFile="vc_mswu\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswu\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswu;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="__WXMSW__;_UNICODE;_CONSOLE;wxUSE_GUI=0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswu\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"
|
||||
GenerateManifest="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswu\HelpGen.pdb"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswu\helpgen_vc8.bsc"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="vc_mswud"
|
||||
IntermediateDirectory="vc_mswud\HelpGen"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswud;.\..\..\..\include;."
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="1"
|
||||
AdditionalOptions=""
|
||||
RuntimeLibrary="3"
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"
|
||||
BasicRuntimeChecks="3"
|
||||
DebugInformationFormat="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
RuntimeTypeInfo="true"
|
||||
AssemblerListingLocation="vc_mswud\HelpGen\"
|
||||
ObjectFile="vc_mswud\HelpGen\"
|
||||
ProgramDataBaseFileName="vc_mswud\HelpGen.pdb"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories=".\..\..\..\lib\vc_lib\mswud;.\..\..\..\include;."
|
||||
PreprocessorDefinitions="_DEBUG;__WXMSW__;__WXDEBUG__;_UNICODE;_CONSOLE;wxUSE_GUI=0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
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"
|
||||
AdditionalOptions=""
|
||||
OutputFile="vc_mswud\HelpGen.exe"
|
||||
LinkIncremental="2"
|
||||
SubSystem="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=".\..\..\..\lib\vc_lib"
|
||||
GenerateManifest="true"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="vc_mswud\HelpGen.pdb"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
OutputFile="vc_mswud\helpgen_vc8.bsc"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\HelpGen.cpp"
|
||||
/>
|
||||
<File
|
||||
RelativePath=".\cjparser.cpp"
|
||||
/>
|
||||
<File
|
||||
RelativePath=".\docripper.cpp"
|
||||
/>
|
||||
<File
|
||||
RelativePath=".\ifcontext.cpp"
|
||||
/>
|
||||
<File
|
||||
RelativePath=".\markup.cpp"
|
||||
/>
|
||||
<File
|
||||
RelativePath=".\scriptbinder.cpp"
|
||||
/>
|
||||
<File
|
||||
RelativePath=".\sourcepainter.cpp"
|
||||
/>
|
||||
<File
|
||||
RelativePath=".\srcparser.cpp"
|
||||
/>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
|
||||
@@ -1,290 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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 );
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
@@ -1,220 +0,0 @@
|
||||
# =========================================================================
|
||||
# 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
|
||||
|
||||
@@ -1,217 +0,0 @@
|
||||
# =========================================================================
|
||||
# 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
|
||||
@@ -1,277 +0,0 @@
|
||||
# =========================================================================
|
||||
# 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
|
||||
|
||||
@@ -1,274 +0,0 @@
|
||||
# =========================================================================
|
||||
# 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) $<
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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;
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
@@ -1,157 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
@@ -1,617 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
}
|
||||
@@ -1,373 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
@@ -1,679 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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 );
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
@@ -1,703 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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__
|
||||
@@ -1,769 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
@@ -1,64 +0,0 @@
|
||||
////////////////////
|
||||
//
|
||||
// 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
|
||||
@@ -1,673 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
@@ -1,561 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
@@ -1,783 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 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
|
||||
@@ -1,58 +0,0 @@
|
||||
|
||||
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>
|
||||
|
||||
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
#!/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
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/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
|
||||
@@ -21,29 +21,25 @@ DESTDIR =
|
||||
|
||||
### 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:
|
||||
@@ -52,30 +48,6 @@ 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)
|
||||
|
||||
@@ -92,4 +64,4 @@ install-strip_ifacecheck:
|
||||
# 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
|
||||
|
||||
@@ -43,7 +43,7 @@ MAKEARGS = -DCC="$(CC)" -DCXX="$(CXX)" -DCFLAGS="$(CFLAGS)" \
|
||||
|
||||
### Targets: ###
|
||||
|
||||
all: emulator helpview tex2rtf helpgen ifacecheck
|
||||
all: emulator helpview ifacecheck
|
||||
|
||||
clean:
|
||||
-if exist .\*.obj del .\*.obj
|
||||
@@ -57,14 +57,6 @@ clean:
|
||||
@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
|
||||
@@ -82,18 +74,6 @@ helpview:
|
||||
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
|
||||
|
||||
@@ -35,15 +35,13 @@ MAKEARGS = LINK_DLL_FLAGS="$(LINK_DLL_FLAGS)" \
|
||||
|
||||
### 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:
|
||||
@@ -52,16 +50,10 @@ 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)
|
||||
|
||||
@@ -34,7 +34,7 @@ MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
|
||||
|
||||
### 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
|
||||
@@ -46,12 +46,6 @@ clean:
|
||||
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)"
|
||||
@@ -66,16 +60,6 @@ sub_helpview:
|
||||
$(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
|
||||
|
||||
@@ -48,7 +48,7 @@ MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" &
|
||||
|
||||
### Targets: ###
|
||||
|
||||
all : .SYMBOLIC emulator helpview tex2rtf helpgen ifacecheck
|
||||
all : .SYMBOLIC emulator helpview ifacecheck
|
||||
|
||||
clean : .SYMBOLIC
|
||||
-if exist .\*.obj del .\*.obj
|
||||
@@ -62,12 +62,6 @@ clean : .SYMBOLIC
|
||||
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)
|
||||
@@ -82,16 +76,6 @@ helpview : .SYMBOLIC
|
||||
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
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
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.
|
||||
@@ -1 +0,0 @@
|
||||
I'm just here to force the creation of a LIB directory.
|
||||
@@ -1,32 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
@@ -1,181 +0,0 @@
|
||||
/*
|
||||
* 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!");
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<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>
|
||||
@@ -1,70 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
@@ -1,44 +0,0 @@
|
||||
#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
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<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>
|
||||
@@ -1,70 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
@@ -1,44 +0,0 @@
|
||||
#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
|
||||
|
||||
@@ -1,169 +0,0 @@
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
#
|
||||
# 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)
|
||||
@@ -1,258 +0,0 @@
|
||||
/*
|
||||
* 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_ */
|
||||
|
||||
@@ -1,278 +0,0 @@
|
||||
/*
|
||||
* 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()
|
||||
}
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
@@ -1,293 +0,0 @@
|
||||
/*
|
||||
* 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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
@@ -1,282 +0,0 @@
|
||||
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
//
|
||||
// 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;
|
||||
}
|
||||
|
||||
@@ -1,799 +0,0 @@
|
||||
/*
|
||||
* 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_ */
|
||||
|
||||
@@ -1,186 +0,0 @@
|
||||
/* 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);
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
|
||||
all:
|
||||
cd src; $(MAKE)
|
||||
|
||||
clean:
|
||||
cd src; $(MAKE) clean
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
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
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
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
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
; 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 <20> Julian Smart, 2002
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
; 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 <20> 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
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,70 +0,0 @@
|
||||
@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
|
||||
@@ -1,119 +0,0 @@
|
||||
#!/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.
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
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
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
<?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>
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
|
||||
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}/*
|
||||
@@ -1,123 +0,0 @@
|
||||
@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
|
||||
@@ -1,28 +0,0 @@
|
||||
@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
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,36 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 978 B |
Binary file not shown.
|
Before Width: | Height: | Size: 138 B |
Binary file not shown.
|
Before Width: | Height: | Size: 996 B |
@@ -1,145 +0,0 @@
|
||||
% 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}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 959 B |
@@ -1,339 +0,0 @@
|
||||
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.
|
||||
@@ -1,43 +0,0 @@
|
||||
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
|
||||
@@ -1,517 +0,0 @@
|
||||
|
||||
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!
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
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.
|
||||
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
% 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}}
|
||||
|
||||
@@ -1,154 +0,0 @@
|
||||
% 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}
|
||||
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
% 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}
|
||||
@@ -1,140 +0,0 @@
|
||||
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).
|
||||
@@ -1,520 +0,0 @@
|
||||
%
|
||||
% %%%%%%% %%%%% %%%%%% %%%%% % %
|
||||
% % % % % % % % % %
|
||||
% % % % % % % % % %
|
||||
% %%%%%%% %%%%% %%%%%% % % %
|
||||
% % % % % % % % %
|
||||
% % % % % % % % %
|
||||
% % %%%%%% %%%%%% %%%%% % %
|
||||
%
|
||||
% 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).
|
||||
@@ -1,78 +0,0 @@
|
||||
|
||||
+++++ 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
|
||||
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
@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}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user