BSD 4_2 development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Tue, 5 Jul 1983 13:03:48 +0000 (05:03 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Tue, 5 Jul 1983 13:03:48 +0000 (05:03 -0800)
Work on file usr/man/man3/rand.3c
Work on file usr/src/lib/libc/vax/compat-4.1/Makefile

Synthesized-from: CSRG/cd1/4.2

usr/man/man3/rand.3c [new file with mode: 0644]
usr/src/lib/libc/vax/compat-4.1/Makefile [new file with mode: 0644]

diff --git a/usr/man/man3/rand.3c b/usr/man/man3/rand.3c
new file mode 100644 (file)
index 0000000..c674dea
--- /dev/null
@@ -0,0 +1,31 @@
+.TH RAND 3C "19 January 1983"
+.SH NAME
+rand, srand \- random number generator
+.SH SYNOPSIS
+.nf
+.B srand(seed)
+.B int seed;
+.PP
+.B rand()
+.fi
+.SH DESCRIPTION
+.ft B
+The newer random(3) should be used in new applications;
+rand remains for compatibilty.
+.ft R
+.PP
+.I Rand
+uses a multiplicative congruential
+random number generator
+with period 2\u\s732\s0\d
+to return successive pseudo-random
+numbers in the range from 0 to 2\u\s731\s10\d\-1.
+.PP
+The generator is reinitialized by calling
+.I srand
+with 1 as argument.
+It can be set to a random starting point by calling
+.I srand
+with whatever you like as argument.
+.SH "SEE ALSO"
+random(3)
diff --git a/usr/src/lib/libc/vax/compat-4.1/Makefile b/usr/src/lib/libc/vax/compat-4.1/Makefile
new file mode 100644 (file)
index 0000000..493b67d
--- /dev/null
@@ -0,0 +1,21 @@
+#      %M%     %I%     %E%
+#
+OBJS=  reset.o
+CFLAGS=
+
+.c.o:
+       /lib/cpp -E -DPROF $*.c | ${AS} -o $*.o
+       -ld -X -r $*.o
+       mv a.out profiled/$*.o
+       /lib/cpp -E $*.c | ${AS} -o $*.o
+       -ld -x -r $*.o
+       mv a.out $*.o
+
+compat-4.1lib compat-4.1lib_p: ${OBJS}
+       @echo "building profiled compat-4.1"
+       @cd profiled; ar cru ../compat-4.1lib_p ${OBJS}
+       @echo "building normal compat-4.1"
+       @ar cru compat-4.1lib ${OBJS}
+
+clean:
+       rm -f ${OBJS} profiled/*.o errs a.out core compat-4.1lib compat-4.1lib_p