1987-03-10 17:51:10 +00:00
|
|
|
/*
|
|
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
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;
|
|
|
|
}
|
1991-12-17 14:11:15 +00:00
|
|
|
#endif /* DATAFLOW */
|