X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cecfc5e7e54067ea099334a1fbce852ca69a6b11..c921c2cd3ada7fe34deaf48d70982c2cf5a963df:/utils/HelpGen/src/wx_extra_imps.cpp diff --git a/utils/HelpGen/src/wx_extra_imps.cpp b/utils/HelpGen/src/wx_extra_imps.cpp index 6cdc260973..fcc09b2d79 100644 --- a/utils/HelpGen/src/wx_extra_imps.cpp +++ b/utils/HelpGen/src/wx_extra_imps.cpp @@ -13,19 +13,52 @@ #include "wx/defs.h" #endif -char * -copystring (const char *s) +#ifdef __WXMSW__ +// from filefn.cpp +void WXDLLEXPORT wxSplitPath(const char *pszFileName, + wxString *pstrPath, + wxString *pstrName, + wxString *pstrExt) { - if (s == NULL) s = ""; - size_t len = strlen (s) + 1; + wxCHECK_RET( pszFileName, _("NULL file name in wxSplitPath") ); - char *news = new char[len]; - memcpy (news, s, len); // Should be the fastest + 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); - return news; + // 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(); + } } -const char *wxGetTranslation(const char *str) +wxLocale *wxGetLocale() { - return str; + return NULL; } + +const char *wxLocale::GetString(const char *szOrigString, + const char *) const +{ + return szOrigString; +} + +#endif // MSW