More updates to the Debian packaging for wxPython, unicode and
the project name change. Applied patch from ABX to make tex2rtf unicode compatible, then removed wxSprintf lameness from it so it might actually work. Also modified it to return true from tex2rtf OnInit in console builds so the app will exit with a successful return code rather than always returning failure even when it succeeds. Implemented unicode capable wxCtime for glibc systems also needed by tex2rtf. Wrapped dde include in tex2rtf in a guard and assert that dde is MSW only in its forwarding header. Lowered the limit of maxlen in wxSprintf so it actually has a chance to segfault on people instead of failing silently and mysteriously with glibc. Silenced some other 'potentially uninitialised variable' warnings from gcc3, most of which were bogus, one potentially not so. Added missing newline at the end of fontdlg.cpp. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
19
Makefile.in
19
Makefile.in
@@ -18732,9 +18732,22 @@ debian-dist: debian-native-dist debian-msw-dirs MSW_DIST
|
|||||||
@# in other dist targets. Ugly and hardly portable but it
|
@# in other dist targets. Ugly and hardly portable but it
|
||||||
@# will run on any Debian box and that's enough for now.
|
@# will run on any Debian box and that's enough for now.
|
||||||
|
|
||||||
find $(DISTDIR) \( -name "CVS" -o -name ".cvsignore" -o -name "*.dsp" -o -name "*.dsw" -o -name "*.hh*" -o \
|
rm -rf $(DISTDIR)/contrib/build
|
||||||
\( -name "makefile.*" -a ! -name "makefile.unx" \) \) \
|
find $(DISTDIR) \( -name "CVS" -o -name ".cvsignore" -o -name "*.dsp" \
|
||||||
-print0 | xargs -0 rm -rf
|
-o -name "*.dsw" -o -name "*.hh*" -o -name "*.mms" \
|
||||||
|
-o -name "*.mcp" -o -name "*M*.xml" -o -name "*.r" \
|
||||||
|
-o -name "*.bkl" -o -name "*.pro" -o -name "*.def" \
|
||||||
|
-o -name "*.vpj" -o -name "*.sc" \
|
||||||
|
-o \( -name "makefile.*" -a ! -name "makefile.unx" \) \
|
||||||
|
\) -print0 | xargs -0 rm -rf
|
||||||
|
|
||||||
|
rm -rf $(DISTDIR)/wxPython/SWIG
|
||||||
|
rm -rf $(DISTDIR)/wxPython/distrib
|
||||||
|
rm -rf $(DISTDIR)/wxPython/distutils
|
||||||
|
rm -rf $(DISTDIR)/wxPython/samples
|
||||||
|
rm -rf $(DISTDIR)/wxPython/contrib/iewin
|
||||||
|
find $(DISTDIR)/wxPython \( -name "mac" -o -name "msw" \) -print0 | xargs -0 rm -rf
|
||||||
|
|
||||||
|
|
||||||
@# We can't get at the individual components of the version here
|
@# We can't get at the individual components of the version here
|
||||||
@# anymore, so strip the major and minor version out of the blob.
|
@# anymore, so strip the major and minor version out of the blob.
|
||||||
|
@@ -1072,9 +1072,22 @@ debian-dist: debian-native-dist debian-msw-dirs MSW_DIST
|
|||||||
@# in other dist targets. Ugly and hardly portable but it
|
@# in other dist targets. Ugly and hardly portable but it
|
||||||
@# will run on any Debian box and that's enough for now.
|
@# will run on any Debian box and that's enough for now.
|
||||||
|
|
||||||
find $(DISTDIR) \( -name "CVS" -o -name ".cvsignore" -o -name "*.dsp" -o -name "*.dsw" -o -name "*.hh*" -o \
|
rm -rf $(DISTDIR)/contrib/build
|
||||||
\( -name "makefile.*" -a ! -name "makefile.unx" \) \) \
|
find $(DISTDIR) \( -name "CVS" -o -name ".cvsignore" -o -name "*.dsp" \
|
||||||
-print0 | xargs -0 rm -rf
|
-o -name "*.dsw" -o -name "*.hh*" -o -name "*.mms" \
|
||||||
|
-o -name "*.mcp" -o -name "*M*.xml" -o -name "*.r" \
|
||||||
|
-o -name "*.bkl" -o -name "*.pro" -o -name "*.def" \
|
||||||
|
-o -name "*.vpj" -o -name "*.sc" \
|
||||||
|
-o \( -name "makefile.*" -a ! -name "makefile.unx" \) \
|
||||||
|
\) -print0 | xargs -0 rm -rf
|
||||||
|
|
||||||
|
rm -rf $(DISTDIR)/wxPython/SWIG
|
||||||
|
rm -rf $(DISTDIR)/wxPython/distrib
|
||||||
|
rm -rf $(DISTDIR)/wxPython/distutils
|
||||||
|
rm -rf $(DISTDIR)/wxPython/samples
|
||||||
|
rm -rf $(DISTDIR)/wxPython/contrib/iewin
|
||||||
|
find $(DISTDIR)/wxPython \( -name "mac" -o -name "msw" \) -print0 | xargs -0 rm -rf
|
||||||
|
|
||||||
|
|
||||||
@# We can't get at the individual components of the version here
|
@# We can't get at the individual components of the version here
|
||||||
@# anymore, so strip the major and minor version out of the blob.
|
@# anymore, so strip the major and minor version out of the blob.
|
||||||
|
@@ -124,6 +124,18 @@ VENDOR = custom
|
|||||||
CFG =
|
CFG =
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
|
# Compiler flags needed to compile test suite in tests directory. If you want
|
||||||
|
# to run the tests, set it so that the compiler can find CppUnit headers.
|
||||||
|
!ifndef CPPUNIT_CFLAGS
|
||||||
|
CPPUNIT_CFLAGS =
|
||||||
|
!endif
|
||||||
|
|
||||||
|
# Linker flags needed to link test suite in tests directory. If you want
|
||||||
|
# to run the tests, include CppUnit library here.
|
||||||
|
!ifndef CPPUNIT_LIBS
|
||||||
|
CPPUNIT_LIBS =
|
||||||
|
!endif
|
||||||
|
|
||||||
# Version of C runtime library to use. You can change this to
|
# Version of C runtime library to use. You can change this to
|
||||||
# static if SHARED=0, but it is highly recommended to not do
|
# static if SHARED=0, but it is highly recommended to not do
|
||||||
# it if SHARED=1 unless you know what you are doing. [dynamic,static]
|
# it if SHARED=1 unless you know what you are doing. [dynamic,static]
|
||||||
|
@@ -29,7 +29,8 @@ MAKEARGS = -DCC="$(CC)" -DCXX="$(CXX)" -DCFLAGS="$(CFLAGS)" \
|
|||||||
-DUSE_GUI="$(USE_GUI)" -DUSE_HTML="$(USE_HTML)" \
|
-DUSE_GUI="$(USE_GUI)" -DUSE_HTML="$(USE_HTML)" \
|
||||||
-DUSE_OPENGL="$(USE_OPENGL)" -DUSE_ODBC="$(USE_ODBC)" \
|
-DUSE_OPENGL="$(USE_OPENGL)" -DUSE_ODBC="$(USE_ODBC)" \
|
||||||
-DUSE_EXCEPTIONS="$(USE_EXCEPTIONS)" -DOFFICIAL_BUILD="$(OFFICIAL_BUILD)" \
|
-DUSE_EXCEPTIONS="$(USE_EXCEPTIONS)" -DOFFICIAL_BUILD="$(OFFICIAL_BUILD)" \
|
||||||
-DVENDOR="$(VENDOR)" -DCFG="$(CFG)" -DRUNTIME_LIBS="$(RUNTIME_LIBS)"
|
-DVENDOR="$(VENDOR)" -DCFG="$(CFG)" -DCPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" \
|
||||||
|
-DCPPUNIT_LIBS="$(CPPUNIT_LIBS)" -DRUNTIME_LIBS="$(RUNTIME_LIBS)"
|
||||||
OBJS = \
|
OBJS = \
|
||||||
bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
|
bcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
|
||||||
SETUPHDIR = \
|
SETUPHDIR = \
|
||||||
|
@@ -19,7 +19,8 @@ MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
|
|||||||
MONOLITHIC="$(MONOLITHIC)" USE_GUI="$(USE_GUI)" USE_HTML="$(USE_HTML)" \
|
MONOLITHIC="$(MONOLITHIC)" USE_GUI="$(USE_GUI)" USE_HTML="$(USE_HTML)" \
|
||||||
USE_OPENGL="$(USE_OPENGL)" USE_ODBC="$(USE_ODBC)" \
|
USE_OPENGL="$(USE_OPENGL)" USE_ODBC="$(USE_ODBC)" \
|
||||||
USE_EXCEPTIONS="$(USE_EXCEPTIONS)" OFFICIAL_BUILD="$(OFFICIAL_BUILD)" \
|
USE_EXCEPTIONS="$(USE_EXCEPTIONS)" OFFICIAL_BUILD="$(OFFICIAL_BUILD)" \
|
||||||
VENDOR="$(VENDOR)" CFG="$(CFG)" RUNTIME_LIBS="$(RUNTIME_LIBS)" \
|
VENDOR="$(VENDOR)" CFG="$(CFG)" CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" \
|
||||||
|
CPPUNIT_LIBS="$(CPPUNIT_LIBS)" RUNTIME_LIBS="$(RUNTIME_LIBS)" \
|
||||||
GCC_VERSION="$(GCC_VERSION)"
|
GCC_VERSION="$(GCC_VERSION)"
|
||||||
OBJS = \
|
OBJS = \
|
||||||
gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
|
gcc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
|
||||||
|
@@ -20,6 +20,7 @@ MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
|
|||||||
USE_GUI="$(USE_GUI)" USE_HTML="$(USE_HTML)" USE_OPENGL="$(USE_OPENGL)" \
|
USE_GUI="$(USE_GUI)" USE_HTML="$(USE_HTML)" USE_OPENGL="$(USE_OPENGL)" \
|
||||||
USE_ODBC="$(USE_ODBC)" USE_EXCEPTIONS="$(USE_EXCEPTIONS)" \
|
USE_ODBC="$(USE_ODBC)" USE_EXCEPTIONS="$(USE_EXCEPTIONS)" \
|
||||||
OFFICIAL_BUILD="$(OFFICIAL_BUILD)" VENDOR="$(VENDOR)" CFG="$(CFG)" \
|
OFFICIAL_BUILD="$(OFFICIAL_BUILD)" VENDOR="$(VENDOR)" CFG="$(CFG)" \
|
||||||
|
CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" CPPUNIT_LIBS="$(CPPUNIT_LIBS)" \
|
||||||
RUNTIME_LIBS="$(RUNTIME_LIBS)"
|
RUNTIME_LIBS="$(RUNTIME_LIBS)"
|
||||||
OBJS = \
|
OBJS = \
|
||||||
vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
|
vc_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
|
||||||
|
@@ -2039,7 +2039,8 @@ MAKEARGS = CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" &
|
|||||||
MONOLITHIC="$(MONOLITHIC)" USE_GUI="$(USE_GUI)" USE_HTML="$(USE_HTML)" &
|
MONOLITHIC="$(MONOLITHIC)" USE_GUI="$(USE_GUI)" USE_HTML="$(USE_HTML)" &
|
||||||
USE_OPENGL="$(USE_OPENGL)" USE_ODBC="$(USE_ODBC)" &
|
USE_OPENGL="$(USE_OPENGL)" USE_ODBC="$(USE_ODBC)" &
|
||||||
USE_EXCEPTIONS="$(USE_EXCEPTIONS)" OFFICIAL_BUILD="$(OFFICIAL_BUILD)" &
|
USE_EXCEPTIONS="$(USE_EXCEPTIONS)" OFFICIAL_BUILD="$(OFFICIAL_BUILD)" &
|
||||||
VENDOR="$(VENDOR)" CFG="$(CFG)" RUNTIME_LIBS="$(RUNTIME_LIBS)"
|
VENDOR="$(VENDOR)" CFG="$(CFG)" CPPUNIT_CFLAGS="$(CPPUNIT_CFLAGS)" &
|
||||||
|
CPPUNIT_LIBS="$(CPPUNIT_LIBS)" RUNTIME_LIBS="$(RUNTIME_LIBS)"
|
||||||
OBJS = &
|
OBJS = &
|
||||||
wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
|
wat_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WXDLLFLAG)$(CFG)
|
||||||
SETUPHDIR = &
|
SETUPHDIR = &
|
||||||
|
14
debian/README.examples
vendored
Normal file
14
debian/README.examples
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
These examples are provided as extended documentation for the wxWidgets
|
||||||
|
package. If you wish to actually run them rather than just browse them
|
||||||
|
as documents you should copy them into a working directory elsewhere
|
||||||
|
first. Note that some of them will attempt to write to the current
|
||||||
|
working directory, or to the home directory of the user they are run as.
|
||||||
|
|
||||||
|
Some of the files have been compressed in accordance with Debian policy
|
||||||
|
regarding documentation, you will need to uncompress such files before
|
||||||
|
building or executing them.
|
||||||
|
|
||||||
|
Ron
|
||||||
|
|
||||||
|
|
4
debian/changelog
vendored
4
debian/changelog
vendored
@@ -7,7 +7,7 @@ wxwidgets2.5 (2.5.1) experimental; urgency=low
|
|||||||
in court. Eleven or so years of unbroken, unquestioned usage
|
in court. Eleven or so years of unbroken, unquestioned usage
|
||||||
was not nearly so interesting to these people as the fact we
|
was not nearly so interesting to these people as the fact we
|
||||||
were a soft target and easy to deprive of due process.
|
were a soft target and easy to deprive of due process.
|
||||||
* wxGTK is now built with gtk2.
|
* wxGTK is now built with gtk2 and unicode support.
|
||||||
* wxBase is no longer a separate package, it is built with the
|
* wxBase is no longer a separate package, it is built with the
|
||||||
GUI libs which now depend on it. We might split it out again
|
GUI libs which now depend on it. We might split it out again
|
||||||
one day if there is a need for that.
|
one day if there is a need for that.
|
||||||
@@ -19,6 +19,8 @@ wxwidgets2.5 (2.5.1) experimental; urgency=low
|
|||||||
improve either, but the logical separation may be beneficial.
|
improve either, but the logical separation may be beneficial.
|
||||||
* Removed many elements of the build scripts that are no longer
|
* Removed many elements of the build scripts that are no longer
|
||||||
required due to improvements and changes elsewhere.
|
required due to improvements and changes elsewhere.
|
||||||
|
* Added README.examples for people who think these are packaged
|
||||||
|
as demos instead of as extended documentation.
|
||||||
|
|
||||||
-- Ron Lee <ron@debian.org> Fri, 27 Feb 2004 17:00:29 +1030
|
-- Ron Lee <ron@debian.org> Fri, 27 Feb 2004 17:00:29 +1030
|
||||||
|
|
||||||
|
2
debian/libwxgtk-dbg.links
vendored
2
debian/libwxgtk-dbg.links
vendored
@@ -1,2 +1,2 @@
|
|||||||
usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxgtk2d-=V-config.1.gz
|
usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxgtk2ud-=V-config.1.gz
|
||||||
|
|
||||||
|
2
debian/libwxgtk-dbg.postinst
vendored
2
debian/libwxgtk-dbg.postinst
vendored
@@ -1,7 +1,7 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxgtk2d-=V-config 50
|
update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxgtk2ud-=V-config 50
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
||||||
|
2
debian/libwxgtk-dbg.prerm
vendored
2
debian/libwxgtk-dbg.prerm
vendored
@@ -1,7 +1,7 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
update-alternatives --remove wx-config /usr/bin/wxgtk2d-=V-config
|
update-alternatives --remove wx-config /usr/bin/wxgtk2ud-=V-config
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
||||||
|
2
debian/libwxgtk-dev.links
vendored
2
debian/libwxgtk-dev.links
vendored
@@ -1,2 +1,2 @@
|
|||||||
usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxgtk2-=V-config.1.gz
|
usr/share/man/man1/wx-config.1.gz usr/share/man/man1/wxgtk2u-=V-config.1.gz
|
||||||
|
|
||||||
|
2
debian/libwxgtk-dev.postinst
vendored
2
debian/libwxgtk-dev.postinst
vendored
@@ -1,7 +1,7 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxgtk2-=V-config 70
|
update-alternatives --install /usr/bin/wx-config wx-config /usr/bin/wxgtk2u-=V-config 70
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
||||||
|
2
debian/libwxgtk-dev.prerm
vendored
2
debian/libwxgtk-dev.prerm
vendored
@@ -1,7 +1,7 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
update-alternatives --remove wx-config /usr/bin/wxgtk2-=V-config
|
update-alternatives --remove wx-config /usr/bin/wxgtk2u-=V-config
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
||||||
|
5
debian/libwxgtk-python.docs
vendored
5
debian/libwxgtk-python.docs
vendored
@@ -1,3 +1,4 @@
|
|||||||
wxPython/README.txt
|
wxPython/docs/README.txt
|
||||||
wxPython/CHANGES.txt
|
wxPython/docs/CHANGES.txt
|
||||||
|
wxPython/docs/MigrationGuide.txt
|
||||||
|
|
||||||
|
6
debian/libwxgtk-python.menu
vendored
6
debian/libwxgtk-python.menu
vendored
@@ -1,7 +1,7 @@
|
|||||||
?package(libwxgtk=V-python):needs=X11 section=Apps/Programming\
|
?package(libwxgtk=V-python):needs="X11" section="Apps/Programming"\
|
||||||
title="pycrust" command="/usr/bin/pycrust"
|
title="pycrust" command="/usr/bin/pycrust"
|
||||||
?package(libwxgtk=V-python):needs=X11 section=Apps/Programming\
|
?package(libwxgtk=V-python):needs="X11" section="Apps/Programming"\
|
||||||
title="pyshell" command="/usr/bin/pyshell"
|
title="pyshell" command="/usr/bin/pyshell"
|
||||||
?package(libwxgtk=V-python):needs=X11 section=Apps/Programming\
|
?package(libwxgtk=V-python):needs="X11" section="Apps/Programming"\
|
||||||
title="xrced" command="/usr/bin/xrced"
|
title="xrced" command="/usr/bin/xrced"
|
||||||
|
|
||||||
|
47
debian/rules
vendored
47
debian/rules
vendored
@@ -93,6 +93,8 @@ wxconfig := $(shell pwd)/$(objdir_gtk_shared)/wx-config \
|
|||||||
--prefix=$(shell pwd) \
|
--prefix=$(shell pwd) \
|
||||||
--exec-prefix=$(shell pwd)/$(objdir_gtk_shared)
|
--exec-prefix=$(shell pwd)/$(objdir_gtk_shared)
|
||||||
|
|
||||||
|
contrib_libs := $(subst CVS,,$(notdir $(wildcard contrib/include/wx/*)))
|
||||||
|
|
||||||
|
|
||||||
# The Rules:
|
# The Rules:
|
||||||
|
|
||||||
@@ -119,12 +121,12 @@ control-files-stamp: debian/control
|
|||||||
done;
|
done;
|
||||||
@for f in docs doc-base; do \
|
@for f in docs doc-base; do \
|
||||||
echo "generating control file $(package_doc).$$f"; \
|
echo "generating control file $(package_doc).$$f"; \
|
||||||
sed -e 's/=V/$(release)/g' < debian/wxwin-doc.$$f \
|
sed -e 's/=V/$(release)/g' < debian/wx-doc.$$f \
|
||||||
> debian/$(package_doc).$$f; \
|
> debian/$(package_doc).$$f; \
|
||||||
done;
|
done;
|
||||||
@for f in examples; do \
|
@for f in examples; do \
|
||||||
echo "generating control file $(package_examples).$$f"; \
|
echo "generating control file $(package_examples).$$f"; \
|
||||||
cp debian/wxwin-examples.$$f debian/$(package_examples).$$f; \
|
cp debian/wx-examples.$$f debian/$(package_examples).$$f; \
|
||||||
done;
|
done;
|
||||||
@for f in dirs links postinst prerm; do \
|
@for f in dirs links postinst prerm; do \
|
||||||
echo "generating control file $(package_msw_dev).$$f"; \
|
echo "generating control file $(package_msw_dev).$$f"; \
|
||||||
@@ -138,7 +140,7 @@ control-files-stamp: debian/control
|
|||||||
done;
|
done;
|
||||||
@for f in dirs; do \
|
@for f in dirs; do \
|
||||||
echo "generating control file $(package_headers_msw).$$f"; \
|
echo "generating control file $(package_headers_msw).$$f"; \
|
||||||
sed -e 's/=H/$(cross_host)/g' < debian/wxwin-headers-msw.$$f \
|
sed -e 's/=H/$(cross_host)/g' < debian/wx-headers-msw.$$f \
|
||||||
> debian/$(package_headers_msw).$$f; \
|
> debian/$(package_headers_msw).$$f; \
|
||||||
done;
|
done;
|
||||||
touch $@
|
touch $@
|
||||||
@@ -163,6 +165,7 @@ configure-gtk-shared-stamp:
|
|||||||
--cache-file=$(config_cache) \
|
--cache-file=$(config_cache) \
|
||||||
--with-gtk \
|
--with-gtk \
|
||||||
--enable-gtk2 \
|
--enable-gtk2 \
|
||||||
|
--enable-unicode \
|
||||||
--with-opengl \
|
--with-opengl \
|
||||||
--enable-soname \
|
--enable-soname \
|
||||||
--with-zlib=sys \
|
--with-zlib=sys \
|
||||||
@@ -186,6 +189,7 @@ configure-gtk-static-stamp:
|
|||||||
--cache-file=$(config_cache) \
|
--cache-file=$(config_cache) \
|
||||||
--with-gtk \
|
--with-gtk \
|
||||||
--enable-gtk2 \
|
--enable-gtk2 \
|
||||||
|
--enable-unicode \
|
||||||
--with-opengl \
|
--with-opengl \
|
||||||
--disable-shared \
|
--disable-shared \
|
||||||
--with-zlib=sys \
|
--with-zlib=sys \
|
||||||
@@ -209,6 +213,7 @@ configure-gtk-debug-stamp:
|
|||||||
--cache-file=$(config_cache) \
|
--cache-file=$(config_cache) \
|
||||||
--with-gtk \
|
--with-gtk \
|
||||||
--enable-gtk2 \
|
--enable-gtk2 \
|
||||||
|
--enable-unicode \
|
||||||
--with-opengl \
|
--with-opengl \
|
||||||
--enable-debug \
|
--enable-debug \
|
||||||
--enable-soname \
|
--enable-soname \
|
||||||
@@ -228,21 +233,30 @@ build-gtk-debug-stamp: configure-gtk-debug-stamp
|
|||||||
|
|
||||||
build-contrib-shared-stamp: build-gtk-shared-stamp
|
build-contrib-shared-stamp: build-gtk-shared-stamp
|
||||||
dh_testdir
|
dh_testdir
|
||||||
cd $(objdir_gtk_shared)/contrib/src \
|
cd $(objdir_gtk_shared)/contrib/src && $(MAKE)
|
||||||
&& $(MAKE)
|
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
build-contrib-static-stamp: build-gtk-static-stamp
|
build-contrib-static-stamp: build-gtk-static-stamp
|
||||||
dh_testdir
|
dh_testdir
|
||||||
cd $(objdir_gtk_static)/contrib/src \
|
cd $(objdir_gtk_static)/contrib/src && $(MAKE)
|
||||||
&& $(MAKE)
|
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
build-gtk-py-stamp: build-gtk-shared-stamp
|
build-gtk-py-stamp: build-gtk-shared-stamp
|
||||||
dh_testdir
|
dh_testdir
|
||||||
touch docs/lgpl.txt
|
touch docs/lgpl.txt
|
||||||
|
cd wxPython/include/wx \
|
||||||
|
&& for f in $(contrib_libs); do \
|
||||||
|
$(RM) $$f; \
|
||||||
|
ln -s ../../../contrib/include/wx/$$f .; \
|
||||||
|
done
|
||||||
cd wxPython \
|
cd wxPython \
|
||||||
&& $(python_ver) ./setup.py build WX_CONFIG='$(wxconfig)'
|
&& $(python_ver) ./setup.py build \
|
||||||
|
WX_CONFIG='$(wxconfig)' \
|
||||||
|
WXPORT=gtk2 \
|
||||||
|
UNICODE=1
|
||||||
|
cd wxPython/include/wx \
|
||||||
|
&& for f in $(contrib_libs); do $(RM) $$f; done
|
||||||
|
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
build-doc-stamp: build-gtk-shared-stamp
|
build-doc-stamp: build-gtk-shared-stamp
|
||||||
@@ -250,6 +264,7 @@ build-doc-stamp: build-gtk-shared-stamp
|
|||||||
cd $(objdir_gtk_shared)/utils/tex2rtf/src \
|
cd $(objdir_gtk_shared)/utils/tex2rtf/src \
|
||||||
&& $(MAKE)
|
&& $(MAKE)
|
||||||
rm -rf $(objdir_doc)
|
rm -rf $(objdir_doc)
|
||||||
|
rm -rf $(objdir_doc_cruft)
|
||||||
mkdir $(objdir_doc)
|
mkdir $(objdir_doc)
|
||||||
mkdir $(objdir_doc_cruft)
|
mkdir $(objdir_doc_cruft)
|
||||||
cd $(objdir_doc_cruft) \
|
cd $(objdir_doc_cruft) \
|
||||||
@@ -409,9 +424,9 @@ install-gtk-dev: build-gtk-static-stamp install-gtk-shared-stamp
|
|||||||
dh_testroot
|
dh_testroot
|
||||||
dh_clean -k
|
dh_clean -k
|
||||||
dh_installdirs
|
dh_installdirs
|
||||||
dh_install $(objdir_gtk_install)/bin/wxgtk2-$(release)-config usr/bin
|
dh_install $(objdir_gtk_install)/bin/wxgtk2u-$(release)-config usr/bin
|
||||||
dh_install $(objdir_gtk_install)/lib/{wx,*.so} usr/lib
|
dh_install $(objdir_gtk_install)/lib/{wx,*.so} usr/lib
|
||||||
dh_install $(objdir_gtk_static)/lib/libwx_gtk2{-,_gl}*.a usr/lib
|
dh_install $(objdir_gtk_static)/lib/libwx_gtk2u{-,_gl}*.a usr/lib
|
||||||
|
|
||||||
install-gtk-dbg: DH_OPTIONS=-p$(package_gtk_dbg)
|
install-gtk-dbg: DH_OPTIONS=-p$(package_gtk_dbg)
|
||||||
install-gtk-dbg: build-gtk-debug-stamp
|
install-gtk-dbg: build-gtk-debug-stamp
|
||||||
@@ -419,7 +434,7 @@ install-gtk-dbg: build-gtk-debug-stamp
|
|||||||
dh_testroot
|
dh_testroot
|
||||||
dh_clean -k
|
dh_clean -k
|
||||||
dh_installdirs usr/share/lintian/overrides
|
dh_installdirs usr/share/lintian/overrides
|
||||||
dh_install $(objdir_gtk_debug)/wxgtk2d-$(release)-config usr/bin
|
dh_install $(objdir_gtk_debug)/wxgtk2ud-$(release)-config usr/bin
|
||||||
dh_install $(objdir_gtk_debug)/lib usr
|
dh_install $(objdir_gtk_debug)/lib usr
|
||||||
cp debian/lintian-override debian/$(package_gtk_dbg)/usr/share/lintian/overrides/$(package_gtk_dbg)
|
cp debian/lintian-override debian/$(package_gtk_dbg)/usr/share/lintian/overrides/$(package_gtk_dbg)
|
||||||
|
|
||||||
@@ -447,7 +462,7 @@ install-gtk-contrib-dev: build-contrib-static-stamp install-gtk-contrib-stamp
|
|||||||
dh_installdirs
|
dh_installdirs
|
||||||
dh_install $(objdir_gtk_contrib_install)/include usr
|
dh_install $(objdir_gtk_contrib_install)/include usr
|
||||||
dh_install $(objdir_gtk_contrib_install)/lib/*.so usr/lib
|
dh_install $(objdir_gtk_contrib_install)/lib/*.so usr/lib
|
||||||
dh_install -Xlibwx_gtk2- -Xlibwx_gtk2_gl- \
|
dh_install -Xlibwx_gtk2u- -Xlibwx_gtk2u_gl- \
|
||||||
$(objdir_gtk_static)/lib/*.a usr/lib
|
$(objdir_gtk_static)/lib/*.a usr/lib
|
||||||
|
|
||||||
install-gtk-py: DH_OPTIONS=-p$(package_gtk_py)
|
install-gtk-py: DH_OPTIONS=-p$(package_gtk_py)
|
||||||
@@ -459,7 +474,9 @@ install-gtk-py: build-gtk-py-stamp
|
|||||||
cd wxPython \
|
cd wxPython \
|
||||||
&& $(python_ver) ./setup.py install \
|
&& $(python_ver) ./setup.py install \
|
||||||
--prefix=`pwd`/../debian/$(package_gtk_py)/usr \
|
--prefix=`pwd`/../debian/$(package_gtk_py)/usr \
|
||||||
WX_CONFIG='$(wxconfig)'
|
WX_CONFIG='$(wxconfig)' \
|
||||||
|
WXPORT=gtk2 \
|
||||||
|
UNICODE=1
|
||||||
|
|
||||||
find debian/$(package_gtk_py)/usr/lib/$(python_ver)/site-packages/wxPython \
|
find debian/$(package_gtk_py)/usr/lib/$(python_ver)/site-packages/wxPython \
|
||||||
-name '*.py?' -exec rm '{}' ';'
|
-name '*.py?' -exec rm '{}' ';'
|
||||||
@@ -477,7 +494,7 @@ install-gtk-py: build-gtk-py-stamp
|
|||||||
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pywrap.1
|
usr/share/man/man1/wxPython-tools.1 usr/share/man/man1/pywrap.1
|
||||||
|
|
||||||
# This is rather bogus, its included in the main copyright file now though.
|
# This is rather bogus, its included in the main copyright file now though.
|
||||||
rm -f debian/$(package_gtk_py)/usr/lib/$(python_ver)/site-packages/wxPython/tools/XRCed/license.txt
|
rm -f debian/$(package_gtk_py)/usr/lib/$(python_ver)/site-packages/wx/tools/XRCed/license.txt
|
||||||
|
|
||||||
install-headers: DH_OPTIONS=-p$(package_headers)
|
install-headers: DH_OPTIONS=-p$(package_headers)
|
||||||
install-headers: install-gtk-shared-stamp
|
install-headers: install-gtk-shared-stamp
|
||||||
@@ -580,7 +597,7 @@ binary-common:
|
|||||||
dh_fixperms
|
dh_fixperms
|
||||||
dh_makeshlibs -N$(package_gtk_py) -V
|
dh_makeshlibs -N$(package_gtk_py) -V
|
||||||
dh_installdeb
|
dh_installdeb
|
||||||
dh_shlibdeps -ldebian/$(package_gtk_lib)/usr/lib:debian/$(package_gtk_dbg)/usr/lib
|
dh_shlibdeps -ldebian/$(package_gtk_lib)/usr/lib:debian/$(package_gtk_dbg)/usr/lib:debian/$(package_gtk_contrib)/usr/lib
|
||||||
dh_gencontrol
|
dh_gencontrol
|
||||||
dh_md5sums
|
dh_md5sums
|
||||||
dh_builddeb
|
dh_builddeb
|
||||||
|
53
debian/wx-config.1
vendored
53
debian/wx-config.1
vendored
@@ -1,6 +1,6 @@
|
|||||||
.TH wx\-config 1 "15 Feb 2000" "Debian GNU/Linux" "wxWindows"
|
.TH wx\-config 1 "15 Feb 2000" "Debian GNU/Linux" "wxWidgets"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
wx-config \- generate compile time info for wxWindows
|
wx-config \- generate compile time requirements for wxWidgets applications
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nh
|
.nh
|
||||||
.B wxbase\-config
|
.B wxbase\-config
|
||||||
@@ -8,11 +8,11 @@ wx-config \- generate compile time info for wxWindows
|
|||||||
.B wxgtk\-config
|
.B wxgtk\-config
|
||||||
.HP
|
.HP
|
||||||
.B wx\-config
|
.B wx\-config
|
||||||
[\-\-version] [\-\-libs] [\-\-cflags] [\-\-cc] [\-\-cxx] [\-\-ld]
|
[\-\-version] [\-\-libs\fI[=LIBS]\fP] [\-\-cflags] [\-\-cc] [\-\-cxx] [\-\-ld]
|
||||||
[\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP]
|
[\-\-prefix\fI[=DIR]\fP] [\-\-exec\-prefix\fI[=DIR]\fP] [\-\-release] [\-\-basename]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
\fIwx\-config\fP is a tool to determine the compiler and linker
|
\fIwx\-config\fP is a tool to determine the compiler and linker
|
||||||
flags required for applications using the \fIwxWindows\fP toolkit(s).
|
flags required for applications using the \fIwxWidgets\fP toolkit(s).
|
||||||
.PP
|
.PP
|
||||||
\fIwx\-config\fP is normally a symlink to one of the port\-specific
|
\fIwx\-config\fP is normally a symlink to one of the port\-specific
|
||||||
versions like \fIwxbase\-config\fP or \fIwxgtk\-config\fP which
|
versions like \fIwxbase\-config\fP or \fIwxgtk\-config\fP which
|
||||||
@@ -26,31 +26,32 @@ mechanism.
|
|||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.l
|
.l
|
||||||
\fIwx\-config\fP accepts the following options:
|
\fIwx\-config\fP accepts the following options:
|
||||||
.TP 8
|
.TP 15
|
||||||
.B \-\-version
|
.B \-\-version
|
||||||
What to
|
What to
|
||||||
.B ALWAYS
|
.B ALWAYS
|
||||||
include in a bug report.
|
include in a bug report.
|
||||||
.br
|
.TP 15
|
||||||
( But of course you already knew that ... )
|
.B \-\-libs[=LIBS]
|
||||||
.TP 8
|
Generate linker flags for a \fIwxWidgets\fP program.
|
||||||
.B \-\-libs
|
The optional argument is a comma separated list of the wxWidgets libraries
|
||||||
Generate linker flags for a \fIwxWindows\fP program.
|
to link with. You may include contrib libs here too. If no argument is
|
||||||
.TP 8
|
given it will assume you wish to link all 'core' libraries.
|
||||||
|
.TP 15
|
||||||
.B \-\-cflags
|
.B \-\-cflags
|
||||||
Generate compiler flags for the same.
|
Generate compiler flags for the same.
|
||||||
.TP 8
|
.TP 15
|
||||||
.B \-\-cc
|
.B \-\-cc
|
||||||
Output the name of the C compiler \fB$(CC)\fP.
|
Output the name of the C compiler \fB$(CC)\fP.
|
||||||
.TP 8
|
.TP 15
|
||||||
.B \-\-cxx
|
.B \-\-cxx
|
||||||
Output the name of the C++ compiler \fB$(CXX)\fP.
|
Output the name of the C++ compiler \fB$(CXX)\fP.
|
||||||
.TP 8
|
.TP 15
|
||||||
.B \-\-ld
|
.B \-\-ld
|
||||||
Output the Linker command \fB$(LD)\fP.
|
Output the Linker command \fB$(LD)\fP.
|
||||||
.TP 8
|
.TP 15
|
||||||
.B \-\-prefix=PREFIX
|
.B \-\-prefix=PREFIX
|
||||||
If specified, use PREFIX instead of the installation prefix that \fIwxWindows\fP
|
If specified, use PREFIX instead of the installation prefix that \fIwxWidgets\fP
|
||||||
was built with when computing the output for the \-\-cflags and
|
was built with when computing the output for the \-\-cflags and
|
||||||
\-\-libs options. This option is also used for the exec prefix
|
\-\-libs options. This option is also used for the exec prefix
|
||||||
if \-\-exec\-prefix was not specified. This option must be specified
|
if \-\-exec\-prefix was not specified. This option must be specified
|
||||||
@@ -58,27 +59,33 @@ before any \-\-libs or \-\-cflags options.
|
|||||||
.br
|
.br
|
||||||
.nh
|
.nh
|
||||||
.HP
|
.HP
|
||||||
(Translation: this is the root path to the \fIwxWindows\fP headers \-\- [Ron])
|
(Translation: this is the root path to the \fIwxWidgets\fP headers \-\- [Ron])
|
||||||
.hy
|
.hy
|
||||||
.TP 8
|
.TP 15
|
||||||
.B \-\-exec\-prefix=PREFIX
|
.B \-\-exec\-prefix=PREFIX
|
||||||
If specified, use PREFIX instead of the installation exec prefix that
|
If specified, use PREFIX instead of the installation exec prefix that
|
||||||
\fIwxWindows\fP was built with when computing the output for the \-\-cflags
|
\fIwxWidgets\fP was built with when computing the output for the \-\-cflags
|
||||||
and \-\-libs options. This option must be specified before any
|
and \-\-libs options. This option must be specified before any
|
||||||
\-\-libs or \-\-cflags options.
|
\-\-libs or \-\-cflags options.
|
||||||
.br
|
.br
|
||||||
.nh
|
.nh
|
||||||
.HP
|
.HP
|
||||||
(Translation: this is the root path to the \fIwxWindows\fP library \-\- [Ron])
|
(Translation: this is the root path to the \fIwxWidgets\fP library \-\- [Ron])
|
||||||
.hy
|
.hy
|
||||||
|
.TP 15
|
||||||
|
.B \-\-release
|
||||||
|
Output the wxWidgets release number.
|
||||||
|
.TP 15
|
||||||
|
.B \-\-basename
|
||||||
|
Output the base name of the wxWidgets libraries.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR gtk\-config (1),
|
.BR gtk\-config (1),
|
||||||
.BR update\-alternatives (8)
|
.BR update\-alternatives (8)
|
||||||
.SH COPYRIGHT
|
.SH COPYRIGHT
|
||||||
This manpage was copied whole\-heartedly from the \fBgtk\-config\fP(1) manpage
|
This manpage was copied whole\-heartedly from the \fBgtk\-config\fP(1) manpage
|
||||||
by Brian Bassett <brianb@debian.org> for the Debian GNU/Linux distribution of
|
by Brian Bassett <brianb@debian.org> for the Debian GNU/Linux distribution of
|
||||||
wxGTK. It was then updated to include new options and otherwise bastardised
|
wxGTK. It was subsequently updated to include new options and otherwise
|
||||||
generally by Ron Lee <ron@debian.org>
|
bastardised generally by Ron Lee <ron@debian.org>
|
||||||
|
|
||||||
The original gtk\-config manpage copyright:
|
The original gtk\-config manpage copyright:
|
||||||
|
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
debian/README.examples
|
||||||
docs/examples/demos
|
docs/examples/demos
|
||||||
docs/examples/samples
|
docs/examples/samples
|
||||||
docs/examples/wxPython
|
docs/examples/wxPython
|
||||||
|
|
4
debian/wxPython-tools.1
vendored
4
debian/wxPython-tools.1
vendored
@@ -1,4 +1,4 @@
|
|||||||
.TH wxPython\-tools 1 "3 Jan 2003" "Debian GNU/Linux" "wxWindows"
|
.TH wxPython\-tools 1 "3 Jan 2003" "Debian GNU/Linux" "wxWidgets"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
img2py \- wxPython tools.
|
img2py \- wxPython tools.
|
||||||
.br
|
.br
|
||||||
@@ -22,6 +22,6 @@ The real documentation for these tools is available in pydoc format.
|
|||||||
|
|
||||||
.SH COPYRIGHT
|
.SH COPYRIGHT
|
||||||
This manpage was written by Ron Lee <ron@debian.org> for the Debian GNU/Linux
|
This manpage was written by Ron Lee <ron@debian.org> for the Debian GNU/Linux
|
||||||
distribution of wxWindows. It may be freely distributed by anyone insane enough
|
distribution of wxWidgets. It may be freely distributed by anyone insane enough
|
||||||
to find it useful.
|
to find it useful.
|
||||||
|
|
||||||
|
@@ -13,14 +13,8 @@ WX_DECLARE_USER_EXPORTED_LIST(wxDDEConnection, wxDDEConnectionList, WXDLLIMPEXP_
|
|||||||
|
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
#include "wx/msw/dde.h"
|
#include "wx/msw/dde.h"
|
||||||
#elif defined(__WXMOTIF__)
|
#else
|
||||||
#include "wx/motif/dde.h"
|
#error DDE is only supported on MSW
|
||||||
#elif defined(__WXGTK__)
|
|
||||||
#include "wx/gtk/dde.h"
|
|
||||||
#elif defined(__WXMAC__)
|
|
||||||
#include "wx/mac/dde.h"
|
|
||||||
#elif defined(__WXPM__)
|
|
||||||
#include "wx/os2/dde.h"
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
* Name: wx/wxchar.h
|
* Name: wx/wxchar.h
|
||||||
* Purpose: Declarations common to wx char/wchar_t usage (wide chars)
|
* Purpose: Declarations common to wx char/wchar_t usage (wide chars)
|
||||||
* Author: Joel Farley, Ove K<>ven
|
* Author: Joel Farley, Ove K<>ven
|
||||||
* Modified by: Vadim Zeitlin, Robert Roebling
|
* Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee
|
||||||
* Created: 1998/06/12
|
* Created: 1998/06/12
|
||||||
* RCS-ID: $Id$
|
* RCS-ID: $Id$
|
||||||
* Copyright: (c) 1998-2002 wxWindows dev team
|
* Copyright: (c) 1998-2002 wxWindows dev team
|
||||||
@@ -923,6 +923,12 @@ WXDLLIMPEXP_BASE int wxSystem(const wxChar *psz);
|
|||||||
const wxChar *fmt, const struct tm *tm);
|
const wxChar *fmt, const struct tm *tm);
|
||||||
#endif /* wxNEED_WX_TIME_H */
|
#endif /* wxNEED_WX_TIME_H */
|
||||||
|
|
||||||
|
#ifndef wxCtime
|
||||||
|
#include <time.h>
|
||||||
|
WXDLLIMPEXP_BASE wxChar *wxCtime(const time_t *timep);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* missing functions in some WinCE versions */
|
/* missing functions in some WinCE versions */
|
||||||
#ifdef _WIN32_WCE
|
#ifdef _WIN32_WCE
|
||||||
#if (_WIN32_WCE < 300)
|
#if (_WIN32_WCE < 300)
|
||||||
|
@@ -751,7 +751,7 @@ wxContractPath (const wxString& filename, const wxString& envname, const wxStrin
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Handle User's home (ignore root homes!)
|
// Handle User's home (ignore root homes!)
|
||||||
size_t len;
|
size_t len = 0;
|
||||||
if ((val = wxGetUserHome (user)) != NULL &&
|
if ((val = wxGetUserHome (user)) != NULL &&
|
||||||
(len = wxStrlen(val)) > 2 &&
|
(len = wxStrlen(val)) > 2 &&
|
||||||
wxStrncmp(dest, val, len) == 0)
|
wxStrncmp(dest, val, len) == 0)
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
// Name: wxchar.cpp
|
// Name: wxchar.cpp
|
||||||
// Purpose: wxChar implementation
|
// Purpose: wxChar implementation
|
||||||
// Author: Ove K<>ven
|
// Author: Ove K<>ven
|
||||||
// Modified by:
|
// Modified by: Ron Lee
|
||||||
// Created: 09/04/99
|
// Created: 09/04/99
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) wxWindows copyright
|
// Copyright: (c) wxWindows copyright
|
||||||
@@ -920,7 +920,18 @@ int wxSprintf( wxChar *str, const wxChar *format, ... )
|
|||||||
va_start(argptr, format);
|
va_start(argptr, format);
|
||||||
|
|
||||||
// callers of wxSprintf() deserve what they get
|
// callers of wxSprintf() deserve what they get
|
||||||
int ret = vswprintf( str, UINT_MAX, wxFormatConverter(format), argptr );
|
//int ret = vswprintf( str, UINT_MAX, wxFormatConverter(format), argptr );
|
||||||
|
|
||||||
|
// ... true, but if we are going to implement it, they probably still
|
||||||
|
// deserve something a little better than absolutely guaranteed silent
|
||||||
|
// failure. For some (very mysterious) reason, this call fails under glibc
|
||||||
|
// 2.3.2 if str was allocated on the heap and maxsize is larger than this.
|
||||||
|
// Even more mysterious is that it does still succeed if str was allocated
|
||||||
|
// on the stack. This should still be plenty large enough for people who
|
||||||
|
// want to overflow a buffer. The bug was first noticed in unicode builds
|
||||||
|
// of tex2rtf, but I'm going to fix that to not use this unsafe function
|
||||||
|
// instead of wasting time diagnosing this further right now.
|
||||||
|
int ret = vswprintf( str, INT_MAX / 4, wxFormatConverter(format), argptr );
|
||||||
|
|
||||||
va_end(argptr);
|
va_end(argptr);
|
||||||
|
|
||||||
@@ -964,7 +975,7 @@ int wxVsnprintf( wxChar *str, size_t size, const wxChar *format, va_list argptr
|
|||||||
int wxVsprintf( wxChar *str, const wxChar *format, va_list argptr )
|
int wxVsprintf( wxChar *str, const wxChar *format, va_list argptr )
|
||||||
{
|
{
|
||||||
// same as for wxSprintf()
|
// same as for wxSprintf()
|
||||||
return vswprintf(str, UINT_MAX, wxFormatConverter(format), argptr);
|
return vswprintf(str, INT_MAX / 4, wxFormatConverter(format), argptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxNEED_PRINTF_CONVERSION
|
#endif // wxNEED_PRINTF_CONVERSION
|
||||||
@@ -1345,6 +1356,18 @@ WXDLLEXPORT size_t wxStrftime(wxChar *s, size_t max, const wxChar *fmt, const
|
|||||||
}
|
}
|
||||||
#endif // wxNEED_WX_TIME_H
|
#endif // wxNEED_WX_TIME_H
|
||||||
|
|
||||||
|
#ifndef wxCtime
|
||||||
|
WXDLLEXPORT wxChar *wxCtime(const time_t *timep)
|
||||||
|
{
|
||||||
|
static wxChar buf[128];
|
||||||
|
|
||||||
|
wxStrncpy( buf, wxConvertMB2WX( ctime( timep ) ), sizeof( buf ) );
|
||||||
|
buf[ sizeof( buf ) - 1 ] = _T('\0');
|
||||||
|
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
#endif // wxCtime
|
||||||
|
|
||||||
#endif // wxUSE_WCHAR_T
|
#endif // wxUSE_WCHAR_T
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -415,7 +415,7 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight,
|
|||||||
{
|
{
|
||||||
char outbyte = 0;
|
char outbyte = 0;
|
||||||
int old_x = -1;
|
int old_x = -1;
|
||||||
guint32 old_pixval;
|
guint32 old_pixval = 0;
|
||||||
|
|
||||||
for (int w = 0; w < width; w++)
|
for (int w = 0; w < width; w++)
|
||||||
{
|
{
|
||||||
@@ -480,7 +480,7 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight,
|
|||||||
{
|
{
|
||||||
char outbyte = 0;
|
char outbyte = 0;
|
||||||
int old_x = -1;
|
int old_x = -1;
|
||||||
guint32 old_pixval;
|
guint32 old_pixval = 0;
|
||||||
|
|
||||||
for (int w = 0; w < width; w++)
|
for (int w = 0; w < width; w++)
|
||||||
{
|
{
|
||||||
|
@@ -192,3 +192,4 @@ void wxFontDialog::SetChosenFont(const char *fontname)
|
|||||||
#endif // wxUSE_FONTDLG
|
#endif // wxUSE_FONTDLG
|
||||||
|
|
||||||
#endif // GPE
|
#endif // GPE
|
||||||
|
|
||||||
|
@@ -45,7 +45,7 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
|
|||||||
int wxMessageDialog::ShowModal()
|
int wxMessageDialog::ShowModal()
|
||||||
{
|
{
|
||||||
GtkWidget *dlg;
|
GtkWidget *dlg;
|
||||||
GtkMessageType type;
|
GtkMessageType type = GTK_MESSAGE_ERROR;
|
||||||
GtkButtonsType buttons = GTK_BUTTONS_OK;
|
GtkButtonsType buttons = GTK_BUTTONS_OK;
|
||||||
|
|
||||||
if (m_dialogStyle & wxYES_NO)
|
if (m_dialogStyle & wxYES_NO)
|
||||||
@@ -69,6 +69,8 @@ int wxMessageDialog::ShowModal()
|
|||||||
type = GTK_MESSAGE_INFO;
|
type = GTK_MESSAGE_INFO;
|
||||||
else if (m_dialogStyle & wxICON_QUESTION)
|
else if (m_dialogStyle & wxICON_QUESTION)
|
||||||
type = GTK_MESSAGE_QUESTION;
|
type = GTK_MESSAGE_QUESTION;
|
||||||
|
else
|
||||||
|
wxFAIL_MSG( _T("Unknown wxMessageDialog type") );
|
||||||
|
|
||||||
dlg = gtk_message_dialog_new(m_parent ?
|
dlg = gtk_message_dialog_new(m_parent ?
|
||||||
GTK_WINDOW(m_parent->m_widget) : NULL,
|
GTK_WINDOW(m_parent->m_widget) : NULL,
|
||||||
|
@@ -415,7 +415,7 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight,
|
|||||||
{
|
{
|
||||||
char outbyte = 0;
|
char outbyte = 0;
|
||||||
int old_x = -1;
|
int old_x = -1;
|
||||||
guint32 old_pixval;
|
guint32 old_pixval = 0;
|
||||||
|
|
||||||
for (int w = 0; w < width; w++)
|
for (int w = 0; w < width; w++)
|
||||||
{
|
{
|
||||||
@@ -480,7 +480,7 @@ wxBitmap wxBitmap::Rescale( int clipx, int clipy, int clipwidth, int clipheight,
|
|||||||
{
|
{
|
||||||
char outbyte = 0;
|
char outbyte = 0;
|
||||||
int old_x = -1;
|
int old_x = -1;
|
||||||
guint32 old_pixval;
|
guint32 old_pixval = 0;
|
||||||
|
|
||||||
for (int w = 0; w < width; w++)
|
for (int w = 0; w < width; w++)
|
||||||
{
|
{
|
||||||
|
@@ -192,3 +192,4 @@ void wxFontDialog::SetChosenFont(const char *fontname)
|
|||||||
#endif // wxUSE_FONTDLG
|
#endif // wxUSE_FONTDLG
|
||||||
|
|
||||||
#endif // GPE
|
#endif // GPE
|
||||||
|
|
||||||
|
@@ -45,7 +45,7 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
|
|||||||
int wxMessageDialog::ShowModal()
|
int wxMessageDialog::ShowModal()
|
||||||
{
|
{
|
||||||
GtkWidget *dlg;
|
GtkWidget *dlg;
|
||||||
GtkMessageType type;
|
GtkMessageType type = GTK_MESSAGE_ERROR;
|
||||||
GtkButtonsType buttons = GTK_BUTTONS_OK;
|
GtkButtonsType buttons = GTK_BUTTONS_OK;
|
||||||
|
|
||||||
if (m_dialogStyle & wxYES_NO)
|
if (m_dialogStyle & wxYES_NO)
|
||||||
@@ -69,6 +69,8 @@ int wxMessageDialog::ShowModal()
|
|||||||
type = GTK_MESSAGE_INFO;
|
type = GTK_MESSAGE_INFO;
|
||||||
else if (m_dialogStyle & wxICON_QUESTION)
|
else if (m_dialogStyle & wxICON_QUESTION)
|
||||||
type = GTK_MESSAGE_QUESTION;
|
type = GTK_MESSAGE_QUESTION;
|
||||||
|
else
|
||||||
|
wxFAIL_MSG( _T("Unknown wxMessageDialog type") );
|
||||||
|
|
||||||
dlg = gtk_message_dialog_new(m_parent ?
|
dlg = gtk_message_dialog_new(m_parent ?
|
||||||
GTK_WINDOW(m_parent->m_widget) : NULL,
|
GTK_WINDOW(m_parent->m_widget) : NULL,
|
||||||
|
@@ -3,7 +3,8 @@
|
|||||||
// Purpose: Utilities for manipulating bitmap and metafile images for
|
// Purpose: Utilities for manipulating bitmap and metafile images for
|
||||||
// the purposes of conversion to RTF
|
// the purposes of conversion to RTF
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by: Wlodzimiez ABX Skiba 2003/2004 Unicode support
|
||||||
|
// Ron Lee
|
||||||
// Created: 7.9.93
|
// Created: 7.9.93
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
@@ -63,7 +64,7 @@ bool GetBMPHeader(FILE *fp, int *Width, int *Height, int *Planes, int *BitsPerPi
|
|||||||
|
|
||||||
/* read the file type (first two bytes) */
|
/* read the file type (first two bytes) */
|
||||||
int c = getc(fp); int c1 = getc(fp);
|
int c = getc(fp); int c1 = getc(fp);
|
||||||
if (c!='B' || c1!='M') { return FALSE; }
|
if (c!='B' || c1!='M') { return false; }
|
||||||
|
|
||||||
/* bfSize = */ getint(fp);
|
/* bfSize = */ getint(fp);
|
||||||
getshort(fp); /* reserved and ignored */
|
getshort(fp); /* reserved and ignored */
|
||||||
@@ -89,16 +90,16 @@ bool GetBMPHeader(FILE *fp, int *Width, int *Height, int *Planes, int *BitsPerPi
|
|||||||
|
|
||||||
// fseek(fp, bfOffBits, SEEK_SET);
|
// fseek(fp, bfOffBits, SEEK_SET);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int scanLineWidth = 0;
|
static int scanLineWidth = 0;
|
||||||
|
|
||||||
bool OutputBitmapHeader(FILE *fd, bool isWinHelp = FALSE)
|
bool OutputBitmapHeader(FILE *fd, bool isWinHelp = false)
|
||||||
{
|
{
|
||||||
int Width, Height, Planes, BitsPerPixel;
|
int Width, Height, Planes, BitsPerPixel;
|
||||||
if (!GetBMPHeader(fd, &Width, &Height, &Planes, &BitsPerPixel))
|
if (!GetBMPHeader(fd, &Width, &Height, &Planes, &BitsPerPixel))
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
scanLineWidth = (int)((float)Width/(8.0/(float)BitsPerPixel));
|
scanLineWidth = (int)((float)Width/(8.0/(float)BitsPerPixel));
|
||||||
if ((float)((int)(scanLineWidth/2.0)) != (float)(scanLineWidth/2.0))
|
if ((float)((int)(scanLineWidth/2.0)) != (float)(scanLineWidth/2.0))
|
||||||
@@ -112,15 +113,15 @@ bool OutputBitmapHeader(FILE *fd, bool isWinHelp = FALSE)
|
|||||||
else TexOutput(_T("\\dibitmap)"));
|
else TexOutput(_T("\\dibitmap)"));
|
||||||
|
|
||||||
wxChar buf[50];
|
wxChar buf[50];
|
||||||
TexOutput(_T("\\picw")); wxSprintf(buf, _T("%d"), Width); TexOutput(buf);
|
TexOutput(_T("\\picw")); wxSnprintf(buf, sizeof(buf), _T("%d"), Width); TexOutput(buf);
|
||||||
TexOutput(_T("\\pich")); wxSprintf(buf, _T("%d"), Height); TexOutput(buf);
|
TexOutput(_T("\\pich")); wxSnprintf(buf, sizeof(buf), _T("%d"), Height); TexOutput(buf);
|
||||||
TexOutput(_T("\\wbmbitspixel")); wxSprintf(buf, _T("%d"), BitsPerPixel); TexOutput(buf);
|
TexOutput(_T("\\wbmbitspixel")); wxSnprintf(buf, sizeof(buf), _T("%d"), BitsPerPixel); TexOutput(buf);
|
||||||
TexOutput(_T("\\wbmplanes")); wxSprintf(buf, _T("%d"), Planes); TexOutput(buf);
|
TexOutput(_T("\\wbmplanes")); wxSnprintf(buf, sizeof(buf), _T("%d"), Planes); TexOutput(buf);
|
||||||
TexOutput(_T("\\wbmwidthbytes")); wxSprintf(buf, _T("%d"), scanLineWidth); TexOutput(buf);
|
TexOutput(_T("\\wbmwidthbytes")); wxSnprintf(buf, sizeof(buf), _T("%d"), scanLineWidth); TexOutput(buf);
|
||||||
TexOutput(_T("\\picwgoal")); wxSprintf(buf, _T("%d"), goalW); TexOutput(buf);
|
TexOutput(_T("\\picwgoal")); wxSnprintf(buf, sizeof(buf), _T("%d"), goalW); TexOutput(buf);
|
||||||
TexOutput(_T("\\pichgoal")); wxSprintf(buf, _T("%d"), goalH); TexOutput(buf);
|
TexOutput(_T("\\pichgoal")); wxSnprintf(buf, sizeof(buf), _T("%d"), goalH); TexOutput(buf);
|
||||||
TexOutput(_T("\n"));
|
TexOutput(_T("\n"));
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -143,7 +144,7 @@ bool OutputBitmapData(FILE *fd)
|
|||||||
ch = getc(fd);
|
ch = getc(fd);
|
||||||
}
|
}
|
||||||
TexOutput(_T("\n}\n"));
|
TexOutput(_T("\n}\n"));
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
@@ -164,21 +165,21 @@ bool GetMetafileHeader(FILE *handle, int *width, int *height)
|
|||||||
fread((void *)theHeader, sizeof(char), sizeof(mfPLACEABLEHEADER), handle);
|
fread((void *)theHeader, sizeof(char), sizeof(mfPLACEABLEHEADER), handle);
|
||||||
if (theHeader->key != 0x9AC6CDD7)
|
if (theHeader->key != 0x9AC6CDD7)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
float widthInUnits = (float)theHeader->bbox.right - theHeader->bbox.left;
|
float widthInUnits = (float)theHeader->bbox.right - theHeader->bbox.left;
|
||||||
float heightInUnits = (float)theHeader->bbox.bottom - theHeader->bbox.top;
|
float heightInUnits = (float)theHeader->bbox.bottom - theHeader->bbox.top;
|
||||||
*width = (int)((widthInUnits*1440.0)/theHeader->inch);
|
*width = (int)((widthInUnits*1440.0)/theHeader->inch);
|
||||||
*height = (int)((heightInUnits*1440.0)/theHeader->inch);
|
*height = (int)((heightInUnits*1440.0)/theHeader->inch);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OutputMetafileHeader(FILE *handle, bool WXUNUSED(isWinHelp), int userWidth, int userHeight)
|
bool OutputMetafileHeader(FILE *handle, bool WXUNUSED(isWinHelp), int userWidth, int userHeight)
|
||||||
{
|
{
|
||||||
int Width, Height;
|
int Width, Height;
|
||||||
if (!GetMetafileHeader(handle, &Width, &Height))
|
if (!GetMetafileHeader(handle, &Width, &Height))
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
scanLineWidth = 64;
|
scanLineWidth = 64;
|
||||||
int goalW = Width;
|
int goalW = Width;
|
||||||
@@ -207,12 +208,12 @@ bool OutputMetafileHeader(FILE *handle, bool WXUNUSED(isWinHelp), int userWidth,
|
|||||||
TexOutput(_T("\\wmetafile8"));
|
TexOutput(_T("\\wmetafile8"));
|
||||||
|
|
||||||
wxChar buf[50];
|
wxChar buf[50];
|
||||||
TexOutput(_T("\\picw")); wxSprintf(buf, _T("%d"), Width); TexOutput(buf);
|
TexOutput(_T("\\picw")); wxSnprintf(buf, sizeof(buf), _T("%d"), Width); TexOutput(buf);
|
||||||
TexOutput(_T("\\pich")); wxSprintf(buf, _T("%d"), Height); TexOutput(buf);
|
TexOutput(_T("\\pich")); wxSnprintf(buf, sizeof(buf), _T("%d"), Height); TexOutput(buf);
|
||||||
TexOutput(_T("\\picwgoal")); wxSprintf(buf, _T("%d"), goalW); TexOutput(buf);
|
TexOutput(_T("\\picwgoal")); wxSnprintf(buf, sizeof(buf), _T("%d"), goalW); TexOutput(buf);
|
||||||
TexOutput(_T("\\pichgoal")); wxSprintf(buf, _T("%d"), goalH); TexOutput(buf);
|
TexOutput(_T("\\pichgoal")); wxSnprintf(buf, sizeof(buf), _T("%d"), goalH); TexOutput(buf);
|
||||||
TexOutput(_T("\n"));
|
TexOutput(_T("\n"));
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OutputMetafileData(FILE *handle)
|
bool OutputMetafileData(FILE *handle)
|
||||||
@@ -236,7 +237,7 @@ bool OutputMetafileData(FILE *handle)
|
|||||||
}
|
}
|
||||||
} while (ch != EOF);
|
} while (ch != EOF);
|
||||||
TexOutput(_T("\n}\n"));
|
TexOutput(_T("\n}\n"));
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,8 @@
|
|||||||
// reverse-engineering
|
// reverse-engineering
|
||||||
// and guesswork at its best.
|
// and guesswork at its best.
|
||||||
// Author: Petr Smilauer
|
// Author: Petr Smilauer
|
||||||
// Modified by:
|
// Modified by: Wlodzimiez ABX Skiba 2003/2004 Unicode support
|
||||||
|
// Ron Lee
|
||||||
// Created: 01/01/99
|
// Created: 01/01/99
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Petr Smilauer
|
// Copyright: (c) Petr Smilauer
|
||||||
@@ -116,10 +117,10 @@ bool SHGToMap(wxChar *filename, wxChar *defaultFile)
|
|||||||
HotSpot *hotspots = NULL;
|
HotSpot *hotspots = NULL;
|
||||||
int n = ParseSHG(filename, &hotspots);
|
int n = ParseSHG(filename, &hotspots);
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
wxChar buf[100];
|
wxChar buf[100];
|
||||||
wxSprintf(buf, _T("Converting .SHG file to HTML map file: there are %d hotspots in %s."), n, filename);
|
wxSnprintf(buf, sizeof(buf), _T("Converting .SHG file to HTML map file: there are %d hotspots in %s."), n, filename);
|
||||||
OnInform(buf);
|
OnInform(buf);
|
||||||
|
|
||||||
wxChar outBuf[256];
|
wxChar outBuf[256];
|
||||||
@@ -132,7 +133,7 @@ bool SHGToMap(wxChar *filename, wxChar *defaultFile)
|
|||||||
{
|
{
|
||||||
OnError(_T("Could not open .map file for writing."));
|
OnError(_T("Could not open .map file for writing."));
|
||||||
delete[] hotspots;
|
delete[] hotspots;
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFprintf(fd, _T("default %s\n"), defaultFile);
|
wxFprintf(fd, _T("default %s\n"), defaultFile);
|
||||||
@@ -146,7 +147,7 @@ bool SHGToMap(wxChar *filename, wxChar *defaultFile)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxChar buf[300];
|
wxChar buf[300];
|
||||||
wxSprintf(buf, _T("Warning: could not find hotspot reference %s"), hotspots[i].szHlpTopic_Macro);
|
wxSnprintf(buf, sizeof(buf), _T("Warning: could not find hotspot reference %s"), hotspots[i].szHlpTopic_Macro);
|
||||||
OnInform(buf);
|
OnInform(buf);
|
||||||
}
|
}
|
||||||
wxFprintf(fd, _T("rect %s %d %d %d %d\n"), refFilename, (int)hotspots[i].left, (int)hotspots[i].top,
|
wxFprintf(fd, _T("rect %s %d %d %d %d\n"), refFilename, (int)hotspots[i].left, (int)hotspots[i].top,
|
||||||
@@ -157,6 +158,6 @@ bool SHGToMap(wxChar *filename, wxChar *defaultFile)
|
|||||||
fclose(fd);
|
fclose(fd);
|
||||||
|
|
||||||
delete[] hotspots;
|
delete[] hotspots;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,8 @@
|
|||||||
// Name: table.cpp
|
// Name: table.cpp
|
||||||
// Purpose: Utilities for manipulating tables
|
// Purpose: Utilities for manipulating tables
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by: Wlodzimiez ABX Skiba 2003/2004 Unicode support
|
||||||
|
// Ron Lee
|
||||||
// Created: 01/01/99
|
// Created: 01/01/99
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
@@ -42,11 +43,11 @@
|
|||||||
#include "table.h"
|
#include "table.h"
|
||||||
|
|
||||||
ColumnData TableData[40];
|
ColumnData TableData[40];
|
||||||
bool inTabular = FALSE;
|
bool inTabular = false;
|
||||||
|
|
||||||
bool startRows = FALSE;
|
bool startRows = false;
|
||||||
bool tableVerticalLineLeft = FALSE;
|
bool tableVerticalLineLeft = false;
|
||||||
bool tableVerticalLineRight = FALSE;
|
bool tableVerticalLineRight = false;
|
||||||
int noColumns = 0; // Current number of columns in table
|
int noColumns = 0; // Current number of columns in table
|
||||||
int ruleTop = 0;
|
int ruleTop = 0;
|
||||||
int ruleBottom = 0;
|
int ruleBottom = 0;
|
||||||
@@ -62,50 +63,50 @@ bool ParseTableArgument(wxChar *value)
|
|||||||
noColumns = 0;
|
noColumns = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int len = wxStrlen(value);
|
int len = wxStrlen(value);
|
||||||
bool isBorder = FALSE;
|
bool isBorder = false;
|
||||||
while (i < len)
|
while (i < len)
|
||||||
{
|
{
|
||||||
int ch = value[i];
|
int ch = value[i];
|
||||||
if (ch == '|')
|
if (ch == '|')
|
||||||
{
|
{
|
||||||
i ++;
|
i ++;
|
||||||
isBorder = TRUE;
|
isBorder = true;
|
||||||
}
|
}
|
||||||
else if (ch == 'l')
|
else if (ch == 'l')
|
||||||
{
|
{
|
||||||
TableData[noColumns].leftBorder = isBorder;
|
TableData[noColumns].leftBorder = isBorder;
|
||||||
TableData[noColumns].rightBorder = FALSE;
|
TableData[noColumns].rightBorder = false;
|
||||||
TableData[noColumns].justification = 'l';
|
TableData[noColumns].justification = 'l';
|
||||||
TableData[noColumns].width = 2000; // Estimate
|
TableData[noColumns].width = 2000; // Estimate
|
||||||
TableData[noColumns].absWidth = FALSE;
|
TableData[noColumns].absWidth = false;
|
||||||
// TableData[noColumns].spacing = ??
|
// TableData[noColumns].spacing = ??
|
||||||
noColumns ++;
|
noColumns ++;
|
||||||
i ++;
|
i ++;
|
||||||
isBorder = FALSE;
|
isBorder = false;
|
||||||
}
|
}
|
||||||
else if (ch == 'c')
|
else if (ch == 'c')
|
||||||
{
|
{
|
||||||
TableData[noColumns].leftBorder = isBorder;
|
TableData[noColumns].leftBorder = isBorder;
|
||||||
TableData[noColumns].rightBorder = FALSE;
|
TableData[noColumns].rightBorder = false;
|
||||||
TableData[noColumns].justification = 'c';
|
TableData[noColumns].justification = 'c';
|
||||||
TableData[noColumns].width = defaultTableColumnWidth; // Estimate
|
TableData[noColumns].width = defaultTableColumnWidth; // Estimate
|
||||||
TableData[noColumns].absWidth = FALSE;
|
TableData[noColumns].absWidth = false;
|
||||||
// TableData[noColumns].spacing = ??
|
// TableData[noColumns].spacing = ??
|
||||||
noColumns ++;
|
noColumns ++;
|
||||||
i ++;
|
i ++;
|
||||||
isBorder = FALSE;
|
isBorder = false;
|
||||||
}
|
}
|
||||||
else if (ch == 'r')
|
else if (ch == 'r')
|
||||||
{
|
{
|
||||||
TableData[noColumns].leftBorder = isBorder;
|
TableData[noColumns].leftBorder = isBorder;
|
||||||
TableData[noColumns].rightBorder = FALSE;
|
TableData[noColumns].rightBorder = false;
|
||||||
TableData[noColumns].justification = 'r';
|
TableData[noColumns].justification = 'r';
|
||||||
TableData[noColumns].width = 2000; // Estimate
|
TableData[noColumns].width = 2000; // Estimate
|
||||||
TableData[noColumns].absWidth = FALSE;
|
TableData[noColumns].absWidth = false;
|
||||||
// TableData[noColumns].spacing = ??
|
// TableData[noColumns].spacing = ??
|
||||||
noColumns ++;
|
noColumns ++;
|
||||||
i ++;
|
i ++;
|
||||||
isBorder = FALSE;
|
isBorder = false;
|
||||||
}
|
}
|
||||||
else if (ch == 'p')
|
else if (ch == 'p')
|
||||||
{
|
{
|
||||||
@@ -135,24 +136,24 @@ bool ParseTableArgument(wxChar *value)
|
|||||||
if (value[i] == '}') i++;
|
if (value[i] == '}') i++;
|
||||||
|
|
||||||
TableData[noColumns].leftBorder = isBorder;
|
TableData[noColumns].leftBorder = isBorder;
|
||||||
TableData[noColumns].rightBorder = FALSE;
|
TableData[noColumns].rightBorder = false;
|
||||||
TableData[noColumns].justification = 'l';
|
TableData[noColumns].justification = 'l';
|
||||||
TableData[noColumns].width = 20*ParseUnitArgument(numberBuf);
|
TableData[noColumns].width = 20*ParseUnitArgument(numberBuf);
|
||||||
TableData[noColumns].absWidth = TRUE;
|
TableData[noColumns].absWidth = true;
|
||||||
// TableData[noColumns].spacing = ??
|
// TableData[noColumns].spacing = ??
|
||||||
noColumns ++;
|
noColumns ++;
|
||||||
isBorder = FALSE;
|
isBorder = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxChar *buf = new wxChar[wxStrlen(value) + 80];
|
wxChar *buf = new wxChar[wxStrlen(value) + 80];
|
||||||
wxSprintf(buf, _T("Tabular first argument \"%s\" too complex!"), value);
|
wxSnprintf(buf, wxStrlen(value) + 80, _T("Tabular first argument \"%s\" too complex!"), value);
|
||||||
OnError(buf);
|
OnError(buf);
|
||||||
delete[] buf;
|
delete[] buf;
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isBorder)
|
if (isBorder)
|
||||||
TableData[noColumns-1].rightBorder = TRUE;
|
TableData[noColumns-1].rightBorder = true;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -147,20 +147,20 @@ extern wxStringList IgnorableInputFiles; // Ignorable \input files, e.g. psbox.t
|
|||||||
bool read_a_line(wxChar *buf);
|
bool read_a_line(wxChar *buf);
|
||||||
bool TexLoadFile(wxChar *filename);
|
bool TexLoadFile(wxChar *filename);
|
||||||
int ParseArg(TexChunk *thisArg, wxList& children, wxChar *buffer, int pos,
|
int ParseArg(TexChunk *thisArg, wxList& children, wxChar *buffer, int pos,
|
||||||
wxChar *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
|
wxChar *environment = NULL, bool parseArgToBrace = true, TexChunk *customMacroArgs = NULL);
|
||||||
int ParseMacroBody(const wxChar *macro_name, TexChunk *parent, int no_args,
|
int ParseMacroBody(const wxChar *macro_name, TexChunk *parent, int no_args,
|
||||||
wxChar *buffer, int pos, wxChar *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
|
wxChar *buffer, int pos, wxChar *environment = NULL, bool parseArgToBrace = true, TexChunk *customMacroArgs = NULL);
|
||||||
void TraverseDocument(void);
|
void TraverseDocument(void);
|
||||||
void TraverseFromChunk(TexChunk *chunk, wxNode *thisNode = NULL, bool childrenOnly = FALSE);
|
void TraverseFromChunk(TexChunk *chunk, wxNode *thisNode = NULL, bool childrenOnly = false);
|
||||||
#define TraverseChildrenFromChunk(arg) TraverseFromChunk(arg, NULL, TRUE)
|
#define TraverseChildrenFromChunk(arg) TraverseFromChunk(arg, NULL, true)
|
||||||
void SetCurrentOutput(FILE *fd);
|
void SetCurrentOutput(FILE *fd);
|
||||||
void SetCurrentOutputs(FILE *fd1, FILE *fd2);
|
void SetCurrentOutputs(FILE *fd1, FILE *fd2);
|
||||||
extern FILE *CurrentOutput1;
|
extern FILE *CurrentOutput1;
|
||||||
extern FILE *CurrentOutput2;
|
extern FILE *CurrentOutput2;
|
||||||
void AddMacroDef(int the_id, const wxChar *name, int n, bool ignore = FALSE, bool forbidden = FALSE);
|
void AddMacroDef(int the_id, const wxChar *name, int n, bool ignore = false, bool forbidden = false);
|
||||||
void TexInitialize(int bufSize);
|
void TexInitialize(int bufSize);
|
||||||
void TexCleanUp(void);
|
void TexCleanUp(void);
|
||||||
void TexOutput(const wxChar *s, bool ordinaryText = FALSE);
|
void TexOutput(const wxChar *s, bool ordinaryText = false);
|
||||||
wxChar *GetArgData(TexChunk *chunk);
|
wxChar *GetArgData(TexChunk *chunk);
|
||||||
wxChar *GetArgData(void); // Get the string for the current argument
|
wxChar *GetArgData(void); // Get the string for the current argument
|
||||||
int GetNoArgs(void); // Get the number of arguments for the current macro
|
int GetNoArgs(void); // Get the number of arguments for the current macro
|
||||||
@@ -174,11 +174,11 @@ wxChar *ConvertCase(wxChar *s); // Convert case, according to upperCaseN
|
|||||||
extern wxPathList TexPathList; // Path list, can be used for file searching.
|
extern wxPathList TexPathList; // Path list, can be used for file searching.
|
||||||
|
|
||||||
#if !WXWIN_COMPATIBILITY_2
|
#if !WXWIN_COMPATIBILITY_2
|
||||||
extern bool StringMatch(const wxChar *one, const wxChar *two, bool subString = TRUE, bool exact = FALSE);
|
extern bool StringMatch(const wxChar *one, const wxChar *two, bool subString = true, bool exact = false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Define a variable value from the .ini file
|
// Define a variable value from the .ini file
|
||||||
wxChar *RegisterSetting(wxChar *settingName, wxChar *settingValue, bool interactive = TRUE);
|
wxChar *RegisterSetting(wxChar *settingName, wxChar *settingValue, bool interactive = true);
|
||||||
|
|
||||||
// Major document styles
|
// Major document styles
|
||||||
#define LATEX_REPORT 1
|
#define LATEX_REPORT 1
|
||||||
@@ -324,7 +324,7 @@ extern void OutputCurrentSectionToString(wxChar *buf);
|
|||||||
extern void OutputChunkToString(TexChunk *chunk, wxChar *buf);
|
extern void OutputChunkToString(TexChunk *chunk, wxChar *buf);
|
||||||
|
|
||||||
// Called by Tex2Any to simulate a section
|
// Called by Tex2Any to simulate a section
|
||||||
extern void FakeCurrentSection(wxChar *fakeSection, bool addToContents = TRUE);
|
extern void FakeCurrentSection(wxChar *fakeSection, bool addToContents = true);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Local to Tex2Any library
|
* Local to Tex2Any library
|
||||||
@@ -362,7 +362,7 @@ void OnError(const wxChar *msg);
|
|||||||
void OnInform(const wxChar *msg);
|
void OnInform(const wxChar *msg);
|
||||||
|
|
||||||
// Special yield wrapper
|
// Special yield wrapper
|
||||||
void Tex2RTFYield(bool force = FALSE);
|
void Tex2RTFYield(bool force = false);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Useful utilities
|
* Useful utilities
|
||||||
|
@@ -2,7 +2,8 @@
|
|||||||
// Name: tex2rtf.cpp
|
// Name: tex2rtf.cpp
|
||||||
// Purpose: Converts Latex to linear/WinHelp RTF, HTML, wxHelp.
|
// Purpose: Converts Latex to linear/WinHelp RTF, HTML, wxHelp.
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by: Wlodzimiez ABX Skiba 2003/2004 Unicode support
|
||||||
|
// Ron Lee
|
||||||
// Created: 7.9.93
|
// Created: 7.9.93
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
@@ -34,7 +35,6 @@
|
|||||||
#include "wx/timer.h"
|
#include "wx/timer.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(NO_GUI) || defined(__UNIX__)
|
|
||||||
#if wxUSE_IOSTREAMH
|
#if wxUSE_IOSTREAMH
|
||||||
#include <iostream.h>
|
#include <iostream.h>
|
||||||
#include <fstream.h>
|
#include <fstream.h>
|
||||||
@@ -42,7 +42,6 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -63,10 +62,10 @@ static inline wxChar* copystring(const wxChar* s)
|
|||||||
const float versionNo = TEX2RTF_VERSION_NUMBER;
|
const float versionNo = TEX2RTF_VERSION_NUMBER;
|
||||||
|
|
||||||
TexChunk *currentMember = NULL;
|
TexChunk *currentMember = NULL;
|
||||||
bool startedSections = FALSE;
|
bool startedSections = false;
|
||||||
wxChar *contentsString = NULL;
|
wxChar *contentsString = NULL;
|
||||||
bool suppressNameDecoration = FALSE;
|
bool suppressNameDecoration = false;
|
||||||
bool OkToClose = TRUE;
|
bool OkToClose = true;
|
||||||
int passNumber = 1;
|
int passNumber = 1;
|
||||||
unsigned long errorCount = 0;
|
unsigned long errorCount = 0;
|
||||||
|
|
||||||
@@ -127,18 +126,16 @@ void ShowOptions(void);
|
|||||||
wxChar wxTex2RTFBuffer[1500];
|
wxChar wxTex2RTFBuffer[1500];
|
||||||
|
|
||||||
#ifdef NO_GUI
|
#ifdef NO_GUI
|
||||||
|
IMPLEMENT_APP_CONSOLE(MyApp)
|
||||||
int main(int argc, char **argv)
|
|
||||||
#else
|
#else
|
||||||
wxMenuBar *menuBar = NULL;
|
wxMenuBar *menuBar = NULL;
|
||||||
MyFrame *frame = NULL;
|
MyFrame *frame = NULL;
|
||||||
|
// DECLARE_APP(MyApp)
|
||||||
// DECLARE_APP(MyApp)
|
IMPLEMENT_APP(MyApp)
|
||||||
IMPLEMENT_APP(MyApp)
|
#endif
|
||||||
|
|
||||||
// `Main program' equivalent, creating windows and returning main app frame
|
// `Main program' equivalent, creating windows and returning main app frame
|
||||||
bool MyApp::OnInit()
|
bool MyApp::OnInit()
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
// Use default list of macros defined in tex2any.cc
|
// Use default list of macros defined in tex2any.cc
|
||||||
DefineDefaultMacros();
|
DefineDefaultMacros();
|
||||||
@@ -151,7 +148,7 @@ bool MyApp::OnInit()
|
|||||||
WinHelpContentsFileName = new wxChar[300];
|
WinHelpContentsFileName = new wxChar[300];
|
||||||
RefFileName = new wxChar[300];
|
RefFileName = new wxChar[300];
|
||||||
|
|
||||||
ColourTable.DeleteContents(TRUE);
|
ColourTable.DeleteContents(true);
|
||||||
|
|
||||||
int n = 1;
|
int n = 1;
|
||||||
|
|
||||||
@@ -181,14 +178,14 @@ bool MyApp::OnInit()
|
|||||||
ShowOptions();
|
ShowOptions();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (InputFile)
|
if (InputFile)
|
||||||
{
|
{
|
||||||
TexPathList.EnsureFileAccessible(InputFile);
|
TexPathList.EnsureFileAccessible(InputFile);
|
||||||
}
|
}
|
||||||
if (!InputFile || !OutputFile)
|
if (!InputFile || !OutputFile)
|
||||||
isInteractive = TRUE;
|
isInteractive = true;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i = n; i < argc;)
|
for (i = n; i < argc;)
|
||||||
@@ -197,19 +194,19 @@ bool MyApp::OnInit()
|
|||||||
{
|
{
|
||||||
i ++;
|
i ++;
|
||||||
convertMode = TEX_RTF;
|
convertMode = TEX_RTF;
|
||||||
winHelp = TRUE;
|
winHelp = true;
|
||||||
}
|
}
|
||||||
#ifndef NO_GUI
|
#ifndef NO_GUI
|
||||||
else if (wxStrcmp(argv[i], _T("-interactive")) == 0)
|
else if (wxStrcmp(argv[i], _T("-interactive")) == 0)
|
||||||
{
|
{
|
||||||
i ++;
|
i ++;
|
||||||
isInteractive = TRUE;
|
isInteractive = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else if (wxStrcmp(argv[i], _T("-sync")) == 0) // Don't yield
|
else if (wxStrcmp(argv[i], _T("-sync")) == 0) // Don't yield
|
||||||
{
|
{
|
||||||
i ++;
|
i ++;
|
||||||
isSync = TRUE;
|
isSync = true;
|
||||||
}
|
}
|
||||||
else if (wxStrcmp(argv[i], _T("-rtf")) == 0)
|
else if (wxStrcmp(argv[i], _T("-rtf")) == 0)
|
||||||
{
|
{
|
||||||
@@ -229,7 +226,7 @@ bool MyApp::OnInit()
|
|||||||
else if (wxStrcmp(argv[i], _T("-twice")) == 0)
|
else if (wxStrcmp(argv[i], _T("-twice")) == 0)
|
||||||
{
|
{
|
||||||
i ++;
|
i ++;
|
||||||
runTwice = TRUE;
|
runTwice = true;
|
||||||
}
|
}
|
||||||
else if (wxStrcmp(argv[i], _T("-macros")) == 0)
|
else if (wxStrcmp(argv[i], _T("-macros")) == 0)
|
||||||
{
|
{
|
||||||
@@ -262,19 +259,19 @@ bool MyApp::OnInit()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
OnError(_T("Incorrect argument for -charset"));
|
OnError(_T("Incorrect argument for -charset"));
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (wxStrcmp(argv[i], _T("-checkcurleybraces")) == 0)
|
else if (wxStrcmp(argv[i], _T("-checkcurleybraces")) == 0)
|
||||||
{
|
{
|
||||||
i ++;
|
i ++;
|
||||||
checkCurleyBraces = TRUE;
|
checkCurleyBraces = true;
|
||||||
}
|
}
|
||||||
else if (wxStrcmp(argv[i], _T("-checksyntax")) == 0)
|
else if (wxStrcmp(argv[i], _T("-checksyntax")) == 0)
|
||||||
{
|
{
|
||||||
i ++;
|
i ++;
|
||||||
checkSyntax = TRUE;
|
checkSyntax = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -285,7 +282,7 @@ bool MyApp::OnInit()
|
|||||||
ShowOptions();
|
ShowOptions();
|
||||||
exit(1);
|
exit(1);
|
||||||
#endif
|
#endif
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -311,7 +308,7 @@ bool MyApp::OnInit()
|
|||||||
wxChar buf[100];
|
wxChar buf[100];
|
||||||
|
|
||||||
// Create the main frame window
|
// Create the main frame window
|
||||||
frame = new MyFrame(NULL, -1, _T("Tex2RTF"), wxPoint(-1, -1), wxSize(400, 300));
|
frame = new MyFrame(NULL, wxID_ANY, _T("Tex2RTF"), wxDefaultPosition, wxSize(400, 300));
|
||||||
frame->CreateStatusBar(2);
|
frame->CreateStatusBar(2);
|
||||||
|
|
||||||
// Give it an icon
|
// Give it an icon
|
||||||
@@ -320,7 +317,7 @@ bool MyApp::OnInit()
|
|||||||
|
|
||||||
if (InputFile)
|
if (InputFile)
|
||||||
{
|
{
|
||||||
wxSprintf(buf, _T("Tex2RTF [%s]"), wxFileNameFromPath(InputFile));
|
wxSnprintf(buf, sizeof(buf), _T("Tex2RTF [%s]"), wxFileNameFromPath(InputFile));
|
||||||
frame->SetTitle(buf);
|
frame->SetTitle(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -350,8 +347,8 @@ bool MyApp::OnInit()
|
|||||||
|
|
||||||
wxMenu *options_menu = new wxMenu;
|
wxMenu *options_menu = new wxMenu;
|
||||||
|
|
||||||
options_menu->Append(TEX_OPTIONS_CURELY_BRACE, _T("Curley brace matching"), _T("Checks for mismatched curley braces"),TRUE);
|
options_menu->Append(TEX_OPTIONS_CURELY_BRACE, _T("Curley brace matching"), _T("Checks for mismatched curley braces"),true);
|
||||||
options_menu->Append(TEX_OPTIONS_SYNTAX_CHECKING, _T("Syntax checking"), _T("Syntax checking for common errors"),TRUE);
|
options_menu->Append(TEX_OPTIONS_SYNTAX_CHECKING, _T("Syntax checking"), _T("Syntax checking for common errors"),true);
|
||||||
|
|
||||||
options_menu->Check(TEX_OPTIONS_CURELY_BRACE, checkCurleyBraces);
|
options_menu->Check(TEX_OPTIONS_CURELY_BRACE, checkCurleyBraces);
|
||||||
options_menu->Check(TEX_OPTIONS_SYNTAX_CHECKING, checkSyntax);
|
options_menu->Check(TEX_OPTIONS_SYNTAX_CHECKING, checkSyntax);
|
||||||
@@ -369,7 +366,7 @@ bool MyApp::OnInit()
|
|||||||
menuBar->Append(help_menu, _T("&Help"));
|
menuBar->Append(help_menu, _T("&Help"));
|
||||||
|
|
||||||
frame->SetMenuBar(menuBar);
|
frame->SetMenuBar(menuBar);
|
||||||
frame->textWindow = new wxTextCtrl(frame, -1, _T(""), wxPoint(-1, -1), wxSize(-1, -1), wxTE_READONLY|wxTE_MULTILINE);
|
frame->textWindow = new wxTextCtrl(frame, wxID_ANY, _T(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY|wxTE_MULTILINE);
|
||||||
|
|
||||||
(*frame->textWindow) << _T("Welcome to Tex2RTF.\n");
|
(*frame->textWindow) << _T("Welcome to Tex2RTF.\n");
|
||||||
// ShowOptions();
|
// ShowOptions();
|
||||||
@@ -399,8 +396,8 @@ bool MyApp::OnInit()
|
|||||||
wxStrcat(buf, _T(" mode."));
|
wxStrcat(buf, _T(" mode."));
|
||||||
frame->SetStatusText(buf, 1);
|
frame->SetStatusText(buf, 1);
|
||||||
|
|
||||||
frame->Show(TRUE);
|
frame->Show(true);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif // NO_GUI
|
#endif // NO_GUI
|
||||||
@@ -420,21 +417,11 @@ bool MyApp::OnInit()
|
|||||||
Go();
|
Go();
|
||||||
}
|
}
|
||||||
#ifdef NO_GUI
|
#ifdef NO_GUI
|
||||||
return 0;
|
return true;
|
||||||
#else
|
#else
|
||||||
return FALSE;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
// it already returned something, no need to cause warning
|
|
||||||
#ifndef NO_GUI
|
|
||||||
// Return the main frame window
|
|
||||||
return TRUE;
|
|
||||||
#else
|
|
||||||
return 0;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_GUI
|
#ifndef NO_GUI
|
||||||
@@ -573,7 +560,7 @@ int MyApp::OnExit()
|
|||||||
void ShowOptions(void)
|
void ShowOptions(void)
|
||||||
{
|
{
|
||||||
wxChar buf[100];
|
wxChar buf[100];
|
||||||
wxSprintf(buf, _T("Tex2RTF version %.2f"), versionNo);
|
wxSnprintf(buf, sizeof(buf), _T("Tex2RTF version %.2f"), versionNo);
|
||||||
OnInform(buf);
|
OnInform(buf);
|
||||||
OnInform(_T("Usage: tex2rtf [input] [output] [switches]\n"));
|
OnInform(_T("Usage: tex2rtf [input] [output] [switches]\n"));
|
||||||
OnInform(_T("where valid switches are"));
|
OnInform(_T("where valid switches are"));
|
||||||
@@ -625,8 +612,8 @@ void MyFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
|
|||||||
{
|
{
|
||||||
if (!stopRunning && !OkToClose)
|
if (!stopRunning && !OkToClose)
|
||||||
{
|
{
|
||||||
stopRunning = TRUE;
|
stopRunning = true;
|
||||||
runTwice = FALSE;
|
runTwice = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (OkToClose)
|
else if (OkToClose)
|
||||||
@@ -645,12 +632,12 @@ void MyFrame::OnGo(wxCommandEvent& WXUNUSED(event))
|
|||||||
{
|
{
|
||||||
passNumber = 1;
|
passNumber = 1;
|
||||||
errorCount = 0;
|
errorCount = 0;
|
||||||
menuBar->EnableTop(0, FALSE);
|
menuBar->EnableTop(0, false);
|
||||||
menuBar->EnableTop(1, FALSE);
|
menuBar->EnableTop(1, false);
|
||||||
menuBar->EnableTop(2, FALSE);
|
menuBar->EnableTop(2, false);
|
||||||
menuBar->EnableTop(3, FALSE);
|
menuBar->EnableTop(3, false);
|
||||||
textWindow->Clear();
|
textWindow->Clear();
|
||||||
Tex2RTFYield(TRUE);
|
Tex2RTFYield(true);
|
||||||
Go();
|
Go();
|
||||||
|
|
||||||
if (stopRunning)
|
if (stopRunning)
|
||||||
@@ -664,23 +651,23 @@ void MyFrame::OnGo(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
if (runTwice && !stopRunning)
|
if (runTwice && !stopRunning)
|
||||||
{
|
{
|
||||||
Tex2RTFYield(TRUE);
|
Tex2RTFYield(true);
|
||||||
Go();
|
Go();
|
||||||
}
|
}
|
||||||
menuBar->EnableTop(0, TRUE);
|
menuBar->EnableTop(0, true);
|
||||||
menuBar->EnableTop(1, TRUE);
|
menuBar->EnableTop(1, true);
|
||||||
menuBar->EnableTop(2, TRUE);
|
menuBar->EnableTop(2, true);
|
||||||
menuBar->EnableTop(3, TRUE);
|
menuBar->EnableTop(3, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnSetInput(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnSetInput(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ChooseInputFile(TRUE);
|
ChooseInputFile(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnSetOutput(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnSetOutput(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
ChooseOutputFile(TRUE);
|
ChooseOutputFile(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnSaveFile(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnSaveFile(wxCommandEvent& WXUNUSED(event))
|
||||||
@@ -690,7 +677,7 @@ void MyFrame::OnSaveFile(wxCommandEvent& WXUNUSED(event))
|
|||||||
{
|
{
|
||||||
textWindow->SaveFile(s);
|
textWindow->SaveFile(s);
|
||||||
wxChar buf[350];
|
wxChar buf[350];
|
||||||
wxSprintf(buf, _T("Saved text to %s"), (const wxChar*) s.c_str());
|
wxSnprintf(buf, sizeof(buf), _T("Saved text to %s"), (const wxChar*) s.c_str());
|
||||||
frame->SetStatusText(buf, 0);
|
frame->SetStatusText(buf, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -703,7 +690,7 @@ void MyFrame::OnViewOutput(wxCommandEvent& WXUNUSED(event))
|
|||||||
textWindow->LoadFile(OutputFile);
|
textWindow->LoadFile(OutputFile);
|
||||||
wxChar buf[300];
|
wxChar buf[300];
|
||||||
wxString str(wxFileNameFromPath(OutputFile));
|
wxString str(wxFileNameFromPath(OutputFile));
|
||||||
wxSprintf(buf, _T("Tex2RTF [%s]"), (const wxChar*) str.c_str());
|
wxSnprintf(buf, sizeof(buf), _T("Tex2RTF [%s]"), (const wxChar*) str.c_str());
|
||||||
frame->SetTitle(buf);
|
frame->SetTitle(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -716,7 +703,7 @@ void MyFrame::OnViewLatex(wxCommandEvent& WXUNUSED(event))
|
|||||||
textWindow->LoadFile(InputFile);
|
textWindow->LoadFile(InputFile);
|
||||||
wxChar buf[300];
|
wxChar buf[300];
|
||||||
wxString str(wxFileNameFromPath(OutputFile));
|
wxString str(wxFileNameFromPath(OutputFile));
|
||||||
wxSprintf(buf, _T("Tex2RTF [%s]"), (const wxChar*) str.c_str());
|
wxSnprintf(buf, sizeof(buf), _T("Tex2RTF [%s]"), (const wxChar*) str.c_str());
|
||||||
frame->SetTitle(buf);
|
frame->SetTitle(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -736,14 +723,14 @@ void MyFrame::OnLoadMacros(wxCommandEvent& WXUNUSED(event))
|
|||||||
void MyFrame::OnShowMacros(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnShowMacros(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
textWindow->Clear();
|
textWindow->Clear();
|
||||||
Tex2RTFYield(TRUE);
|
Tex2RTFYield(true);
|
||||||
ShowCustomMacros();
|
ShowCustomMacros();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnModeRTF(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnModeRTF(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
convertMode = TEX_RTF;
|
convertMode = TEX_RTF;
|
||||||
winHelp = FALSE;
|
winHelp = false;
|
||||||
InputFile = NULL;
|
InputFile = NULL;
|
||||||
OutputFile = NULL;
|
OutputFile = NULL;
|
||||||
SetStatusText(_T("In linear RTF mode."), 1);
|
SetStatusText(_T("In linear RTF mode."), 1);
|
||||||
@@ -752,7 +739,7 @@ void MyFrame::OnModeRTF(wxCommandEvent& WXUNUSED(event))
|
|||||||
void MyFrame::OnModeWinHelp(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnModeWinHelp(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
convertMode = TEX_RTF;
|
convertMode = TEX_RTF;
|
||||||
winHelp = TRUE;
|
winHelp = true;
|
||||||
InputFile = NULL;
|
InputFile = NULL;
|
||||||
OutputFile = NULL;
|
OutputFile = NULL;
|
||||||
SetStatusText(_T("In WinHelp RTF mode."), 1);
|
SetStatusText(_T("In WinHelp RTF mode."), 1);
|
||||||
@@ -761,7 +748,7 @@ void MyFrame::OnModeWinHelp(wxCommandEvent& WXUNUSED(event))
|
|||||||
void MyFrame::OnModeHTML(wxCommandEvent& WXUNUSED(event))
|
void MyFrame::OnModeHTML(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
convertMode = TEX_HTML;
|
convertMode = TEX_HTML;
|
||||||
winHelp = FALSE;
|
winHelp = false;
|
||||||
InputFile = NULL;
|
InputFile = NULL;
|
||||||
OutputFile = NULL;
|
OutputFile = NULL;
|
||||||
SetStatusText(_T("In HTML mode."), 1);
|
SetStatusText(_T("In HTML mode."), 1);
|
||||||
@@ -823,7 +810,7 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
|
|||||||
wxChar *platform = _T("");
|
wxChar *platform = _T("");
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
wxSprintf(buf, _T("Tex2RTF Version %.2f%s\nLaTeX to RTF, WinHelp, and HTML Conversion\n\n(c) Julian Smart, George Tasker and others, 1999-2002"), versionNo, platform);
|
wxSnprintf(buf, sizeof(buf), _T("Tex2RTF Version %.2f%s\nLaTeX to RTF, WinHelp, and HTML Conversion\n\n(c) Julian Smart, George Tasker and others, 1999-2002"), versionNo, platform);
|
||||||
wxMessageBox(buf, _T("About Tex2RTF"));
|
wxMessageBox(buf, _T("About Tex2RTF"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -905,7 +892,7 @@ bool Go(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!InputFile || !OutputFile || stopRunning)
|
if (!InputFile || !OutputFile || stopRunning)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
#ifndef NO_GUI
|
#ifndef NO_GUI
|
||||||
if (isInteractive)
|
if (isInteractive)
|
||||||
@@ -913,7 +900,7 @@ bool Go(void)
|
|||||||
wxChar buf[300];
|
wxChar buf[300];
|
||||||
wxString str = wxFileNameFromPath(InputFile);
|
wxString str = wxFileNameFromPath(InputFile);
|
||||||
|
|
||||||
wxSprintf(buf, _T("Tex2RTF [%s]"), (const wxChar*) str);
|
wxSnprintf(buf, sizeof(buf), _T("Tex2RTF [%s]"), (const wxChar*) str);
|
||||||
frame->SetTitle(buf);
|
frame->SetTitle(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -936,11 +923,11 @@ bool Go(void)
|
|||||||
sName[5] = '\0'; // that should do!
|
sName[5] = '\0'; // that should do!
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSprintf(ContentsName, _T("%s.con"), FileRoot);
|
wxSnprintf(ContentsName, 300, _T("%s.con"), FileRoot);
|
||||||
wxSprintf(TmpContentsName, _T("%s.cn1"), FileRoot);
|
wxSnprintf(TmpContentsName, 300, _T("%s.cn1"), FileRoot);
|
||||||
wxSprintf(TmpFrameContentsName, _T("%s.frc"), FileRoot);
|
wxSnprintf(TmpFrameContentsName, 300, _T("%s.frc"), FileRoot);
|
||||||
wxSprintf(WinHelpContentsFileName, _T("%s.cnt"), FileRoot);
|
wxSnprintf(WinHelpContentsFileName, 300, _T("%s.cnt"), FileRoot);
|
||||||
wxSprintf(RefFileName, _T("%s.ref"), FileRoot);
|
wxSnprintf(RefFileName, 300, _T("%s.ref"), FileRoot);
|
||||||
|
|
||||||
TexPathList.EnsureFileAccessible(InputFile);
|
TexPathList.EnsureFileAccessible(InputFile);
|
||||||
if (!bulletFile)
|
if (!bulletFile)
|
||||||
@@ -956,7 +943,7 @@ bool Go(void)
|
|||||||
if (wxFileExists(RefFileName))
|
if (wxFileExists(RefFileName))
|
||||||
ReadTexReferences(RefFileName);
|
ReadTexReferences(RefFileName);
|
||||||
|
|
||||||
bool success = FALSE;
|
bool success = false;
|
||||||
|
|
||||||
if (InputFile && OutputFile)
|
if (InputFile && OutputFile)
|
||||||
{
|
{
|
||||||
@@ -964,7 +951,7 @@ bool Go(void)
|
|||||||
{
|
{
|
||||||
OnError(_T("Cannot open input file!"));
|
OnError(_T("Cannot open input file!"));
|
||||||
TexCleanUp();
|
TexCleanUp();
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
#ifndef NO_GUI
|
#ifndef NO_GUI
|
||||||
if (isInteractive)
|
if (isInteractive)
|
||||||
@@ -974,14 +961,14 @@ bool Go(void)
|
|||||||
frame->SetStatusText((wxChar *)buf.c_str());
|
frame->SetStatusText((wxChar *)buf.c_str());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
OkToClose = FALSE;
|
OkToClose = false;
|
||||||
OnInform(_T("Reading LaTeX file..."));
|
OnInform(_T("Reading LaTeX file..."));
|
||||||
TexLoadFile(InputFile);
|
TexLoadFile(InputFile);
|
||||||
|
|
||||||
if (stopRunning)
|
if (stopRunning)
|
||||||
{
|
{
|
||||||
OkToClose = TRUE;
|
OkToClose = true;
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (convertMode)
|
switch (convertMode)
|
||||||
@@ -1006,16 +993,16 @@ bool Go(void)
|
|||||||
if (stopRunning)
|
if (stopRunning)
|
||||||
{
|
{
|
||||||
OnInform(_T("*** Aborted by user."));
|
OnInform(_T("*** Aborted by user."));
|
||||||
success = FALSE;
|
success = false;
|
||||||
stopRunning = FALSE;
|
stopRunning = false;
|
||||||
OkToClose = TRUE;
|
OkToClose = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
WriteTexReferences(RefFileName);
|
WriteTexReferences(RefFileName);
|
||||||
TexCleanUp();
|
TexCleanUp();
|
||||||
startedSections = FALSE;
|
startedSections = false;
|
||||||
|
|
||||||
wxString buf;
|
wxString buf;
|
||||||
#ifndef NO_GUI
|
#ifndef NO_GUI
|
||||||
@@ -1045,28 +1032,29 @@ bool Go(void)
|
|||||||
#endif
|
#endif
|
||||||
passNumber ++;
|
passNumber ++;
|
||||||
errorCount = 0;
|
errorCount = 0;
|
||||||
OkToClose = TRUE;
|
OkToClose = true;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
TexCleanUp();
|
TexCleanUp();
|
||||||
startedSections = FALSE;
|
startedSections = false;
|
||||||
|
|
||||||
#ifndef NO_GUI
|
#ifndef NO_GUI
|
||||||
frame->SetStatusText(_T("Aborted by user."));
|
frame->SetStatusText(_T("Aborted by user."));
|
||||||
#endif // GUI
|
#endif // GUI
|
||||||
|
|
||||||
OnInform(_T("Sorry, unsuccessful."));
|
OnInform(_T("Sorry, unsuccessful."));
|
||||||
OkToClose = TRUE;
|
OkToClose = true;
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnError(const wxChar *msg)
|
void OnError(const wxChar *msg)
|
||||||
{
|
{
|
||||||
|
wxString msg_string = msg;
|
||||||
errorCount++;
|
errorCount++;
|
||||||
|
|
||||||
#ifdef NO_GUI
|
#ifdef NO_GUI
|
||||||
wxSTD cerr << "Error: " << msg << "\n";
|
wxSTD cerr << "Error: " << msg_string.mb_str() << "\n";
|
||||||
wxSTD cerr.flush();
|
wxSTD cerr.flush();
|
||||||
#else
|
#else
|
||||||
if (isInteractive && frame)
|
if (isInteractive && frame)
|
||||||
@@ -1074,7 +1062,7 @@ void OnError(const wxChar *msg)
|
|||||||
else
|
else
|
||||||
#ifdef __UNIX__
|
#ifdef __UNIX__
|
||||||
{
|
{
|
||||||
wxSTD cerr << "Error: " << msg << "\n";
|
wxSTD cerr << "Error: " << msg_string.mb_str() << "\n";
|
||||||
wxSTD cerr.flush();
|
wxSTD cerr.flush();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1082,14 +1070,15 @@ void OnError(const wxChar *msg)
|
|||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
wxLogError(msg);
|
wxLogError(msg);
|
||||||
#endif
|
#endif
|
||||||
Tex2RTFYield(TRUE);
|
Tex2RTFYield(true);
|
||||||
#endif // NO_GUI
|
#endif // NO_GUI
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnInform(const wxChar *msg)
|
void OnInform(const wxChar *msg)
|
||||||
{
|
{
|
||||||
|
wxString msg_string = msg;
|
||||||
#ifdef NO_GUI
|
#ifdef NO_GUI
|
||||||
wxSTD cout << msg << "\n";
|
wxSTD cout << msg_string.mb_str() << "\n";
|
||||||
wxSTD cout.flush();
|
wxSTD cout.flush();
|
||||||
#else
|
#else
|
||||||
if (isInteractive && frame)
|
if (isInteractive && frame)
|
||||||
@@ -1102,7 +1091,7 @@ void OnInform(const wxChar *msg)
|
|||||||
else
|
else
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
{
|
{
|
||||||
wxSTD cout << msg << "\n";
|
wxSTD cout << msg_string.mb_str() << "\n";
|
||||||
wxSTD cout.flush();
|
wxSTD cout.flush();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1112,7 +1101,7 @@ void OnInform(const wxChar *msg)
|
|||||||
*/
|
*/
|
||||||
if (isInteractive)
|
if (isInteractive)
|
||||||
{
|
{
|
||||||
Tex2RTFYield(TRUE);
|
Tex2RTFYield(true);
|
||||||
}
|
}
|
||||||
#endif // NO_GUI
|
#endif // NO_GUI
|
||||||
}
|
}
|
||||||
@@ -1159,7 +1148,7 @@ bool OnArgument(int macroId, int arg_no, bool start)
|
|||||||
// break;
|
// break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1201,12 +1190,12 @@ bool SplitCommand(wxChar *data, wxChar *firstArg, wxChar *secondArg)
|
|||||||
firstArg[0] = 0;
|
firstArg[0] = 0;
|
||||||
secondArg[0] = 0;
|
secondArg[0] = 0;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
bool stop = FALSE;
|
bool stop = false;
|
||||||
// Find first argument (command name)
|
// Find first argument (command name)
|
||||||
while (!stop)
|
while (!stop)
|
||||||
{
|
{
|
||||||
if (data[i] == ' ' || data[i] == 0)
|
if (data[i] == ' ' || data[i] == 0)
|
||||||
stop = TRUE;
|
stop = true;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
firstArg[i] = data[i];
|
firstArg[i] = data[i];
|
||||||
@@ -1227,7 +1216,7 @@ bool SplitCommand(wxChar *data, wxChar *firstArg, wxChar *secondArg)
|
|||||||
}
|
}
|
||||||
secondArg[j] = 0;
|
secondArg[j] = 0;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Tex2RTFConnection::OnExecute(const wxString& WXUNUSED(topic), wxChar *data, int WXUNUSED(size), wxIPCFormat WXUNUSED(format))
|
bool Tex2RTFConnection::OnExecute(const wxString& WXUNUSED(topic), wxChar *data, int WXUNUSED(size), wxIPCFormat WXUNUSED(format))
|
||||||
@@ -1247,7 +1236,7 @@ bool Tex2RTFConnection::OnExecute(const wxString& WXUNUSED(topic), wxChar *data,
|
|||||||
{
|
{
|
||||||
wxChar buf[100];
|
wxChar buf[100];
|
||||||
wxString str = wxFileNameFromPath(InputFile);
|
wxString str = wxFileNameFromPath(InputFile);
|
||||||
wxSprintf(buf, _T("Tex2RTF [%s]"), (const wxChar*) str);
|
wxSnprintf(buf, sizeof(buf), _T("Tex2RTF [%s]"), (const wxChar*) str);
|
||||||
frame->SetTitle(buf);
|
frame->SetTitle(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1271,20 +1260,20 @@ bool Tex2RTFConnection::OnExecute(const wxString& WXUNUSED(topic), wxChar *data,
|
|||||||
else if (wxStrcmp(firstArg, _T("MINIMIZE")) == 0 || wxStrcmp(firstArg, _T("ICONIZE")) == 0)
|
else if (wxStrcmp(firstArg, _T("MINIMIZE")) == 0 || wxStrcmp(firstArg, _T("ICONIZE")) == 0)
|
||||||
{
|
{
|
||||||
if (frame)
|
if (frame)
|
||||||
frame->Iconize(TRUE);
|
frame->Iconize(true);
|
||||||
}
|
}
|
||||||
else if (wxStrcmp(firstArg, _T("SHOW")) == 0 || wxStrcmp(firstArg, _T("RESTORE")) == 0)
|
else if (wxStrcmp(firstArg, _T("SHOW")) == 0 || wxStrcmp(firstArg, _T("RESTORE")) == 0)
|
||||||
{
|
{
|
||||||
if (frame)
|
if (frame)
|
||||||
{
|
{
|
||||||
frame->Iconize(FALSE);
|
frame->Iconize(false);
|
||||||
frame->Show(TRUE);
|
frame->Show(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Try for a setting
|
// Try for a setting
|
||||||
wxStrcpy(Tex2RTFLastStatus, RegisterSetting(firstArg, secondArg, FALSE));
|
wxStrcpy(Tex2RTFLastStatus, RegisterSetting(firstArg, secondArg, false));
|
||||||
#ifndef NO_GUI
|
#ifndef NO_GUI
|
||||||
if (frame && wxStrcmp(firstArg, _T("conversionMode")) == 0)
|
if (frame && wxStrcmp(firstArg, _T("conversionMode")) == 0)
|
||||||
{
|
{
|
||||||
@@ -1303,7 +1292,7 @@ bool Tex2RTFConnection::OnExecute(const wxString& WXUNUSED(topic), wxChar *data,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxChar *Tex2RTFConnection::OnRequest(const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item), int *WXUNUSED(size), wxIPCFormat WXUNUSED(format))
|
wxChar *Tex2RTFConnection::OnRequest(const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item), int *WXUNUSED(size), wxIPCFormat WXUNUSED(format))
|
||||||
|
@@ -2,26 +2,43 @@
|
|||||||
// Name: tex2any.h
|
// Name: tex2any.h
|
||||||
// Purpose: tex2RTF conversion header
|
// Purpose: tex2RTF conversion header
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by: Wlodzimiez ABX Skiba 2003/2004 Unicode support
|
||||||
// Created: 7.9.93
|
// Created: 7.9.93
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef NO_GUI
|
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/frame.h"
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxTextCtrl;
|
#ifndef NO_GUI
|
||||||
|
#include "wx/frame.h"
|
||||||
|
#include "wx/textctrl.h"
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
#include "wx/dde.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
// Define a new application type
|
// Define a new application type
|
||||||
class MyApp: public wxApp
|
class MyApp: public
|
||||||
|
#ifndef NO_GUI
|
||||||
|
wxApp
|
||||||
|
#else
|
||||||
|
wxAppConsole
|
||||||
|
#endif
|
||||||
{ public:
|
{ public:
|
||||||
bool OnInit();
|
bool OnInit();
|
||||||
|
#ifdef NO_GUI
|
||||||
|
int OnRun() { return EXIT_SUCCESS; }
|
||||||
|
#else
|
||||||
int OnExit();
|
int OnExit();
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef NO_GUI
|
||||||
|
|
||||||
// Define a new frame type
|
// Define a new frame type
|
||||||
class MyFrame: public wxFrame
|
class MyFrame: public wxFrame
|
||||||
{ public:
|
{ public:
|
||||||
@@ -52,7 +69,6 @@ DECLARE_EVENT_TABLE()
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
#include "wx/dde.h"
|
|
||||||
|
|
||||||
class Tex2RTFConnection: public wxDDEConnection
|
class Tex2RTFConnection: public wxDDEConnection
|
||||||
{
|
{
|
||||||
@@ -147,8 +163,8 @@ extern wxChar *RefName; // Reference file name
|
|||||||
extern wxChar *bulletFile;
|
extern wxChar *bulletFile;
|
||||||
|
|
||||||
#ifndef NO_GUI
|
#ifndef NO_GUI
|
||||||
void ChooseOutputFile(bool force = FALSE);
|
void ChooseOutputFile(bool force = false);
|
||||||
void ChooseInputFile(bool force = FALSE);
|
void ChooseInputFile(bool force = false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void RTFOnMacro(int macroId, int no_args, bool start);
|
void RTFOnMacro(int macroId, int no_args, bool start);
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,8 @@
|
|||||||
// Name: xlputils.cpp
|
// Name: xlputils.cpp
|
||||||
// Purpose: Converts Latex to obsolete XLP format
|
// Purpose: Converts Latex to obsolete XLP format
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by:
|
// Modified by: Wlodzimiez ABX Skiba 2003/2004 Unicode support
|
||||||
|
// Ron Lee
|
||||||
// Created: 7.9.93
|
// Created: 7.9.93
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
@@ -37,9 +38,9 @@ static TexChunk *descriptionItemArg = NULL;
|
|||||||
static int indentLevel = 0;
|
static int indentLevel = 0;
|
||||||
static int noColumns = 0;
|
static int noColumns = 0;
|
||||||
static int currentTab = 0;
|
static int currentTab = 0;
|
||||||
static bool tableVerticalLineLeft = FALSE;
|
static bool tableVerticalLineLeft = false;
|
||||||
static bool tableVerticalLineRight = FALSE;
|
static bool tableVerticalLineRight = false;
|
||||||
static bool inTable = FALSE;
|
static bool inTable = false;
|
||||||
static int citeCount = 1;
|
static int citeCount = 1;
|
||||||
wxList hyperLinks(wxKEY_INTEGER);
|
wxList hyperLinks(wxKEY_INTEGER);
|
||||||
wxList hyperLabels(wxKEY_STRING);
|
wxList hyperLabels(wxKEY_STRING);
|
||||||
@@ -53,7 +54,7 @@ void PadToTab(int tabPos)
|
|||||||
{
|
{
|
||||||
int currentCol = GetCurrentColumn();
|
int currentCol = GetCurrentColumn();
|
||||||
for (int i = currentCol; i < tabPos; i++)
|
for (int i = currentCol; i < tabPos; i++)
|
||||||
TexOutput(_T(" "), TRUE);
|
TexOutput(_T(" "), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static long xlpBlockId = 0;
|
static long xlpBlockId = 0;
|
||||||
@@ -85,7 +86,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
long id1 = NewBlockId();
|
long id1 = NewBlockId();
|
||||||
currentBlockId = NewBlockId();
|
currentBlockId = NewBlockId();
|
||||||
|
|
||||||
startedSections = TRUE;
|
startedSections = true;
|
||||||
wxFprintf(Contents, _T("\\hy-%d{%ld}{"), hyBLOCK_SMALL_HEADING, id1);
|
wxFprintf(Contents, _T("\\hy-%d{%ld}{"), hyBLOCK_SMALL_HEADING, id1);
|
||||||
wxFprintf(Chapters, _T("\n\\hy-%d{%ld}{"), hyBLOCK_LARGE_VISIBLE_SECTION, currentBlockId);
|
wxFprintf(Chapters, _T("\n\\hy-%d{%ld}{"), hyBLOCK_LARGE_VISIBLE_SECTION, currentBlockId);
|
||||||
wxFprintf(Index, _T("%ld %ld\n"), id1, currentBlockId);
|
wxFprintf(Index, _T("%ld %ld\n"), id1, currentBlockId);
|
||||||
@@ -117,7 +118,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
long id1 = NewBlockId();
|
long id1 = NewBlockId();
|
||||||
currentBlockId = NewBlockId();
|
currentBlockId = NewBlockId();
|
||||||
|
|
||||||
startedSections = TRUE;
|
startedSections = true;
|
||||||
|
|
||||||
if (DocumentStyle == LATEX_ARTICLE)
|
if (DocumentStyle == LATEX_ARTICLE)
|
||||||
wxFprintf(Contents, _T("\\hy-%d{%ld}{"), hyBLOCK_LARGE_HEADING, id1);
|
wxFprintf(Contents, _T("\\hy-%d{%ld}{"), hyBLOCK_LARGE_HEADING, id1);
|
||||||
@@ -209,19 +210,19 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
}
|
}
|
||||||
case ltVOID:
|
case ltVOID:
|
||||||
// if (start)
|
// if (start)
|
||||||
// TexOutput(_T("void"), TRUE);
|
// TexOutput(_T("void"), true);
|
||||||
break;
|
break;
|
||||||
case ltBACKSLASHCHAR:
|
case ltBACKSLASHCHAR:
|
||||||
if (start)
|
if (start)
|
||||||
TexOutput(_T("\n"), TRUE);
|
TexOutput(_T("\n"), true);
|
||||||
break;
|
break;
|
||||||
case ltPAR:
|
case ltPAR:
|
||||||
{
|
{
|
||||||
if (start)
|
if (start)
|
||||||
{
|
{
|
||||||
if (ParSkip > 0)
|
if (ParSkip > 0)
|
||||||
TexOutput(_T("\n"), TRUE);
|
TexOutput(_T("\n"), true);
|
||||||
TexOutput(_T("\n"), TRUE);
|
TexOutput(_T("\n"), true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -239,7 +240,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
{
|
{
|
||||||
wxChar buf[100];
|
wxChar buf[100];
|
||||||
long id = NewBlockId();
|
long id = NewBlockId();
|
||||||
wxSprintf(buf, _T("\\hy-%d{%ld}{"), hyBLOCK_BOLD, id);
|
wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_BOLD, id);
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
}
|
}
|
||||||
else TexOutput(_T("}"));
|
else TexOutput(_T("}"));
|
||||||
@@ -253,7 +254,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
{
|
{
|
||||||
wxChar buf[100];
|
wxChar buf[100];
|
||||||
long id = NewBlockId();
|
long id = NewBlockId();
|
||||||
wxSprintf(buf, _T("\\hy-%d{%ld}{"), hyBLOCK_ITALIC, id);
|
wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_ITALIC, id);
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
}
|
}
|
||||||
else TexOutput(_T("}"));
|
else TexOutput(_T("}"));
|
||||||
@@ -266,7 +267,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
if (start)
|
if (start)
|
||||||
{
|
{
|
||||||
long id = NewBlockId();
|
long id = NewBlockId();
|
||||||
wxSprintf(buf, _T("\\hy-%d{%ld}{"), hyBLOCK_TELETYPE, id);
|
wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_TELETYPE, id);
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
}
|
}
|
||||||
else TexOutput(_T("}"));
|
else TexOutput(_T("}"));
|
||||||
@@ -276,7 +277,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
{
|
{
|
||||||
if (start)
|
if (start)
|
||||||
{
|
{
|
||||||
wxSprintf(buf, _T("\\hy-%d{%ld}{"), hyBLOCK_SMALL_TEXT, NewBlockId());
|
wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_SMALL_TEXT, NewBlockId());
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
}
|
}
|
||||||
else TexOutput(_T("}"));
|
else TexOutput(_T("}"));
|
||||||
@@ -286,7 +287,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
{
|
{
|
||||||
if (start)
|
if (start)
|
||||||
{
|
{
|
||||||
wxSprintf(buf, _T("\\hy-%d{%ld}{"), hyBLOCK_SMALL_TEXT, NewBlockId());
|
wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_SMALL_TEXT, NewBlockId());
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
}
|
}
|
||||||
else TexOutput(_T("}"));
|
else TexOutput(_T("}"));
|
||||||
@@ -296,7 +297,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
{
|
{
|
||||||
if (start)
|
if (start)
|
||||||
{
|
{
|
||||||
wxSprintf(buf, _T("\\hy-%d{%ld}{"), hyBLOCK_NORMAL, NewBlockId());
|
wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_NORMAL, NewBlockId());
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
}
|
}
|
||||||
else TexOutput(_T("}"));
|
else TexOutput(_T("}"));
|
||||||
@@ -306,7 +307,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
{
|
{
|
||||||
if (start)
|
if (start)
|
||||||
{
|
{
|
||||||
wxSprintf(buf, _T("\\hy-%d{%ld}{"), hyBLOCK_SMALL_HEADING, NewBlockId());
|
wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_SMALL_HEADING, NewBlockId());
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
}
|
}
|
||||||
else TexOutput(_T("}\n"));
|
else TexOutput(_T("}\n"));
|
||||||
@@ -316,7 +317,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
{
|
{
|
||||||
if (start)
|
if (start)
|
||||||
{
|
{
|
||||||
wxSprintf(buf, _T("\\hy-%d{%ld}{"), hyBLOCK_LARGE_HEADING, NewBlockId());
|
wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_LARGE_HEADING, NewBlockId());
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
}
|
}
|
||||||
else TexOutput(_T("}\n"));
|
else TexOutput(_T("}\n"));
|
||||||
@@ -372,14 +373,14 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
{
|
{
|
||||||
case LATEX_ENUMERATE:
|
case LATEX_ENUMERATE:
|
||||||
{
|
{
|
||||||
wxSprintf(indentBuf, _T("\\hy-%d{%ld}{%d.} "),
|
wxSnprintf(indentBuf, sizeof(indentBuf), _T("\\hy-%d{%ld}{%d.} "),
|
||||||
hyBLOCK_BOLD, NewBlockId(), struc->currentItem);
|
hyBLOCK_BOLD, NewBlockId(), struc->currentItem);
|
||||||
TexOutput(indentBuf);
|
TexOutput(indentBuf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case LATEX_ITEMIZE:
|
case LATEX_ITEMIZE:
|
||||||
{
|
{
|
||||||
wxSprintf(indentBuf, _T("\\hy-%d{%ld}{o} "),
|
wxSnprintf(indentBuf, sizeof(indentBuf), _T("\\hy-%d{%ld}{o} "),
|
||||||
hyBLOCK_BOLD, NewBlockId());
|
hyBLOCK_BOLD, NewBlockId());
|
||||||
TexOutput(indentBuf);
|
TexOutput(indentBuf);
|
||||||
break;
|
break;
|
||||||
@@ -389,7 +390,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
{
|
{
|
||||||
if (descriptionItemArg)
|
if (descriptionItemArg)
|
||||||
{
|
{
|
||||||
wxSprintf(indentBuf, _T("\\hy-%d{%ld}{"),
|
wxSnprintf(indentBuf, sizeof(indentBuf), _T("\\hy-%d{%ld}{"),
|
||||||
hyBLOCK_BOLD, NewBlockId());
|
hyBLOCK_BOLD, NewBlockId());
|
||||||
TexOutput(indentBuf);
|
TexOutput(indentBuf);
|
||||||
TraverseChildrenFromChunk(descriptionItemArg);
|
TraverseChildrenFromChunk(descriptionItemArg);
|
||||||
@@ -407,11 +408,11 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
{
|
{
|
||||||
if (start && DocumentTitle && DocumentAuthor)
|
if (start && DocumentTitle && DocumentAuthor)
|
||||||
{
|
{
|
||||||
wxSprintf(buf, _T("\\hy-%d{%ld}{"), hyBLOCK_LARGE_HEADING, NewBlockId());
|
wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_LARGE_HEADING, NewBlockId());
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
TraverseChildrenFromChunk(DocumentTitle);
|
TraverseChildrenFromChunk(DocumentTitle);
|
||||||
TexOutput(_T("}\n\n"));
|
TexOutput(_T("}\n\n"));
|
||||||
wxSprintf(buf, _T("\\hy-%d{%ld}{"), hyBLOCK_SMALL_HEADING, NewBlockId());
|
wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_SMALL_HEADING, NewBlockId());
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
TraverseChildrenFromChunk(DocumentAuthor);
|
TraverseChildrenFromChunk(DocumentAuthor);
|
||||||
TexOutput(_T("}\n\n"));
|
TexOutput(_T("}\n\n"));
|
||||||
@@ -449,13 +450,13 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
case ltHARDY:
|
case ltHARDY:
|
||||||
{
|
{
|
||||||
if (start)
|
if (start)
|
||||||
TexOutput(_T("HARDY"), TRUE);
|
TexOutput(_T("HARDY"), true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ltWXCLIPS:
|
case ltWXCLIPS:
|
||||||
{
|
{
|
||||||
if (start)
|
if (start)
|
||||||
TexOutput(_T("wxCLIPS"), TRUE);
|
TexOutput(_T("wxCLIPS"), true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ltVERBATIM:
|
case ltVERBATIM:
|
||||||
@@ -464,7 +465,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
{
|
{
|
||||||
wxChar buf[100];
|
wxChar buf[100];
|
||||||
long id = NewBlockId();
|
long id = NewBlockId();
|
||||||
wxSprintf(buf, _T("\\hy-%d{%ld}{"), hyBLOCK_TELETYPE, id);
|
wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_TELETYPE, id);
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
}
|
}
|
||||||
else TexOutput(_T("}"));
|
else TexOutput(_T("}"));
|
||||||
@@ -474,7 +475,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
{
|
{
|
||||||
if (start)
|
if (start)
|
||||||
{
|
{
|
||||||
TexOutput(_T("\n------------------------------------------------------------------"), TRUE);
|
TexOutput(_T("\n------------------------------------------------------------------"), true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -482,7 +483,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
{
|
{
|
||||||
if (start)
|
if (start)
|
||||||
{
|
{
|
||||||
TexOutput(_T("--------------------------------------------------------------------------------"), TRUE);
|
TexOutput(_T("--------------------------------------------------------------------------------"), true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -501,7 +502,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
{
|
{
|
||||||
if (start)
|
if (start)
|
||||||
{
|
{
|
||||||
wxSprintf(buf, _T("\\hy-%d{%ld}{"), hyBLOCK_TELETYPE, NewBlockId());
|
wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_TELETYPE, NewBlockId());
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -511,7 +512,7 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
case ltNUMBEREDBIBITEM:
|
case ltNUMBEREDBIBITEM:
|
||||||
{
|
{
|
||||||
if (!start)
|
if (!start)
|
||||||
TexOutput(_T("\n\n"), TRUE);
|
TexOutput(_T("\n\n"), true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ltCAPTION:
|
case ltCAPTION:
|
||||||
@@ -523,9 +524,9 @@ void XLPOnMacro(int macroId, int no_args, bool start)
|
|||||||
|
|
||||||
wxChar figBuf[40];
|
wxChar figBuf[40];
|
||||||
if (DocumentStyle != LATEX_ARTICLE)
|
if (DocumentStyle != LATEX_ARTICLE)
|
||||||
wxSprintf(figBuf, _T("Figure %d.%d: "), chapterNo, figureNo);
|
wxSnprintf(figBuf, sizeof(figBuf), _T("Figure %d.%d: "), chapterNo, figureNo);
|
||||||
else
|
else
|
||||||
wxSprintf(figBuf, _T("Figure %d: "), figureNo);
|
wxSnprintf(figBuf, sizeof(figBuf), _T("Figure %d: "), figureNo);
|
||||||
|
|
||||||
TexOutput(figBuf);
|
TexOutput(figBuf);
|
||||||
}
|
}
|
||||||
@@ -568,43 +569,43 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
{
|
{
|
||||||
if (!start && (arg_no == 1))
|
if (!start && (arg_no == 1))
|
||||||
currentSection = GetArgChunk();
|
currentSection = GetArgChunk();
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
case ltFUNC:
|
case ltFUNC:
|
||||||
{
|
{
|
||||||
if (!start && (arg_no == 1))
|
if (!start && (arg_no == 1))
|
||||||
TexOutput(_T(" "), TRUE);
|
TexOutput(_T(" "), true);
|
||||||
if (start && (arg_no == 3))
|
if (start && (arg_no == 3))
|
||||||
TexOutput(_T("("), TRUE);
|
TexOutput(_T("("), true);
|
||||||
if (!start && (arg_no == 3))
|
if (!start && (arg_no == 3))
|
||||||
TexOutput(_T(")"), TRUE);
|
TexOutput(_T(")"), true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ltPFUNC:
|
case ltPFUNC:
|
||||||
{
|
{
|
||||||
if (!start && (arg_no == 1))
|
if (!start && (arg_no == 1))
|
||||||
TexOutput(_T(" "), TRUE);
|
TexOutput(_T(" "), true);
|
||||||
|
|
||||||
if (start && (arg_no == 2))
|
if (start && (arg_no == 2))
|
||||||
TexOutput(_T("(*"), TRUE);
|
TexOutput(_T("(*"), true);
|
||||||
if (!start && (arg_no == 2))
|
if (!start && (arg_no == 2))
|
||||||
TexOutput(_T(")"), TRUE);
|
TexOutput(_T(")"), true);
|
||||||
|
|
||||||
if (start && (arg_no == 3))
|
if (start && (arg_no == 3))
|
||||||
TexOutput(_T("("), TRUE);
|
TexOutput(_T("("), true);
|
||||||
if (!start && (arg_no == 3))
|
if (!start && (arg_no == 3))
|
||||||
TexOutput(_T(")"), TRUE);
|
TexOutput(_T(")"), true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ltCLIPSFUNC:
|
case ltCLIPSFUNC:
|
||||||
{
|
{
|
||||||
if (!start && (arg_no == 1))
|
if (!start && (arg_no == 1))
|
||||||
TexOutput(_T(" "), TRUE);
|
TexOutput(_T(" "), true);
|
||||||
if (start && (arg_no == 2))
|
if (start && (arg_no == 2))
|
||||||
{
|
{
|
||||||
TexOutput(_T("("), TRUE);
|
TexOutput(_T("("), true);
|
||||||
long id = NewBlockId();
|
long id = NewBlockId();
|
||||||
wxSprintf(buf, _T("\\hy-%d{%ld}{"), hyBLOCK_BOLD, id);
|
wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_BOLD, id);
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
}
|
}
|
||||||
if (!start && (arg_no == 2))
|
if (!start && (arg_no == 2))
|
||||||
@@ -612,7 +613,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
TexOutput(_T("}"));
|
TexOutput(_T("}"));
|
||||||
}
|
}
|
||||||
if (!start && (arg_no == 3))
|
if (!start && (arg_no == 3))
|
||||||
TexOutput(_T(")"), TRUE);
|
TexOutput(_T(")"), true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ltPARAM:
|
case ltPARAM:
|
||||||
@@ -620,7 +621,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
if (start && (arg_no == 2))
|
if (start && (arg_no == 2))
|
||||||
{
|
{
|
||||||
long id = NewBlockId();
|
long id = NewBlockId();
|
||||||
wxSprintf(buf, _T(" \\hy-%d{%ld}{"), hyBLOCK_BOLD, id);
|
wxSnprintf(buf, sizeof(buf), _T(" \\hy-%d{%ld}{"), hyBLOCK_BOLD, id);
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
}
|
}
|
||||||
if (!start && (arg_no == 2))
|
if (!start && (arg_no == 2))
|
||||||
@@ -634,7 +635,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
if (start && (arg_no == 2))
|
if (start && (arg_no == 2))
|
||||||
{
|
{
|
||||||
long id = NewBlockId();
|
long id = NewBlockId();
|
||||||
wxSprintf(buf, _T(" \\hy-%d{%ld}{"), hyBLOCK_BOLD, id);
|
wxSnprintf(buf, sizeof(buf), _T(" \\hy-%d{%ld}{"), hyBLOCK_BOLD, id);
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
}
|
}
|
||||||
if (!start && (arg_no == 2))
|
if (!start && (arg_no == 2))
|
||||||
@@ -646,12 +647,12 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
case ltMEMBER:
|
case ltMEMBER:
|
||||||
{
|
{
|
||||||
if (!start && (arg_no == 1))
|
if (!start && (arg_no == 1))
|
||||||
TexOutput(_T(" "), TRUE);
|
TexOutput(_T(" "), true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ltLABEL:
|
case ltLABEL:
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
case ltREF:
|
case ltREF:
|
||||||
{
|
{
|
||||||
@@ -672,7 +673,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
{
|
{
|
||||||
TexOutput(sec);
|
TexOutput(sec);
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -685,7 +686,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
if (start)
|
if (start)
|
||||||
{
|
{
|
||||||
currentBlockId = NewBlockId();
|
currentBlockId = NewBlockId();
|
||||||
wxSprintf(buf, _T("\\hy-%d{%ld}{"), hyBLOCK_RED_ITALIC, currentBlockId);
|
wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{"), hyBLOCK_RED_ITALIC, currentBlockId);
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
}
|
}
|
||||||
else TexOutput(_T("}"));
|
else TexOutput(_T("}"));
|
||||||
@@ -698,7 +699,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
hyperLinks.Append(currentBlockId, (wxObject *)copystring(label));
|
hyperLinks.Append(currentBlockId, (wxObject *)copystring(label));
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -706,7 +707,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
{
|
{
|
||||||
if (arg_no == 1)
|
if (arg_no == 1)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else if (arg_no == 2)
|
else if (arg_no == 2)
|
||||||
{
|
{
|
||||||
@@ -714,7 +715,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
TexOutput(_T(" ("));
|
TexOutput(_T(" ("));
|
||||||
else
|
else
|
||||||
TexOutput(_T(")"));
|
TexOutput(_T(")"));
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -723,7 +724,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
if (start && IsArgOptional())
|
if (start && IsArgOptional())
|
||||||
{
|
{
|
||||||
descriptionItemArg = GetArgChunk();
|
descriptionItemArg = GetArgChunk();
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -734,9 +735,9 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
{
|
{
|
||||||
if (start)
|
if (start)
|
||||||
{
|
{
|
||||||
inTable = TRUE;
|
inTable = true;
|
||||||
tableVerticalLineLeft = FALSE;
|
tableVerticalLineLeft = false;
|
||||||
tableVerticalLineRight = FALSE;
|
tableVerticalLineRight = false;
|
||||||
|
|
||||||
wxChar *alignString = copystring(GetArgData());
|
wxChar *alignString = copystring(GetArgData());
|
||||||
|
|
||||||
@@ -746,9 +747,9 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
if (len > 0)
|
if (len > 0)
|
||||||
{
|
{
|
||||||
if (alignString[0] == '|')
|
if (alignString[0] == '|')
|
||||||
tableVerticalLineLeft = TRUE;
|
tableVerticalLineLeft = true;
|
||||||
if (alignString[len-1] == '|')
|
if (alignString[len-1] == '|')
|
||||||
tableVerticalLineRight = TRUE;
|
tableVerticalLineRight = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < len; i++)
|
for (int i = 0; i < len; i++)
|
||||||
@@ -768,15 +769,15 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
// int tabPos = 80/noColumns;
|
// int tabPos = 80/noColumns;
|
||||||
currentTab = 0;
|
currentTab = 0;
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (arg_no == 2 && !start)
|
else if (arg_no == 2 && !start)
|
||||||
{
|
{
|
||||||
inTable = FALSE;
|
inTable = false;
|
||||||
}
|
}
|
||||||
else if (arg_no == 2 && start)
|
else if (arg_no == 2 && start)
|
||||||
return TRUE;
|
return true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ltMARGINPAR:
|
case ltMARGINPAR:
|
||||||
@@ -787,11 +788,11 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
{
|
{
|
||||||
if (start)
|
if (start)
|
||||||
{
|
{
|
||||||
TexOutput(_T("----------------------------------------------------------------------\n"), TRUE);
|
TexOutput(_T("----------------------------------------------------------------------\n"), true);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
TexOutput(_T("\n----------------------------------------------------------------------\n"), TRUE);
|
TexOutput(_T("\n----------------------------------------------------------------------\n"), true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ltBIBITEM:
|
case ltBIBITEM:
|
||||||
@@ -804,16 +805,16 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
if (ref)
|
if (ref)
|
||||||
{
|
{
|
||||||
if (ref->sectionNumber) delete[] ref->sectionNumber;
|
if (ref->sectionNumber) delete[] ref->sectionNumber;
|
||||||
wxSprintf(buf, _T("[%d]"), citeCount);
|
wxSnprintf(buf, sizeof(buf), _T("[%d]"), citeCount);
|
||||||
ref->sectionNumber = copystring(buf);
|
ref->sectionNumber = copystring(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSprintf(buf, _T("\\hy-%d{%ld}{[%d]} "), hyBLOCK_BOLD, NewBlockId(), citeCount);
|
wxSnprintf(buf, sizeof(buf), _T("\\hy-%d{%ld}{[%d]} "), hyBLOCK_BOLD, NewBlockId(), citeCount);
|
||||||
TexOutput(buf);
|
TexOutput(buf);
|
||||||
citeCount ++;
|
citeCount ++;
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
case ltTHEBIBLIOGRAPHY:
|
case ltTHEBIBLIOGRAPHY:
|
||||||
{
|
{
|
||||||
@@ -831,12 +832,12 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
wxFprintf(Index, _T("%ld %ld\n"), id1, id2);
|
wxFprintf(Index, _T("%ld %ld\n"), id1, id2);
|
||||||
|
|
||||||
SetCurrentOutput(Chapters);
|
SetCurrentOutput(Chapters);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
if (!start && (arg_no == 2))
|
if (!start && (arg_no == 2))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
case ltTWOCOLITEM:
|
case ltTWOCOLITEM:
|
||||||
case ltTWOCOLITEMRULED:
|
case ltTWOCOLITEMRULED:
|
||||||
@@ -846,7 +847,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
|
|
||||||
if (!start && (arg_no == 2))
|
if (!start && (arg_no == 2))
|
||||||
TexOutput(_T("\n"));
|
TexOutput(_T("\n"));
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Accents
|
* Accents
|
||||||
@@ -896,7 +897,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
case ltACCENT_ACUTE:
|
case ltACCENT_ACUTE:
|
||||||
{
|
{
|
||||||
@@ -948,7 +949,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
case ltACCENT_CARET:
|
case ltACCENT_CARET:
|
||||||
{
|
{
|
||||||
@@ -994,7 +995,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
case ltACCENT_TILDE:
|
case ltACCENT_TILDE:
|
||||||
{
|
{
|
||||||
@@ -1031,7 +1032,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
case ltACCENT_UMLAUT:
|
case ltACCENT_UMLAUT:
|
||||||
{
|
{
|
||||||
@@ -1083,7 +1084,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
case ltACCENT_DOT:
|
case ltACCENT_DOT:
|
||||||
{
|
{
|
||||||
@@ -1105,7 +1106,7 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
case ltACCENT_CADILLA:
|
case ltACCENT_CADILLA:
|
||||||
{
|
{
|
||||||
@@ -1127,14 +1128,14 @@ bool XLPOnArgument(int macroId, int arg_no, bool start)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
return DefaultOnArgument(macroId, arg_no, start);
|
return DefaultOnArgument(macroId, arg_no, start);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool XLPGo(void)
|
bool XLPGo(void)
|
||||||
@@ -1208,8 +1209,8 @@ bool XLPGo(void)
|
|||||||
wxRemoveFile(_T("subsections.xlp"));
|
wxRemoveFile(_T("subsections.xlp"));
|
||||||
wxRemoveFile(_T("subsubsections.xlp"));
|
wxRemoveFile(_T("subsubsections.xlp"));
|
||||||
wxRemoveFile(_T("index.xlp"));
|
wxRemoveFile(_T("index.xlp"));
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -169,14 +169,14 @@ Usage: wx-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--release]
|
|||||||
[--cc] [--cxx] [--ld]
|
[--cc] [--cxx] [--ld]
|
||||||
|
|
||||||
wx-config returns configuration information about the installed
|
wx-config returns configuration information about the installed
|
||||||
version of wxWindows. It may be used to query its version and
|
version of wxWidgets. It may be used to query its version and
|
||||||
installation directories and also retrieve the C and C++ compilers
|
installation directories and also retrieve the C and C++ compilers
|
||||||
and linker which were used for its building and the corresponding
|
and linker which were used for its building and the corresponding
|
||||||
flags.
|
flags.
|
||||||
|
|
||||||
Ordinarily it should be installed to the appropriate system location
|
Ordinarily it should be installed to the appropriate system location
|
||||||
along with the headers and library files, but it is also possible to
|
along with the headers and library files, but it is also possible to
|
||||||
use it to enable builds with an uninstalled wxWindows version for
|
use it to enable builds with an uninstalled wxWidgets version for
|
||||||
package building and bleeding edge developers. To do so, use it like
|
package building and bleeding edge developers. To do so, use it like
|
||||||
this:
|
this:
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ specification for it to take effect.
|
|||||||
--static must come before --libs and --gl-libs.
|
--static must come before --libs and --gl-libs.
|
||||||
|
|
||||||
--libs can take optional argument that contains comma-separated list of
|
--libs can take optional argument that contains comma-separated list of
|
||||||
wxWindows libraries to link against. This list can include both core
|
wxWidgets libraries to link against. This list can include both core
|
||||||
and contrib libraries.
|
and contrib libraries.
|
||||||
|
|
||||||
--gl-libs option is deprecated, used --libs=gl instead.
|
--gl-libs option is deprecated, used --libs=gl instead.
|
||||||
|
Reference in New Issue
Block a user