# 2.11BSD#431 - /usr/ingres/source/gutil/bitpos.c

##### Functions

    bitpos            X

       1: /*
       2: **  FIND HIGH ORDER BIT POSITION
       3: **
       4: **	The position of the highest ordered one bit in `word' is
       5: **	found and returned.  Bits are numbered 0 -> 15, from
       6: **	right (low-order) to left (high-order) in word.
       7: */
       8:
       9: bitpos(word)
      10: int word;
      11: {
      12:     register int    wd, i, j;
      13:     int     pos;
      14:
      15:     wd = word;
      16:
      17:     pos = -1;
      18:
      19:     for (i = 1, j = 0; wd; i <<= 1, j++)
      20:     {
      21:         if (wd & i)
      22:         {
      23:             pos = j;
      24:             wd &= ~i;
      25:         }
      26:     }
      27:
      28:     return (pos);
      29: }

#### Defined functions

bitpos defined in line 9; used 5 times

- in /usr/ingres/source/decomp/aggregate.c line 88
- in /usr/ingres/source/decomp/decision.c line 118
- in /usr/ingres/source/decomp/pull_sq.c line 80
- in /usr/ingres/source/decomp/reformat.c line 74
- in /usr/ingres/source/qrymod/view.c line 443

Last modified: 1995-02-04 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 457 |