X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd85b0640ea48f66a27e5908930e9f004de698b6..6d26dc89c5e7a421f4f8807728928eee91aa5f7e:/utils/tex2rtf/src/tex2any.cpp diff --git a/utils/tex2rtf/src/tex2any.cpp b/utils/tex2rtf/src/tex2any.cpp index 8ce3299079..51fdab5dbd 100644 --- a/utils/tex2rtf/src/tex2any.cpp +++ b/utils/tex2rtf/src/tex2any.cpp @@ -144,6 +144,8 @@ char *linkColourString = NULL; char *followedLinkColourString = NULL; bool combineSubSections = FALSE; bool htmlWorkshopFiles = FALSE; +bool ignoreBadRefs = FALSE; +char *htmlFaceName = copystring("Times New Roman"); extern int passNumber; @@ -218,7 +220,8 @@ TexMacroDef *VerbatimMacroDef = NULL; #define IncrementLineNumber() LineNumbers[CurrentInputIndex] ++ -TexRef::TexRef(char *label, char *file, char *section, char *sectionN) +TexRef::TexRef(const char *label, const char *file, + const char *section, const char *sectionN) { refLabel = copystring(label); refFile = file ? copystring(file) : (char*) NULL; @@ -243,7 +246,7 @@ CustomMacro::~CustomMacro() delete [] macroBody; } -void TexOutput(char *s, bool ordinaryText) +void TexOutput(const char *s, bool ordinaryText) { int len = strlen(s); @@ -1142,7 +1145,7 @@ int ParseArg(TexChunk *thisArg, wxList& children, char *buffer, int pos, char *e pos ++; int noBraces = 1; - wxBuffer[0] = 0; + wxTex2RTFBuffer[0] = 0; int i = 0; bool end = FALSE; while (!end) @@ -1153,37 +1156,37 @@ int ParseArg(TexChunk *thisArg, wxList& children, char *buffer, int pos, char *e noBraces --; if (noBraces == 0) { - wxBuffer[i] = 0; + wxTex2RTFBuffer[i] = 0; end = TRUE; } else { - wxBuffer[i] = '}'; + wxTex2RTFBuffer[i] = '}'; i ++; } pos ++; } else if (ch == '{') { - wxBuffer[i] = '{'; + wxTex2RTFBuffer[i] = '{'; i ++; pos ++; } else if (ch == '\\' && buffer[pos+1] == '}') { - wxBuffer[i] = '}'; + wxTex2RTFBuffer[i] = '}'; pos += 2; i++; } else if (ch == '\\' && buffer[pos+1] == '{') { - wxBuffer[i] = '{'; + wxTex2RTFBuffer[i] = '{'; pos += 2; i++; } else { - wxBuffer[i] = ch; + wxTex2RTFBuffer[i] = ch; pos ++; i ++; if (ch == 0) @@ -1204,7 +1207,7 @@ int ParseArg(TexChunk *thisArg, wxList& children, char *buffer, int pos, char *e TexChunk *argValue = new TexChunk(CHUNK_TYPE_STRING); arg->children.Append((wxObject *)argValue); argValue->argn = 1; - argValue->value = copystring(wxBuffer); + argValue->value = copystring(wxTex2RTFBuffer); children.Append((wxObject *)chunk); } @@ -1551,7 +1554,7 @@ int ParseArg(TexChunk *thisArg, wxList& children, char *buffer, int pos, char *e * */ -int ParseMacroBody(char *macro_name, TexChunk *parent, +int ParseMacroBody(const char *macro_name, TexChunk *parent, int no_args, char *buffer, int pos, char *environment, bool parseToBrace, TexChunk *customMacroArgs) @@ -1686,7 +1689,7 @@ bool TexLoadFile(char *filename) return FALSE; } -TexMacroDef::TexMacroDef(int the_id, char *the_name, int n, bool ig, bool forbidLevel) +TexMacroDef::TexMacroDef(int the_id, const char *the_name, int n, bool ig, bool forbidLevel) { name = copystring(the_name); no_args = n; @@ -1961,7 +1964,7 @@ void SetCurrentOutputs(FILE *fd1, FILE *fd2) CurrentOutput2 = fd2; } -void AddMacroDef(int the_id, char *name, int n, bool ignore, bool forbid) +void AddMacroDef(int the_id, const char *name, int n, bool ignore, bool forbid) { MacroDefs.Put(name, new TexMacroDef(the_id, name, n, ignore, forbid)); }