1: /*
2: * Copyright (c) 1980 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: */
6:
7: #ifndef lint
8: static char sccsid[] = "@(#)ranf.c 5.1 (Berkeley) 5/30/85";
9: #endif not lint
10:
11: # include <stdio.h>
12:
13: ranf(max)
14: int max;
15: {
16: register int t;
17:
18: if (max <= 0)
19: return (0);
20: t = rand() >> 5;
21: return (t % max);
22: }
23:
24:
25: double franf()
26: {
27: double t;
28: t = rand() & 077777;
29: return (t / 32767.0);
30: }
Defined functions
franf
defined in line
25; used 27 times
ranf
defined in line
13; used 53 times
- in /usr/src/games/trek/abandon.c line
105,
115-118(2)
- in /usr/src/games/trek/attack.c line
120-129(3)
- in /usr/src/games/trek/autover.c line
45
- in /usr/src/games/trek/capture.c line
65-69(2),
99
- in /usr/src/games/trek/dumpme.c line
34-37(4)
- in /usr/src/games/trek/events.c line
120,
143-144(2),
236-237(2)
- in /usr/src/games/trek/help.c line
104-107(2)
- in /usr/src/games/trek/initquad.c line
119-120(2)
- in /usr/src/games/trek/klmove.c line
60-67(4)
- in /usr/src/games/trek/nova.c line
35-44(3)
- in /usr/src/games/trek/ram.c line
59,
67
- in /usr/src/games/trek/setup.c line
82,
109,
186-187(2),
204-205(2),
214-215(2),
226-227(2),
248-254(3)
- in /usr/src/games/trek/snova.c line
51-52(2),
60
- in /usr/src/games/trek/torped.c line
143,
205
- in /usr/src/games/trek/warp.c line
84,
108,
114
Defined variables
sccsid
defined in line
8;
never used