Mercurial > emacs
changeset 1743:a1933e20a2a3
(Frandom): Change arg name.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 08 Jan 1993 09:08:24 +0000 |
parents | 69e337909652 |
children | 5180778aedcb |
files | src/fns.c |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fns.c Thu Jan 07 10:22:16 1993 +0000 +++ b/src/fns.c Fri Jan 08 09:08:24 1993 +0000 @@ -49,27 +49,27 @@ This is 24 bits' worth.\n\ With argument N, return random number in interval [0,N).\n\ With argument t, set the random number seed from the current time and pid.") - (arg) - Lisp_Object arg; + (limit) + Lisp_Object limit; { int val; extern long random (); extern srandom (); extern long time (); - if (EQ (arg, Qt)) + if (EQ (limit, Qt)) srandom (getpid () + time (0)); val = random (); - if (XTYPE (arg) == Lisp_Int && XINT (arg) != 0) + if (XTYPE (limit) == Lisp_Int && XINT (limit) != 0) { /* Try to take our random number from the higher bits of VAL, not the lower, since (says Gentzel) the low bits of `random' are less random than the higher ones. */ val &= 0xfffffff; /* Ensure positive. */ val >>= 5; - if (XINT (arg) < 10000) + if (XINT (limit) < 10000) val >>= 6; - val %= XINT (arg); + val %= XINT (limit); } return make_number (val); }