Bell 32V development
authorTom London <tbl@research.uucp>
Tue, 19 Dec 1978 12:53:01 +0000 (07:53 -0500)
committerTom London <tbl@research.uucp>
Tue, 19 Dec 1978 12:53:01 +0000 (07:53 -0500)
Work on file usr/src/libc/gen/rand.c

Co-Authored-By: John Reiser <jfr@research.uucp>
Synthesized-from: 32v

usr/src/libc/gen/rand.c [new file with mode: 0644]

diff --git a/usr/src/libc/gen/rand.c b/usr/src/libc/gen/rand.c
new file mode 100644 (file)
index 0000000..eff6735
--- /dev/null
@@ -0,0 +1,12 @@
+static long    randx = 1;
+
+srand(x)
+unsigned x;
+{
+       randx = x;
+}
+
+rand()
+{
+       return((randx = randx * 1103515245 + 12345) & 0x7fffffff);
+}