diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-03-22 05:18:32 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-03-22 05:18:32 +0000 |
commit | 7c67d3134ec53a23ac833b10e0de842f21764474 (patch) | |
tree | ec4a490e5d7334da26e387cd944fda31666ca810 /usr.bin/gprof/dfn.c | |
parent | d93057278dedc689aefd0a88d48d49744ff95d9f (diff) |
_wall, err/warn; dummy hppa part, like others
Diffstat (limited to 'usr.bin/gprof/dfn.c')
-rw-r--r-- | usr.bin/gprof/dfn.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/usr.bin/gprof/dfn.c b/usr.bin/gprof/dfn.c index 601c674a1c7..303145e396e 100644 --- a/usr.bin/gprof/dfn.c +++ b/usr.bin/gprof/dfn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dfn.c,v 1.2 1996/06/26 05:33:49 deraadt Exp $ */ +/* $OpenBSD: dfn.c,v 1.3 2001/03/22 05:18:30 mickey Exp $ */ /* $NetBSD: dfn.c,v 1.5 1995/04/19 07:15:56 cgd Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)dfn.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: dfn.c,v 1.2 1996/06/26 05:33:49 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: dfn.c,v 1.3 2001/03/22 05:18:30 mickey Exp $"; #endif #endif /* not lint */ @@ -57,6 +57,7 @@ int dfn_depth; int dfn_counter; +void dfn_init() { @@ -67,6 +68,7 @@ dfn_init() /* * given this parent, depth first number its children. */ +void dfn( parentp ) nltype *parentp; { @@ -113,15 +115,14 @@ dfn( parentp ) /* * push a parent onto the stack and mark it busy */ +void dfn_pre_visit( parentp ) nltype *parentp; { dfn_depth += 1; - if ( dfn_depth >= DFN_DEPTH ) { - fprintf( stderr , "[dfn] out of my depth (dfn_stack overflow)\n" ); - exit( 1 ); - } + if ( dfn_depth >= DFN_DEPTH ) + errx(1, "[dfn] out of my depth (dfn_stack overflow)" ); dfn_stack[ dfn_depth ].nlentryp = parentp; dfn_stack[ dfn_depth ].cycletop = dfn_depth; parentp -> toporder = DFN_BUSY; @@ -162,6 +163,7 @@ dfn_busy( childp ) /* * MISSING: an explanation */ +void dfn_findcycle( childp ) nltype *childp; { @@ -180,10 +182,8 @@ dfn_findcycle( childp ) break; } } - if ( cycletop <= 0 ) { - fprintf( stderr , "[dfn_findcycle] couldn't find head of cycle\n" ); - exit( 1 ); - } + if ( cycletop <= 0 ) + errx( 1, "[dfn_findcycle] couldn't find head of cycle"); # ifdef DEBUG if ( debug & DFNDEBUG ) { printf( "[dfn_findcycle] dfn_depth %d cycletop %d " , @@ -260,10 +260,8 @@ dfn_findcycle( childp ) } # endif DEBUG } - } else if ( childp -> cyclehead != cycleheadp /* firewall */ ) { - fprintf( stderr , - "[dfn_busy] glommed, but not to cyclehead\n" ); - } + } else if ( childp -> cyclehead != cycleheadp /* firewall */ ) + warnx("[dfn_busy] glommed, but not to cyclehead"); } } } @@ -272,6 +270,7 @@ dfn_findcycle( childp ) * deal with self-cycles * for lint: ARGSUSED */ +void dfn_self_cycle( parentp ) nltype *parentp; { @@ -293,6 +292,7 @@ dfn_self_cycle( parentp ) * [MISSING: an explanation] * and pop it off the stack */ +void dfn_post_visit( parentp ) nltype *parentp; { |