Globally replace _T() with wxT().
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -51,11 +51,11 @@ static const wxChar* ReadLine(const wxChar *line, wxChar *buf, size_t bufsize)
|
||||
wxChar *endptr = buf + bufsize - 1;
|
||||
const wxChar *readptr = line;
|
||||
|
||||
while (*readptr != 0 && *readptr != _T('\r') && *readptr != _T('\n') &&
|
||||
while (*readptr != 0 && *readptr != wxT('\r') && *readptr != wxT('\n') &&
|
||||
writeptr != endptr)
|
||||
*(writeptr++) = *(readptr++);
|
||||
*writeptr = 0;
|
||||
while (*readptr == _T('\r') || *readptr == _T('\n'))
|
||||
while (*readptr == wxT('\r') || *readptr == wxT('\n'))
|
||||
readptr++;
|
||||
if (*readptr == 0)
|
||||
return NULL;
|
||||
@@ -255,7 +255,7 @@ wxString wxHtmlHelpDataItem::GetIndentedName() const
|
||||
{
|
||||
wxString s;
|
||||
for (int i = 1; i < level; i++)
|
||||
s << _T(" ");
|
||||
s << wxT(" ");
|
||||
s << name;
|
||||
return s;
|
||||
}
|
||||
@@ -476,10 +476,10 @@ void wxHtmlHelpData::SetTempDir(const wxString& path)
|
||||
else
|
||||
{
|
||||
if (wxIsAbsolutePath(path)) m_tempPath = path;
|
||||
else m_tempPath = wxGetCwd() + _T("/") + path;
|
||||
else m_tempPath = wxGetCwd() + wxT("/") + path;
|
||||
|
||||
if (m_tempPath[m_tempPath.length() - 1] != _T('/'))
|
||||
m_tempPath << _T('/');
|
||||
if (m_tempPath[m_tempPath.length() - 1] != wxT('/'))
|
||||
m_tempPath << wxT('/');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -674,16 +674,16 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
|
||||
for (wxChar *ch = linebuf; *ch != wxT('\0') && *ch != wxT('='); ch++)
|
||||
*ch = (wxChar)wxTolower(*ch);
|
||||
|
||||
if (wxStrstr(linebuf, _T("title=")) == linebuf)
|
||||
title = linebuf + wxStrlen(_T("title="));
|
||||
if (wxStrstr(linebuf, _T("default topic=")) == linebuf)
|
||||
start = linebuf + wxStrlen(_T("default topic="));
|
||||
if (wxStrstr(linebuf, _T("index file=")) == linebuf)
|
||||
index = linebuf + wxStrlen(_T("index file="));
|
||||
if (wxStrstr(linebuf, _T("contents file=")) == linebuf)
|
||||
contents = linebuf + wxStrlen(_T("contents file="));
|
||||
if (wxStrstr(linebuf, _T("charset=")) == linebuf)
|
||||
charset = linebuf + wxStrlen(_T("charset="));
|
||||
if (wxStrstr(linebuf, wxT("title=")) == linebuf)
|
||||
title = linebuf + wxStrlen(wxT("title="));
|
||||
if (wxStrstr(linebuf, wxT("default topic=")) == linebuf)
|
||||
start = linebuf + wxStrlen(wxT("default topic="));
|
||||
if (wxStrstr(linebuf, wxT("index file=")) == linebuf)
|
||||
index = linebuf + wxStrlen(wxT("index file="));
|
||||
if (wxStrstr(linebuf, wxT("contents file=")) == linebuf)
|
||||
contents = linebuf + wxStrlen(wxT("contents file="));
|
||||
if (wxStrstr(linebuf, wxT("charset=")) == linebuf)
|
||||
charset = linebuf + wxStrlen(wxT("charset="));
|
||||
} while (lineptr != NULL);
|
||||
|
||||
wxFontEncoding enc = wxFONTENCODING_SYSTEM;
|
||||
@@ -844,11 +844,11 @@ bool wxHtmlSearchStatus::Search()
|
||||
{
|
||||
const wxChar *p1, *p2;
|
||||
for (p1 = thepage.c_str(), p2 = m_LastPage.c_str();
|
||||
*p1 != 0 && *p1 != _T('#') && *p1 == *p2; p1++, p2++) {}
|
||||
*p1 != 0 && *p1 != wxT('#') && *p1 == *p2; p1++, p2++) {}
|
||||
|
||||
m_LastPage = thepage;
|
||||
|
||||
if (*p1 == 0 || *p1 == _T('#'))
|
||||
if (*p1 == 0 || *p1 == wxT('#'))
|
||||
return false;
|
||||
}
|
||||
else m_LastPage = thepage;
|
||||
@@ -892,7 +892,7 @@ void wxHtmlSearchEngine::LookFor(const wxString& keyword, bool case_sensitive, b
|
||||
|
||||
static inline bool WHITESPACE(wxChar c)
|
||||
{
|
||||
return c == _T(' ') || c == _T('\n') || c == _T('\r') || c == _T('\t');
|
||||
return c == wxT(' ') || c == wxT('\n') || c == wxT('\r') || c == wxT('\t');
|
||||
}
|
||||
|
||||
// replace continuous spaces by one single space
|
||||
@@ -911,7 +911,7 @@ static inline wxString CompressSpaces(const wxString & str)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
ch = _T(' ');
|
||||
ch = wxT(' ');
|
||||
space_counted = true;
|
||||
}
|
||||
else
|
||||
@@ -943,19 +943,19 @@ bool wxHtmlSearchEngine::Scan(const wxFSFile& file)
|
||||
wxChar c = *pBufStr;
|
||||
if (insideTag)
|
||||
{
|
||||
if (c == _T('>'))
|
||||
if (c == wxT('>'))
|
||||
{
|
||||
insideTag = false;
|
||||
// replace the tag by an empty space
|
||||
c = _T(' ');
|
||||
c = wxT(' ');
|
||||
}
|
||||
else
|
||||
continue;
|
||||
}
|
||||
else if (c == _T('<'))
|
||||
else if (c == wxT('<'))
|
||||
{
|
||||
wxChar nextCh = *(pBufStr + 1);
|
||||
if (nextCh == _T('/') || !WHITESPACE(nextCh))
|
||||
if (nextCh == wxT('/') || !WHITESPACE(nextCh))
|
||||
{
|
||||
insideTag = true;
|
||||
continue;
|
||||
@@ -971,10 +971,10 @@ bool wxHtmlSearchEngine::Scan(const wxFSFile& file)
|
||||
if (m_WholeWords)
|
||||
{
|
||||
// insert ' ' at the beginning and at the end
|
||||
keyword.insert( 0, _T(" ") );
|
||||
keyword.append( _T(" ") );
|
||||
bufStr.insert( 0, _T(" ") );
|
||||
bufStr.append( _T(" ") );
|
||||
keyword.insert( 0, wxT(" ") );
|
||||
keyword.append( wxT(" ") );
|
||||
bufStr.insert( 0, wxT(" ") );
|
||||
bufStr.append( wxT(" ") );
|
||||
}
|
||||
|
||||
// remove continuous spaces
|
||||
|
Reference in New Issue
Block a user