class wxExtHelpMapEntry : public wxObject
{
public:
- int id;
+ int entryid;
wxString url;
wxString doc;
wxExtHelpMapEntry(int iid, wxString const &iurl, wxString const &idoc)
- { id = iid; url = iurl; doc = idoc; }
+ { entryid = iid; url = iurl; doc = idoc; }
};
void wxExtHelpController::DeleteList()
node = m_MapList->GetFirst();
}
- delete m_MapList;
- m_MapList = NULL;
+ wxDELETE(m_MapList);
}
}
const wxChar *p = line.c_str();
// skip whitespace
- while ( isascii(*p) && isspace(*p) )
+ while ( isascii(*p) && wxIsspace(*p) )
p++;
// skip empty lines and comments
return false;
p = end;
- while ( isascii(*p) && isspace(*p) )
+ while ( isascii(*p) && wxIsspace(*p) )
p++;
// next should be the URL
wxString url;
url.reserve(line.length());
- while ( isascii(*p) && !isspace(*p) )
+ while ( isascii(*p) && !wxIsspace(*p) )
url += *p++;
- while ( isascii(*p) && isspace(*p) )
+ while ( isascii(*p) && wxIsspace(*p) )
p++;
// and finally the optional description of the entry after comment
if ( *p == WXEXTHELP_COMMENTCHAR )
{
p++;
- while ( isascii(*p) && isspace(*p) )
+ while ( isascii(*p) && wxIsspace(*p) )
p++;
doc = p;
}
while (node)
{
entry = (wxExtHelpMapEntry *)node->GetData();
- if (entry->id == WXEXTHELP_CONTENTS_ID)
+ if (entry->entryid == WXEXTHELP_CONTENTS_ID)
{
contents = entry->url;
break;
file << m_helpDir << wxFILE_SEP_PATH << contents;
if (file.Contains(wxT('#')))
file = file.BeforeLast(wxT('#'));
- if (contents.length() && wxFileExists(file))
+ if ( wxFileExists(file) )
rc = DisplaySection(WXEXTHELP_CONTENTS_ID);
// if not found, open homemade toc:
while (node)
{
entry = (wxExtHelpMapEntry *)node->GetData();
- if (entry->id == sectionNo)
+ if (entry->entryid == sectionNo)
return DisplayHelp(entry->url);
node = node->GetNext();
}