DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦98c78cc77⟧ TextFile

    Length: 482 (0x1e2)
    Types: TextFile
    Names: »random.c«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/X/Xtrek/random.c« 

TextFile

static char sccsid[] = "@(#)random.c	1.1";
/*
 * The really nice random number generator that came with 4.3 uses
 * too much state information to pass across the network so for our
 * network-wide random generator we just use the old srand/rand
 * combination.  Sorry about the false naming.
 */

static long randx = 1;

srandom(seed)
int seed;
{
  randx = seed;
}

long random()
{
  return((randx = randx * 1103515245 + 12345) & 0x7fffffff);
}

long grandom()
{
  return(randx);
}