diff options
| author | Paul Eggert | 2011-07-04 19:51:15 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-07-04 19:51:15 -0700 |
| commit | d8ed26bd07abb23acc9c1879776f5afc44ed4874 (patch) | |
| tree | ab5b8c578e2d209e3d1984a45260f38aa388fada /src/ChangeLog | |
| parent | b768cdcd31e941af9a1ddce45da7e1482b494e77 (diff) | |
| download | emacs-d8ed26bd07abb23acc9c1879776f5afc44ed4874.tar.gz 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/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 17a6179f356..9ad7da46ecf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2011-07-05 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Random fixes. E.g., (random) never returned negative values. | ||
| 4 | * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the | ||
| 5 | subseconds part to the entropy, as that's a bit more random. | ||
| 6 | Prefer signed to unsigned, since the signedness doesn't matter and | ||
| 7 | in general we prefer signed. When given a limit, use a | ||
| 8 | denominator equal to INTMASK + 1, not to VALMASK + 1, because the | ||
| 9 | latter isn't right if USE_2_TAGS_FOR_INTS. | ||
| 10 | * sysdep.c (get_random): Return a value in the range 0..INTMASK, | ||
| 11 | not 0..VALMASK. Don't discard "excess" bits that random () returns. | ||
| 12 | |||
| 1 | 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca> | 13 | 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 14 | ||
| 3 | * textprop.c (text_property_stickiness): | 15 | * textprop.c (text_property_stickiness): |