mirror of
https://github.com/YosysHQ/abc.git
synced 2026-09-08 03:46:07 +02:00
Version abc60220
This commit is contained in:
+13
-13
@@ -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 ...
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user