diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2020-12-21 12:45:50 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2020-12-21 12:45:50 -0800 |
commit | f06217e25a9905e5ebb9bce27ac06c456b9cf5f8 (patch) | |
tree | 06f912b404d05059cf8c61fd3372ef85fc56cdb6 /src/aig/gia | |
parent | 73dcdab6d836440ae5edf6fd23f9a409f9e519c2 (diff) | |
download | abc-f06217e25a9905e5ebb9bce27ac06c456b9cf5f8.tar.gz abc-f06217e25a9905e5ebb9bce27ac06c456b9cf5f8.tar.bz2 abc-f06217e25a9905e5ebb9bce27ac06c456b9cf5f8.zip |
Compiler warnings.
Diffstat (limited to 'src/aig/gia')
-rw-r--r-- | src/aig/gia/giaUtil.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/aig/gia/giaUtil.c b/src/aig/gia/giaUtil.c index 2409df2e..2762dbac 100644 --- a/src/aig/gia/giaUtil.c +++ b/src/aig/gia/giaUtil.c @@ -2460,6 +2460,40 @@ Vec_Int_t * Gia_ManComputeDistance( Gia_Man_t * p, int iObj, Vec_Int_t * vObjs, } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Gia_ComputeTest() +{ + char * pStart, Line [1000]; float Total = 0; + char * pFileName = "data.txt"; + FILE * pFile = fopen( pFileName, "r" ); + if ( pFile == NULL ) + { printf( "Input file \"%s\" cannot be opened.\n", pFileName ); return; } + while ( fgets( Line, 1000, pFile ) != NULL ) + { + if ( !strstr(Line, "xxx") ) + continue; + if ( !strstr(Line, "yyy") ) + continue; + //printf( "%s", Line ); + pStart = strstr(Line, "zzz"); + if ( pStart == NULL ) + continue; + //printf( "%s", pStart + 4 ); + Total += -atof( pStart + 4 ); + } + printf( "Total = %.2f\n", Total ); + fclose( pFile ); +} //////////////////////////////////////////////////////////////////////// /// END OF FILE /// |