Root/
Source at commit 1077 created 13 years 1 month ago. By azimutz, Removing this info from DEBUG's realm. This will be enabled by default until i gather enough feedback to decide whether it will stay On or Off by default. This info display, is only available on Gui; ShowInfo=No disables it. For the Gui minimalist, "Boot Banner"=No also disables it. Ok, "house cleaning" is suspended until i figure out what Meklort's cooking over at that new branch... "rewrite" :-o just the name sounds scary :-D | |
---|---|
1 | /*␊ |
2 | * jrand48.c␊ |
3 | */␊ |
4 | ␊ |
5 | #include <stdlib.h>␊ |
6 | #include <stdint.h>␊ |
7 | ␊ |
8 | long jrand48(unsigned short xsubi[3])␊ |
9 | {␊ |
10 | ␉uint64_t x;␊ |
11 | ␊ |
12 | ␉/* The xsubi[] array is littleendian by spec */␊ |
13 | ␉x = (uint64_t) (uint16_t) xsubi[0] +␊ |
14 | ␉ ((uint64_t) (uint16_t) xsubi[1] << 16) +␊ |
15 | ␉ ((uint64_t) (uint16_t) xsubi[2] << 32);␊ |
16 | ␊ |
17 | ␉x = (0x5deece66dULL * x) + 0xb;␊ |
18 | ␊ |
19 | ␉xsubi[0] = (unsigned short)(uint16_t) x;␊ |
20 | ␉xsubi[1] = (unsigned short)(uint16_t) (x >> 16);␊ |
21 | ␉xsubi[2] = (unsigned short)(uint16_t) (x >> 32);␊ |
22 | ␊ |
23 | ␉return (long)(int32_t) (x >> 16);␊ |
24 | }␊ |
25 |