X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstdlib%2Fsrand.c;fp=functions%2Fstdlib%2Fsrand.c;h=f207de87f9514bd2bbda077de168105993b48dba;hp=0000000000000000000000000000000000000000;hb=8a210237d6ac0dfb36ca14b5aebe8be2b967b9e6;hpb=6da00d2f9ead7e732007fef0ae46c45523059f2d diff --git a/functions/stdlib/srand.c b/functions/stdlib/srand.c new file mode 100644 index 0000000..f207de8 --- /dev/null +++ b/functions/stdlib/srand.c @@ -0,0 +1,32 @@ +/* $Id$ */ + +/* Release $Name$ */ + +/* srand( unsigned int ) + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +#include + +#ifndef REGTEST + +void srand( unsigned int seed ) +{ + _PDCLIB_seed = seed; +} + +#endif + +#ifdef TEST +#include <_PDCLIB_test.h> + +int main() +{ + BEGIN_TESTS; + /* tested in rand.c */ + return TEST_RESULTS; +} + +#endif