void getpathpart (TCHAR *outpath, int size, const TCHAR *inpath) { _tcscpy (outpath, inpath); TCHAR *p = _tcsrchr (outpath, '\\'); if (p) p[0] = 0; fixtrailing (outpath); }
void getpathpart(TCHAR *outpath, int size, const TCHAR *inpath) { strcpy(outpath, inpath); TCHAR *p = strrchr(outpath, '/'); #ifdef WINDOWS if (!p) { p = strrchr(outpath, '\\'); } #endif if (p) { p[0] = 0; } fixtrailing(outpath); }