summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2011-07-02 17:17:55 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2011-07-02 17:17:55 -0700
commita37de7cc4d15fc8c5bf30a89a9590546af3174e1 (patch)
tree1c43d488705c6acd001618041df698a19a821e3e
parent10953634c9b9b04df84d76553b7e57e9fb13c943 (diff)
downloadabc-a37de7cc4d15fc8c5bf30a89a9590546af3174e1.tar.gz
abc-a37de7cc4d15fc8c5bf30a89a9590546af3174e1.tar.bz2
abc-a37de7cc4d15fc8c5bf30a89a9590546af3174e1.zip
Printing out the path/name of the resource file that is being sourced.
-rw-r--r--src/base/cmd/cmdUtils.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/base/cmd/cmdUtils.c b/src/base/cmd/cmdUtils.c
index 5fc663fc..f97a2c6a 100644
--- a/src/base/cmd/cmdUtils.c
+++ b/src/base/cmd/cmdUtils.c
@@ -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;