From eb75697fe00a8668f74b3c710dcbf5658e07d167 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sat, 4 Oct 2008 08:01:00 -0700 Subject: Version abc81004 --- src/base/main/mainUtils.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/base/main') 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); -- cgit v1.2.3