ack/lang/cem/cemcom/dataflow.c

34 lines
517 B
C
Raw Normal View History

1986-03-10 13:07:55 +00:00
/* $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()
{
1986-04-03 14:32:56 +00:00
if (NumberOfCalls == 0)
print("DFA: %s: --none--\n", CurrentFunction);
1986-03-10 13:07:55 +00:00
}
DfaCallFunction(s)
char *s;
{
1986-04-03 14:32:56 +00:00
print("DFA: %s: %s\n", CurrentFunction, s);
1986-03-10 13:07:55 +00:00
++NumberOfCalls;
}
#endif DATAFLOW