fixed a bug in multi-subscript calculation
[unix-history] / usr / src / usr.bin / gprof / dfn.c
index 01b11cc..9ce1d04 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef lint
 #ifndef lint
-    static     char *sccsid = "@(#)dfn.c       1.1 (Berkeley) %G%";
+    static     char *sccsid = "@(#)dfn.c       1.3 (Berkeley) %G%";
 #endif lint
 
 #include <stdio.h>
 #endif lint
 
 #include <stdio.h>
-#include "dprof.h"
+#include "gprof.h"
 
 #define        DFN_DEPTH       100
 struct dfnstruct {
 
 #define        DFN_DEPTH       100
 struct dfnstruct {
@@ -15,7 +15,7 @@ typedef struct dfnstruct      dfntype;
 dfntype        dfn_stack[ DFN_DEPTH ];
 int    dfn_depth = 0;
 
 dfntype        dfn_stack[ DFN_DEPTH ];
 int    dfn_depth = 0;
 
-int    dfn_counter = 0;
+int    dfn_counter = DFN_NAN;
 
     /*
      * given this parent, depth first number its children.
 
     /*
      * given this parent, depth first number its children.
@@ -93,7 +93,7 @@ dfn_numbered( childp )
     nltype     *childp;
 {
     
     nltype     *childp;
 {
     
-    return ( childp -> toporder != 0 && childp -> toporder != DFN_BUSY );
+    return ( childp -> toporder != DFN_NAN && childp -> toporder != DFN_BUSY );
 }
 
     /*
 }
 
     /*
@@ -104,7 +104,7 @@ dfn_busy( childp )
     nltype     *childp;
 {
 
     nltype     *childp;
 {
 
-    if ( childp -> toporder == 0 ) {
+    if ( childp -> toporder == DFN_NAN ) {
        return FALSE;
     }
     return TRUE;
        return FALSE;
     }
     return TRUE;