--- pgp/src/random.h 2018/04/24 16:37:52 1.1 +++ pgp/src/random.h 2018/04/24 16:37:53 1.1.1.2 @@ -4,30 +4,15 @@ */ -/* Elaborate protection mechanisms to assure no redefinitions of types...*/ -#ifndef BOOLSTUFF -#define BOOLSTUFF -#ifndef TRUE -#define FALSE 0 -#define TRUE (!FALSE) -#endif /* if TRUE not already defined */ -typedef unsigned char boolean; /* values are TRUE or FALSE */ -#endif /* if BOOLSTUFF not already defined */ -#ifndef BYTESTUFF -#define BYTESTUFF -typedef unsigned char byte; /* values are 0-255 */ -typedef byte *byteptr; /* pointer to byte */ -typedef char *string; /* pointer to ASCII character string */ -#endif /* if BYTESTUFF not already defined */ -#ifndef min /* if min macro not already defined */ -#define min(a,b) ( (a)<(b) ? (a) : (b) ) -#define max(a,b) ( (a)>(b) ? (a) : (b) ) -#endif /* if min macro not already defined */ - +#include "usuals.h" /* typedefs for byte, word16, boolean, etc. */ int pseudorand(void); /* 16-bit LCG pseudorandom generator */ -/* Don't define PSEUDORANDOM unless you want only pseudorandom numbers */ +/* Don't define PSEUDORANDOM unless you want only pseudorandom numbers. + If you do want PSEDORANDOM defined, it's better to define it right + here in this include file because then you can be sure that all the + files that include random.h will be properly affected. */ +/* #define PSEUDORANDOM */ #ifdef PSEUDORANDOM /* use pseudorandom numbers */ #define randombyte() ((byte) pseudorand()) /* pseudorandom generator */ @@ -58,7 +43,9 @@ short randload(short bitcount); void randflush(void); /* flush recycled random bytes */ boolean keypress(void); /* TRUE iff keyboard input ready */ +#ifndef AMIGA short getkey(void); /* returns data from keyboard (no echo). */ +#endif /* !AMIGA */ #endif /* ifndef PSEUDORANDOM */