Pristine Ack-5.5
[Ack-5.5.git] / lang / cem / cemcom / dataflow.c
1 /*
2  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3  * See the copyright notice in the ACK home directory, in the file "Copyright".
4  */
5 /* $Id: dataflow.c,v 3.4 1994/06/24 12:02:55 ceriel Exp $ */
6 /*      DATAFLOW ANALYSIS ON C PROGRAMS */
7
8 /*      Compile the C compiler with flag DATAFLOW.
9         Use the compiler option --d.
10 */
11
12 #include        "dataflow.h"    /* UF */
13
14 #ifdef  DATAFLOW
15 char *CurrentFunction = 0;
16 int NumberOfCalls;
17
18 DfaStartFunction(nm)
19         char *nm;
20 {
21         CurrentFunction = nm;
22         NumberOfCalls = 0;
23 }
24
25 DfaEndFunction()
26 {
27         if (NumberOfCalls == 0)
28                 print("DFA: %s: --none--\n", CurrentFunction);
29 }
30
31 DfaCallFunction(s)
32         char *s;
33 {
34         print("DFA: %s: %s\n", CurrentFunction, s);
35         ++NumberOfCalls;
36 }
37 #endif  /* DATAFLOW */