Applied patch [ 867187 ] wxWindows-like markup in TEX2RTF tool

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2004-01-08 11:54:30 +00:00
parent 6ee9b7b53e
commit 6c155d3387
14 changed files with 3625 additions and 3742 deletions

View File

@@ -13,7 +13,7 @@
static char hexArray[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B',
'C', 'D', 'E', 'F' };
void DecToHex(int dec, char *buf)
void DecToHex(int dec, wxChar *buf)
{
int firstDigit = (int)(dec/16.0);
int secondDigit = (int)(dec - (firstDigit*16.0));
@@ -41,30 +41,46 @@ static unsigned long getint(FILE *fp)
bool GetBMPHeader(FILE *fp, int *Width, int *Height, int *Planes, int *BitsPerPixel)
{
unsigned long bfSize, bfOffBits, biSize, biWidth, biHeight, biPlanes;
unsigned long biBitCount, biCompression, biSizeImage, biXPelsPerMeter;
unsigned long biYPelsPerMeter, biClrUsed, biClrImportant;
// Remember about all fields but store only important ones
unsigned long /*
bfSize,
bfOffBits,
biSize,
*/
biWidth,
biHeight,
biPlanes,
biBitCount
/* ,
biCompression,
biSizeImage,
biXPelsPerMeter,
biYPelsPerMeter,
biClrUsed,
biClrImportant
*/
;
/* read the file type (first two bytes) */
int c = getc(fp); int c1 = getc(fp);
if (c!='B' || c1!='M') { return FALSE; }
bfSize = getint(fp);
/* bfSize = */ getint(fp);
getshort(fp); /* reserved and ignored */
getshort(fp);
bfOffBits = getint(fp);
/* bfOffBits = */ getint(fp);
biSize = getint(fp);
/* biSize = */ getint(fp);
biWidth = getint(fp);
biHeight = getint(fp);
biPlanes = getshort(fp);
biBitCount = getshort(fp);
biCompression = getint(fp);
biSizeImage = getint(fp);
biXPelsPerMeter = getint(fp);
biYPelsPerMeter = getint(fp);
biClrUsed = getint(fp);
biClrImportant = getint(fp);
/* biCompression = */ getint(fp);
/* biSizeImage = */ getint(fp);
/* biXPelsPerMeter = */ getint(fp);
/* biYPelsPerMeter = */ getint(fp);
/* biClrUsed = */ getint(fp);
/* biClrImportant = */ getint(fp);
*Width = (int)biWidth;
*Height = (int)biHeight;
@@ -91,19 +107,19 @@ bool OutputBitmapHeader(FILE *fd, bool isWinHelp = FALSE)
int goalW = 15*Width;
int goalH = 15*Height;
TexOutput("{\\pict");
if (isWinHelp) TexOutput("\\wbitmap0");
else TexOutput("\\dibitmap");
TexOutput(_T("{\\pict"));
if (isWinHelp) TexOutput(_T("\\wbitmap0"));
else TexOutput(_T("\\dibitmap)"));
char buf[50];
TexOutput("\\picw"); sprintf(buf, "%d", Width); TexOutput(buf);
TexOutput("\\pich"); sprintf(buf, "%d", Height); TexOutput(buf);
TexOutput("\\wbmbitspixel"); sprintf(buf, "%d", BitsPerPixel); TexOutput(buf);
TexOutput("\\wbmplanes"); sprintf(buf, "%d", Planes); TexOutput(buf);
TexOutput("\\wbmwidthbytes"); sprintf(buf, "%d", scanLineWidth); TexOutput(buf);
TexOutput("\\picwgoal"); sprintf(buf, "%d", goalW); TexOutput(buf);
TexOutput("\\pichgoal"); sprintf(buf, "%d", goalH); TexOutput(buf);
TexOutput("\n");
wxChar buf[50];
TexOutput(_T("\\picw")); wxSprintf(buf, _T("%d"), Width); TexOutput(buf);
TexOutput(_T("\\pich")); wxSprintf(buf, _T("%d"), Height); TexOutput(buf);
TexOutput(_T("\\wbmbitspixel")); wxSprintf(buf, _T("%d"), BitsPerPixel); TexOutput(buf);
TexOutput(_T("\\wbmplanes")); wxSprintf(buf, _T("%d"), Planes); TexOutput(buf);
TexOutput(_T("\\wbmwidthbytes")); wxSprintf(buf, _T("%d"), scanLineWidth); TexOutput(buf);
TexOutput(_T("\\picwgoal")); wxSprintf(buf, _T("%d"), goalW); TexOutput(buf);
TexOutput(_T("\\pichgoal")); wxSprintf(buf, _T("%d"), goalH); TexOutput(buf);
TexOutput(_T("\n"));
return TRUE;
}
@@ -113,20 +129,20 @@ bool OutputBitmapData(FILE *fd)
fseek(fd, 14, SEEK_SET);
int bytesSoFar = 0;
int ch = getc(fd);
char hexBuf[3];
wxChar hexBuf[3];
while (ch != EOF)
{
if (bytesSoFar == scanLineWidth)
{
bytesSoFar = 0;
TexOutput("\n");
TexOutput(_T("\n"));
}
DecToHex(ch, hexBuf);
TexOutput(hexBuf);
bytesSoFar ++;
ch = getc(fd);
}
TexOutput("\n}\n");
TexOutput(_T("\n}\n"));
return TRUE;
}
@@ -158,7 +174,7 @@ bool GetMetafileHeader(FILE *handle, int *width, int *height)
return TRUE;
}
bool OutputMetafileHeader(FILE *handle, bool isWinHelp, int userWidth, int userHeight)
bool OutputMetafileHeader(FILE *handle, bool WXUNUSED(isWinHelp), int userWidth, int userHeight)
{
int Width, Height;
if (!GetMetafileHeader(handle, &Width, &Height))
@@ -187,22 +203,22 @@ bool OutputMetafileHeader(FILE *handle, bool isWinHelp, int userWidth, int userH
goalH = userHeight;
}
TexOutput("{\\pict");
TexOutput("\\wmetafile8");
TexOutput(_T("{\\pict"));
TexOutput(_T("\\wmetafile8"));
char buf[50];
TexOutput("\\picw"); sprintf(buf, "%d", Width); TexOutput(buf);
TexOutput("\\pich"); sprintf(buf, "%d", Height); TexOutput(buf);
TexOutput("\\picwgoal"); sprintf(buf, "%d", goalW); TexOutput(buf);
TexOutput("\\pichgoal"); sprintf(buf, "%d", goalH); TexOutput(buf);
TexOutput("\n");
wxChar buf[50];
TexOutput(_T("\\picw")); wxSprintf(buf, _T("%d"), Width); TexOutput(buf);
TexOutput(_T("\\pich")); wxSprintf(buf, _T("%d"), Height); TexOutput(buf);
TexOutput(_T("\\picwgoal")); wxSprintf(buf, _T("%d"), goalW); TexOutput(buf);
TexOutput(_T("\\pichgoal")); wxSprintf(buf, _T("%d"), goalH); TexOutput(buf);
TexOutput(_T("\n"));
return TRUE;
}
bool OutputMetafileData(FILE *handle)
{
int bytesSoFar = 0;
char hexBuf[3];
wxChar hexBuf[3];
int ch;
do
{
@@ -210,7 +226,7 @@ bool OutputMetafileData(FILE *handle)
if (bytesSoFar == scanLineWidth)
{
bytesSoFar = 0;
TexOutput("\n");
TexOutput(_T("\n"));
}
if (ch != EOF)
{
@@ -219,7 +235,7 @@ bool OutputMetafileData(FILE *handle)
bytesSoFar ++;
}
} while (ch != EOF);
TexOutput("\n}\n");
TexOutput(_T("\n}\n"));
return TRUE;
}

