2001-07-05 19:24:39 +02:00
|
|
|
/* ffs -- Find the first bit set in the parameter
|
|
|
|
|
Makefile.in (TEXIFILES): Add fnmatch.txh.
* Makefile.in (TEXIFILES): Add fnmatch.txh.
(maint-undoc): New.
maint-tool: Add "undoc" tool.
* alloca.c, argv.c, asprintf.c, choose-temp.c, concat.c,
fdmatch.c, ffs.c, getruntime.c, insque.c, lbasename.c,
make-temp-file.c, mkstemps.c, pexecute.c, random.c, spaces.c,
strerror.s, strsignal.c, strtol.c, vasprintf.c: Add or update
documentation.
* fnmatch.txh: New.
* functions.texi: Regenerate.
From-SVN: r46274
2001-10-16 04:50:13 +02:00
|
|
|
@deftypefn Supplemental int ffs (int @var{valu})
|
2001-07-05 19:24:39 +02:00
|
|
|
|
argv.c, [...]: Improve manual formatting.
* argv.c, asprintf.c, choose-temp.c, concat.c, cplus-dem.c,
ffs.c, fnmatch.txh, getruntime.c, make-temp-file.c,
mkstemps.c, pexecute.c, random.c, strsitnal.c, vasprintf.c:
Improve manual formatting.
* functions.texi: Regenerate.
From-SVN: r46323
2001-10-17 23:15:41 +02:00
|
|
|
Find the first (least significant) bit set in @var{valu}. Bits are
|
Makefile.in (TEXIFILES): Add fnmatch.txh.
* Makefile.in (TEXIFILES): Add fnmatch.txh.
(maint-undoc): New.
maint-tool: Add "undoc" tool.
* alloca.c, argv.c, asprintf.c, choose-temp.c, concat.c,
fdmatch.c, ffs.c, getruntime.c, insque.c, lbasename.c,
make-temp-file.c, mkstemps.c, pexecute.c, random.c, spaces.c,
strerror.s, strsignal.c, strtol.c, vasprintf.c: Add or update
documentation.
* fnmatch.txh: New.
* functions.texi: Regenerate.
From-SVN: r46274
2001-10-16 04:50:13 +02:00
|
|
|
numbered from right to left, starting with bit 1 (corresponding to the
|
|
|
|
value 1). If @var{valu} is zero, zero is returned.
|
2001-07-05 19:24:39 +02:00
|
|
|
|
Makefile.in (TEXIFILES): Add fnmatch.txh.
* Makefile.in (TEXIFILES): Add fnmatch.txh.
(maint-undoc): New.
maint-tool: Add "undoc" tool.
* alloca.c, argv.c, asprintf.c, choose-temp.c, concat.c,
fdmatch.c, ffs.c, getruntime.c, insque.c, lbasename.c,
make-temp-file.c, mkstemps.c, pexecute.c, random.c, spaces.c,
strerror.s, strsignal.c, strtol.c, vasprintf.c: Add or update
documentation.
* fnmatch.txh: New.
* functions.texi: Regenerate.
From-SVN: r46274
2001-10-16 04:50:13 +02:00
|
|
|
@end deftypefn
|
2001-07-05 19:24:39 +02:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
int
|
|
|
|
ffs (valu)
|
|
|
|
register int valu;
|
|
|
|
{
|
|
|
|
register int bit;
|
|
|
|
|
|
|
|
if (valu == 0)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
for (bit = 1; !(valu & 1); bit++)
|
|
|
|
valu >>= 1;
|
|
|
|
|
|
|
|
return bit;
|
|
|
|
}
|
|
|
|
|