Add seedable PRNG using an adaptation the original LCG algorithm.

This commit is contained in:
Jason S. Ninneman 2017-05-23 23:37:56 -07:00
parent 2bc887c84e
commit 8a8770375e
7 changed files with 48 additions and 34 deletions

6
main.h
View file

@ -2,9 +2,15 @@
#define LINESIZE 100
typedef struct lcg_state
{
unsigned long a, c, m, x;
} lcg_state;
extern long ABB[], ATAB[], ATLOC[], BLKLIN, DFLAG, DLOC[], FIXED[], HOLDNG,
KTAB[], *LINES, LINK[], LNLENG, LNPOSN,
PARMS[], PLACE[], PTEXT[], RTEXT[], TABSIZ;
extern signed char INLINE[LINESIZE+1], MAP1[], MAP2[];
extern FILE *logfp;
extern bool oldstyle;
extern lcg_state lcgstate;