/********************************************************************** * Copyright (c) Digital Equipment Corporation 1984, 1985, 1986. * * All Rights Reserved. * * Reference "/usr/src/COPYRIGHT" for applicable restrictions. * **********************************************************************/ /* * SCCSID: @(#)rand.c 3.0 4/22/86 */ static long randx = 1; srand(x) unsigned x; { randx = x; } rand() { return(((randx = randx*1103515245 + 12345)>>16) & 077777); }