1: /* function iputbt fortran callable for integer*4.   PLW 8/5/79*/
   2: /* For integer x, replace the n bits starting at bit p with v.
   3:    The rightmost or lowest bit is number 0 and integers are 31
   4:    bits plus the sign bit. The n bits are counted from lowest
   5:    to highest.                                                */
   6: 
   7: long int i_putbit(x,p,n,v)
   8:     long int *x,*p,*n,*v;
   9: {
  10:     long int r;
  11:     if (*n == 32)  r=~0;
  12:     else r=~(~0 << *n);
  13:     return(((r & *v) << *p) | (~(r<< *p) & *x));
  14: }

Defined functions

i_putbit defined in line 7; never used
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 267
Valid CSS Valid XHTML 1.0 Strict