diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp index 02181732a7..37691592c7 100644 --- a/src/html/helpdata.cpp +++ b/src/html/helpdata.cpp @@ -584,7 +584,7 @@ bool wxHtmlHelpData::AddBook(const wxString& book) bookFull = fn.GetFullPath( wxPATH_UNIX ); #else if (wxIsAbsolutePath(book)) bookFull = book; - else bookFull = wxGetCwd() + "/" + book; + else bookFull = wxGetCwd() + wxT("/") + book; #endif fi = fsys.OpenFile(bookFull); @@ -607,7 +607,7 @@ bool wxHtmlHelpData::AddBook(const wxString& book) { lineptr = ReadLine(lineptr, linebuf, 300); - for (wxChar *ch = linebuf; *ch != '\0' && *ch != '='; ch++) + for (wxChar *ch = linebuf; *ch != wxT('\0') && *ch != wxT('='); ch++) *ch = tolower(*ch); if (wxStrstr(linebuf, _T("title=")) == linebuf) diff --git a/src/html/htmlfilt.cpp b/src/html/htmlfilt.cpp index 0482dc49cd..09801f5d1e 100644 --- a/src/html/htmlfilt.cpp +++ b/src/html/htmlfilt.cpp @@ -45,7 +45,7 @@ void wxPrivate_ReadString(wxString& str, wxInputStream* s) s->Read(buffer, bufSize); lastRead = s->LastRead(); buffer[lastRead] = 0; - str.Append(buffer); + str.Append( wxString::FromAscii(buffer) ); // TODO: What encoding ? } while(lastRead == bufSize); } @@ -54,7 +54,7 @@ void wxPrivate_ReadString(wxString& str, wxInputStream* s) char* src = new char[streamSize+1]; s->Read(src, streamSize); src[streamSize] = 0; - str = src; + str = wxString::FromAscii( src); // TODO: What encoding ? delete [] src; } } @@ -92,7 +92,7 @@ wxString wxHtmlFilterPlainText::ReadFile(const wxFSFile& file) const doc.Replace(wxT("&"), wxT("&"), TRUE); doc.Replace(wxT("<"), wxT("<"), TRUE); doc.Replace(wxT(">"), wxT(">"), TRUE); - doc2 = "
\n" + doc + "\n
"; + doc2 = wxT("
\n") + doc + wxT("\n
"); return doc2; } @@ -127,7 +127,8 @@ bool wxHtmlFilterImage::CanRead(const wxFSFile& file) const wxString wxHtmlFilterImage::ReadFile(const wxFSFile& file) const { - return (""); + wxString res = wxT(""); + return res; } diff --git a/src/html/m_dflist.cpp b/src/html/m_dflist.cpp index 634a31786b..1f36a7dca0 100644 --- a/src/html/m_dflist.cpp +++ b/src/html/m_dflist.cpp @@ -34,7 +34,7 @@ FORCE_LINK_ME(m_dflist) -TAG_HANDLER_BEGIN(DEFLIST, "DL,DT,DD") +TAG_HANDLER_BEGIN(DEFLIST, wxT("DL,DT,DD") ) TAG_HANDLER_PROC(tag) { diff --git a/src/html/m_fonts.cpp b/src/html/m_fonts.cpp index 0014a38ed8..f847ce3c30 100644 --- a/src/html/m_fonts.cpp +++ b/src/html/m_fonts.cpp @@ -31,7 +31,7 @@ FORCE_LINK_ME(m_fonts) -TAG_HANDLER_BEGIN(FONT, "FONT") +TAG_HANDLER_BEGIN(FONT, wxT("FONT") ) TAG_HANDLER_VARS wxArrayString m_Faces; @@ -112,7 +112,7 @@ TAG_HANDLER_BEGIN(FONT, "FONT") TAG_HANDLER_END(FONT) -TAG_HANDLER_BEGIN(FACES_U, "U,STRIKE") +TAG_HANDLER_BEGIN(FACES_U, wxT("U,STRIKE")) TAG_HANDLER_PROC(tag) { @@ -135,7 +135,7 @@ TAG_HANDLER_END(FACES_U) -TAG_HANDLER_BEGIN(FACES_B, "B,STRONG") +TAG_HANDLER_BEGIN(FACES_B, wxT("B,STRONG")) TAG_HANDLER_PROC(tag) { @@ -158,7 +158,7 @@ TAG_HANDLER_END(FACES_B) -TAG_HANDLER_BEGIN(FACES_I, "I,EM,CITE,ADDRESS") +TAG_HANDLER_BEGIN(FACES_I, wxT("I,EM,CITE,ADDRESS")) TAG_HANDLER_PROC(tag) { @@ -181,7 +181,7 @@ TAG_HANDLER_END(FACES_I) -TAG_HANDLER_BEGIN(FACES_TT, "TT,CODE,KBD,SAMP") +TAG_HANDLER_BEGIN(FACES_TT, wxT("TT,CODE,KBD,SAMP")) TAG_HANDLER_PROC(tag) { @@ -205,7 +205,7 @@ TAG_HANDLER_END(FACES_TT) -TAG_HANDLER_BEGIN(Hx, "H1,H2,H3,H4,H5,H6") +TAG_HANDLER_BEGIN(Hx, wxT("H1,H2,H3,H4,H5,H6")) TAG_HANDLER_PROC(tag) { @@ -281,7 +281,7 @@ TAG_HANDLER_BEGIN(Hx, "H1,H2,H3,H4,H5,H6") TAG_HANDLER_END(Hx) -TAG_HANDLER_BEGIN(BIGSMALL, "BIG,SMALL") +TAG_HANDLER_BEGIN(BIGSMALL, wxT("BIG,SMALL")) TAG_HANDLER_PROC(tag) { diff --git a/src/html/m_hline.cpp b/src/html/m_hline.cpp index b9df229000..468a4a97e1 100644 --- a/src/html/m_hline.cpp +++ b/src/html/m_hline.cpp @@ -69,7 +69,7 @@ void wxHtmlLineCell::Draw(wxDC& dc, int x, int y, int WXUNUSED(view_y1), int WXU //----------------------------------------------------------------------------- -TAG_HANDLER_BEGIN(HR, "HR") +TAG_HANDLER_BEGIN(HR, wxT("HR")) TAG_HANDLER_PROC(tag) { diff --git a/src/html/m_image.cpp b/src/html/m_image.cpp index 7458ddf792..8510a3f34f 100644 --- a/src/html/m_image.cpp +++ b/src/html/m_image.cpp @@ -611,7 +611,7 @@ wxHtmlLinkInfo *wxHtmlImageCell::GetLink( int x, int y ) const // tag handler //-------------------------------------------------------------------------------- -TAG_HANDLER_BEGIN(IMG, "IMG,MAP,AREA") +TAG_HANDLER_BEGIN(IMG, wxT("IMG,MAP,AREA")) TAG_HANDLER_PROC(tag) { diff --git a/src/html/m_layout.cpp b/src/html/m_layout.cpp index e828f01e1d..00a2e48b9d 100644 --- a/src/html/m_layout.cpp +++ b/src/html/m_layout.cpp @@ -31,7 +31,7 @@ FORCE_LINK_ME(m_layout) -TAG_HANDLER_BEGIN(P, "P") +TAG_HANDLER_BEGIN(P, wxT("P")) TAG_HANDLER_PROC(tag) { @@ -49,7 +49,7 @@ TAG_HANDLER_END(P) -TAG_HANDLER_BEGIN(BR, "BR") +TAG_HANDLER_BEGIN(BR, wxT("BR")) TAG_HANDLER_PROC(tag) { @@ -68,7 +68,7 @@ TAG_HANDLER_END(BR) -TAG_HANDLER_BEGIN(CENTER, "CENTER") +TAG_HANDLER_BEGIN(CENTER, wxT("CENTER")) TAG_HANDLER_PROC(tag) { @@ -106,7 +106,7 @@ TAG_HANDLER_END(CENTER) -TAG_HANDLER_BEGIN(DIV, "DIV") +TAG_HANDLER_BEGIN(DIV, wxT("DIV")) TAG_HANDLER_PROC(tag) { @@ -145,7 +145,7 @@ TAG_HANDLER_END(DIV) -TAG_HANDLER_BEGIN(TITLE, "TITLE") +TAG_HANDLER_BEGIN(TITLE, wxT("TITLE")) TAG_HANDLER_PROC(tag) { @@ -167,7 +167,7 @@ TAG_HANDLER_END(TITLE) -TAG_HANDLER_BEGIN(BODY, "BODY") +TAG_HANDLER_BEGIN(BODY, wxT("BODY")) TAG_HANDLER_PROC(tag) { @@ -196,7 +196,7 @@ TAG_HANDLER_END(BODY) -TAG_HANDLER_BEGIN(BLOCKQUOTE, "BLOCKQUOTE") +TAG_HANDLER_BEGIN(BLOCKQUOTE, wxT("BLOCKQUOTE")) TAG_HANDLER_PROC(tag) { diff --git a/src/html/m_links.cpp b/src/html/m_links.cpp index 588180f01e..14162b93d1 100644 --- a/src/html/m_links.cpp +++ b/src/html/m_links.cpp @@ -48,23 +48,23 @@ class wxHtmlAnchorCell : public wxHtmlCell -TAG_HANDLER_BEGIN(A, "A") +TAG_HANDLER_BEGIN(A, wxT("A")) TAG_HANDLER_PROC(tag) { - if (tag.HasParam("NAME")) + if (tag.HasParam( wxT("NAME") )) { - m_WParser->GetContainer()->InsertCell(new wxHtmlAnchorCell(tag.GetParam("NAME"))); + m_WParser->GetContainer()->InsertCell(new wxHtmlAnchorCell(tag.GetParam( wxT("NAME") ))); } - if (tag.HasParam("HREF")) + if (tag.HasParam( wxT("HREF") )) { wxHtmlLinkInfo oldlnk = m_WParser->GetLink(); wxColour oldclr = m_WParser->GetActualColor(); int oldund = m_WParser->GetFontUnderlined(); - wxString name(tag.GetParam("HREF")), target; + wxString name(tag.GetParam( wxT("HREF") )), target; - if (tag.HasParam("TARGET")) target = tag.GetParam("TARGET"); + if (tag.HasParam( wxT("TARGET") )) target = tag.GetParam( wxT("TARGET") ); m_WParser->SetActualColor(m_WParser->GetLinkColor()); m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(m_WParser->GetLinkColor())); m_WParser->SetFontUnderlined(TRUE); diff --git a/src/html/m_list.cpp b/src/html/m_list.cpp index 44cad981ed..b36a67897c 100644 --- a/src/html/m_list.cpp +++ b/src/html/m_list.cpp @@ -70,7 +70,7 @@ void wxHtmlListmarkCell::Draw(wxDC& dc, int x, int y, int WXUNUSED(view_y1), int //----------------------------------------------------------------------------- -TAG_HANDLER_BEGIN(OLULLI, "OL,UL,LI") +TAG_HANDLER_BEGIN(OLULLI, wxT("OL,UL,LI") ) TAG_HANDLER_VARS int m_Numbering; diff --git a/src/html/m_meta.cpp b/src/html/m_meta.cpp index 9ad9eb7c4b..c95938bded 100644 --- a/src/html/m_meta.cpp +++ b/src/html/m_meta.cpp @@ -34,7 +34,7 @@ FORCE_LINK_ME(m_meta) -TAG_HANDLER_BEGIN(META, "META") +TAG_HANDLER_BEGIN(META, wxT("META") ) TAG_HANDLER_PROC(tag) { diff --git a/src/html/m_pre.cpp b/src/html/m_pre.cpp index f1c064e755..f429d521d6 100644 --- a/src/html/m_pre.cpp +++ b/src/html/m_pre.cpp @@ -68,7 +68,7 @@ static wxString LINKAGEMODE HtmlizeWhitespaces(const wxString& str) //----------------------------------------------------------------------------- -TAG_HANDLER_BEGIN(PRE, "PRE") +TAG_HANDLER_BEGIN(PRE, wxT("PRE")) TAG_HANDLER_PROC(tag) { diff --git a/src/html/m_style.cpp b/src/html/m_style.cpp index 9355867e81..a31b62b502 100644 --- a/src/html/m_style.cpp +++ b/src/html/m_style.cpp @@ -30,7 +30,7 @@ FORCE_LINK_ME(m_style) -TAG_HANDLER_BEGIN(STYLE, "STYLE") +TAG_HANDLER_BEGIN(STYLE, wxT("STYLE")) TAG_HANDLER_PROC(WXUNUSED(tag)) { diff --git a/src/html/m_tables.cpp b/src/html/m_tables.cpp index 7d125edf1c..c15a1bc8fa 100644 --- a/src/html/m_tables.cpp +++ b/src/html/m_tables.cpp @@ -519,7 +519,7 @@ void wxHtmlTableCell::Layout(int w) //----------------------------------------------------------------------------- -TAG_HANDLER_BEGIN(TABLE, "TABLE,TR,TD,TH") +TAG_HANDLER_BEGIN(TABLE, wxT("TABLE,TR,TD,TH")) TAG_HANDLER_VARS wxHtmlTableCell* m_Table; diff --git a/src/html/winpars.cpp b/src/html/winpars.cpp index dbdbd7ab01..8c3ee953aa 100644 --- a/src/html/winpars.cpp +++ b/src/html/winpars.cpp @@ -72,7 +72,7 @@ wxHtmlWinParser::wxHtmlWinParser(wxHtmlWindow *wnd) : wxHtmlParser() #else static int default_sizes[7] = {10, 12, 14, 16, 19, 24, 32}; #endif - SetFonts("", "", default_sizes); + SetFonts(wxT(""), wxT(""), default_sizes); } // fill in wxHtmlParser's tables: @@ -138,18 +138,18 @@ void wxHtmlWinParser::SetFonts(wxString normal_face, wxString fixed_face, const void wxHtmlWinParser::InitParser(const wxString& source) { wxHtmlParser::InitParser(source); - wxASSERT_MSG(m_DC != NULL, _T("no DC assigned to wxHtmlWinParser!!")); + wxASSERT_MSG(m_DC != NULL, wxT("no DC assigned to wxHtmlWinParser!!")); m_FontBold = m_FontItalic = m_FontUnderlined = m_FontFixed = FALSE; m_FontSize = 3; //default one CreateCurrentFont(); // we're selecting default font into - m_DC->GetTextExtent("H", &m_CharWidth, &m_CharHeight); + m_DC->GetTextExtent( wxT("H"), &m_CharWidth, &m_CharHeight); /* NOTE : we're not using GetCharWidth/Height() because of differences under X and win */ m_UseLink = FALSE; - m_Link = wxHtmlLinkInfo("", ""); + m_Link = wxHtmlLinkInfo( wxT(""), wxT("") ); m_LinkColor.Set(0, 0, 0xFF); m_ActualColor.Set(0, 0, 0); m_Align = wxHTML_ALIGN_LEFT; diff --git a/src/unix/dialup.cpp b/src/unix/dialup.cpp index 50150eb326..f0bb49e961 100644 --- a/src/unix/dialup.cpp +++ b/src/unix/dialup.cpp @@ -676,26 +676,26 @@ wxDialUpManagerImpl::CheckIfconfig() wxASSERT_MSG( m_IfconfigPath.length(), _T("can't use ifconfig if it wasn't found") ); - wxString tmpfile = wxGetTempFileName("_wxdialuptest"); - wxString cmd = "/bin/sh -c \'"; + wxString tmpfile = wxGetTempFileName( wxT("_wxdialuptest") ); + wxString cmd = wxT("/bin/sh -c \'"); cmd << m_IfconfigPath; #if defined(__SOLARIS__) || defined (__SUNOS__) // need to add -a flag - cmd << " -a"; + cmd << wxT(" -a"); #elif defined(__LINUX__) || defined(__SGI__) // nothing to be added to ifconfig #elif defined(__FREEBSD__) || defined(__DARWIN__) // add -l flag - cmd << " -l"; + cmd << wxT(" -l"); #elif defined(__HPUX__) // VZ: a wild guess (but without it, ifconfig fails completely) - cmd << _T(" ppp0"); + cmd << wxT(" ppp0"); #else # pragma warning "No ifconfig information for this OS." m_CanUseIfconfig = 0; return -1; #endif - cmd << " >" << tmpfile << '\''; + cmd << wxT(" >") << tmpfile << wxT('\''); /* I tried to add an option to wxExecute() to not close stdout, so we could let ifconfig write directly to the tmpfile, but this does not work. That should be faster, as it doesn´t call @@ -754,41 +754,41 @@ wxDialUpManagerImpl::CheckIfconfig() wxDialUpManagerImpl::NetConnection wxDialUpManagerImpl::CheckPing() { - // First time check for ping location. We only use the variant - // which does not take arguments, a la GNU. - if(m_CanUsePing == -1) // unknown - { + // First time check for ping location. We only use the variant + // which does not take arguments, a la GNU. + if(m_CanUsePing == -1) // unknown + { #ifdef __VMS - if(wxFileExists("SYS$SYSTEM:TCPIP$PING.EXE")) - m_PingPath = "$SYS$SYSTEM:TCPIP$PING"; + if (wxFileExists( wxT("SYS$SYSTEM:TCPIP$PING.EXE") )) + m_PingPath = wxT("$SYS$SYSTEM:TCPIP$PING"); #else - if(wxFileExists("/bin/ping")) - m_PingPath = "/bin/ping"; - else if(wxFileExists("/usr/sbin/ping")) - m_PingPath = "/usr/sbin/ping"; + if (wxFileExists( wxT("/bin/ping") )) + m_PingPath = wxT("/bin/ping"); + else if (wxFileExists( wxT("/usr/sbin/ping") )) + m_PingPath = wxT("/usr/sbin/ping"); #endif - if(! m_PingPath) - { - m_CanUsePing = 0; - } - } + if (!m_PingPath) + { + m_CanUsePing = 0; + } + } - if(! m_CanUsePing) - { + if(! m_CanUsePing) + { // we didn't find ping return Net_Unknown; - } + } wxLogNull ln; // suppress all error messages wxASSERT(m_PingPath.length()); wxString cmd; - cmd << m_PingPath << ' '; + cmd << m_PingPath << wxT(' '); #if defined(__SOLARIS__) || defined (__SUNOS__) // nothing to add to ping command #elif defined(__LINUX__) || defined (__BSD__) || defined( __VMS ) - cmd << "-c 1 "; // only ping once + cmd << wxT("-c 1 "); // only ping once #elif defined(__HPUX__) - cmd << "64 1 "; // only ping once (need also specify the packet size) + cmd << wxT("64 1 "); // only ping once (need also specify the packet size) #else # pragma warning "No Ping information for this OS." m_CanUsePing = 0; diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index e303fd756a..6f29465df4 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -925,12 +925,12 @@ void wxMimeTypesManagerImpl::LoadKDELinksForMimeSubtype(const wxString& dirbase, wxArrayString sExts; wxString mimetype, mime_desc, strIcon; - int nIndex = file.pIndexOf ("MimeType="); + int nIndex = file.pIndexOf( wxT("MimeType=") ); if (nIndex == wxNOT_FOUND) { // construct mimetype from the directory name and the basename of the // file (it always has .kdelnk extension) - mimetype << subdir << _T('/') << filename.BeforeLast(_T('.')); + mimetype << subdir << wxT('/') << filename.BeforeLast( wxT('.') ); } else mimetype = file.GetCmd (nIndex); @@ -1097,15 +1097,15 @@ void wxMimeTypesManagerImpl::GetKDEMimeInfo(const wxString& sExtraDir) wxArrayString icondirs; // settings in ~/.kde have maximal priority - dirs.Add(wxGetHomeDir() + _T("/.kde/share")); - icondirs.Add(wxGetHomeDir() + _T("/.kde/share/icons/")); + dirs.Add(wxGetHomeDir() + wxT("/.kde/share")); + icondirs.Add(wxGetHomeDir() + wxT("/.kde/share/icons/")); // the variable KDEDIR is set when KDE is running - const char *kdedir = getenv("KDEDIR"); + const wxChar *kdedir = wxGetenv( wxT("KDEDIR") ); if ( kdedir ) { - dirs.Add(wxString(kdedir) + _T("/share")); - icondirs.Add(wxString(kdedir) + _T("/share/icons/")); + dirs.Add( wxString(kdedir) + wxT("/share") ); + icondirs.Add( wxString(kdedir) + wxT("/share/icons/") ); } else { diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index 2b0caccfd9..463825755f 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -952,7 +952,7 @@ wxString wxGetOsDescription() #ifndef WXWIN_OS_DESCRIPTION #error WXWIN_OS_DESCRIPTION should be defined in config.h by configure #else - return WXWIN_OS_DESCRIPTION; + return wxString::FromAscii( WXWIN_OS_DESCRIPTION ); #endif } #endif