diff options
Diffstat (limited to 'src/base/cmd/cmdUtils.c')
-rw-r--r-- | src/base/cmd/cmdUtils.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/base/cmd/cmdUtils.c b/src/base/cmd/cmdUtils.c index 71396d3e..47e54bb3 100644 --- a/src/base/cmd/cmdUtils.c +++ b/src/base/cmd/cmdUtils.c @@ -30,7 +30,7 @@ static int CmdCommandPrintCompare( Abc_Command ** ppC1, Abc_Command ** ppC2 ); //////////////////////////////////////////////////////////////////////// -/// FUNCTION DEFITIONS /// +/// FUNCTION DEFINITIONS /// //////////////////////////////////////////////////////////////////////// /**Function************************************************************* @@ -121,10 +121,10 @@ int CmdCommandDispatch( Abc_Frame_t * pAbc, int argc, char **argv ) } // execute the command - clk = util_cpu_time(); + clk = Extra_CpuTime(); pFunc = (int (*)(Abc_Frame_t *, int, char **))pCommand->pFunc; fError = (*pFunc)( pAbc, argc, argv ); - pAbc->TimeCommand += (util_cpu_time() - clk); + pAbc->TimeCommand += (Extra_CpuTime() - clk); // automatic execution of arbitrary command after each command // usually this is a passive command ... @@ -245,7 +245,7 @@ int CmdApplyAlias( Abc_Frame_t * pAbc, int *argcp, char ***argvp, int *loop ) argc = *argcp; argv = *argvp; stopit = 0; - for ( ; *loop < 20; ( *loop )++ ) + for ( ; *loop < 200; ( *loop )++ ) { if ( argc == 0 ) return 0; @@ -270,7 +270,7 @@ int CmdApplyAlias( Abc_Frame_t * pAbc, int *argcp, char ***argvp, int *loop ) } for ( i = 1; i <= added; i++ ) { - argv[i] = NIL( char ); + argv[i] = NULL; } argc += added; } @@ -278,7 +278,7 @@ int CmdApplyAlias( Abc_Frame_t * pAbc, int *argcp, char ***argvp, int *loop ) for ( i = 0, offset = 0; i < alias->argc; i++, offset++ ) { arg = CmdHistorySubstitution( pAbc, alias->argv[i], &did_subst ); - if ( arg == NIL( char ) ) + if ( arg == NULL ) { *argcp = argc; *argvp = argv; @@ -383,11 +383,11 @@ FILE * CmdFileOpen( Abc_Frame_t * pAbc, char *sFileName, char *sMode, char **pFi if (strcmp(sFileName, "-") == 0) { if (strcmp(sMode, "w") == 0) { - sRealName = util_strsav( "stdout" ); + sRealName = Extra_UtilStrsav( "stdout" ); pFile = stdout; } else { - sRealName = util_strsav( "stdin" ); + sRealName = Extra_UtilStrsav( "stdin" ); pFile = stdin; } } @@ -403,24 +403,24 @@ FILE * CmdFileOpen( Abc_Frame_t * pAbc, char *sFileName, char *sMode, char **pFi sPathAll = NULL; } else if ( sPathUsr == NULL ) { - sPathAll = util_strsav( sPathLib ); + sPathAll = Extra_UtilStrsav( sPathLib ); } else if ( sPathLib == NULL ) { - sPathAll = util_strsav( sPathUsr ); + sPathAll = Extra_UtilStrsav( sPathUsr ); } else { sPathAll = ALLOC( char, strlen(sPathLib)+strlen(sPathUsr)+5 ); sprintf( sPathAll, "%s:%s",sPathUsr, sPathLib ); } - if ( sPathAll != NIL(char) ) { - sRealName = util_file_search(sFileName, sPathAll, "r"); + if ( sPathAll != NULL ) { + sRealName = Extra_UtilFileSearch(sFileName, sPathAll, "r"); FREE( sPathAll ); } } - if (sRealName == NIL(char)) { - sRealName = util_tilde_expand(sFileName); + if (sRealName == NULL) { + sRealName = Extra_UtilTildeExpand(sFileName); } - if ((pFile = fopen(sRealName, sMode)) == NIL(FILE)) { + if ((pFile = fopen(sRealName, sMode)) == NULL) { if (! silent) { perror(sRealName); } |