summaryrefslogtreecommitdiffstats
path: root/src/aig/gia/giaUtil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig/gia/giaUtil.c')
-rw-r--r--src/aig/gia/giaUtil.c34
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 ///