]> git.saurik.com Git - wxWidgets.git/blame_incremental - utils/HelpGen/src/wx_extra_imps.cpp
checked in forgottern parts of MSLU changes
[wxWidgets.git] / utils / HelpGen / src / wx_extra_imps.cpp
... / ...
CommitLineData
1////////////////////
2//
3// craeted by Alex
4//
5////////////////////
6
7// For compilers that support precompilation, includes "wx.h".
8#include "wx/wxprec.h"
9
10#include <memory.h>
11
12#ifndef WX_PRECOMP
13 #include "wx/defs.h"
14#endif
15
16#ifdef __WXMSW__
17// from filefn.cpp
18void WXDLLEXPORT wxSplitPath(const char *pszFileName,
19 wxString *pstrPath,
20 wxString *pstrName,
21 wxString *pstrExt)
22{
23 wxCHECK_RET( pszFileName, _("NULL file name in wxSplitPath") );
24
25 const char *pDot = strrchr(pszFileName, wxFILE_SEP_EXT);
26 const char *pSepUnix = strrchr(pszFileName, wxFILE_SEP_PATH_UNIX);
27 const char *pSepDos = strrchr(pszFileName, wxFILE_SEP_PATH_DOS);
28
29 // take the last of the two
30 size_t nPosUnix = pSepUnix ? pSepUnix - pszFileName : 0;
31 size_t nPosDos = pSepDos ? pSepDos - pszFileName : 0;
32 if ( nPosDos > nPosUnix )
33 nPosUnix = nPosDos;
34// size_t nLen = Strlen(pszFileName);
35
36 if ( pstrPath )
37 *pstrPath = wxString(pszFileName, nPosUnix);
38 if ( pDot ) {
39 size_t nPosDot = pDot - pszFileName;
40 if ( pstrName )
41 *pstrName = wxString(pszFileName + nPosUnix + 1, nPosDot - nPosUnix);
42 if ( pstrExt )
43 *pstrExt = wxString(pszFileName + nPosDot + 1);
44 }
45 else {
46 if ( pstrName )
47 *pstrName = wxString(pszFileName + nPosUnix + 1);
48 if ( pstrExt )
49 pstrExt->Empty();
50 }
51}
52
53wxLocale *wxGetLocale()
54{
55 return NULL;
56}
57
58const char *wxLocale::GetString(const char *szOrigString,
59 const char *) const
60{
61 return szOrigString;
62}
63
64#endif // MSW