Standards / Extensions | C or C++ | Dependencies |
---|---|---|
z/OS® UNIX | both |
#define _XOPEN_SOURCE
#include <unistd.h>
void __cnvblk(char bits[8], char bytes[64], int flag);
The __cnvblk() function maps an 8 character array, bits, of bits to or from a 64 character array, bytes, of bytes depending on the value of flag.
If the value of flag is 0, __cnvblk() sets all bytes in the bytes array to 0x00 for which the corresponding bits in the bits array have value 0, and it sets all bytes in the bytes array to 0x01 for which the corresponding bits in the bits array have value 1.
If the value of flag is not 0, __cnvblk() sets all bits in the bits array to 0 for which corresponding bytes in the bytes array have value 0x00, and it sets all bits in the bits array to 1 for which the corresponding bytes in the bytes array have value 0x01.
This function may be used to prepare input to setkey() or encrypt() functions and to map results back to 8 bit characters.
If the value of flag is zero, __cnvblk() functions without error checking.