#ifndef BONNIE
#define BONNIE

#define BON_VERSION "0.99j"

#include "port.h"

#define SemKey 4711
#define NumSems TestCount
// million files (7) + up to 12 random extra chars
#define RandExtraLen (12)
#define MaxNameLen (7 + RandExtraLen)
// data includes index to which directory (4 bytes) and terminating '\0' for
// the name and pointer to file name
#define MaxDataPerFile (MaxNameLen + 4 + 1 + 4)
#define Seeks (8000)
#define UpdateSeek (10)
#define SeekProcCount (3)
#define ChunkBits (13)
#define Chunk (1 << ChunkBits)
#define UnitBits (20)
#define Unit (1 << UnitBits)
#define CreateNameLen 6
#define DefaultFileSize 200
#define DirectoryUnit 1024
#define DefaultDirectorySize 30
#define DefaultDirectoryMaxSize 0
#define DefaultDirectoryMinSize 0
// 1024M per file for IO.
#define IOFileSize 1024
// 3 digits
#define MaxIOFiles 1000
#define IntSize sizeof(int)

typedef const char * CPCHAR;
typedef char * PCHAR;
typedef const char * const CPCCHAR;
typedef void * PVOID;
typedef const void * CPVOID;
typedef const void * const CPCVOID;

enum tests_t
{
  Putc,
  ReWrite,
  FastWrite,
  Getc,
  FastRead,
  Lseek,
  CreateRand,
  CreateSeq,
  StatRand,
  StatSeq,
  DelRand,
  DelSeq,
  TestCount
};

int   io_error(CPCCHAR message, bool do_exit = false);

#endif
