Printing out the path/name of the resource file that is being sourced.

This commit is contained in:
Alan Mishchenko 2011-07-02 17:17:55 -07:00
parent 10953634c9
commit a37de7cc4d
1 changed files with 7 additions and 0 deletions

View File

@ -445,11 +445,18 @@ FILE * CmdFileOpen( Abc_Frame_t * pAbc, char *sFileName, char *sMode, char **pFi
if (sRealName == NULL) {
sRealName = Extra_UtilTildeExpand(sFileName);
}
if ((pFile = fopen(sRealName, sMode)) == NULL) {
if (! silent) {
perror(sRealName);
}
}
else
{
// print the path/name of the resource file 'abc.rc' that is being loaded
if ( strlen(sRealName) >= 6 && strcmp( sRealName + strlen(sRealName) - 6, "abc.rc" ) == 0 )
printf( "Loading resource file \"%s\".\n", sRealName );
}
}
if ( pFileNameReal )
*pFileNameReal = sRealName;