Typecasting added to prevent warnings.
Instead of copying the temp file, if the temp file directory and output file directory for RTF are the same, program does a rename instead of a copy. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -210,7 +210,7 @@ void OutputSectionKeyword(FILE *fd)
|
||||
{
|
||||
OutputCurrentSectionToString(wxBuffer);
|
||||
|
||||
int i;
|
||||
unsigned int i;
|
||||
for (i = 0; i < strlen(wxBuffer); i++)
|
||||
if (wxBuffer[i] == ':')
|
||||
wxBuffer[i] = ' ';
|
||||
@@ -349,7 +349,7 @@ void GenerateKeywordsForTopic(char *topic)
|
||||
SplitIndexEntry(s, buf1, buf2);
|
||||
|
||||
// Check for ':' which messes up index
|
||||
int i;
|
||||
unsigned int i;
|
||||
for (i = 0; i < strlen(buf1) ; i++)
|
||||
if (buf1[i] == ':')
|
||||
buf1[i] = ' ';
|
||||
@@ -5219,7 +5219,21 @@ bool RTFGo(void)
|
||||
wxConcatFiles("header.rtf", "chapters.rtf", "tmp1.rtf");
|
||||
Tex2RTFYield(TRUE);
|
||||
if (FileExists(OutputFile)) wxRemoveFile(OutputFile);
|
||||
wxString cwdStr, outputDirStr;
|
||||
cwdStr = wxGetWorkingDirectory();
|
||||
outputDirStr = wxPathOnly(OutputFile);
|
||||
// Determine if the temp file and the output file are in the same directory,
|
||||
// and if they are, then just rename the temp file rather than copying
|
||||
// it, as this is much faster when working with large (multi-megabyte files)
|
||||
if ((wxStrcmp(wxPathOnly(OutputFile),"") == 0) || // no path specified on output file
|
||||
(wxStrcmp(wxGetWorkingDirectory(),wxPathOnly(OutputFile)) == 0)) // paths do not match
|
||||
{
|
||||
wxRenameFile("tmp1.rtf", OutputFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
wxCopyFile("tmp1.rtf", OutputFile);
|
||||
}
|
||||
Tex2RTFYield(TRUE);
|
||||
wxRemoveFile("tmp1.rtf");
|
||||
}
|
||||
|
@@ -1471,7 +1471,8 @@ bool TexLoadFile(char *filename)
|
||||
if (Inputs[0]) fclose(Inputs[0]);
|
||||
return TRUE;
|
||||
}
|
||||
else return FALSE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
TexMacroDef::TexMacroDef(int the_id, char *the_name, int n, bool ig, bool forbidLevel)
|
||||
|
Reference in New Issue
Block a user