8 lbit_bits (integer a
, integer b
, integer len
)
10 /* Assume 2's complement arithmetic */
14 x
= (unsigned long) a
;
15 y
= (unsigned long) -1L;
18 return (integer
) (x
& ~y
);
22 lbit_cshift (integer a
, integer b
, integer len
)
24 unsigned long x
, y
, z
;
26 x
= (unsigned long) a
;
39 return (integer
) (x
<< b
| x
>> (LONGBITS
- b
));
43 return (integer
) (x
<< (LONGBITS
- b
) | x
>> b
);
45 y
= z
= (unsigned long) -1;
53 return (integer
) (y
| (z
& (x
<< b
| x
>> (len
- b
))));
57 return (integer
) (y
| (z
& (x
>> b
| x
<< (len
- b
))));