for wxUSE_HELP == 0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4102
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
--- /dev/null
+#
+# File: makefile.unx
+# Author: Julian Smart
+# Created: 1998
+# Updated:
+# Copyright: (c) 1998 Julian Smart
+#
+# "%W% %G%"
+#
+# Makefile for Tex2RTF (Unix)
+
+top_srcdir = @top_srcdir@
+top_builddir = ../../..
+program_dir = utils/tex2rtf/src
+
+PROGRAM=tex2rtf
+
+OBJECTS = tex2rtf.o tex2any.o texutils.o rtfutils.o xlputils.o htmlutil.o readshg.o table.o
+
+include ../../../src/makeprog.env
+
#include <wx/timer.h>
#endif
#include <wx/timer.h>
#endif
+#if defined(NO_GUI) || defined(__UNIX__)
#if wxUSE_IOSTREAMH
#include <iostream.h>
#include <fstream.h>
#if wxUSE_IOSTREAMH
#include <iostream.h>
#include <fstream.h>
int passNumber = 1;
#ifndef NO_GUI
int passNumber = 1;
#ifndef NO_GUI
wxHelpController *HelpInstance = NULL;
wxHelpController *HelpInstance = NULL;
#ifdef __WXMSW__
static char *ipc_buffer = NULL;
#ifdef __WXMSW__
static char *ipc_buffer = NULL;
RefName = new char[300];
int n = 1;
RefName = new char[300];
int n = 1;
// Read input/output files
if (argc > 1)
{
// Read input/output files
if (argc > 1)
{
frame->textWindow = new wxTextCtrl(frame, -1, "", wxPoint(-1, -1), wxSize(-1, -1), wxTE_READONLY|wxTE_MULTILINE);
(*frame->textWindow) << "Welcome to Julian Smart's LaTeX to RTF converter.\n";
frame->textWindow = new wxTextCtrl(frame, -1, "", wxPoint(-1, -1), wxSize(-1, -1), wxTE_READONLY|wxTE_MULTILINE);
(*frame->textWindow) << "Welcome to Julian Smart's LaTeX to RTF converter.\n";
HelpInstance = new wxHelpController();
HelpInstance->Initialize("tex2rtf");
HelpInstance = new wxHelpController();
HelpInstance->Initialize("tex2rtf");
/*
* Read macro/initialisation file
*
*/
/*
* Read macro/initialisation file
*
*/
wxString path;
if ((path = TexPathList.FindValidPath(MacroFile)) != "")
ReadCustomMacros((char*) (const char*) path);
wxString path;
if ((path = TexPathList.FindValidPath(MacroFile)) != "")
ReadCustomMacros((char*) (const char*) path);
else if (convertMode == TEX_XLP) strcat(buf, "XLP");
strcat(buf, " mode.");
frame->SetStatusText(buf, 1);
else if (convertMode == TEX_XLP) strcat(buf, "XLP");
strcat(buf, " mode.");
frame->SetStatusText(buf, 1);
frame->Show(TRUE);
return TRUE;
}
frame->Show(TRUE);
return TRUE;
}
* Read macro/initialisation file
*
*/
* Read macro/initialisation file
*
*/
wxString path;
if ((path = TexPathList.FindValidPath(MacroFile)) != "")
ReadCustomMacros((char*) (const char*) path);
wxString path;
if ((path = TexPathList.FindValidPath(MacroFile)) != "")
ReadCustomMacros((char*) (const char*) path);
delete TheTex2RTFServer;
wxDDECleanUp();
#endif
delete TheTex2RTFServer;
wxDDECleanUp();
#endif
// TODO: this simulates zero-memory leaks!
// Otherwise there are just too many...
// TODO: this simulates zero-memory leaks!
// Otherwise there are just too many...
void MyFrame::OnHelp(wxCommandEvent& event)
{
void MyFrame::OnHelp(wxCommandEvent& event)
{
HelpInstance->LoadFile();
HelpInstance->DisplayContents();
HelpInstance->LoadFile();
HelpInstance->DisplayContents();
}
void MyFrame::OnAbout(wxCommandEvent& event)
}
void MyFrame::OnAbout(wxCommandEvent& event)
path = wxPathOnly(OutputFile);
else if (InputFile)
path = wxPathOnly(InputFile);
path = wxPathOnly(OutputFile);
else if (InputFile)
path = wxPathOnly(InputFile);
switch (convertMode)
{
case TEX_RTF:
switch (convertMode)
{
case TEX_RTF:
if(strlen( sName) > 5)
sName[5] = '\0'; // that should do!
}
if(strlen( sName) > 5)
sName[5] = '\0'; // that should do!
}
sprintf(ContentsName, "%s.con", FileRoot);
sprintf(TmpContentsName, "%s.cn1", FileRoot);
sprintf(TmpFrameContentsName, "%s.frc", FileRoot);
sprintf(ContentsName, "%s.con", FileRoot);
sprintf(TmpContentsName, "%s.cn1", FileRoot);
sprintf(TmpFrameContentsName, "%s.frc", FileRoot);
if (wxFileExists(RefName))
ReadTexReferences(RefName);
if (wxFileExists(RefName))
ReadTexReferences(RefName);
bool success = FALSE;
if (InputFile && OutputFile)
bool success = FALSE;
if (InputFile && OutputFile)
{
if (!ipc_buffer)
ipc_buffer = new char[1000];
{
if (!ipc_buffer)
ipc_buffer = new char[1000];
return new Tex2RTFConnection(ipc_buffer, 4000);
}
else
return new Tex2RTFConnection(ipc_buffer, 4000);
}
else
Tex2RTFConnection::Tex2RTFConnection(char *buf, int size):wxDDEConnection(buf, size)
{
}
Tex2RTFConnection::Tex2RTFConnection(char *buf, int size):wxDDEConnection(buf, size)
{
}