summaryrefslogtreecommitdiffstats
path: root/usr.bin/gprof/lookup.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>2002-05-30 21:18:01 +0000
committerwollman <wollman@FreeBSD.org>2002-05-30 21:18:01 +0000
commit0e6b4b2400baba8b4439c902fff94d37adae6210 (patch)
tree9e2e70fd8cf989c08e7d8841fd105a5977aa308f /usr.bin/gprof/lookup.c
parent1116ad074f220f063066380619dac288603d89d0 (diff)
downloadFreeBSD-src-0e6b4b2400baba8b4439c902fff94d37adae6210.zip
FreeBSD-src-0e6b4b2400baba8b4439c902fff94d37adae6210.tar.gz
Fix preprocessor directive syntax (text after #endif).
The style of this program is still atrocious (not fixed).
Diffstat (limited to 'usr.bin/gprof/lookup.c')
-rw-r--r--usr.bin/gprof/lookup.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/usr.bin/gprof/lookup.c b/usr.bin/gprof/lookup.c
index c276346..9badc6c 100644
--- a/usr.bin/gprof/lookup.c
+++ b/usr.bin/gprof/lookup.c
@@ -32,7 +32,11 @@
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)lookup.c 8.1 (Berkeley) 6/6/93";
+#endif
+static const char rcsid[] =
+ "$FreeBSD$";
#endif /* not lint */
#include "gprof.h"
@@ -53,18 +57,18 @@ nllookup( address )
register int probes;
probes = 0;
-# endif DEBUG
+# endif /* DEBUG */
for ( low = 0 , high = nname - 1 ; low != high ; ) {
# ifdef DEBUG
probes += 1;
-# endif DEBUG
+# endif /* DEBUG */
middle = ( high + low ) >> 1;
if ( nl[ middle ].value <= address && nl[ middle+1 ].value > address ) {
# ifdef DEBUG
if ( debug & LOOKUPDEBUG ) {
printf( "[nllookup] %d (%d) probes\n" , probes , nname-1 );
}
-# endif DEBUG
+# endif /* DEBUG */
return &nl[ middle ];
}
if ( nl[ middle ].value > address ) {
@@ -78,7 +82,7 @@ nllookup( address )
fprintf( stderr , "[nllookup] (%d) binary search fails\n" ,
nname-1 );
}
-# endif DEBUG
+# endif /* DEBUG */
return 0;
}
@@ -98,7 +102,7 @@ arclookup( parentp , childp )
printf( "[arclookup] parent %s child %s\n" ,
parentp -> name , childp -> name );
}
-# endif DEBUG
+# endif /* DEBUG */
for ( arcp = parentp -> children ; arcp ; arcp = arcp -> arc_childlist ) {
# ifdef DEBUG
if ( debug & LOOKUPDEBUG ) {
@@ -106,7 +110,7 @@ arclookup( parentp , childp )
arcp -> arc_parentp -> name ,
arcp -> arc_childp -> name );
}
-# endif DEBUG
+# endif /* DEBUG */
if ( arcp -> arc_childp == childp ) {
return arcp;
}
OpenPOWER on IntegriCloud