]> pd.if.org Git - pdclib/blobdiff - functions/stdlib/srand.c
Initial checkin.
[pdclib] / functions / stdlib / srand.c
diff --git a/functions/stdlib/srand.c b/functions/stdlib/srand.c
new file mode 100644 (file)
index 0000000..f207de8
--- /dev/null
@@ -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 <stdlib.h>
+
+#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