rotate an unsigned long integer to the left
#include <stdlib.h>
unsigned long _lrotl( unsigned long value,
unsigned int shift );
The _lrotl() function rotates the unsigned long integer, determined by value, to the left by the number of bits specified in shift.
The rotated value.
#include <stdio.h>
#include <stdlib.h>
unsigned long mask = 0x12345678;
void main()
{
mask = _lrotl( mask, 4 );
printf( "%08lX\n", mask );
}
produces the output:
23456781
WATCOM
| Safety: | |
|---|---|
| Interrupt handler | Yes |
| Signal handler | Yes |
| Thread | Yes |