mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
88 lines
1.8 KiB
Plaintext
88 lines
1.8 KiB
Plaintext
.\"
|
|
.\" Copyright (c) 2025 Robert Clausecker <[email protected]>
|
|
.\"
|
|
.\" SPDX-License-Identifier: BSD-2-Clause
|
|
.\"
|
|
.Dd November 9, 2025
|
|
.Dt STDC_TRAILING_ZEROS 3
|
|
.Os
|
|
.Sh NAME
|
|
.Nm stdc_trailing_zeros
|
|
.Nd find the number of trailing zeros in an integer
|
|
.Sh SYNOPSIS
|
|
.Lb libc
|
|
.In stdbit.h
|
|
.Ft unsigned int
|
|
.Fn stdc_trailing_zeros_uc "unsigned char value"
|
|
.Ft unsigned int
|
|
.Fn stdc_trailing_zeros_us "unsigned short value"
|
|
.Ft unsigned int
|
|
.Fn stdc_trailing_zeros_ui "unsigned int value"
|
|
.Ft unsigned int
|
|
.Fn stdc_trailing_zeros_ul "unsigned long value"
|
|
.Ft unsigned int
|
|
.Fn stdc_trailing_zeros_ull "unsigned long long value"
|
|
.Ft unsigned int
|
|
.Fn stdc_trailing_zeros "value"
|
|
.Sh DESCRIPTION
|
|
The
|
|
.Nm stdc_trailing_zeros_ Ns Em type Ns ()
|
|
family of functions returns the number of trailing zeros in
|
|
.Fa value ,
|
|
where
|
|
.Fa value
|
|
is of type
|
|
.Va unsigned char ,
|
|
.Va unsigned short ,
|
|
.Va unsigned int ,
|
|
.Va unsigned long ,
|
|
or
|
|
.Va unsigned long long
|
|
for
|
|
.Em type
|
|
being
|
|
.Sy uc ,
|
|
.Sy us ,
|
|
.Sy ui ,
|
|
.Sy ul ,
|
|
or
|
|
.Sy ull
|
|
respectively.
|
|
The
|
|
.Fn stdc_trailing_zeros "value"
|
|
type-generic macro picks the appropriate
|
|
.Nm stdc_trailing_zeros_ Ns Em type Ns ()
|
|
function based on the type of
|
|
.Fa value .
|
|
.Sh RETURN VALUES
|
|
Returns the number of trailing zeros in
|
|
.Fa value .
|
|
If
|
|
.Fa value
|
|
is all zeros,
|
|
the total number of bits in the type of
|
|
.Fa value
|
|
is returned.
|
|
.Sh SEE ALSO
|
|
.Xr ffs 3 ,
|
|
.Xr stdbit 3 ,
|
|
.Xr stdc_first_trailing_one 3 ,
|
|
.Xr stdc_leading_zeros 3 ,
|
|
.Xr stdc_trailing_ones 3
|
|
.Sh STANDARDS
|
|
The
|
|
.Nm stdc_trailing_zeros_ Ns Em type Ns ()
|
|
family of functions and the
|
|
.Fn stdc_trailing_zeros
|
|
type-generic macro conform to
|
|
.St -isoC-2023 .
|
|
.Sh HISTORY
|
|
The
|
|
.Nm stdc_trailing_zeros_ Ns Em type Ns ()
|
|
family of functions and the
|
|
.Fn stdc_trailing_zeros
|
|
type-generic macro were added in
|
|
.Fx 15.1 .
|
|
.Sh AUTHORS
|
|
.An Robert Clausecker Aq Mt [email protected]
|