From ea5648db3f5cc48a2c370be43d8f313db3683967 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 16 Feb 2022 15:32:53 -0800 Subject: Improving truth table handling. --- src/base/io/io.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/base/io') diff --git a/src/base/io/io.c b/src/base/io/io.c index 72fd25bf..26bfb1f4 100644 --- a/src/base/io/io.c +++ b/src/base/io/io.c @@ -1142,7 +1142,17 @@ int IoCommandReadTruth( Abc_Frame_t * pAbc, int argc, char ** argv ) goto usage; if ( fFile ) + { + FILE * pFile = fopen( argv[globalUtilOptind], "rb" ); + if ( pFile == NULL ) + { + printf( "The file \"%s\" cannot be found.\n", argv[globalUtilOptind] ); + return 1; + } + else + fclose( pFile ); pStr = Extra_FileReadContents( argv[globalUtilOptind] ); + } else pStr = argv[globalUtilOptind]; -- cgit v1.2.3