diff options
-rw-r--r-- | converters/tex2rtf/Makefile | 22 | ||||
-rw-r--r-- | converters/tex2rtf/distinfo | 19 | ||||
-rw-r--r-- | converters/tex2rtf/files/stringmatch.cpp | 44 | ||||
-rw-r--r-- | converters/tex2rtf/files/stringmatch.h | 5 | ||||
-rw-r--r-- | converters/tex2rtf/patches/patch-aa | 31 | ||||
-rw-r--r-- | converters/tex2rtf/patches/patch-ab | 167 | ||||
-rw-r--r-- | converters/tex2rtf/patches/patch-ac | 116 | ||||
-rw-r--r-- | converters/tex2rtf/patches/patch-ad | 50 | ||||
-rw-r--r-- | converters/tex2rtf/patches/patch-ae | 429 | ||||
-rw-r--r-- | converters/tex2rtf/patches/patch-af | 13 | ||||
-rw-r--r-- | converters/tex2rtf/patches/patch-ag | 13 | ||||
-rw-r--r-- | converters/tex2rtf/patches/patch-ah | 12 | ||||
-rw-r--r-- | converters/tex2rtf/patches/patch-ai | 13 |
13 files changed, 855 insertions, 79 deletions
diff --git a/converters/tex2rtf/Makefile b/converters/tex2rtf/Makefile index c9f43dd2d3e..ba670b9008d 100644 --- a/converters/tex2rtf/Makefile +++ b/converters/tex2rtf/Makefile @@ -1,22 +1,24 @@ -# $NetBSD: Makefile,v 1.8 2004/03/29 05:19:47 ben Exp $ +# $NetBSD: Makefile,v 1.9 2004/03/30 18:23:46 ben Exp $ -DISTNAME= tex2rtf164_source -PKGNAME= tex2rtf-164 +DISTNAME= tex2rtf-2.01-source +PKGNAME= tex2rtf-2.01 CATEGORIES= converters textproc -MASTER_SITES= ftp://www.remstar.com/pub/wxwin/tex2rtf/ \ - ftp://ftp.sunet.se/pub7/lang/wxwin/tex2rtf/ -EXTRACT_SUFX= .zip +MASTER_SITES= ftp://biolpc22.york.ac.uk/pub/tex2rtf/ +EXTRACT_SUFX= .tar.bz2 MAINTAINER= ben@NetBSD.org HOMEPAGE= http://www.wxwindows.org/tex2rtf/index.htm COMMENT= LaTex-to-RTF translator -WRKSRC= ${WRKDIR}/src +WRKSRC= ${WRKDIR}/${DISTNAME}/src +MAKEFILE= makefile.unx +USE_BUILDLINK3= yes -do-build: - cd ${WRKSRC} && make -f makefile.unx nogui +post-patch: + ${CP} ${FILESDIR}/stringmatch.* ${WRKSRC} do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/tex2rtf_nogui ${PREFIX}/bin/tex2rtf + ${INSTALL_PROGRAM} ${WRKSRC}/tex2rtf ${PREFIX}/bin/tex2rtf +.include "../../x11/wxGTK/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/converters/tex2rtf/distinfo b/converters/tex2rtf/distinfo index dc03f165876..a4be941ed57 100644 --- a/converters/tex2rtf/distinfo +++ b/converters/tex2rtf/distinfo @@ -1,8 +1,13 @@ -$NetBSD: distinfo,v 1.2 2003/12/20 16:00:56 ben Exp $ +$NetBSD: distinfo,v 1.3 2004/03/30 18:23:46 ben Exp $ -SHA1 (tex2rtf164_source.zip) = 553e76b3ffd7e0a670427ea27a4cdaab3cee4d72 -Size (tex2rtf164_source.zip) = 310555 bytes -SHA1 (patch-aa) = 08b848150d26177e8401a0538fe9ea49395c1a5e -SHA1 (patch-ab) = fbb7a7733670acc96f86765c7c3d34baeab4a061 -SHA1 (patch-ac) = 786e851e1a3968f7796c10f302bbb7f88ef42932 -SHA1 (patch-ad) = 1eadb381c0cfc436f5d35a314feb2d229af4be5a +SHA1 (tex2rtf-2.01-source.tar.bz2) = 363d2b1944e6f6817c0af170b9fd10289d259fcb +Size (tex2rtf-2.01-source.tar.bz2) = 183262 bytes +SHA1 (patch-aa) = 40fe1026d45242e5b8c35eacb232c8a0a571e7ed +SHA1 (patch-ab) = 1ccdfe65311489b730d5ce660f85e2abae80939b +SHA1 (patch-ac) = 3bebebafc7c252387881bf0c290002413b9462de +SHA1 (patch-ad) = ea3d458b2ef52aac5069aa4137a0138b3604b9bb +SHA1 (patch-ae) = f818c53093befdfedb6ea4d1c57d1fb74bbdb738 +SHA1 (patch-af) = 8977d4aeb1dc383d62201f591aa82e241e725902 +SHA1 (patch-ag) = 10c5116760dde455fb4923ea1f6ca006019b4535 +SHA1 (patch-ah) = 906f6097afaf9b5e0e4568939c0e7bec31485244 +SHA1 (patch-ai) = 278ab730e4ca281409dc08a60695be979eac9387 diff --git a/converters/tex2rtf/files/stringmatch.cpp b/converters/tex2rtf/files/stringmatch.cpp new file mode 100644 index 00000000000..d5a5ebb0537 --- /dev/null +++ b/converters/tex2rtf/files/stringmatch.cpp @@ -0,0 +1,44 @@ +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +/* #include <wx/wxchar.h> */ + +bool +wxStringMatch2 (const wxChar *str1, const wxChar *str2, bool subString, bool exact) +{ + if (str1 == NULL || str2 == NULL) + return FALSE; + if (str1 == str2) + return TRUE; + + if (subString) + { + int len1 = wxStrlen (str1); + int len2 = wxStrlen (str2); + int i; + + // Search for str1 in str2 + // Slow .... but acceptable for short strings + for (i = 0; i <= len2 - len1; i++) + { + if (wxStrnicmp (str1, str2 + i, len1) == 0) + return TRUE; + } + } + else if (exact) + { + if (wxStricmp (str1, str2) == 0) + return TRUE; + } + else + { + int len1 = wxStrlen (str1); + int len2 = wxStrlen (str2); + + if (wxStrnicmp (str1, str2, wxMin (len1, len2)) == 0) + return TRUE; + } + + return FALSE; +} diff --git a/converters/tex2rtf/files/stringmatch.h b/converters/tex2rtf/files/stringmatch.h new file mode 100644 index 00000000000..b1925aff681 --- /dev/null +++ b/converters/tex2rtf/files/stringmatch.h @@ -0,0 +1,5 @@ +#include "wx/object.h" +#include "wx/list.h" +#include "wx/filefn.h" + +WXDLLEXPORT bool wxStringMatch2(const wxChar *one, const wxChar *two, bool subString = TRUE, bool exact = FALSE); diff --git a/converters/tex2rtf/patches/patch-aa b/converters/tex2rtf/patches/patch-aa index 9b00a234d7c..8c32fe6cb54 100644 --- a/converters/tex2rtf/patches/patch-aa +++ b/converters/tex2rtf/patches/patch-aa @@ -1,13 +1,22 @@ -$NetBSD: patch-aa,v 1.1.1.1 2002/05/25 23:23:01 rh Exp $ +$NetBSD: patch-aa,v 1.2 2004/03/30 18:23:46 ben Exp $ ---- make.env.orig Thu Sep 12 11:58:42 1996 -+++ make.env -@@ -56,7 +56,7 @@ - # Sun with GCC: nothing - # Solaris: -lgen -ldl -lsocket -lnsl - # SGI: -lPW --COMPLIBS=-lg++ -+COMPLIBS=-lstdc++ +--- tex2rtf.cpp.orig Wed Aug 7 16:04:05 2002 ++++ tex2rtf.cpp +@@ -330,7 +330,7 @@ bool MyApp::OnInit() - # HP-specific compiler library: an AIAI convenience - HPCOMPLIBS= + if (InputFile) + { +- sprintf(buf, "Tex2RTF [%s]", FileNameFromPath(InputFile)); ++ sprintf(buf, "Tex2RTF [%s]", wxFileNameFromPath(InputFile)); + frame->SetTitle(buf); + } + +@@ -967,7 +967,7 @@ bool Go(void) + + if (InputFile && OutputFile) + { +- if (!FileExists(InputFile)) ++ if (!wxFileExists(InputFile)) + { + OnError("Cannot open input file!"); + TexCleanUp(); diff --git a/converters/tex2rtf/patches/patch-ab b/converters/tex2rtf/patches/patch-ab index d4fdbbcf340..477a4ed83b2 100644 --- a/converters/tex2rtf/patches/patch-ab +++ b/converters/tex2rtf/patches/patch-ab @@ -1,22 +1,159 @@ -$NetBSD: patch-ab,v 1.1.1.1 2002/05/25 23:23:01 rh Exp $ +$NetBSD: patch-ab,v 1.2 2004/03/30 18:23:46 ben Exp $ ---- makefile.unx.orig Sun Nov 23 17:55:48 1997 -+++ makefile.unx -@@ -2,7 +2,7 @@ - # Valid targets: xview, motif or nogui. These should produce - # the executables tex2rtf_ol, tex2rtf_motif and tex2rtf_nogui respectively. +--- htmlutil.cpp.orig Fri Jun 7 11:01:36 2002 ++++ htmlutil.cpp +@@ -1,4 +1,4 @@ +-///////////////////////////////////////////////////////////////////////////// ++//////////////////////////////////////////////////////////////////////////// + // Name: htmlutil.cpp + // Purpose: Converts Latex to HTML + // Author: Julian Smart +@@ -191,7 +191,7 @@ void ReopenFile(FILE **fd, char **fileNa + else + sprintf(buf, "%s%d.html", FileRoot, fileId); + if (*fileName) delete[] *fileName; +- *fileName = copystring(FileNameFromPath(buf)); ++ *fileName = copystring(wxFileNameFromPath(buf)); + *fd = fopen(buf, "w"); + fprintf(*fd, "<HTML>\n"); + } +@@ -426,13 +426,13 @@ void AddBrowseButtons(char *upLabel, cha + if (truncateFilenames) + { + char buf1[80]; +- strcpy(buf1, ConvertCase(FileNameFromPath(FileRoot))); ++ strcpy(buf1, ConvertCase(wxFileNameFromPath(FileRoot))); + sprintf(buf, "\n<A HREF=\"%s.%s\">%s</A> ", buf1, ConvertCase("htm"), contentsReference); + } + else + { + char buf1[80]; +- strcpy(buf1, ConvertCase(FileNameFromPath(FileRoot))); ++ strcpy(buf1, ConvertCase(wxFileNameFromPath(FileRoot))); + sprintf(buf, "\n<A HREF=\"%s%s\">%s</A> ", buf1, ConvertCase("_contents.html"), contentsReference); + } + // TexOutput("<NOFRAMES>"); +@@ -708,9 +708,9 @@ void HTMLOnMacro(int macroId, int no_arg --WXDIR = ../../.. -+WXDIR = .. + char titleBuf[200]; + if (truncateFilenames) +- sprintf(titleBuf, "%s.htm", FileNameFromPath(FileRoot)); ++ sprintf(titleBuf, "%s.htm", wxFileNameFromPath(FileRoot)); + else +- sprintf(titleBuf, "%s_contents.html", FileNameFromPath(FileRoot)); ++ sprintf(titleBuf, "%s_contents.html", wxFileNameFromPath(FileRoot)); - # All common UNIX compiler flags and options are now in - # this central makefile. -@@ -25,7 +25,7 @@ + fprintf(Chapters, "<A NAME=\"%s\"></A>", topicName); - TEX2ANYLIB = $(TEX2RTFDIR)/lib/libtex2any$(GUISUFFIX).a +@@ -2708,9 +2708,9 @@ bool HTMLOnArgument(int macroId, int arg --INC = -I$(WXDIR)/include/base -I$(WXDIR)/include/x -I$(WXHELPDIR)/src $(COMPPATHS) -+INC = -I$(WXDIR)/include/base -I$(WXDIR)/include/x -I$(WXHELPDIR)/src -I$(WXDIR)/src/wxwin $(COMPPATHS) + char titleBuf[150]; + if (truncateFilenames) +- sprintf(titleBuf, "%s.htm", FileNameFromPath(FileRoot)); ++ sprintf(titleBuf, "%s.htm", wxFileNameFromPath(FileRoot)); + else +- sprintf(titleBuf, "%s_contents.html", FileNameFromPath(FileRoot)); ++ sprintf(titleBuf, "%s_contents.html", wxFileNameFromPath(FileRoot)); - LDFLAGS = $(XLIB) -L$(WXDIR)/lib -L$(TEX2RTFDIR)/lib + HTMLHead(); + TexOutput("<title>"); +@@ -2919,7 +2919,7 @@ bool HTMLGo(void) + OnError("Cannot open output file!"); + return FALSE; + } +- AddTexRef("contents", FileNameFromPath(TitlepageName), ContentsNameString); ++ AddTexRef("contents", wxFileNameFromPath(TitlepageName), ContentsNameString); + fprintf(Contents, "<P><P><H2>%s</H2><P><P>\n", ContentsNameString); + +@@ -3003,7 +3003,7 @@ bool HTMLGo(void) + if (contentsString) + fprintf(tmpTitle, "<TITLE>%s</TITLE></HEAD>\n\n", contentsString); + else +- fprintf(tmpTitle, "<TITLE>%s</TITLE></HEAD>\n\n", FileNameFromPath(FileRoot)); ++ fprintf(tmpTitle, "<TITLE>%s</TITLE></HEAD>\n\n", wxFileNameFromPath(FileRoot)); + } + + // Output frame information +@@ -3017,8 +3017,8 @@ bool HTMLGo(void) + + fprintf(tmpTitle, "<FRAMESET COLS=\"30%%,70%%\">\n"); + +- fprintf(tmpTitle, "<FRAME SRC=\"%s\">\n", ConvertCase(FileNameFromPath(contentsFrameName))); +- fprintf(tmpTitle, "<FRAME SRC=\"%s\" NAME=\"mainwindow\">\n", ConvertCase(FileNameFromPath(firstFileName))); ++ fprintf(tmpTitle, "<FRAME SRC=\"%s\">\n", ConvertCase(wxFileNameFromPath(contentsFrameName))); ++ fprintf(tmpTitle, "<FRAME SRC=\"%s\" NAME=\"mainwindow\">\n", ConvertCase(wxFileNameFromPath(firstFileName))); + fprintf(tmpTitle, "</FRAMESET>\n"); + + fprintf(tmpTitle, "<NOFRAMES>\n"); +@@ -3049,7 +3049,7 @@ bool HTMLGo(void) + fprintf(tmpTitle, "\n</HTML>\n"); + + fclose(tmpTitle); +- if (FileExists(TitlepageName)) wxRemoveFile(TitlepageName); ++ if (wxFileExists(TitlepageName)) wxRemoveFile(TitlepageName); + if (!wxRenameFile("title.tmp", TitlepageName)) + { + wxCopyFile("title.tmp", TitlepageName); +@@ -3062,7 +3062,7 @@ bool HTMLGo(void) + if (lastTopic) delete[] lastTopic; + lastTopic = NULL; + +- if (FileExists(ContentsName)) wxRemoveFile(ContentsName); ++ if (wxFileExists(ContentsName)) wxRemoveFile(ContentsName); + + if (!wxRenameFile(TmpContentsName, ContentsName)) + { +@@ -3147,11 +3147,11 @@ void GenerateHTMLWorkshopFiles(char *fna + "Default topic=%s\n" + "Index file=%s.hhk\n" + "Title=", +- FileNameFromPath(fname), +- FileNameFromPath(fname), +- FileNameFromPath(fname), +- FileNameFromPath(TitlepageName), +- FileNameFromPath(fname) ++ wxFileNameFromPath(fname), ++ wxFileNameFromPath(fname), ++ wxFileNameFromPath(fname), ++ wxFileNameFromPath(TitlepageName), ++ wxFileNameFromPath(fname) + ); + + if (DocumentTitle) { +@@ -3162,19 +3162,19 @@ void GenerateHTMLWorkshopFiles(char *fna + + fprintf(f, "\n\n[WINDOWS]\n" + "%sHelp=,\"%s.hhc\",\"%s.hhk\",\"%s\",,,,,,0x2420,,0x380e,,,,,0,,,", +- FileNameFromPath(fname), +- FileNameFromPath(fname), +- FileNameFromPath(fname), +- FileNameFromPath(TitlepageName)); ++ wxFileNameFromPath(fname), ++ wxFileNameFromPath(fname), ++ wxFileNameFromPath(fname), ++ wxFileNameFromPath(TitlepageName)); + + + fprintf(f, "\n\n[FILES]\n"); +- fprintf(f, "%s\n", FileNameFromPath(TitlepageName)); ++ fprintf(f, "%s\n", wxFileNameFromPath(TitlepageName)); + for (int i = 1; i <= fileId; i++) { + if (truncateFilenames) +- sprintf(buf, "%s%d.htm", FileNameFromPath(FileRoot), i); ++ sprintf(buf, "%s%d.htm", wxFileNameFromPath(FileRoot), i); + else +- sprintf(buf, "%s%d.html", FileNameFromPath(FileRoot), i); ++ sprintf(buf, "%s%d.html", wxFileNameFromPath(FileRoot), i); + fprintf(f, "%s\n", buf); + } + fclose(f); +@@ -3278,7 +3278,7 @@ void HTMLWorkshopStartContents() + "<LI> <OBJECT type=\"text/sitemap\">\n" + "<param name=\"Local\" value=\"%s\">\n" + "<param name=\"Name\" value=\"Contents\">\n</OBJECT>\n", +- FileNameFromPath(TitlepageName) ++ wxFileNameFromPath(TitlepageName) + ); + + } diff --git a/converters/tex2rtf/patches/patch-ac b/converters/tex2rtf/patches/patch-ac index 7e13842b495..a9d9232123c 100644 --- a/converters/tex2rtf/patches/patch-ac +++ b/converters/tex2rtf/patches/patch-ac @@ -1,31 +1,95 @@ -$NetBSD: patch-ac,v 1.1 2003/12/20 16:00:56 ben Exp $ +$NetBSD: patch-ac,v 1.2 2004/03/30 18:23:46 ben Exp $ ---- texutils.cpp.orig 1997-06-05 16:17:46.000000000 -0700 -+++ texutils.cpp -@@ -390,7 +390,7 @@ void WriteTexReferences(char *filename) +--- rtfutils.cpp.orig Mon Jul 15 15:54:46 2002 ++++ rtfutils.cpp +@@ -527,7 +527,7 @@ bool WriteHPJ(char *filename) + StripExtension(hpjFilename); + strcat(hpjFilename, ".hpj"); - void ReadTexReferences(char *filename) - { -- ifstream istr(filename, ios::nocreate | ios::in); -+ ifstream istr(filename, ios::in); - if (istr.bad()) return; +- strcpy(helpFile, FileNameFromPath(filename)); ++ strcpy(helpFile, wxFileNameFromPath(filename)); + StripExtension(helpFile); + strcpy(rtfFile, helpFile); + strcat(helpFile, ".hlp"); +@@ -1195,7 +1195,7 @@ void RTFOnMacro(int macroId, int no_args + fprintf(Chapters, "!{\\footnote DisableButton(\"Up\")}\n"); + else + fprintf(Chapters, "!{\\footnote EnableButton(\"Up\");ChangeButtonBinding(\"Up\", \"JumpId(`%s.hlp', `%s')\")}\n", +- FileNameFromPath(FileRoot), "Contents"); ++ wxFileNameFromPath(FileRoot), "Contents"); + } + } - char label[100]; -@@ -554,7 +554,7 @@ void BibReadValue(istream& istr, char *b - Bool ReadBib(char *filename) - { - char buf[300]; -- ifstream istr(filename, ios::nocreate | ios::in); -+ ifstream istr(filename, ios::in); - if (istr.bad()) return FALSE; +@@ -1350,12 +1350,12 @@ void RTFOnMacro(int macroId, int no_args + if (DocumentStyle == LATEX_ARTICLE) + { + fprintf(Sections, "!{\\footnote EnableButton(\"Up\");ChangeButtonBinding(\"Up\", \"JumpId(`%s.hlp', `%s')\")}\n", +- FileNameFromPath(FileRoot), "Contents"); ++ wxFileNameFromPath(FileRoot), "Contents"); + } + else if (CurrentChapterName) + { + fprintf(Sections, "!{\\footnote EnableButton(\"Up\");ChangeButtonBinding(\"Up\", \"JumpId(`%s.hlp', `%s')\")}\n", +- FileNameFromPath(FileRoot), CurrentChapterName); ++ wxFileNameFromPath(FileRoot), CurrentChapterName); + } + } + } +@@ -1501,7 +1501,7 @@ void RTFOnMacro(int macroId, int no_args + if (useUpButton && CurrentSectionName) + { + fprintf(Subsections, "!{\\footnote EnableButton(\"Up\");ChangeButtonBinding(\"Up\", \"JumpId(`%s.hlp', `%s')\")}\n", +- FileNameFromPath(FileRoot), CurrentSectionName); ++ wxFileNameFromPath(FileRoot), CurrentSectionName); + } + } + if (!winHelp && indexSubsections && useWord) +@@ -1647,7 +1647,7 @@ void RTFOnMacro(int macroId, int no_args + if (useUpButton && CurrentSubsectionName) + { + fprintf(Subsubsections, "!{\\footnote EnableButton(\"Up\");ChangeButtonBinding(\"Up\", \"JumpId(`%s.hlp', `%s')\")}\n", +- FileNameFromPath(FileRoot), CurrentSubsectionName); ++ wxFileNameFromPath(FileRoot), CurrentSubsectionName); + } + } + if (!winHelp && indexSubsections && useWord) +@@ -4772,10 +4772,10 @@ bool RTFOnArgument(int macroId, int arg_ + { + if (MinorDocumentStyleString) + { +- if (StringMatch("twoside", MinorDocumentStyleString)) ++ if (wxStringMatch2("twoside", MinorDocumentStyleString)) + // Mirror margins, switch on odd/even headers & footers, and break sections at odd pages + TexOutput("\\margmirror\\facingp\\sbkodd"); +- if (StringMatch("twocolumn", MinorDocumentStyleString)) ++ if (wxStringMatch2("twocolumn", MinorDocumentStyleString)) + TexOutput("\\cols2"); + } + TexOutput("\n"); +@@ -4897,7 +4897,7 @@ bool RTFOnArgument(int macroId, int arg_ + if (useUpButton) + { + fprintf(Chapters, "!{\\footnote EnableButton(\"Up\");ChangeButtonBinding(\"Up\", \"JumpId(`%s.hlp', `%s')\")}\n", +- FileNameFromPath(FileRoot), "Contents"); ++ wxFileNameFromPath(FileRoot), "Contents"); + } + } + +@@ -5247,7 +5247,7 @@ bool RTFGo(void) + { + wxConcatFiles("header.rtf", "chapters.rtf", "tmp1.rtf"); + Tex2RTFYield(TRUE); +- if (FileExists(OutputFile)) ++ if (wxFileExists(OutputFile)) + wxRemoveFile(OutputFile); - BibLine = 1; -@@ -1271,7 +1271,7 @@ char *RegisterSetting(char *settingName, + char *cwdStr; +@@ -5273,7 +5273,7 @@ bool RTFGo(void) + wxRemoveFile("tmp1.rtf"); + } + +- if (FileExists(ContentsName)) wxRemoveFile(ContentsName); ++ if (wxFileExists(ContentsName)) wxRemoveFile(ContentsName); - Bool ReadCustomMacros(char *filename) - { -- ifstream istr(filename, ios::nocreate | ios::in); -+ ifstream istr(filename, ios::in); - if (istr.bad()) return FALSE; - - CustomMacroList.Clear(); + if (!wxRenameFile(TmpContentsName, ContentsName)) + { diff --git a/converters/tex2rtf/patches/patch-ad b/converters/tex2rtf/patches/patch-ad index 61d0927603d..3421374dc82 100644 --- a/converters/tex2rtf/patches/patch-ad +++ b/converters/tex2rtf/patches/patch-ad @@ -1,13 +1,43 @@ -$NetBSD: patch-ad,v 1.1 2003/12/20 16:00:56 ben Exp $ +$NetBSD: patch-ad,v 1.2 2004/03/30 18:23:46 ben Exp $ ---- wxwin/wb_utils.cpp.orig 1997-07-20 17:01:04.000000000 -0700 -+++ wxwin/wb_utils.cpp -@@ -27,6 +27,8 @@ - */ +--- tex2any.cpp.orig Mon Jul 15 15:54:46 2002 ++++ tex2any.cpp +@@ -750,7 +750,7 @@ bool read_a_line(char *buf) + fileNameStr.Replace("\\", ""); + // Ignore some types of input files (e.g. macro definition files) +- char *fileOnly = FileNameFromPath((char*) (const char*) fileNameStr); ++ char *fileOnly = wxFileNameFromPath((char*) (const char*) fileNameStr); + currentFileName = fileOnly; + if (IgnorableInputFiles.Member(fileOnly)) + return read_a_line(buf); +@@ -3224,11 +3224,11 @@ bool DefaultOnArgument(int macroId, int + else if (strncmp(DocumentStyleString, "slides", 6) == 0) + DocumentStyle = LATEX_SLIDES; + +- if (StringMatch("10", DocumentStyleString)) ++ if (wxStringMatch2("10", DocumentStyleString)) + SetFontSizes(10); +- else if (StringMatch("11", DocumentStyleString)) ++ else if (wxStringMatch2("11", DocumentStyleString)) + SetFontSizes(11); +- else if (StringMatch("12", DocumentStyleString)) ++ else if (wxStringMatch2("12", DocumentStyleString)) + SetFontSizes(12); -+using namespace std; -+ - #include "common.h" - #include "wx_utils.h" - #include "wx_list.h" + OnMacro(ltHELPFONTSIZE, 1, TRUE); +@@ -3243,11 +3243,11 @@ bool DefaultOnArgument(int macroId, int + { + MinorDocumentStyleString = copystring(GetArgData()); + +- if (StringMatch("10", MinorDocumentStyleString)) ++ if (wxStringMatch2("10", MinorDocumentStyleString)) + SetFontSizes(10); +- else if (StringMatch("11", MinorDocumentStyleString)) ++ else if (wxStringMatch2("11", MinorDocumentStyleString)) + SetFontSizes(11); +- else if (StringMatch("12", MinorDocumentStyleString)) ++ else if (wxStringMatch2("12", MinorDocumentStyleString)) + SetFontSizes(12); + } + return FALSE; diff --git a/converters/tex2rtf/patches/patch-ae b/converters/tex2rtf/patches/patch-ae new file mode 100644 index 00000000000..2f8b0a39910 --- /dev/null +++ b/converters/tex2rtf/patches/patch-ae @@ -0,0 +1,429 @@ +$NetBSD: patch-ae,v 1.1 2004/03/30 18:23:46 ben Exp $ + +--- texutils.cpp.orig Mon Jul 15 15:54:47 2002 ++++ texutils.cpp +@@ -619,7 +619,7 @@ bool ReadBib(char *filename) + return FALSE; + } + BibEatWhiteSpace(istr); +- if (StringMatch(recordType, "string", FALSE, TRUE)) ++ if (wxStringMatch2(recordType, "string", FALSE, TRUE)) + { + BibReadWord(istr, recordType); + BibEatWhiteSpace(istr); +@@ -696,57 +696,57 @@ bool ReadBib(char *filename) + BibReadValue(istr, fieldValue, TRUE, (ch == '"' ? TRUE : FALSE)); + + // Now we can add a field +- if (StringMatch(recordField, "author", FALSE, TRUE)) ++ if (wxStringMatch2(recordField, "author", FALSE, TRUE)) + bibEntry->author = copystring(fieldValue); +- else if (StringMatch(recordField, "key", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "key", FALSE, TRUE)) + {} +- else if (StringMatch(recordField, "annotate", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "annotate", FALSE, TRUE)) + {} +- else if (StringMatch(recordField, "abstract", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "abstract", FALSE, TRUE)) + {} +- else if (StringMatch(recordField, "edition", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "edition", FALSE, TRUE)) + {} +- else if (StringMatch(recordField, "howpublished", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "howpublished", FALSE, TRUE)) + {} +- else if (StringMatch(recordField, "note", FALSE, TRUE) || StringMatch(recordField, "notes", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "note", FALSE, TRUE) || wxStringMatch2(recordField, "notes", FALSE, TRUE)) + {} +- else if (StringMatch(recordField, "series", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "series", FALSE, TRUE)) + {} +- else if (StringMatch(recordField, "type", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "type", FALSE, TRUE)) + {} +- else if (StringMatch(recordField, "keywords", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "keywords", FALSE, TRUE)) + {} +- else if (StringMatch(recordField, "editor", FALSE, TRUE) || StringMatch(recordField, "editors", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "editor", FALSE, TRUE) || wxStringMatch2(recordField, "editors", FALSE, TRUE)) + bibEntry->editor= copystring(fieldValue); +- else if (StringMatch(recordField, "title", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "title", FALSE, TRUE)) + bibEntry->title= copystring(fieldValue); +- else if (StringMatch(recordField, "booktitle", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "booktitle", FALSE, TRUE)) + bibEntry->booktitle= copystring(fieldValue); +- else if (StringMatch(recordField, "journal", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "journal", FALSE, TRUE)) + bibEntry->journal= copystring(fieldValue); +- else if (StringMatch(recordField, "volume", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "volume", FALSE, TRUE)) + bibEntry->volume= copystring(fieldValue); +- else if (StringMatch(recordField, "number", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "number", FALSE, TRUE)) + bibEntry->number= copystring(fieldValue); +- else if (StringMatch(recordField, "year", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "year", FALSE, TRUE)) + bibEntry->year= copystring(fieldValue); +- else if (StringMatch(recordField, "month", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "month", FALSE, TRUE)) + bibEntry->month= copystring(fieldValue); +- else if (StringMatch(recordField, "pages", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "pages", FALSE, TRUE)) + bibEntry->pages= copystring(fieldValue); +- else if (StringMatch(recordField, "publisher", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "publisher", FALSE, TRUE)) + bibEntry->publisher= copystring(fieldValue); +- else if (StringMatch(recordField, "address", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "address", FALSE, TRUE)) + bibEntry->address= copystring(fieldValue); +- else if (StringMatch(recordField, "institution", FALSE, TRUE) || StringMatch(recordField, "school", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "institution", FALSE, TRUE) || wxStringMatch2(recordField, "school", FALSE, TRUE)) + bibEntry->institution= copystring(fieldValue); +- else if (StringMatch(recordField, "organization", FALSE, TRUE) || StringMatch(recordField, "organisation", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "organization", FALSE, TRUE) || wxStringMatch2(recordField, "organisation", FALSE, TRUE)) + bibEntry->organization= copystring(fieldValue); +- else if (StringMatch(recordField, "comment", FALSE, TRUE) || StringMatch(recordField, "comments", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "comment", FALSE, TRUE) || wxStringMatch2(recordField, "comments", FALSE, TRUE)) + bibEntry->comment= copystring(fieldValue); +- else if (StringMatch(recordField, "annote", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "annote", FALSE, TRUE)) + bibEntry->comment= copystring(fieldValue); +- else if (StringMatch(recordField, "chapter", FALSE, TRUE)) ++ else if (wxStringMatch2(recordField, "chapter", FALSE, TRUE)) + bibEntry->chapter= copystring(fieldValue); + else + { +@@ -797,7 +797,7 @@ void OutputBibItem(TexRef *ref, BibEntry + if (bib->year || bib->month) + TexOutput(". "); + +- if (StringMatch(bib->type, "article", FALSE, TRUE)) ++ if (wxStringMatch2(bib->type, "article", FALSE, TRUE)) + { + if (bib->title) + { +@@ -834,14 +834,14 @@ void OutputBibItem(TexRef *ref, BibEntry + } + TexOutput("."); + } +- else if (StringMatch(bib->type, "book", FALSE, TRUE) || +- StringMatch(bib->type, "unpublished", FALSE, TRUE) || +- StringMatch(bib->type, "manual", FALSE, TRUE) || +- StringMatch(bib->type, "phdthesis", FALSE, TRUE) || +- StringMatch(bib->type, "mastersthesis", FALSE, TRUE) || +- StringMatch(bib->type, "misc", FALSE, TRUE) || +- StringMatch(bib->type, "techreport", FALSE, TRUE) || +- StringMatch(bib->type, "booklet", FALSE, TRUE)) ++ else if (wxStringMatch2(bib->type, "book", FALSE, TRUE) || ++ wxStringMatch2(bib->type, "unpublished", FALSE, TRUE) || ++ wxStringMatch2(bib->type, "manual", FALSE, TRUE) || ++ wxStringMatch2(bib->type, "phdthesis", FALSE, TRUE) || ++ wxStringMatch2(bib->type, "mastersthesis", FALSE, TRUE) || ++ wxStringMatch2(bib->type, "misc", FALSE, TRUE) || ++ wxStringMatch2(bib->type, "techreport", FALSE, TRUE) || ++ wxStringMatch2(bib->type, "booklet", FALSE, TRUE)) + { + if (bib->title || bib->booktitle) + { +@@ -852,9 +852,9 @@ void OutputBibItem(TexRef *ref, BibEntry + OnArgument(ltIT, 1, FALSE); + OnMacro(ltIT, 1, FALSE); + } +- if (StringMatch(bib->type, "phdthesis", FALSE, TRUE)) ++ if (wxStringMatch2(bib->type, "phdthesis", FALSE, TRUE)) + TexOutput("PhD thesis. "); +- if (StringMatch(bib->type, "techreport", FALSE, TRUE)) ++ if (wxStringMatch2(bib->type, "techreport", FALSE, TRUE)) + TexOutput("Technical report. "); + if (bib->editor) + { +@@ -883,10 +883,10 @@ void OutputBibItem(TexRef *ref, BibEntry + TexOutput(". "); + } + } +- else if (StringMatch(bib->type, "inbook", FALSE, TRUE) || +- StringMatch(bib->type, "inproceedings", FALSE, TRUE) || +- StringMatch(bib->type, "incollection", FALSE, TRUE) || +- StringMatch(bib->type, "conference", FALSE, TRUE)) ++ else if (wxStringMatch2(bib->type, "inbook", FALSE, TRUE) || ++ wxStringMatch2(bib->type, "inproceedings", FALSE, TRUE) || ++ wxStringMatch2(bib->type, "incollection", FALSE, TRUE) || ++ wxStringMatch2(bib->type, "conference", FALSE, TRUE)) + { + if (bib->title) + { +@@ -1067,151 +1067,151 @@ char *RegisterSetting(char *settingName, + { + static char errorCode[100]; + strcpy(errorCode, "OK"); +- if (StringMatch(settingName, "chapterName", FALSE, TRUE)) ++ if (wxStringMatch2(settingName, "chapterName", FALSE, TRUE)) + { + delete[] ChapterNameString; + ChapterNameString = copystring(settingValue); + } +- else if (StringMatch(settingName, "sectionName", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "sectionName", FALSE, TRUE)) + { + delete[] SectionNameString; + SectionNameString = copystring(settingValue); + } +- else if (StringMatch(settingName, "subsectionName", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "subsectionName", FALSE, TRUE)) + { + delete[] SubsectionNameString; + SubsectionNameString = copystring(settingValue); + } +- else if (StringMatch(settingName, "subsubsectionName", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "subsubsectionName", FALSE, TRUE)) + { + delete[] SubsubsectionNameString; + SubsubsectionNameString = copystring(settingValue); + } +- else if (StringMatch(settingName, "indexName", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "indexName", FALSE, TRUE)) + { + delete[] IndexNameString; + IndexNameString = copystring(settingValue); + } +- else if (StringMatch(settingName, "contentsName", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "contentsName", FALSE, TRUE)) + { + delete[] ContentsNameString; + ContentsNameString = copystring(settingValue); + } +- else if (StringMatch(settingName, "glossaryName", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "glossaryName", FALSE, TRUE)) + { + delete[] GlossaryNameString; + GlossaryNameString = copystring(settingValue); + } +- else if (StringMatch(settingName, "referencesName", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "referencesName", FALSE, TRUE)) + { + delete[] ReferencesNameString; + ReferencesNameString = copystring(settingValue); + } +- else if (StringMatch(settingName, "tablesName", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "tablesName", FALSE, TRUE)) + { + delete[] TablesNameString; + TablesNameString = copystring(settingValue); + } +- else if (StringMatch(settingName, "figuresName", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "figuresName", FALSE, TRUE)) + { + delete[] FiguresNameString; + FiguresNameString = copystring(settingValue); + } +- else if (StringMatch(settingName, "tableName", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "tableName", FALSE, TRUE)) + { + delete[] TableNameString; + TableNameString = copystring(settingValue); + } +- else if (StringMatch(settingName, "figureName", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "figureName", FALSE, TRUE)) + { + delete[] FigureNameString; + FigureNameString = copystring(settingValue); + } +- else if (StringMatch(settingName, "abstractName", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "abstractName", FALSE, TRUE)) + { + delete[] AbstractNameString; + AbstractNameString = copystring(settingValue); + } +- else if (StringMatch(settingName, "chapterFontSize", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "chapterFontSize", FALSE, TRUE)) + StringToInt(settingValue, &chapterFont); +- else if (StringMatch(settingName, "sectionFontSize", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "sectionFontSize", FALSE, TRUE)) + StringToInt(settingValue, §ionFont); +- else if (StringMatch(settingName, "subsectionFontSize", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "subsectionFontSize", FALSE, TRUE)) + StringToInt(settingValue, &subsectionFont); +- else if (StringMatch(settingName, "titleFontSize", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "titleFontSize", FALSE, TRUE)) + StringToInt(settingValue, &titleFont); +- else if (StringMatch(settingName, "authorFontSize", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "authorFontSize", FALSE, TRUE)) + StringToInt(settingValue, &authorFont); +- else if (StringMatch(settingName, "ignoreInput", FALSE, TRUE)) +- IgnorableInputFiles.Add(FileNameFromPath(settingValue)); +- else if (StringMatch(settingName, "mirrorMargins", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "ignoreInput", FALSE, TRUE)) ++ IgnorableInputFiles.Add(wxFileNameFromPath(settingValue)); ++ else if (wxStringMatch2(settingName, "mirrorMargins", FALSE, TRUE)) + mirrorMargins = StringTobool(settingValue); +- else if (StringMatch(settingName, "runTwice", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "runTwice", FALSE, TRUE)) + runTwice = StringTobool(settingValue); +- else if (StringMatch(settingName, "isInteractive", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "isInteractive", FALSE, TRUE)) + isInteractive = StringTobool(settingValue); +- else if (StringMatch(settingName, "headerRule", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "headerRule", FALSE, TRUE)) + headerRule = StringTobool(settingValue); +- else if (StringMatch(settingName, "footerRule", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "footerRule", FALSE, TRUE)) + footerRule = StringTobool(settingValue); +- else if (StringMatch(settingName, "combineSubSections", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "combineSubSections", FALSE, TRUE)) + combineSubSections = StringTobool(settingValue); +- else if (StringMatch(settingName, "listLabelIndent", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "listLabelIndent", FALSE, TRUE)) + StringToInt(settingValue, &labelIndentTab); +- else if (StringMatch(settingName, "listItemIndent", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "listItemIndent", FALSE, TRUE)) + StringToInt(settingValue, &itemIndentTab); +- else if (StringMatch(settingName, "useUpButton", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "useUpButton", FALSE, TRUE)) + useUpButton = StringTobool(settingValue); +- else if (StringMatch(settingName, "useHeadingStyles", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "useHeadingStyles", FALSE, TRUE)) + useHeadingStyles = StringTobool(settingValue); +- else if (StringMatch(settingName, "useWord", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "useWord", FALSE, TRUE)) + useWord = StringTobool(settingValue); +- else if (StringMatch(settingName, "contentsDepth", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "contentsDepth", FALSE, TRUE)) + StringToInt(settingValue, &contentsDepth); +- else if (StringMatch(settingName, "generateHPJ", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "generateHPJ", FALSE, TRUE)) + generateHPJ = StringTobool(settingValue); +- else if (StringMatch(settingName, "truncateFilenames", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "truncateFilenames", FALSE, TRUE)) + truncateFilenames = StringTobool(settingValue); +- else if (StringMatch(settingName, "winHelpVersion", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "winHelpVersion", FALSE, TRUE)) + StringToInt(settingValue, &winHelpVersion); +- else if (StringMatch(settingName, "winHelpContents", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "winHelpContents", FALSE, TRUE)) + winHelpContents = StringTobool(settingValue); +- else if (StringMatch(settingName, "htmlIndex", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "htmlIndex", FALSE, TRUE)) + htmlIndex = StringTobool(settingValue); +- else if (StringMatch(settingName, "htmlWorkshopFiles", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "htmlWorkshopFiles", FALSE, TRUE)) + htmlWorkshopFiles = StringTobool(settingValue); +- else if (StringMatch(settingName, "htmlFrameContents", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "htmlFrameContents", FALSE, TRUE)) + htmlFrameContents = StringTobool(settingValue); +- else if (StringMatch(settingName, "htmlStylesheet", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "htmlStylesheet", FALSE, TRUE)) + { + if (htmlStylesheet) delete[] htmlStylesheet; + htmlStylesheet = copystring(settingValue); + } +- else if (StringMatch(settingName, "upperCaseNames", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "upperCaseNames", FALSE, TRUE)) + upperCaseNames = StringTobool(settingValue); +- else if (StringMatch(settingName, "ignoreBadRefs", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "ignoreBadRefs", FALSE, TRUE)) + ignoreBadRefs = StringTobool(settingValue); +- else if (StringMatch(settingName, "htmlFaceName", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "htmlFaceName", FALSE, TRUE)) + { + delete[] htmlFaceName; + htmlFaceName = copystring(settingValue); + } +- else if (StringMatch(settingName, "winHelpTitle", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "winHelpTitle", FALSE, TRUE)) + { + if (winHelpTitle) + delete[] winHelpTitle; + winHelpTitle = copystring(settingValue); + } +- else if (StringMatch(settingName, "indexSubsections", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "indexSubsections", FALSE, TRUE)) + indexSubsections = StringTobool(settingValue); +- else if (StringMatch(settingName, "compatibility", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "compatibility", FALSE, TRUE)) + compatibilityMode = StringTobool(settingValue); +- else if (StringMatch(settingName, "defaultColumnWidth", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "defaultColumnWidth", FALSE, TRUE)) + { + StringToInt(settingValue, &defaultTableColumnWidth); + defaultTableColumnWidth = 20*defaultTableColumnWidth; + } +- else if (StringMatch(settingName, "bitmapMethod", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "bitmapMethod", FALSE, TRUE)) + { + if ((strcmp(settingValue, "includepicture") != 0) && (strcmp(settingValue, "hex") != 0) && + (strcmp(settingValue, "import") != 0)) +@@ -1226,7 +1226,7 @@ char *RegisterSetting(char *settingName, + bitmapMethod = copystring(settingValue); + } + } +- else if (StringMatch(settingName, "htmlBrowseButtons", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "htmlBrowseButtons", FALSE, TRUE)) + { + if (strcmp(settingValue, "none") == 0) + htmlBrowseButtons = HTML_BUTTONS_NONE; +@@ -1241,43 +1241,43 @@ char *RegisterSetting(char *settingName, + strcpy(errorCode, "Initialisation file error: htmlBrowseButtons must be one of none, bitmap, or text."); + } + } +- else if (StringMatch(settingName, "backgroundImage", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "backgroundImage", FALSE, TRUE)) + { + backgroundImageString = copystring(settingValue); + } +- else if (StringMatch(settingName, "backgroundColour", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "backgroundColour", FALSE, TRUE)) + { + delete[] backgroundColourString; + backgroundColourString = copystring(settingValue); + } +- else if (StringMatch(settingName, "textColour", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "textColour", FALSE, TRUE)) + { + textColourString = copystring(settingValue); + } +- else if (StringMatch(settingName, "linkColour", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "linkColour", FALSE, TRUE)) + { + linkColourString = copystring(settingValue); + } +- else if (StringMatch(settingName, "followedLinkColour", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "followedLinkColour", FALSE, TRUE)) + { + followedLinkColourString = copystring(settingValue); + } +- else if (StringMatch(settingName, "conversionMode", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "conversionMode", FALSE, TRUE)) + { +- if (StringMatch(settingValue, "RTF", FALSE, TRUE)) ++ if (wxStringMatch2(settingValue, "RTF", FALSE, TRUE)) + { + winHelp = FALSE; convertMode = TEX_RTF; + } +- else if (StringMatch(settingValue, "WinHelp", FALSE, TRUE)) ++ else if (wxStringMatch2(settingValue, "WinHelp", FALSE, TRUE)) + { + winHelp = TRUE; convertMode = TEX_RTF; + } +- else if (StringMatch(settingValue, "XLP", FALSE, TRUE) || +- StringMatch(settingValue, "wxHelp", FALSE, TRUE)) ++ else if (wxStringMatch2(settingValue, "XLP", FALSE, TRUE) || ++ wxStringMatch2(settingValue, "wxHelp", FALSE, TRUE)) + { + convertMode = TEX_XLP; + } +- else if (StringMatch(settingValue, "HTML", FALSE, TRUE)) ++ else if (wxStringMatch2(settingValue, "HTML", FALSE, TRUE)) + { + convertMode = TEX_HTML; + } +@@ -1288,7 +1288,7 @@ char *RegisterSetting(char *settingName, + strcpy(errorCode, "Initialisation file error: conversionMode must be one of\nRTF, WinHelp, XLP (or wxHelp), HTML."); + } + } +- else if (StringMatch(settingName, "documentFontSize", FALSE, TRUE)) ++ else if (wxStringMatch2(settingName, "documentFontSize", FALSE, TRUE)) + { + int n; + StringToInt(settingValue, &n); diff --git a/converters/tex2rtf/patches/patch-af b/converters/tex2rtf/patches/patch-af new file mode 100644 index 00000000000..f3587af3dfa --- /dev/null +++ b/converters/tex2rtf/patches/patch-af @@ -0,0 +1,13 @@ +$NetBSD: patch-af,v 1.1 2004/03/30 18:23:46 ben Exp $ + +--- xlputils.cpp.orig Thu Nov 23 05:27:52 2000 ++++ xlputils.cpp +@@ -1195,7 +1195,7 @@ bool XLPGo(void) + fclose(Subsubsections); Subsubsections = NULL; + fclose(Index); Index = NULL; + +- if (FileExists(ContentsName)) wxRemoveFile(ContentsName); ++ if (wxFileExists(ContentsName)) wxRemoveFile(ContentsName); + + if (!wxRenameFile(TmpContentsName, ContentsName)) + { diff --git a/converters/tex2rtf/patches/patch-ag b/converters/tex2rtf/patches/patch-ag new file mode 100644 index 00000000000..974d2791f94 --- /dev/null +++ b/converters/tex2rtf/patches/patch-ag @@ -0,0 +1,13 @@ +$NetBSD: patch-ag,v 1.1 2004/03/30 18:23:46 ben Exp $ + +--- makefile.unx.orig Thu Aug 8 08:40:25 2002 ++++ makefile.unx +@@ -5,7 +5,7 @@ LDFLAGS = `wx-config --libs` + + PROGRAM = tex2rtf + +-OBJECTS = tex2rtf.o tex2any.o texutils.o rtfutils.o xlputils.o htmlutil.o readshg.o table.o ++OBJECTS = tex2rtf.o tex2any.o texutils.o rtfutils.o xlputils.o htmlutil.o readshg.o table.o stringmatch.o + + # implementation + diff --git a/converters/tex2rtf/patches/patch-ah b/converters/tex2rtf/patches/patch-ah new file mode 100644 index 00000000000..08093dbfcf0 --- /dev/null +++ b/converters/tex2rtf/patches/patch-ah @@ -0,0 +1,12 @@ +$NetBSD: patch-ah,v 1.1 2004/03/30 18:23:46 ben Exp $ + +--- tex2any.h.orig Mon Jul 15 15:54:46 2002 ++++ tex2any.h +@@ -15,6 +15,7 @@ + #include "wx/list.h" + #include "wx/hash.h" + #include "wxhlpblk.h" ++#include "stringmatch.h" + + /* + * Conversion modes diff --git a/converters/tex2rtf/patches/patch-ai b/converters/tex2rtf/patches/patch-ai new file mode 100644 index 00000000000..08cd1f193a1 --- /dev/null +++ b/converters/tex2rtf/patches/patch-ai @@ -0,0 +1,13 @@ +$NetBSD: patch-ai,v 1.1 2004/03/30 18:23:46 ben Exp $ + +--- tex2rtf.h.orig Thu May 24 09:54:19 2001 ++++ tex2rtf.h +@@ -9,6 +9,8 @@ + // Licence: wxWindows licence + ///////////////////////////////////////////////////////////////////////////// + ++#include "stringmatch.h" ++ + #ifndef NO_GUI + // Define a new application type + class MyApp: public wxApp |