]> git.saurik.com Git - wxWidgets.git/blame - utils/HelpGen/src/wx_extra_imps.cpp
Updated makefiles etc. for 2.5.1
[wxWidgets.git] / utils / HelpGen / src / wx_extra_imps.cpp
CommitLineData
cecfc5e7
VZ
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
71432ef8
VZ
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
59734eb5
VZ
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);
71432ef8
VZ
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
977bf6ff 64#endif // MSW