FreeBSD/usr.bin/gprof/dfn.c
/*
     *	visit a node after all its children
     *	[MISSING: an explanation]
     *	and pop it off the stack
     */
visit a node after all its children
[MISSING: an explanation]
and pop it off the stack
visit a node after all its children [ MISSING : an explanation ] and pop it off the stack
void
dfn_post_visit(nltype *parentp)
{
    nltype	*memberp;
#   ifdef DEBUG
	if ( debug & DFNDEBUG ) {
	    printf( "[dfn_post_visit]\t%d: " , dfn_depth );
	    printname( parentp );
	    printf( "\n" );
	}
#   endif 
    if ( parentp -> cyclehead == parentp ) {
	dfn_counter += 1;
	for ( memberp = parentp ; memberp ; memberp = memberp -> cnext ) {
	    memberp -> toporder = dfn_counter;
#	    ifdef DEBUG
		if ( debug & DFNDEBUG ) {
		    printf( "[dfn_post_visit]\t\tmember " );
		    printname( memberp );
		    printf( " -> toporder = %d\n" , dfn_counter );
		}
#	    endif 
	}
    } else {
#	ifdef DEBUG
	    if ( debug & DFNDEBUG ) {
		printf( "[dfn_post_visit]\t\tis part of a cycle\n" );
	    }
#	endif 
    }
    dfn_depth -= 1;
}
void dfn_post_visit ( nltype * parentp ) { nltype * memberp ; #   ifdef DEBUG if ( debug & DFNDEBUG ) { printf ( " \t " , dfn_depth ) ; printname ( parentp ) ; printf ( " \n " ) ; } #   endif if ( parentp -> cyclehead == parentp ) { dfn_counter += 1 ; for ( memberp = parentp ; memberp ; memberp = memberp -> cnext ) { memberp -> toporder = dfn_counter ; #	    ifdef DEBUG if ( debug & DFNDEBUG ) { printf ( " \t \t " ) ; printname ( memberp ) ; printf ( " \n " , dfn_counter ) ; } #	    endif } } else { #	ifdef DEBUG if ( debug & DFNDEBUG ) { printf ( " \t \t \n " ) ; } #	endif } dfn_depth -= 1 ; }
visit a node after all its children
  [MISSING: an explanation]
  and pop it off the stack
visit a node after all its children [ MISSING : an explanation ] and pop it off the stack
/* DEBUG */ /*
	 *	number functions and things in their cycles
	 *	unless the function is itself part of a cycle
	 */ /* DEBUG */ /* DEBUG */