From 0871bffae307e0553e0c5186336189e8b55cf6a6 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 15 Feb 2009 08:01:00 -0800 Subject: Version abc90215 --- src/base/main/mainUtils.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/base/main/mainUtils.c') diff --git a/src/base/main/mainUtils.c b/src/base/main/mainUtils.c index 46469490..f6751b6b 100644 --- a/src/base/main/mainUtils.c +++ b/src/base/main/mainUtils.c @@ -76,7 +76,7 @@ char * Abc_UtilsGetUsersInput( Abc_Frame_t * pAbc ) fgets( Prompt, 999, stdin ); return Prompt; #else - if (line != NULL) free(line); + if (line != NULL) ABC_FREE(line); line = readline(Prompt); if (line == NULL){ printf("***EOF***\n"); exit(0); } add_history(line); @@ -173,8 +173,8 @@ void Abc_UtilsSource( Abc_Frame_t * pAbc ) (void) Cmd_CommandExecute(pAbc, "source -s .rc"); } } - if ( sPath1 ) FREE(sPath1); - if ( sPath2 ) FREE(sPath2); + if ( sPath1 ) ABC_FREE(sPath1); + if ( sPath2 ) ABC_FREE(sPath2); /* execute the abc script which can be open with the "open_path" */ Cmd_CommandExecute( pAbc, "source -s abc.rc" ); @@ -189,10 +189,10 @@ void Abc_UtilsSource( Abc_Frame_t * pAbc ) // it from the home directory. Otherwise, read it from wherever it's located. home = getenv("HOME"); if (home){ - char * sPath3 = ALLOC(char, strlen(home) + 2); + char * sPath3 = ABC_ALLOC(char, strlen(home) + 2); (void) sprintf(sPath3, "%s/", home); sPath1 = Extra_UtilFileSearch(".abc.rc", sPath3, "r"); - FREE(sPath3); + ABC_FREE(sPath3); }else sPath1 = NULL; @@ -200,30 +200,30 @@ void Abc_UtilsSource( Abc_Frame_t * pAbc ) if ( sPath1 && sPath2 ) { /* ~/.rc == .rc : Source the file only once */ - char *tmp_cmd = ALLOC(char, strlen(sPath1)+12); + char *tmp_cmd = ABC_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); + ABC_FREE(tmp_cmd); } else { if (sPath1) { - char *tmp_cmd = ALLOC(char, strlen(sPath1)+12); + char *tmp_cmd = ABC_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); + ABC_FREE(tmp_cmd); } if (sPath2) { - char *tmp_cmd = ALLOC(char, strlen(sPath2)+12); + char *tmp_cmd = ABC_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); + ABC_FREE(tmp_cmd); } } - if ( sPath1 ) FREE(sPath1); - if ( sPath2 ) FREE(sPath2); + if ( sPath1 ) ABC_FREE(sPath1); + if ( sPath2 ) ABC_FREE(sPath2); /* execute the abc script which can be open with the "open_path" */ Cmd_CommandExecute( pAbc, "source -s abc.rc" ); @@ -235,7 +235,7 @@ void Abc_UtilsSource( Abc_Frame_t * pAbc ) char * pName; int i; Vec_PtrForEachEntry( pAbc->aHistory, pName, i ) - free( pName ); + ABC_FREE( pName ); pAbc->aHistory->nSize = 0; } } -- cgit v1.2.3