1f08c3bdfSopenharmony_ci#ifndef _DATABIN_H_
2f08c3bdfSopenharmony_ci#define _DATABIN_H_
3f08c3bdfSopenharmony_ci
4f08c3bdfSopenharmony_ci/*******************************************************************************
5f08c3bdfSopenharmony_ci* NAME
6f08c3bdfSopenharmony_ci*       databingen - fill a buffer with a data pattern
7f08c3bdfSopenharmony_ci*
8f08c3bdfSopenharmony_ci* SYNOPSIS
9f08c3bdfSopenharmony_ci*       (void) databingen(mode, buffer, bsize, offset)
10f08c3bdfSopenharmony_ci*       int     mode;
11f08c3bdfSopenharmony_ci*       char    *buffer;
12f08c3bdfSopenharmony_ci*       int     bsize;
13f08c3bdfSopenharmony_ci*	int 	offset;
14f08c3bdfSopenharmony_ci*
15f08c3bdfSopenharmony_ci* DESCRIPTION
16f08c3bdfSopenharmony_ci*       datagen fills the buffer pointed to by 'buffer' with 'bsize' bytes
17f08c3bdfSopenharmony_ci*       of data of the form indicated by 'mode'.
18f08c3bdfSopenharmony_ci*	All modes (expect r -random) are file offset based.
19f08c3bdfSopenharmony_ci*	This allows more than process to do writing to the file without
20f08c3bdfSopenharmony_ci*	corrupting it if the same modes were used.
21f08c3bdfSopenharmony_ci*	They data modes to choose from, these are:
22f08c3bdfSopenharmony_ci*
23f08c3bdfSopenharmony_ci*               'a' - writes an alternating bit pattern (i.e. 0x5555555...)
24f08c3bdfSopenharmony_ci*
25f08c3bdfSopenharmony_ci*               'c' - writes a checkerboard pattern (i.e. 0xff00ff00ff00...)
26f08c3bdfSopenharmony_ci*
27f08c3bdfSopenharmony_ci*		'C' - writes counting pattern (i.e. 0 - 07, 0 - 07, ...);
28f08c3bdfSopenharmony_ci*
29f08c3bdfSopenharmony_ci*		'o' - writes all bits set (i.e. 0xffffffffffffff...)
30f08c3bdfSopenharmony_ci*
31f08c3bdfSopenharmony_ci*		'z' - writes all bits cleared (i.e. 0x000000000...);
32f08c3bdfSopenharmony_ci*
33f08c3bdfSopenharmony_ci*               'r' - writes random integers
34f08c3bdfSopenharmony_ci*
35f08c3bdfSopenharmony_ci* RETURN VALUE
36f08c3bdfSopenharmony_ci*       None
37f08c3bdfSopenharmony_ci*
38f08c3bdfSopenharmony_ci*******************************************************************************/
39f08c3bdfSopenharmony_ci
40f08c3bdfSopenharmony_civoid databingen( int mode, char *buffer, int bsize, int offset );
41f08c3bdfSopenharmony_ci
42f08c3bdfSopenharmony_ciint databinchk( int mode, char *buffer, int bsize, int offset, char **errmsg);
43f08c3bdfSopenharmony_ci
44f08c3bdfSopenharmony_ci#endif
45