- wxSprintf(topicBuf, _T("topic%ld"), topicCounter);
+ wxSnprintf(topicBuf, sizeof(topicBuf), _T("topic%ld"), topicCounter);
void StartSimulateArgument(wxChar *data)
{
wxStrcpy(currentArgData, data);
void StartSimulateArgument(wxChar *data)
{
wxStrcpy(currentArgData, data);
- wxSprintf(buf2, _T("%d"), subsubsection);
+ wxSnprintf(buf2, sizeof(buf2), _T("%d"), subsubsection);
- ostr << ref->refLabel << _T(" ") << (ref->refFile ? ref->refFile : _T("??")) << _T(" ");
- ostr << (ref->sectionName ? ref->sectionName : _T("??")) << _T(" ");
- ostr << (ref->sectionNumber ? ref->sectionNumber : _T("??")) << _T("\n");
+ converter = ref->refLabel;
+ ostr << converter.mb_str();
+ ostr << " ";
+ converter = (ref->refFile ? ref->refFile : _T("??"));
+ ostr << converter.mb_str();
+ ostr << " ";
+ converter = (ref->sectionName ? ref->sectionName : _T("??")) ;
+ ostr << converter.mb_str();
+ ostr << " ";
+ converter = (ref->sectionNumber ? ref->sectionNumber : _T("??")) ;
+ ostr << converter.mb_str();
+ ostr << "\n";
if (!ref->sectionNumber || (wxStrcmp(ref->sectionNumber, _T("??")) == 0 && wxStrcmp(ref->sectionName, _T("??")) == 0))
{
if (!ref->sectionNumber || (wxStrcmp(ref->sectionNumber, _T("??")) == 0 && wxStrcmp(ref->sectionName, _T("??")) == 0))
{
- wxSprintf(buf, _T("Warning: reference %s not resolved."), ref->refLabel);
+ wxChar buf[200];
+ wxSnprintf(buf, sizeof(buf), _T("Warning: reference %s not resolved."), ref->refLabel);
+ wxString label_string = wxString::FromAscii(label);
+ wxString file_string = wxString::FromAscii(file);
+ wxString sectionName_string = wxString::FromAscii(sectionName);
+ wxString section_string = wxString::FromAscii(section);
+
// gt - needed to trick the hash table "TexReferences" into deleting the key
// strings it creates in the Put() function, but not the item that is
// created here, as that is destroyed elsewhere. Without doing this, there
// were massive memory leaks
// gt - needed to trick the hash table "TexReferences" into deleting the key
// strings it creates in the Put() function, but not the item that is
// created here, as that is destroyed elsewhere. Without doing this, there
// were massive memory leaks
- TexReferences.DeleteContents(TRUE);
- TexReferences.Put(label, new TexRef(label, file, section, sectionName));
- TexReferences.DeleteContents(FALSE);
+ TexReferences.DeleteContents(true);
+ TexReferences.Put(
+ label_string.c_str(),
+ new TexRef(
+ label_string.c_str(),
+ file_string.c_str(),
+ section_string.c_str(),
+ sectionName_string.c_str()
+ )
+ );
+ TexReferences.DeleteContents(false);
}
// If in quotes, read white space too. If not,
// stop at white space or comment.
}
// If in quotes, read white space too. If not,
// stop at white space or comment.
-void BibReadValue(wxSTD istream& istr, wxChar *buffer, bool ignoreBraces = TRUE,
- bool quotesMayTerminate = TRUE)
+void BibReadValue(wxSTD istream& istr, wxChar *buffer, bool ignoreBraces = true,
+ bool quotesMayTerminate = true)
- wxSprintf(buf, _T("Sorry, value > 4000 chars in bib file at line %ld."), BibLine);
+ wxSnprintf(buf, sizeof(buf), _T("Sorry, value > 4000 chars in bib file at line %ld."), BibLine);
- wxSTD ifstream istr(filename, wxSTD ios::in);
- if (istr.bad()) return FALSE;
+ wxSTD ifstream istr((char const *)name.fn_str(), wxSTD ios::in);
+ if (istr.bad()) return false;
- wxSprintf(buf, _T("Expected @: malformed bib file at line %ld (%s)"), BibLine, filename);
+ wxSnprintf(buf, sizeof(buf), _T("Expected @: malformed bib file at line %ld (%s)"), BibLine, filename);
}
BibReadWord(istr, recordType);
BibEatWhiteSpace(istr);
istr.get(ch);
if (ch != '{' && ch != '(')
{
}
BibReadWord(istr, recordType);
BibEatWhiteSpace(istr);
istr.get(ch);
if (ch != '{' && ch != '(')
{
- wxSprintf(buf, _T("Expected { or ( after record type: malformed .bib file at line %ld (%s)"), BibLine, filename);
+ wxSnprintf(buf, sizeof(buf), _T("Expected { or ( after record type: malformed .bib file at line %ld (%s)"), BibLine, filename);
- if (StringMatch(recordType, _T("string"), FALSE, TRUE))
+ if (StringMatch(recordType, _T("string"), false, true))
- wxSprintf(buf, _T("Expected = after string key: malformed .bib file at line %ld (%s)"), BibLine, filename);
+ wxSnprintf(buf, sizeof(buf), _T("Expected = after string key: malformed .bib file at line %ld (%s)"), BibLine, filename);
- wxSprintf(buf, _T("Expected = after string key: malformed .bib file at line %ld (%s)"), BibLine, filename);
+ wxSnprintf(buf, sizeof(buf), _T("Expected = after string key: malformed .bib file at line %ld (%s)"), BibLine, filename);
- wxSprintf(buf, _T("Expected = after field type: malformed .bib file at line %ld (%s)"), BibLine, filename);
+ wxSnprintf(buf, sizeof(buf), _T("Expected = after field type: malformed .bib file at line %ld (%s)"), BibLine, filename);
- BibReadValue(istr, fieldValue, TRUE, (ch == _T('"') ? TRUE : FALSE));
+ BibReadValue(istr, fieldValue, true, (ch == _T('"') ? true : false));
- if (StringMatch(recordField, _T("author"), FALSE, TRUE))
+ if (StringMatch(recordField, _T("author"), false, true))
- else if (StringMatch(recordField, _T("key"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("key"), false, true))
- else if (StringMatch(recordField, _T("annotate"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("annotate"), false, true))
- else if (StringMatch(recordField, _T("abstract"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("abstract"), false, true))
- else if (StringMatch(recordField, _T("edition"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("edition"), false, true))
- else if (StringMatch(recordField, _T("howpublished"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("howpublished"), false, true))
- else if (StringMatch(recordField, _T("note"), FALSE, TRUE) || StringMatch(recordField, _T("notes"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("note"), false, true) || StringMatch(recordField, _T("notes"), false, true))
- else if (StringMatch(recordField, _T("series"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("series"), false, true))
- else if (StringMatch(recordField, _T("type"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("type"), false, true))
- else if (StringMatch(recordField, _T("keywords"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("keywords"), false, true))
- else if (StringMatch(recordField, _T("editor"), FALSE, TRUE) || StringMatch(recordField, _T("editors"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("editor"), false, true) || StringMatch(recordField, _T("editors"), false, true))
- else if (StringMatch(recordField, _T("title"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("title"), false, true))
- else if (StringMatch(recordField, _T("booktitle"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("booktitle"), false, true))
- else if (StringMatch(recordField, _T("journal"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("journal"), false, true))
- else if (StringMatch(recordField, _T("volume"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("volume"), false, true))
- else if (StringMatch(recordField, _T("number"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("number"), false, true))
- else if (StringMatch(recordField, _T("year"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("year"), false, true))
- else if (StringMatch(recordField, _T("month"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("month"), false, true))
- else if (StringMatch(recordField, _T("pages"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("pages"), false, true))
- else if (StringMatch(recordField, _T("publisher"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("publisher"), false, true))
- else if (StringMatch(recordField, _T("address"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("address"), false, true))
- else if (StringMatch(recordField, _T("institution"), FALSE, TRUE) || StringMatch(recordField, _T("school"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("institution"), false, true) || StringMatch(recordField, _T("school"), false, true))
- else if (StringMatch(recordField, _T("organization"), FALSE, TRUE) || StringMatch(recordField, _T("organisation"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("organization"), false, true) || StringMatch(recordField, _T("organisation"), false, true))
- else if (StringMatch(recordField, _T("comment"), FALSE, TRUE) || StringMatch(recordField, _T("comments"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("comment"), false, true) || StringMatch(recordField, _T("comments"), false, true))
- else if (StringMatch(recordField, _T("annote"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("annote"), false, true))
- else if (StringMatch(recordField, _T("chapter"), FALSE, TRUE))
+ else if (StringMatch(recordField, _T("chapter"), false, true))
- wxSprintf(buf, _T("Unrecognised bib field type %s at line %ld (%s)"), recordField, BibLine, filename);
+ wxSnprintf(buf, sizeof(buf), _T("Unrecognised bib field type %s at line %ld (%s)"), recordField, BibLine, filename);
- OnMacro(ltNUMBEREDBIBITEM, 2, TRUE);
- OnArgument(ltNUMBEREDBIBITEM, 1, TRUE);
+ OnMacro(ltNUMBEREDBIBITEM, 2, true);
+ OnArgument(ltNUMBEREDBIBITEM, 1, true);
- OnArgument(ltNUMBEREDBIBITEM, 1, FALSE);
- OnArgument(ltNUMBEREDBIBITEM, 2, TRUE);
+ OnArgument(ltNUMBEREDBIBITEM, 1, false);
+ OnArgument(ltNUMBEREDBIBITEM, 2, true);
- OnMacro(ltBF, 1, TRUE);
- OnArgument(ltBF, 1, TRUE);
+ OnMacro(ltBF, 1, true);
+ OnArgument(ltBF, 1, true);
- OnArgument(ltBF, 1, FALSE);
- OnMacro(ltBF, 1, FALSE);
+ OnArgument(ltBF, 1, false);
+ OnMacro(ltBF, 1, false);
- if (StringMatch(bib->type, _T("article"), FALSE, TRUE))
+ if (StringMatch(bib->type, _T("article"), false, true))
- OnMacro(ltIT, 1, TRUE);
- OnArgument(ltIT, 1, TRUE);
+ OnMacro(ltIT, 1, true);
+ OnArgument(ltIT, 1, true);
- OnArgument(ltIT, 1, FALSE);
- OnMacro(ltIT, 1, FALSE);
+ OnArgument(ltIT, 1, false);
+ OnMacro(ltIT, 1, false);
- OnMacro(ltBF, 1, TRUE);
- OnArgument(ltBF, 1, TRUE);
+ OnMacro(ltBF, 1, true);
+ OnArgument(ltBF, 1, true);
- OnArgument(ltBF, 1, FALSE);
- OnMacro(ltBF, 1, FALSE);
+ OnArgument(ltBF, 1, false);
+ OnMacro(ltBF, 1, false);
- else if (StringMatch(bib->type, _T("book"), FALSE, TRUE) ||
- StringMatch(bib->type, _T("unpublished"), FALSE, TRUE) ||
- StringMatch(bib->type, _T("manual"), FALSE, TRUE) ||
- StringMatch(bib->type, _T("phdthesis"), FALSE, TRUE) ||
- StringMatch(bib->type, _T("mastersthesis"), FALSE, TRUE) ||
- StringMatch(bib->type, _T("misc"), FALSE, TRUE) ||
- StringMatch(bib->type, _T("techreport"), FALSE, TRUE) ||
- StringMatch(bib->type, _T("booklet"), FALSE, TRUE))
+ else if (StringMatch(bib->type, _T("book"), false, true) ||
+ StringMatch(bib->type, _T("unpublished"), false, true) ||
+ StringMatch(bib->type, _T("manual"), false, true) ||
+ StringMatch(bib->type, _T("phdthesis"), false, true) ||
+ StringMatch(bib->type, _T("mastersthesis"), false, true) ||
+ StringMatch(bib->type, _T("misc"), false, true) ||
+ StringMatch(bib->type, _T("techreport"), false, true) ||
+ StringMatch(bib->type, _T("booklet"), false, true))
- OnMacro(ltIT, 1, TRUE);
- OnArgument(ltIT, 1, TRUE);
+ OnMacro(ltIT, 1, true);
+ OnArgument(ltIT, 1, true);
- OnArgument(ltIT, 1, FALSE);
- OnMacro(ltIT, 1, FALSE);
+ OnArgument(ltIT, 1, false);
+ OnMacro(ltIT, 1, false);
- if (StringMatch(bib->type, _T("phdthesis"), FALSE, TRUE))
+ if (StringMatch(bib->type, _T("phdthesis"), false, true))
- if (StringMatch(bib->type, _T("techreport"), FALSE, TRUE))
+ if (StringMatch(bib->type, _T("techreport"), false, true))
- else if (StringMatch(bib->type, _T("inbook"), FALSE, TRUE) ||
- StringMatch(bib->type, _T("inproceedings"), FALSE, TRUE) ||
- StringMatch(bib->type, _T("incollection"), FALSE, TRUE) ||
- StringMatch(bib->type, _T("conference"), FALSE, TRUE))
+ else if (StringMatch(bib->type, _T("inbook"), false, true) ||
+ StringMatch(bib->type, _T("inproceedings"), false, true) ||
+ StringMatch(bib->type, _T("incollection"), false, true) ||
+ StringMatch(bib->type, _T("conference"), false, true))
- OnMacro(ltIT, 1, TRUE);
- OnArgument(ltIT, 1, TRUE);
+ OnMacro(ltIT, 1, true);
+ OnArgument(ltIT, 1, true);
- OnArgument(ltIT, 1, FALSE);
- OnMacro(ltIT, 1, FALSE);
+ OnArgument(ltIT, 1, false);
+ OnMacro(ltIT, 1, false);
- OnMacro(ltBF, 1, TRUE);
- OnArgument(ltBF, 1, TRUE);
+ OnMacro(ltBF, 1, true);
+ OnArgument(ltBF, 1, true);
- OnArgument(ltBF, 1, FALSE);
- OnMacro(ltBF, 1, FALSE);
+ OnArgument(ltBF, 1, false);
+ OnMacro(ltBF, 1, false);
- OnArgument(ltNUMBEREDBIBITEM, 2, FALSE);
- OnMacro(ltNUMBEREDBIBITEM, 2, FALSE);
+ OnArgument(ltNUMBEREDBIBITEM, 2, false);
+ OnMacro(ltNUMBEREDBIBITEM, 2, false);
- OnMacro(ltPAR, 0, TRUE);
- OnMacro(ltPAR, 0, FALSE);
+ OnMacro(ltPAR, 0, true);
+ OnMacro(ltPAR, 0, false);
- OnMacro(ltPAR, 0, TRUE);
- OnMacro(ltPAR, 0, FALSE);
+ OnMacro(ltPAR, 0, true);
+ OnMacro(ltPAR, 0, false);
// Unused Variable
//BibEntry *entry = (BibEntry *)bibNode->GetData();
if (ref->sectionNumber) delete[] ref->sectionNumber;
// Unused Variable
//BibEntry *entry = (BibEntry *)bibNode->GetData();
if (ref->sectionNumber) delete[] ref->sectionNumber;
- wxSprintf(buf, _T("Warning: bib ref %s not resolved."), citeKey);
+ wxSnprintf(buf, sizeof(buf), _T("Warning: bib ref %s not resolved."), citeKey);
{
if (wxStrncmp(val, _T("yes"), 3) == 0 || wxStrncmp(val, _T("YES"), 3) == 0 ||
wxStrncmp(val, _T("on"), 2) == 0 || wxStrncmp(val, _T("ON"), 2) == 0 ||
{
if (wxStrncmp(val, _T("yes"), 3) == 0 || wxStrncmp(val, _T("YES"), 3) == 0 ||
wxStrncmp(val, _T("on"), 2) == 0 || wxStrncmp(val, _T("ON"), 2) == 0 ||
- wxStrncmp(val, _T("true"), 4) == 0 || wxStrncmp(val, _T("TRUE"), 4) == 0 ||
+ wxStrncmp(val, _T("true"), 4) == 0 || wxStrncmp(val, _T("true"), 4) == 0 ||
wxStrncmp(val, _T("ok"), 2) == 0 || wxStrncmp(val, _T("OK"), 2) == 0 ||
wxStrncmp(val, _T("1"), 1) == 0)
wxStrncmp(val, _T("ok"), 2) == 0 || wxStrncmp(val, _T("OK"), 2) == 0 ||
wxStrncmp(val, _T("1"), 1) == 0)
{
static wxChar errorCode[100];
wxStrcpy(errorCode, _T("OK"));
{
static wxChar errorCode[100];
wxStrcpy(errorCode, _T("OK"));
- if (StringMatch(settingName, _T("chapterName"), FALSE, TRUE))
+ if (StringMatch(settingName, _T("chapterName"), false, true))
- else if (StringMatch(settingName, _T("sectionName"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("sectionName"), false, true))
- else if (StringMatch(settingName, _T("subsectionName"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("subsectionName"), false, true))
- else if (StringMatch(settingName, _T("subsubsectionName"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("subsubsectionName"), false, true))
- else if (StringMatch(settingName, _T("indexName"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("indexName"), false, true))
- else if (StringMatch(settingName, _T("contentsName"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("contentsName"), false, true))
- else if (StringMatch(settingName, _T("glossaryName"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("glossaryName"), false, true))
- else if (StringMatch(settingName, _T("referencesName"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("referencesName"), false, true))
- else if (StringMatch(settingName, _T("tablesName"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("tablesName"), false, true))
- else if (StringMatch(settingName, _T("figuresName"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("figuresName"), false, true))
- else if (StringMatch(settingName, _T("tableName"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("tableName"), false, true))
- else if (StringMatch(settingName, _T("figureName"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("figureName"), false, true))
- else if (StringMatch(settingName, _T("abstractName"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("abstractName"), false, true))
- else if (StringMatch(settingName, _T("chapterFontSize"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("chapterFontSize"), false, true))
- else if (StringMatch(settingName, _T("sectionFontSize"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("sectionFontSize"), false, true))
- else if (StringMatch(settingName, _T("subsectionFontSize"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("subsectionFontSize"), false, true))
- else if (StringMatch(settingName, _T("titleFontSize"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("titleFontSize"), false, true))
- else if (StringMatch(settingName, _T("authorFontSize"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("authorFontSize"), false, true))
- else if (StringMatch(settingName, _T("ignoreInput"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("ignoreInput"), false, true))
- else if (StringMatch(settingName, _T("mirrorMargins"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("mirrorMargins"), false, true))
- else if (StringMatch(settingName, _T("runTwice"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("runTwice"), false, true))
- else if (StringMatch(settingName, _T("isInteractive"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("isInteractive"), false, true))
- else if (StringMatch(settingName, _T("headerRule"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("headerRule"), false, true))
- else if (StringMatch(settingName, _T("footerRule"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("footerRule"), false, true))
- else if (StringMatch(settingName, _T("combineSubSections"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("combineSubSections"), false, true))
- else if (StringMatch(settingName, _T("listLabelIndent"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("listLabelIndent"), false, true))
- else if (StringMatch(settingName, _T("listItemIndent"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("listItemIndent"), false, true))
- else if (StringMatch(settingName, _T("useUpButton"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("useUpButton"), false, true))
- else if (StringMatch(settingName, _T("useHeadingStyles"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("useHeadingStyles"), false, true))
- else if (StringMatch(settingName, _T("useWord"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("useWord"), false, true))
- else if (StringMatch(settingName, _T("contentsDepth"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("contentsDepth"), false, true))
- else if (StringMatch(settingName, _T("generateHPJ"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("generateHPJ"), false, true))
- else if (StringMatch(settingName, _T("truncateFilenames"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("truncateFilenames"), false, true))
- else if (StringMatch(settingName, _T("winHelpVersion"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("winHelpVersion"), false, true))
- else if (StringMatch(settingName, _T("winHelpContents"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("winHelpContents"), false, true))
- else if (StringMatch(settingName, _T("htmlIndex"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("htmlIndex"), false, true))
- else if (StringMatch(settingName, _T("htmlWorkshopFiles"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("htmlWorkshopFiles"), false, true))
- else if (StringMatch(settingName, _T("htmlFrameContents"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("htmlFrameContents"), false, true))
- else if (StringMatch(settingName, _T("htmlStylesheet"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("htmlStylesheet"), false, true))
- else if (StringMatch(settingName, _T("upperCaseNames"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("upperCaseNames"), false, true))
- else if (StringMatch(settingName, _T("ignoreBadRefs"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("ignoreBadRefs"), false, true))
- else if (StringMatch(settingName, _T("htmlFaceName"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("htmlFaceName"), false, true))
- else if (StringMatch(settingName, _T("winHelpTitle"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("winHelpTitle"), false, true))
- else if (StringMatch(settingName, _T("indexSubsections"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("indexSubsections"), false, true))
- else if (StringMatch(settingName, _T("compatibility"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("compatibility"), false, true))
- else if (StringMatch(settingName, _T("defaultColumnWidth"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("defaultColumnWidth"), false, true))
{
StringToInt(settingValue, &defaultTableColumnWidth);
defaultTableColumnWidth = 20*defaultTableColumnWidth;
}
{
StringToInt(settingValue, &defaultTableColumnWidth);
defaultTableColumnWidth = 20*defaultTableColumnWidth;
}
- else if (StringMatch(settingName, _T("bitmapMethod"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("bitmapMethod"), false, true))
{
if ((wxStrcmp(settingValue, _T("includepicture")) != 0) && (wxStrcmp(settingValue, _T("hex")) != 0) &&
(wxStrcmp(settingValue, _T("import")) != 0))
{
if ((wxStrcmp(settingValue, _T("includepicture")) != 0) && (wxStrcmp(settingValue, _T("hex")) != 0) &&
(wxStrcmp(settingValue, _T("import")) != 0))
- else if (StringMatch(settingName, _T("htmlBrowseButtons"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("htmlBrowseButtons"), false, true))
{
if (wxStrcmp(settingValue, _T("none")) == 0)
htmlBrowseButtons = HTML_BUTTONS_NONE;
{
if (wxStrcmp(settingValue, _T("none")) == 0)
htmlBrowseButtons = HTML_BUTTONS_NONE;
wxStrcpy(errorCode, _T("Initialisation file error: htmlBrowseButtons must be one of none, bitmap, or text."));
}
}
wxStrcpy(errorCode, _T("Initialisation file error: htmlBrowseButtons must be one of none, bitmap, or text."));
}
}
- else if (StringMatch(settingName, _T("backgroundImage"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("backgroundImage"), false, true))
- else if (StringMatch(settingName, _T("backgroundColour"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("backgroundColour"), false, true))
- else if (StringMatch(settingName, _T("textColour"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("textColour"), false, true))
- else if (StringMatch(settingName, _T("linkColour"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("linkColour"), false, true))
- else if (StringMatch(settingName, _T("followedLinkColour"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("followedLinkColour"), false, true))
- else if (StringMatch(settingName, _T("conversionMode"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("conversionMode"), false, true))
- if (StringMatch(settingValue, _T("RTF"), FALSE, TRUE))
+ if (StringMatch(settingValue, _T("RTF"), false, true))
- else if (StringMatch(settingValue, _T("WinHelp"), FALSE, TRUE))
+ else if (StringMatch(settingValue, _T("WinHelp"), false, true))
- else if (StringMatch(settingValue, _T("XLP"), FALSE, TRUE) ||
- StringMatch(settingValue, _T("wxHelp"), FALSE, TRUE))
+ else if (StringMatch(settingValue, _T("XLP"), false, true) ||
+ StringMatch(settingValue, _T("wxHelp"), false, true))
- else if (StringMatch(settingValue, _T("HTML"), FALSE, TRUE))
+ else if (StringMatch(settingValue, _T("HTML"), false, true))
wxStrcpy(errorCode, _T("Initialisation file error: conversionMode must be one of\nRTF, WinHelp, XLP (or wxHelp), HTML."));
}
}
wxStrcpy(errorCode, _T("Initialisation file error: conversionMode must be one of\nRTF, WinHelp, XLP (or wxHelp), HTML."));
}
}
- else if (StringMatch(settingName, _T("documentFontSize"), FALSE, TRUE))
+ else if (StringMatch(settingName, _T("documentFontSize"), false, true))
- wxSprintf(buf, _T("Initialisation file error: nonstandard document font size %d."), n);
+ wxSnprintf(buf, sizeof(buf), _T("Initialisation file error: nonstandard document font size %d."), n);
- wxSprintf(buf, _T("Initialisation file error: unrecognised setting %s."), settingName);
+ wxSnprintf(buf, sizeof(buf), _T("Initialisation file error: unrecognised setting %s."), settingName);
- BibReadValue(istr, macroBody, FALSE, FALSE); // Don't ignore extra braces
+ BibReadValue(istr, macroBody, false, false); // Don't ignore extra braces
- wxSprintf(mbuf, _T("Read initialization file %s."), filename);
+ wxSnprintf(mbuf, sizeof(mbuf), _T("Read initialization file %s."), filename);
- wxSprintf(buf, _T("\\%s[%d]\n {%s}"), macro->macroName, macro->noArgs,
+ wxSnprintf(buf, sizeof(buf), _T("\\%s[%d]\n {%s}"), macro->macroName, macro->noArgs,
bool StringMatch(const wxChar *str1, const wxChar *str2, bool subString,
bool exact)
{
bool StringMatch(const wxChar *str1, const wxChar *str2, bool subString,
bool exact)
{