void ReadTexReferences(char *filename)
{
- ifstream istr(filename, ios::nocreate | ios::in);
+ if (!wxFileExists(filename))
+ return;
+
+ ifstream istr(filename, ios::in);
+
if (istr.bad()) return;
char label[100];
bool ReadBib(char *filename)
{
+ if (!wxFileExists(filename))
+ return FALSE;
+
char buf[300];
- ifstream istr(filename, ios::nocreate | ios::in);
+ ifstream istr(filename, ios::in);
if (istr.bad()) return FALSE;
BibLine = 1;
winHelpContents = StringTobool(settingValue);
else if (StringMatch(settingName, "htmlIndex", FALSE, TRUE))
htmlIndex = StringTobool(settingValue);
+ else if (StringMatch(settingName, "htmlWorkshopFiles", FALSE, TRUE))
+ htmlWorkshopFiles = StringTobool(settingValue);
else if (StringMatch(settingName, "htmlFrameContents", FALSE, TRUE))
htmlFrameContents = StringTobool(settingValue);
else if (StringMatch(settingName, "upperCaseNames", FALSE, TRUE))
bool ReadCustomMacros(char *filename)
{
- ifstream istr(filename, ios::nocreate | ios::in);
+ if (!wxFileExists(filename))
+ return FALSE;
+
+ ifstream istr(filename, ios::in);
+
if (istr.bad()) return FALSE;
CustomMacroList.Clear();
int i;
if (upperCaseNames)
for (i = 0; i < len; i ++)
- buf[i] = wxToUpper(s[i]);
+ buf[i] = toupper(s[i]);
else
for (i = 0; i < len; i ++)
- buf[i] = wxToLower(s[i]);
+ buf[i] = tolower(s[i]);
buf[i] = 0;
return buf;
}