Wolfgang Thalleradd binutils-2.20.15d96d8014 years agoHistory
26 lines · 465 B · C
RawDownload
/* ffs -- Find the first bit set in the parameter @deftypefn Supplemental int ffs (int @var{valu}) Find the first (least significant) bit set in @var{valu}.  Bits arenumbered from right to left, starting with bit 1 (corresponding to thevalue 1).  If @var{valu} is zero, zero is returned. @end deftypefn */ intffs (register int valu){  register int bit;   if (valu == 0)    return 0;   for (bit = 1; !(valu & 1); bit++)  	valu >>= 1;   return bit;} 

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t