C:/Users/Dennis/src/lang/russell.orig/src/stree/bitcnt.c

Go to the documentation of this file.
00001 /*
00002  * bitcnt(n) returns the number of bits set in n.
00003  */
00004 int bitcnt(n)
00005 register int n;
00006 {
00007     register int count = 0;
00008 
00009     while (n != 0) {
00010         if (n < 0) count++;
00011         n <<= 1;
00012     }
00013     return(count);
00014 }

Generated on Fri Jan 25 10:39:48 2008 for russell by  doxygen 1.5.4