File diff suppressed because it is too large Load Diff

View File

@@ -38,8 +38,8 @@
// HotSpots *array;
// int n = ParseSHG("thing.shg", &array);
int ParseSHG( const char* fileName, HotSpot **hotspots)
{ FILE* fSHG = fopen( fileName, "rb");
int ParseSHG( const wxChar* fileName, HotSpot **hotspots)
{ FILE* fSHG = wxFopen( fileName, _T("rb"));
long offset;
int nHotspots = 0;
@@ -110,7 +110,7 @@ int ParseSHG( const char* fileName, HotSpot **hotspots)
// Convert Windows .SHG file to HTML map file
bool SHGToMap(char *filename, char *defaultFile)
bool SHGToMap(wxChar *filename, wxChar *defaultFile)
{
// Test the SHG parser
HotSpot *hotspots = NULL;
@@ -118,41 +118,41 @@ bool SHGToMap(char *filename, char *defaultFile)
if (n == 0)
return FALSE;
char buf[100];
sprintf(buf, "Converting .SHG file to HTML map file: there are %d hotspots in %s.", n, filename);
wxChar buf[100];
wxSprintf(buf, _T("Converting .SHG file to HTML map file: there are %d hotspots in %s."), n, filename);
OnInform(buf);
char outBuf[256];
strcpy(outBuf, filename);
wxChar outBuf[256];
wxStrcpy(outBuf, filename);
StripExtension(outBuf);
strcat(outBuf, ".map");
wxStrcat(outBuf, _T(".map"));
FILE *fd = fopen(outBuf, "w");
FILE *fd = wxFopen(outBuf, _T("w"));
if (!fd)
{
OnError("Could not open .map file for writing.");
OnError(_T("Could not open .map file for writing."));
delete[] hotspots;
return FALSE;
}
fprintf(fd, "default %s\n", defaultFile);
wxFprintf(fd, _T("default %s\n"), defaultFile);
for (int i = 0; i < n; i++)
{
char *refFilename = "??";
wxChar *refFilename = _T("??");
TexRef *texRef = FindReference(hotspots[i].szHlpTopic_Macro);
if (texRef)
refFilename = texRef->refFile;
else
{
char buf[300];
sprintf(buf, "Warning: could not find hotspot reference %s", hotspots[i].szHlpTopic_Macro);
wxChar buf[300];
wxSprintf(buf, _T("Warning: could not find hotspot reference %s"), hotspots[i].szHlpTopic_Macro);
OnInform(buf);
}
fprintf(fd, "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,
(int)hotspots[i].right, (int)hotspots[i].bottom);
}
fprintf(fd, "\n");
wxFprintf(fd, _T("\n"));
fclose(fd);

View File

@@ -46,7 +46,7 @@ struct HotSpot
top,
right,
bottom;
char szHlpTopic_Macro[65];
wxChar szHlpTopic_Macro[65];
bool IsVisible;
};
@@ -55,10 +55,10 @@ struct HotSpot
// HotSpots *array;
// int n = ParseSHG("thing.shg", &array);
extern int ParseSHG( const char* fileName, HotSpot **hotspots);
extern int ParseSHG( const wxChar* fileName, HotSpot **hotspots);
// Converts Windows .SHG file to HTML map file
extern bool SHGToMap(char *filename, char *defaultFile);
extern bool SHGToMap(wxChar *filename, wxChar *defaultFile);
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -43,7 +43,7 @@ void Text2RTF(TexChunk *chunk);
*
*/
void PushEnvironmentStyle(char *style);
void PushEnvironmentStyle(wxChar *style);
void PopEnvironmentStyle(void);
@@ -51,10 +51,10 @@ void PopEnvironmentStyle(void);
void WriteEnvironmentStyles(void);
// Called on start/end of macro examination
void DefaultRtfOnMacro(char *name, int no_args, bool start);
void DefaultRtfOnMacro(wxChar *name, int no_args, bool start);
// Called on start/end of argument examination
bool DefaultRtfOnArgument(char *macro_name, int arg_no, bool start);
bool DefaultRtfOnArgument(wxChar *macro_name, int arg_no, bool start);
// Reset memory of which levels have 'books' (for WinHelp 4 contents file)
void ResetContentsLevels(int level);

View File

@@ -57,11 +57,11 @@ int currentRowNumber = 0;
*
*/
bool ParseTableArgument(char *value)
bool ParseTableArgument(wxChar *value)
{
noColumns = 0;
int i = 0;
int len = strlen(value);
int len = wxStrlen(value);
bool isBorder = FALSE;
while (i < len)
{
@@ -111,7 +111,7 @@ bool ParseTableArgument(char *value)
{
i ++;
int j = 0;
char numberBuf[50];
wxChar numberBuf[50];
ch = value[i];
if (ch == '{')
{
@@ -145,8 +145,8 @@ bool ParseTableArgument(char *value)
}
else
{
char *buf = new char[strlen(value) + 80];
sprintf(buf, "Tabular first argument \"%s\" too complex!", value);
wxChar *buf = new wxChar[wxStrlen(value) + 80];
wxSprintf(buf, _T("Tabular first argument \"%s\" too complex!"), value);
OnError(buf);
delete[] buf;
return FALSE;

View File

@@ -33,4 +33,4 @@ extern int noColumns; // Current number of columns in table
extern int ruleTop;
extern int ruleBottom;
extern int currentRowNumber;
extern bool ParseTableArgument(char *value);
extern bool ParseTableArgument(wxChar *value);

File diff suppressed because it is too large Load Diff

View File

@@ -13,6 +13,7 @@
#include "wx/utils.h"
#include "wx/list.h"
#include "wx/hash.h"
#include "wx/tokenzr.h"
#include "wxhlpblk.h"
/*
@@ -44,12 +45,12 @@ class TexMacroDef: public wxObject
{
public:
int no_args;
char *name;
wxChar *name;
bool ignore;
int forbidden;
int macroId;
TexMacroDef(int the_id, const char *the_name, int n, bool ig, bool forbidLevel = FORBID_OK);
TexMacroDef(int the_id, const wxChar *the_name, int n, bool ig, bool forbidLevel = FORBID_OK);
~TexMacroDef(void);
};
@@ -105,7 +106,7 @@ class TexChunk
int type;
// char *name;
TexMacroDef *def;
char *value;
wxChar *value;
int macroId;
int no_args;
int argn;
@@ -129,26 +130,26 @@ class TexTopic: public wxObject
// to find there's only one page in it. We might force a book to be used if
// a top-level topic has no children (?)
bool hasChildren;
char *filename;
wxChar *filename;
wxStringList *keywords;
TexTopic(char *f = NULL);
TexTopic(wxChar *f = NULL);
~TexTopic(void);
};
extern wxHashTable TopicTable;
void AddKeyWordForTopic(char *topic, char *entry, char *filename = NULL);
void AddKeyWordForTopic(wxChar *topic, wxChar *entry, wxChar *filename = NULL);
void ClearKeyWordTable(void);
extern char wxTex2RTFBuffer[];
extern wxChar wxTex2RTFBuffer[];
extern TexChunk *TopLevel;
extern wxHashTable MacroDefs;
extern wxStringList IgnorableInputFiles; // Ignorable \input files, e.g. psbox.tex
bool read_a_line(char *buf);
bool TexLoadFile(char *filename);
int ParseArg(TexChunk *thisArg, wxList& children, char *buffer, int pos,
char *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
int ParseMacroBody(const char *macro_name, TexChunk *parent, int no_args,
char *buffer, int pos, char *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
bool read_a_line(wxChar *buf);
bool TexLoadFile(wxChar *filename);
int ParseArg(TexChunk *thisArg, wxList& children, wxChar *buffer, int pos,
wxChar *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
int ParseMacroBody(const wxChar *macro_name, TexChunk *parent, int no_args,
wxChar *buffer, int pos, wxChar *environment = NULL, bool parseArgToBrace = TRUE, TexChunk *customMacroArgs = NULL);
void TraverseDocument(void);
void TraverseFromChunk(TexChunk *chunk, wxNode *thisNode = NULL, bool childrenOnly = FALSE);
#define TraverseChildrenFromChunk(arg) TraverseFromChunk(arg, NULL, TRUE)
@@ -156,12 +157,12 @@ void SetCurrentOutput(FILE *fd);
void SetCurrentOutputs(FILE *fd1, FILE *fd2);
extern FILE *CurrentOutput1;
extern FILE *CurrentOutput2;
void AddMacroDef(int the_id, const char *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 TexCleanUp(void);
void TexOutput(const char *s, bool ordinaryText = FALSE);
char *GetArgData(TexChunk *chunk);
char *GetArgData(void); // Get the string for the current argument
void TexOutput(const wxChar *s, bool ordinaryText = FALSE);
wxChar *GetArgData(TexChunk *chunk);
wxChar *GetArgData(void); // Get the string for the current argument
int GetNoArgs(void); // Get the number of arguments for the current macro
TexChunk *GetArgChunk(void); // Get the chunk for the current argument
TexChunk *GetTopLevelChunk(void); // Get the chunk for the top level
@@ -169,7 +170,7 @@ TexChunk *GetNextChunk(void); // Look ahead to the next chunk
bool IsArgOptional(void); // Is this argument an optional argument?
void DefineDefaultMacros(void); // Optional set of default macros
int GetCurrentColumn(void); // number of characters on current line
char *ConvertCase(char *s); // Convert case, according to upperCaseNames setting.
wxChar *ConvertCase(wxChar *s); // Convert case, according to upperCaseNames setting.
extern wxPathList TexPathList; // Path list, can be used for file searching.
#if !WXWIN_COMPATIBILITY_2
@@ -177,7 +178,7 @@ extern bool StringMatch(const wxChar *one, const wxChar *two, bool subString = T
#endif
// Define a variable value from the .ini file
char *RegisterSetting(char *settingName, char *settingValue, bool interactive = TRUE);
wxChar *RegisterSetting(wxChar *settingName, wxChar *settingValue, bool interactive = TRUE);
// Major document styles
#define LATEX_REPORT 1
@@ -191,9 +192,9 @@ extern TexChunk *DocumentAuthor;
extern TexChunk *DocumentDate;
extern int DocumentStyle;
extern int MinorDocumentStyle;
extern char *BibliographyStyleString;
extern char *DocumentStyleString;
extern char *MinorDocumentStyleString;
extern wxChar *BibliographyStyleString;
extern wxChar *DocumentStyleString;
extern wxChar *MinorDocumentStyleString;
extern int normalFont;
extern int smallFont;
@@ -235,42 +236,42 @@ extern bool useWord; // Insert Word table of contents, etc. etc.
extern bool indexSubsections; // put subsections in index
extern bool compatibilityMode;
extern bool generateHPJ; // Generate WinHelp HPJ file
extern char *winHelpTitle; // Title for Windows Help file
extern wxChar *winHelpTitle; // Title for Windows Help file
extern int defaultTableColumnWidth;
extern char *bitmapMethod;
extern wxChar *bitmapMethod;
extern bool truncateFilenames; // Truncate for DOS
extern int winHelpVersion; // Version e.g. 4 for Win95
extern bool winHelpContents; // Generate .cnt file
extern bool htmlIndex; // Generate .htx HTML index file
extern bool htmlFrameContents; // Use frames for HTML contents page
extern char *htmlStylesheet; // Use this CSS stylesheet for HTML pages
extern wxChar *htmlStylesheet; // Use this CSS stylesheet for HTML pages
extern int contentsDepth; // Depth of contents for linear RTF files
extern bool upperCaseNames; // Filenames; default is lower case
extern char *backgroundImageString; // HTML background image
extern char *backgroundColourString; // HTML background colour
extern char *textColourString; // HTML text colour
extern char *linkColourString; // HTML link colour
extern char *followedLinkColourString; // HTML followed link colour
extern wxChar *backgroundImageString; // HTML background image
extern wxChar *backgroundColourString; // HTML background colour
extern wxChar *textColourString; // HTML text colour
extern wxChar *linkColourString; // HTML link colour
extern wxChar *followedLinkColourString; // HTML followed link colour
extern bool combineSubSections; // Stop splitting files below section
extern bool htmlWorkshopFiles; // generate HTML Help Workshop project files
extern bool ignoreBadRefs; // Don't insert (REF NOT FOUND)
extern char *htmlFaceName; // HTML face name
extern wxChar *htmlFaceName; // HTML face name
// Names to help with internationalisation
extern char *ContentsNameString;
extern char *AbstractNameString;
extern char *GlossaryNameString;
extern char *ReferencesNameString;
extern char *FiguresNameString;
extern char *TablesNameString;
extern char *FigureNameString;
extern char *TableNameString;
extern char *IndexNameString;
extern char *ChapterNameString;
extern char *SectionNameString;
extern char *SubsectionNameString;
extern char *SubsubsectionNameString;
extern char *UpNameString;
extern wxChar *ContentsNameString;
extern wxChar *AbstractNameString;
extern wxChar *GlossaryNameString;
extern wxChar *ReferencesNameString;
extern wxChar *FiguresNameString;
extern wxChar *TablesNameString;
extern wxChar *FigureNameString;
extern wxChar *TableNameString;
extern wxChar *IndexNameString;
extern wxChar *ChapterNameString;
extern wxChar *SectionNameString;
extern wxChar *SubsectionNameString;
extern wxChar *SubsubsectionNameString;
extern wxChar *UpNameString;
/*
* HTML button identifiers: what kind of browse buttons
@@ -315,26 +316,24 @@ extern TexChunk * CentreHeaderEven;
extern TexChunk * CentreFooterEven;
extern TexChunk * RightHeaderEven;
extern TexChunk * RightFooterEven;
extern char * PageStyle;
extern wxChar * PageStyle;
// Repeat the currentSection, either real (Chapter) or simulated (References)
extern void OutputCurrentSection(void);
extern void OutputCurrentSectionToString(char *buf);
extern void OutputChunkToString(TexChunk *chunk, char *buf);
extern char *fakeCurrentSection;
extern void OutputCurrentSectionToString(wxChar *buf);
extern void OutputChunkToString(TexChunk *chunk, wxChar *buf);
// Called by Tex2Any to simulate a section
extern void FakeCurrentSection(char *fakeSection, bool addToContents = TRUE);
extern void FakeCurrentSection(wxChar *fakeSection, bool addToContents = TRUE);
/*
* Local to Tex2Any library
*
*/
extern char *currentArgData;
extern wxChar *currentArgData;
extern bool haveArgData; // If TRUE, we're simulating the data.
void StartSimulateArgument(char *data);
void StartSimulateArgument(wxChar *data);
void EndSimulateArgument(void);
/*
@@ -357,10 +356,10 @@ void DefaultOnMacro(int macroId, int no_args, bool start);
bool DefaultOnArgument(int macroId, int arg_no, bool start);
// Called on error
void OnError(const char *msg);
void OnError(const wxChar *msg);
// Called for information
void OnInform(const char *msg);
void OnInform(const wxChar *msg);
// Special yield wrapper
void Tex2RTFYield(bool force = FALSE);
@@ -372,13 +371,13 @@ void Tex2RTFYield(bool force = FALSE);
// Look for \label macro, use this ref name if found or
// make up a topic name otherwise.
char *FindTopicName(TexChunk *chunk);
wxChar *FindTopicName(TexChunk *chunk);
// Force the current topic to be this (e.g. force 'references' label).
void ForceTopicName(const char *name);
void ForceTopicName(const wxChar *name);
void ResetTopicCounter(void);
// Parse unit eg. 14, 12pt, 34cm and return value in points.
int ParseUnitArgument(char *unitArg);
int ParseUnitArgument(wxChar *unitArg);
// Set small, large, normal etc. point sizes for reference size
void SetFontSizes(int pointSize);
@@ -389,7 +388,7 @@ void SetFontSizes(int pointSize);
*
*/
void StripExtension(char *buffer);
void StripExtension(wxChar *buffer);
/*
* Reference structure
@@ -399,11 +398,11 @@ void StripExtension(char *buffer);
class TexRef: public wxObject
{
public:
char *refLabel; // Reference label
char *refFile; // Reference filename (can be NULL)
char *sectionNumber; // Section or figure number (as a string)
char *sectionName; // name e.g. 'section'
TexRef(const char *label, const char *file, const char *section, const char *sectionN = NULL);
wxChar *refLabel; // Reference label
wxChar *refFile; // Reference filename (can be NULL)
wxChar *sectionNumber; // Section or figure number (as a string)
wxChar *sectionName; // name e.g. 'section'
TexRef(const wxChar *label, const wxChar *file, const wxChar *section, const wxChar *sectionN = NULL);
~TexRef(void);
};
@@ -412,15 +411,15 @@ class TexRef: public wxObject
*
*/
void AddTexRef(char *name, char *file = NULL, char *sectionName = NULL,
void AddTexRef(wxChar *name, wxChar *file = NULL, wxChar *sectionName = NULL,
int chapter = 0, int section = 0, int subsection = 0, int subsubsection = 0);
/*
* Read and write reference file (.ref), to resolve refs for second pass.
*
*/
void WriteTexReferences(char *filename);
void ReadTexReferences(char *filename);
void WriteTexReferences(wxChar *filename);
void ReadTexReferences(wxChar *filename);
/*
* Bibliography stuff
@@ -430,33 +429,33 @@ void ReadTexReferences(char *filename);
class BibEntry: public wxObject
{
public:
char *key;
wxChar *key;
/*
* book, inbook, article, phdthesis, inproceedings, techreport
*/
char *type;
wxChar *type;
/*
* Possible fields
*
*/
char *editor;
char *title;
char *booktitle;
char *author;
char *journal;
char *volume;
char *number;
char *year;
char *month;
char *pages;
char *chapter;
char *publisher;
char *address;
char *institution;
char *organization;
char *comment;
wxChar *editor;
wxChar *title;
wxChar *booktitle;
wxChar *author;
wxChar *journal;
wxChar *volume;
wxChar *number;
wxChar *year;
wxChar *month;
wxChar *pages;
wxChar *chapter;
wxChar *publisher;
wxChar *address;
wxChar *institution;
wxChar *organization;
wxChar *comment;
inline BibEntry(void)
{
@@ -484,11 +483,11 @@ class BibEntry: public wxObject
extern wxList BibList;
extern wxStringList CitationList;
bool ReadBib(char *filename);
bool ReadBib(wxChar *filename);
void OutputBib(void);
void ResolveBibReferences(void);
void AddCitation(char *citeKey);
TexRef *FindReference(char *key);
void AddCitation(wxChar *citeKey);
TexRef *FindReference(wxChar *key);
/*
* Ability to customize, or at least suppress unknown macro errors
@@ -504,25 +503,25 @@ extern wxList CustomMacroList;
class CustomMacro: public wxObject
{
public:
char *macroName;
char *macroBody;
wxChar *macroName;
wxChar *macroBody;
int noArgs;
inline CustomMacro(char *name, int args, char *body)
inline CustomMacro(wxChar *name, int args, wxChar *body)
{
noArgs = args;
macroName = strcpy(new char[strlen(name) + 1], name);
macroName = wxStrcpy(new wxChar[wxStrlen(name) + 1], name);
if (body)
macroBody = strcpy(new char[strlen(body) + 1], body);
macroBody = wxStrcpy(new wxChar[wxStrlen(body) + 1], body);
else
macroBody = NULL;
}
~CustomMacro();
};
bool ReadCustomMacros(char *filename);
bool ReadCustomMacros(wxChar *filename);
void ShowCustomMacros(void);
CustomMacro *FindCustomMacro(char *name);
char *ParseMultifieldString(char *s, int *pos);
CustomMacro *FindCustomMacro(wxChar *name);
wxChar *ParseMultifieldString(wxChar *s, int *pos);
/*
* Colour table stuff
@@ -532,20 +531,20 @@ char *ParseMultifieldString(char *s, int *pos);
class ColourTableEntry: public wxObject
{
public:
char *name;
wxChar *name;
unsigned int red;
unsigned int green;
unsigned int blue;
ColourTableEntry(const char *theName, unsigned int r, unsigned int g, unsigned int b);
ColourTableEntry(const wxChar *theName, unsigned int r, unsigned int g, unsigned int b);
~ColourTableEntry(void);
};
extern wxList ColourTable;
extern void AddColour(const char *theName, unsigned int r, unsigned int g, unsigned int b);
extern int FindColourPosition(char *theName);
extern void AddColour(const wxChar *theName, unsigned int r, unsigned int g, unsigned int b);
extern int FindColourPosition(wxChar *theName);
// Converts e.g. "red" -> "#FF0000"
extern bool FindColourHTMLString(char *theName, char *buf);
extern bool FindColourHTMLString(wxChar *theName, wxChar *buf);
extern void InitialiseColourTable(void);
#define ltABSTRACT 1

File diff suppressed because it is too large Load Diff

View File

@@ -57,10 +57,10 @@ DECLARE_EVENT_TABLE()
class Tex2RTFConnection: public wxDDEConnection
{
public:
Tex2RTFConnection(char *buf, int size);
Tex2RTFConnection(wxChar *buf, int size);
~Tex2RTFConnection(void);
bool OnExecute(const wxString& topic, char *data, int size, int format);
char *OnRequest(const wxString& topic, const wxString& item, int *size, int format);
bool OnExecute(const wxString& topic, wxChar *data, int size, wxIPCFormat format);
wxChar *OnRequest(const wxString& topic, const wxString& item, int *size, wxIPCFormat format);
};
class Tex2RTFServer: public wxDDEServer
@@ -124,7 +124,7 @@ class ItemizeStruc: public wxObject
extern TexChunk *currentMember;
extern bool startedSections;
extern char *contentsString;
extern wxChar *contentsString;
extern bool suppressNameDecoration;
extern wxList itemizeStack;
@@ -134,17 +134,17 @@ extern FILE *Sections;
extern FILE *Subsections;
extern FILE *Subsubsections;
extern char *InputFile;
extern char *OutputFile;
extern char *MacroFile;
extern wxChar *InputFile;
extern wxChar *OutputFile;
extern wxChar *MacroFile;
extern char *FileRoot;
extern char *ContentsName; // Contents page from last time around
extern char *TmpContentsName; // Current contents page
extern char *TmpFrameContentsName; // Current frame contents page
extern char *WinHelpContentsFileName; // WinHelp .cnt file
extern char *RefName; // Reference file name
extern char *bulletFile;
extern wxChar *FileRoot;
extern wxChar *ContentsName; // Contents page from last time around
extern wxChar *TmpContentsName; // Current contents page
extern wxChar *TmpFrameContentsName; // Current frame contents page
extern wxChar *WinHelpContentsFileName; // WinHelp .cnt file
extern wxChar *RefName; // Reference file name
extern wxChar *bulletFile;
#ifndef NO_GUI
void ChooseOutputFile(bool force = FALSE);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff