daily update
[deliverable/binutils-gdb.git] / gprof / cg_dfn.c
index 02d64e7388865c82bb0c53f87eab2a71596a2742..463f22e5d25b8ca386485f46ec8d8768c19c7d47 100644 (file)
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
-#include <stdio.h>
 #include "libiberty.h"
 #include "gprof.h"
+#include "search_list.h"
+#include "source.h"
+#include "symtab.h"
 #include "cg_arcs.h"
 #include "cg_dfn.h"
-#include "symtab.h"
 #include "utils.h"
 
 #define        DFN_INCR_DEPTH (128)
@@ -33,6 +34,12 @@ typedef struct
   }
 DFN_Stack;
 
+static boolean is_numbered PARAMS ((Sym *));
+static boolean is_busy PARAMS ((Sym *));
+static void find_cycle PARAMS ((Sym *));
+static void pre_visit PARAMS ((Sym *));
+static void post_visit PARAMS ((Sym *));
+
 DFN_Stack *dfn_stack = NULL;
 int dfn_maxdepth = 0;
 int dfn_depth = 0;
@@ -42,8 +49,9 @@ int dfn_counter = DFN_NAN;
 /*
  * Is CHILD already numbered?
  */
-static bool
-DEFUN (is_numbered, (child), Sym * child)
+static boolean
+is_numbered (child)
+     Sym *child;
 {
   return child->cg.top_order != DFN_NAN && child->cg.top_order != DFN_BUSY;
 }
@@ -52,14 +60,15 @@ DEFUN (is_numbered, (child), Sym * child)
 /*
  * Is CHILD already busy?
  */
-static bool
-DEFUN (is_busy, (child), Sym * child)
+static boolean
+is_busy (child)
+     Sym *child;
 {
   if (child->cg.top_order == DFN_NAN)
     {
-      return FALSE;
+      return false;
     }
-  return TRUE;
+  return true;
 }
 
 
@@ -70,7 +79,8 @@ DEFUN (is_busy, (child), Sym * child)
  * depth-first number).
  */
 static void
-DEFUN (find_cycle, (child), Sym * child)
+find_cycle (child)
+     Sym *child;
 {
   Sym *head = 0;
   Sym *tail;
@@ -193,7 +203,8 @@ DEFUN (find_cycle, (child), Sym * child)
  * the stack and mark it busy.
  */
 static void
-DEFUN (pre_visit, (parent), Sym * parent)
+pre_visit (parent)
+     Sym *parent;
 {
   ++dfn_depth;
 
@@ -217,7 +228,8 @@ DEFUN (pre_visit, (parent), Sym * parent)
  * and number functions if PARENT is head of a cycle.
  */
 static void
-DEFUN (post_visit, (parent), Sym * parent)
+post_visit (parent)
+     Sym *parent;
 {
   Sym *member;
 
@@ -251,7 +263,8 @@ DEFUN (post_visit, (parent), Sym * parent)
  * Given this PARENT, depth first number its children.
  */
 void
-DEFUN (cg_dfn, (parent), Sym * parent)
+cg_dfn (parent)
+     Sym *parent;
 {
   Arc *arc;
 
This page took 0.040738 seconds and 4 git commands to generate.