All pastes #331061 Raw Edit

Untitled

public text v1 · immutable
#331061 ·published 2007-01-28 14:38 UTC
rendered paste body
BOOL GetFileNameFromPath(char filepath[], char *name)
{
	int pathsize = strlen(filepath), nameoffset = 0;
	memset(name,0,sizeof(name));
	for(int i = 0; i <= pathsize; i++)
	{
		name[i - nameoffset]=filepath[i];
		if (filepath[i] == '\\')
		{
			nameoffset = i + 1;
		}
	}
	return TRUE;
}