home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 1
/
FishNMoreVol1.bin
/
more
/
code_examples
/
librar
/
ltestbit.c
< prev
next >
Wrap
Text File
|
1989-02-08
|
512b
|
20 lines
/*--------------------------------------*/
/* */
/* LTESTBIT(X,X) */
/* */
/* Bit tests a long integer. The first */
/* argument is the long integer being */
/* tested. The second argument is the */
/* bit to be tested. The function */
/* returns a -1 if the bit is on or a */
/* zero otherwise. */
/* */
/*--------------------------------------*/
ltestbit(h,a)
long h;
int a;
{
int d;
d=(h<<(31-a))>>31;
return(d);
}