more compilation fixes (tex2rtf now builds again)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2002-10-20 22:17:49 +00:00
parent 8677ac53d2
commit 4a5fc54878
5 changed files with 63 additions and 37 deletions

View File

@@ -1143,7 +1143,7 @@ char *RegisterSetting(char *settingName, char *settingValue, bool interactive)
else if (StringMatch(settingName, "authorFontSize", FALSE, TRUE))
StringToInt(settingValue, &authorFont);
else if (StringMatch(settingName, "ignoreInput", FALSE, TRUE))
IgnorableInputFiles.Add(FileNameFromPath(settingValue));
IgnorableInputFiles.Add(wxFileNameFromPath(settingValue));
else if (StringMatch(settingName, "mirrorMargins", FALSE, TRUE))
mirrorMargins = StringTobool(settingValue);
else if (StringMatch(settingName, "runTwice", FALSE, TRUE))
@@ -1671,3 +1671,25 @@ char *ConvertCase(char *s)
buf[i] = 0;
return buf;
}
#if !WXWIN_COMPATIBILITY_2
// if substring is TRUE, search for str1 in str2
bool StringMatch(const wxChar *str1, const wxChar *str2, bool subString,
bool exact)
{
if (subString)
{
wxString Sstr1(str1);
wxString Sstr2(str2);
if (!exact)
{
Sstr1.MakeUpper();
Sstr2.MakeUpper();
}
return Sstr2.Index(Sstr1) != wxNOT_FOUND;
}
else
return exact ? wxString(str2).Cmp(str1) == 0 :
wxString(str2).CmpNoCase(str1) == 0;
}
#endif