15 int forspec(
const char* spec,
void ( *func )(
const char* pathname ) )
20 char fullpath[MAX_PATH];
24 GetFullPathName( spec,
sizeof fullpath, fullpath, &fname );
25 lenleft =
sizeof fullpath - ( fname - fullpath );
27 hFind = FindFirstFile( spec, &find );
28 if ( hFind != INVALID_HANDLE_VALUE )
33 strzcpy( fname, find.cFileName, lenleft );
35 ( *func )( fullpath );
36 }
while ( FindNextFile( hFind, &find ) );
int forspec(const char *spec, void(*func)(const char *pathname))