WSJT-X/lib/sgran.c
Steven Franke cca493e28c Mods to jt65sim to use new seed for each invocation - for use in a script that estimates high-snr FER.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6227 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
2015-12-06 04:37:14 +00:00

16 lines
261 B
C

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
/* seed rand using urandom */
float sgran_()
{
unsigned int seed;
FILE *urandom;
urandom = fopen ("/dev/urandom","r");
fread (&seed, sizeof (seed), 1, urandom);
srand (seed);
return(0);
}