Show Table of Contents
Chapter 47. Functions for Manipulating Bits
This chapter contains reference information on routines for manipulating bits.
Table 47.1. Bit Manipulator Routines
| Function | Description |
|---|---|
| slapi_isbitset_int() | Checks whether a particular bit is set in an integer. |
| slapi_isbitset_uchar() | Checks whether a particular bit is set in a character. |
| slapi_setbit_int() | Sets the specified bit in an integer. |
| slapi_setbit_uchar() | Sets the specified bit in a character. |
| slapi_unsetbit_int() | Unsets the specified bit in an integer. |
| slapi_unsetbit_uchar() | Unsets the specified bit in a character. |
47.1. slapi_isbitset_int()
Checks whether a particular bit is set in the specified integer.
Syntax
#include "slapi-plugin.h" int slapi_isbitset_int(unsigned int f,unsigned int bitnum);
Parameters
This function takes the following parameters:
|
f
| The unsigned integer, a bit of which is to be checked. |
|
bitnum
| The bit number in the unsigned integer that needs tobe checked. |
Returns
This function returns one of the following values:
- 1 if the specified bit is set.
- 0 if the specified bit is not set.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.