--- pgp/src/random.h 2018/04/24 16:38:52 1.1.1.3 +++ pgp/src/random.h 2018/04/24 16:39:35 1.1.1.4 @@ -6,7 +6,6 @@ #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. If you do want PSEDORANDOM defined, it's better to define it right @@ -16,6 +15,7 @@ int pseudorand(void); /* 16-bit LCG pseu #ifdef PSEUDORANDOM /* use pseudorandom numbers */ #define randombyte() ((byte) pseudorand()) /* pseudorandom generator */ +#define randaccum_later(bitcount) /* null function */ #define randaccum(bitcount) /* null function */ #define randload(bitcount) /* null function */ #define randflush() /* null function */ @@ -26,15 +26,12 @@ int pseudorand(void); /* 16-bit LCG pseu #ifndef PSEUDORANDOM /* use truly random numbers */ -extern int randcount; /* number of random bytes accumulated in pool */ - -void capturecounter(void); /* capture a fast counter into the random pool. */ -/* Should be called when the user clicks the mouse, or from getkey(). */ - +short try_randombyte(void); /* returns truly random byte, or -1 */ short randombyte(void); /* returns truly random byte from pool */ int getstring(char *strbuf,int maxlen,boolean echo); +void randaccum_later(short bitcount); /* get random bits later */ void randaccum(short bitcount); /* get this many raw random bits ready */ short randload(short bitcount); @@ -42,10 +39,13 @@ 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 */ +/* DJGPP includes a getkey() which works, but PGP also uses getkey() to + accumulate random bytes. To avoid a conflict, getkey is #defined as + pgp_getkey. You don't really need to know this. */ +#ifdef __GO32__ + #define getkey pgp_getkey +#endif + +extern void flush_input(void);