summaryrefslogtreecommitdiff
path: root/src/regex.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-07-04 19:51:15 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-07-04 19:51:15 -0700
commitd8ed26bd07abb23acc9c1879776f5afc44ed4874 (patch)
treeab5b8c578e2d209e3d1984a45260f38aa388fada /src/regex.c
parentb768cdcd31e941af9a1ddce45da7e1482b494e77 (diff)
downloademacs-d8ed26bd07abb23acc9c1879776f5afc44ed4874.tar.gz
emacs-d8ed26bd07abb23acc9c1879776f5afc44ed4874.tar.bz2
emacs-d8ed26bd07abb23acc9c1879776f5afc44ed4874.zip
Random fixes. E.g., (random) never returned negative values.
* fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the subseconds part to the entropy, as that's a bit more random. Prefer signed to unsigned, since the signedness doesn't matter and in general we prefer signed. When given a limit, use a denominator equal to INTMASK + 1, not to VALMASK + 1, because the latter isn't right if USE_2_TAGS_FOR_INTS. * sysdep.c (get_random): Return a value in the range 0..INTMASK, not 0..VALMASK. Don't discard "excess" bits that random () returns.
Diffstat (limited to 'src/regex.c')
0 files changed, 0 insertions, 0 deletions