X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8ec2b48446fa4f17187dcd73c3a314e4030333f6..a04eec8792810cbdda0cbeda7e3ddca434da1712:/src/html/search.cpp?ds=sidebyside diff --git a/src/html/search.cpp b/src/html/search.cpp index 73b317620f..85a59a2b2e 100644 --- a/src/html/search.cpp +++ b/src/html/search.cpp @@ -2,6 +2,7 @@ // Name: search.cpp // Purpose: search engine // Author: Vaclav Slavik +// RCS-ID: $Id$ // Copyright: (c) 1999 Vaclav Slavik // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -12,9 +13,9 @@ #pragma implementation #endif -#include +#include "wx/wxprec.h" -#include +#include "wx/defs.h" #if wxUSE_HTML #ifdef __BORDLANDC__ @@ -22,13 +23,11 @@ #endif #ifndef WXPRECOMP -#include #endif #include "wx/html/helpdata.h" - //-------------------------------------------------------------------------------- // wxSearchEngine //-------------------------------------------------------------------------------- @@ -36,11 +35,11 @@ void wxSearchEngine::LookFor(const wxString& keyword) { if (m_Keyword) delete[] m_Keyword; - m_Keyword = new char[keyword.Length() + 1]; - strcpy(m_Keyword, keyword.c_str()); - for (int i = strlen(m_Keyword) - 1; i >= 0; i--) - if ((m_Keyword[i] >= 'A') && (m_Keyword[i] <= 'Z')) - m_Keyword[i] += 'a' - 'A'; + m_Keyword = new wxChar[keyword.Length() + 1]; + wxStrcpy(m_Keyword, keyword.c_str()); + for (int i = wxStrlen(m_Keyword) - 1; i >= 0; i--) + if ((m_Keyword[i] >= wxT('A')) && (m_Keyword[i] <= wxT('Z'))) + m_Keyword[i] += wxT('a') - wxT('A'); } @@ -51,7 +50,7 @@ bool wxSearchEngine::Scan(wxInputStream *stream) int i, j; int lng = stream ->GetSize(); - int wrd = strlen(m_Keyword); + int wrd = wxStrlen(m_Keyword); bool found = FALSE; char *buf = new char[lng + 1]; stream -> Read(buf, lng);