1*0d943ef0Sguenther /* $OpenBSD: lcong48.c,v 1.6 2015/09/13 08:31:47 guenther Exp $ */ 2df930be7Sderaadt /* 3df930be7Sderaadt * Copyright (c) 1993 Martin Birgmeier 4df930be7Sderaadt * All rights reserved. 5df930be7Sderaadt * 6df930be7Sderaadt * You may redistribute unmodified or modified versions of this source 7df930be7Sderaadt * code provided that the above copyright notice and this and the 8df930be7Sderaadt * following conditions are retained. 9df930be7Sderaadt * 10df930be7Sderaadt * This software is provided ``as is'', and comes with no warranties 11df930be7Sderaadt * of any kind. I shall in no event be liable for anything that happens 12df930be7Sderaadt * to anyone/anything when using this software. 13df930be7Sderaadt */ 14df930be7Sderaadt 15df930be7Sderaadt #include "rand48.h" 16df930be7Sderaadt 17df930be7Sderaadt void lcong48(unsigned short p[7])18df930be7Sderaadtlcong48(unsigned short p[7]) 19df930be7Sderaadt { 20f7510a6eSderaadt lcong48_deterministic(p); 21f7510a6eSderaadt __rand48_deterministic = 0; 22f7510a6eSderaadt } 23f7510a6eSderaadt 24f7510a6eSderaadt void lcong48_deterministic(unsigned short p[7])25f7510a6eSderaadtlcong48_deterministic(unsigned short p[7]) 26f7510a6eSderaadt { 27f7510a6eSderaadt __rand48_deterministic = 1; 28df930be7Sderaadt __rand48_seed[0] = p[0]; 29df930be7Sderaadt __rand48_seed[1] = p[1]; 30df930be7Sderaadt __rand48_seed[2] = p[2]; 31df930be7Sderaadt __rand48_mult[0] = p[3]; 32df930be7Sderaadt __rand48_mult[1] = p[4]; 33df930be7Sderaadt __rand48_mult[2] = p[5]; 34df930be7Sderaadt __rand48_add = p[6]; 35df930be7Sderaadt } 36*0d943ef0Sguenther DEF_WEAK(lcong48_deterministic); 37