pkgsrc/converters/tex2rtf/patches/patch-ac
ben 165158ba55 Update tex2rtf to version 2.01. A changelog is not available, but this
version of tex2rtf is updated to work with newer versions of wxwindows,
and the prior version is referred to as obsolete.  I am told that some
of the patches duplicate work that is done in CVS, so some patches
should disappear over time.
2004-03-30 18:23:46 +00:00

95 lines
3.9 KiB
Text

$NetBSD: patch-ac,v 1.2 2004/03/30 18:23:46 ben Exp $
--- 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");
- 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");
}
}
@@ -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);
char *cwdStr;
@@ -5273,7 +5273,7 @@ bool RTFGo(void)
wxRemoveFile("tmp1.rtf");
}
- if (FileExists(ContentsName)) wxRemoveFile(ContentsName);
+ if (wxFileExists(ContentsName)) wxRemoveFile(ContentsName);
if (!wxRenameFile(TmpContentsName, ContentsName))
{