summaryrefslogtreecommitdiffstats
path: root/src/base/main/mainUtils.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2008-10-04 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2008-10-04 08:01:00 -0700
commiteb75697fe00a8668f74b3c710dcbf5658e07d167 (patch)
tree05b78ce8fb95fcc37b013f5bfd9da0dd3544b42a /src/base/main/mainUtils.c
parent689cbe904e3a28d7502feb9931b748764f947aaf (diff)
downloadabc-eb75697fe00a8668f74b3c710dcbf5658e07d167.tar.gz
abc-eb75697fe00a8668f74b3c710dcbf5658e07d167.tar.bz2
abc-eb75697fe00a8668f74b3c710dcbf5658e07d167.zip
Version abc81004
Diffstat (limited to 'src/base/main/mainUtils.c')
-rw-r--r--src/base/main/mainUtils.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/base/main/mainUtils.c b/src/base/main/mainUtils.c
index d69055a4..46469490 100644
--- a/src/base/main/mainUtils.c
+++ b/src/base/main/mainUtils.c
@@ -200,14 +200,26 @@ void Abc_UtilsSource( Abc_Frame_t * pAbc )
if ( sPath1 && sPath2 ) {
/* ~/.rc == .rc : Source the file only once */
- (void) Cmd_CommandExecute(pAbc, "source -s ~/.abc.rc");
+ char *tmp_cmd = ALLOC(char, strlen(sPath1)+12);
+ (void) sprintf(tmp_cmd, "source -s %s", sPath1);
+ // (void) Cmd_CommandExecute(pAbc, "source -s ~/.abc.rc");
+ (void) Cmd_CommandExecute(pAbc, tmp_cmd);
+ FREE(tmp_cmd);
}
else {
if (sPath1) {
- (void) Cmd_CommandExecute(pAbc, "source -s ~/.abc.rc");
+ char *tmp_cmd = ALLOC(char, strlen(sPath1)+12);
+ (void) sprintf(tmp_cmd, "source -s %s", sPath1);
+ // (void) Cmd_CommandExecute(pAbc, "source -s ~/.abc.rc");
+ (void) Cmd_CommandExecute(pAbc, tmp_cmd);
+ FREE(tmp_cmd);
}
if (sPath2) {
- (void) Cmd_CommandExecute(pAbc, "source -s .abc.rc");
+ char *tmp_cmd = ALLOC(char, strlen(sPath2)+12);
+ (void) sprintf(tmp_cmd, "source -s %s", sPath2);
+ // (void) Cmd_CommandExecute(pAbc, "source -s .abc.rc");
+ (void) Cmd_CommandExecute(pAbc, tmp_cmd);
+ FREE(tmp_cmd);
}
}
if ( sPath1 ) FREE(sPath1);