Unicodified wxSplitPath

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ove Kaaven
1999-04-16 23:06:39 +00:00
parent 6f9eb45239
commit c16e5a9271

View File

@@ -365,18 +365,18 @@ wxString wxExpandEnvVars(const wxString& str)
} }
// this function is used to properly interpret '..' in path // this function is used to properly interpret '..' in path
void wxSplitPath(wxArrayString& aParts, const char *sz) void wxSplitPath(wxArrayString& aParts, const wxChar *sz)
{ {
aParts.Empty(); aParts.Empty();
wxString strCurrent; wxString strCurrent;
const char *pc = sz; const wxChar *pc = sz;
for ( ;; ) { for ( ;; ) {
if ( *pc == '\0' || *pc == wxCONFIG_PATH_SEPARATOR ) { if ( *pc == _T('\0') || *pc == wxCONFIG_PATH_SEPARATOR ) {
if ( strCurrent == "." ) { if ( strCurrent == _T(".") ) {
// ignore // ignore
} }
else if ( strCurrent == ".." ) { else if ( strCurrent == _T("..") ) {
// go up one level // go up one level
if ( aParts.IsEmpty() ) if ( aParts.IsEmpty() )
wxLogWarning(_("'%s' has extra '..', ignored."), sz); wxLogWarning(_("'%s' has extra '..', ignored."), sz);
@@ -392,7 +392,7 @@ void wxSplitPath(wxArrayString& aParts, const char *sz)
//else: //else:
// could log an error here, but we prefer to ignore extra '/' // could log an error here, but we prefer to ignore extra '/'
if ( *pc == '\0' ) if ( *pc == _T('\0') )
return; return;
} }
else else