summaryrefslogtreecommitdiffstats
path: root/src/base/main/mainUtils.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2009-02-15 08:01:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2009-02-15 08:01:00 -0800
commit0871bffae307e0553e0c5186336189e8b55cf6a6 (patch)
tree4571d1563fe33a53a57fea1c35fb668b9d33265f /src/base/main/mainUtils.c
parentf936cc0680c98ffe51b3a1716c996072d5dbf76c (diff)
downloadabc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.gz
abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.bz2
abc-0871bffae307e0553e0c5186336189e8b55cf6a6.zip
Version abc90215
Diffstat (limited to 'src/base/main/mainUtils.c')
-rw-r--r--src/base/main/mainUtils.c28
1 files changed, 14 insertions, 14 deletions
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;
}
}