home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
wxos2233.zip
/
wxOS2-2_3_3.zip
/
wxWindows-2.3.3
/
utils
/
HelpGen
/
src
/
wx_extra_imps.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2001-10-18
|
2KB
|
65 lines
////////////////////
//
// craeted by Alex
//
////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include <memory.h>
#ifndef WX_PRECOMP
#include "wx/defs.h"
#endif
#ifdef __WXMSW__
// from filefn.cpp
void WXDLLEXPORT wxSplitPath(const char *pszFileName,
wxString *pstrPath,
wxString *pstrName,
wxString *pstrExt)
{
wxCHECK_RET( pszFileName, _("NULL file name in wxSplitPath") );
const char *pDot = strrchr(pszFileName, wxFILE_SEP_EXT);
const char *pSepUnix = strrchr(pszFileName, wxFILE_SEP_PATH_UNIX);
const char *pSepDos = strrchr(pszFileName, wxFILE_SEP_PATH_DOS);
// take the last of the two
size_t nPosUnix = pSepUnix ? pSepUnix - pszFileName : 0;
size_t nPosDos = pSepDos ? pSepDos - pszFileName : 0;
if ( nPosDos > nPosUnix )
nPosUnix = nPosDos;
// size_t nLen = Strlen(pszFileName);
if ( pstrPath )
*pstrPath = wxString(pszFileName, nPosUnix);
if ( pDot ) {
size_t nPosDot = pDot - pszFileName;
if ( pstrName )
*pstrName = wxString(pszFileName + nPosUnix + 1, nPosDot - nPosUnix);
if ( pstrExt )
*pstrExt = wxString(pszFileName + nPosDot + 1);
}
else {
if ( pstrName )
*pstrName = wxString(pszFileName + nPosUnix + 1);
if ( pstrExt )
pstrExt->Empty();
}
}
wxLocale *wxGetLocale()
{
return NULL;
}
const char *wxLocale::GetString(const char *szOrigString,
const char *) const
{
return szOrigString;
}
#endif // MSW