/*---------------------------------------------------------------------- Copyright (c) 1998,1999 Gipsysoft. All Rights Reserved. File: RemoveFilename.cpp Owner: russf@gipsysoft.com Purpose: Remove the filename from the path passed. Could have used splitpath and makepath but they are just too heavy for such a small task. ----------------------------------------------------------------------*/ #include "stdafx.h" extern void RemoveFilename( const char * pcszFilePath, char * pszBuffer ); void RemoveFilename( const char * pcszFilePath, char * pszBuffer ) { LPTSTR pszSlash = pszBuffer; while( ( *pszBuffer = *pcszFilePath ) != '\000' ) { if( *pszBuffer == '\\' ) { pszSlash = pszBuffer + 1; } pszBuffer++; pcszFilePath++; } *pszSlash = '\000'; }