ack/lang/cem/cemcom/dataflow.c

38 lines
683 B
C
Raw Normal View History

/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
1994-06-24 14:02:31 +00:00
/* $Id$ */
1986-03-10 13:07:55 +00:00
/* 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 */