*** empty log message ***
This commit is contained in:
34
lang/cem/cemcom/dataflow.c
Normal file
34
lang/cem/cemcom/dataflow.c
Normal file
@@ -0,0 +1,34 @@
|
||||
/* $Header$ */
|
||||
/* DATAFLOW ANALYSIS ON C PROGRAMS */
|
||||
|
||||
/* Compile the C compiler with flag DATAFLOW.
|
||||
Use the compiler option --d.
|
||||
*/
|
||||
|
||||
#include "dataflow.h" /* UF */
|
||||
|
||||
#ifdef DATAFLOW
|
||||
char *CurrentFunction = 0;
|
||||
int NumberOfCalls;
|
||||
|
||||
DfaStartFunction(nm)
|
||||
char *nm;
|
||||
{
|
||||
CurrentFunction = nm;
|
||||
NumberOfCalls = 0;
|
||||
}
|
||||
|
||||
DfaEndFunction()
|
||||
{
|
||||
if (NumberOfCalls == 0) {
|
||||
printf("DFA: %s: --none--\n", CurrentFunction);
|
||||
}
|
||||
}
|
||||
|
||||
DfaCallFunction(s)
|
||||
char *s;
|
||||
{
|
||||
printf("DFA: %s: %s\n", CurrentFunction, s);
|
||||
++NumberOfCalls;
|
||||
}
|
||||
#endif DATAFLOW
|
||||
Reference in New Issue
Block a user