4 /*******************************************************************************
6 * databingen - fill a buffer with a data pattern
9 * (void) databingen(mode, buffer, bsize, offset)
16 * datagen fills the buffer pointed to by 'buffer' with 'bsize' bytes
17 * of data of the form indicated by 'mode'.
18 * All modes (expect r -random) are file offset based.
19 * This allows more than process to do writing to the file without
20 * corrupting it if the same modes were used.
21 * They data modes to choose from, these are:
23 * 'a' - writes an alternating bit pattern (i.e. 0x5555555...)
25 * 'c' - writes a checkerboard pattern (i.e. 0xff00ff00ff00...)
27 * 'C' - writes counting pattern (i.e. 0 - 07, 0 - 07, ...);
29 * 'o' - writes all bits set (i.e. 0xffffffffffffff...)
31 * 'z' - writes all bits cleared (i.e. 0x000000000...);
33 * 'r' - writes random integers
38 *******************************************************************************/
40 void databingen( int mode, unsigned char *buffer, int bsize, int offset );
42 void databinchedk( int mode, unsigned char *buffer, int bsize, int offset, char **errmsg);