ffa_ch8_randomism.kv 1
ffa_ch8_randomism.kv 2
ffa_ch8_randomism.kv 3
ffa_ch8_randomism.kv 4
ffa_ch8_randomism.kv 5
ffa_ch8_randomism.kv 6
ffa_ch8_randomism.kv 7
ffa_ch8_randomism.kv 8
ffa_ch8_randomism.kv 9
ffa_ch8_randomism.kv 10
ffa_ch8_randomism.kv 11
ffa_ch8_randomism.kv 12
ffa_ch8_randomism.kv 13
ffa_ch8_randomism.kv 14
ffa_ch8_randomism.kv 15
ffa_ch8_randomism.kv 16
ffa_ch8_randomism.kv 17
ffa_ch8_randomism.kv 18
ffa_ch8_randomism.kv 19
ffa_ch8_randomism.kv 20 with OS; use OS;
ffa_ch8_randomism.kv 21
ffa_ch8_randomism.kv 22 with FZ_Type; use FZ_Type;
ffa_ch8_randomism.kv 23
ffa_ch8_randomism.kv 24
ffa_ch8_randomism.kv 25 package body FFA_RNG is
ffa_ch8_randomism.kv 26
ffa_ch8_randomism.kv 27
ffa_ch8_randomism.kv 28 procedure Init_RNG(RNG : out RNG_Device;
ffa_ch8_randomism.kv 29 RNG_Unix_Path : in String := Default_RNG_Path) is
ffa_ch8_randomism.kv 30 begin
ffa_ch8_randomism.kv 31 begin
ffa_ch8_randomism.kv 32
ffa_ch8_randomism.kv 33 Word_IO.Open(File => RNG.F,
ffa_ch8_randomism.kv 34 Mode => Word_IO.In_File,
ffa_ch8_randomism.kv 35 Name => RNG_Unix_Path);
ffa_ch8_randomism.kv 36 exception
ffa_ch8_randomism.kv 37 when others =>
ffa_ch8_randomism.kv 38 Eggog("Could not open RNG at : " & RNG_Unix_Path & "!");
ffa_ch8_randomism.kv 39 end;
ffa_ch8_randomism.kv 40 end Init_RNG;
ffa_ch8_randomism.kv 41
ffa_ch8_randomism.kv 42
ffa_ch8_randomism.kv 43
ffa_ch8_randomism.kv 44 procedure FZ_Random(RNG : in RNG_Device;
ffa_ch8_randomism.kv 45 N : out FZ) is
ffa_ch8_randomism.kv 46 begin
ffa_ch8_randomism.kv 47 begin
ffa_ch8_randomism.kv 48
ffa_ch8_randomism.kv 49 for i in N'Range loop
ffa_ch8_randomism.kv 50 Word_IO.Read(RNG.F, N(i));
ffa_ch8_randomism.kv 51 end loop;
ffa_ch8_randomism.kv 52 exception
ffa_ch8_randomism.kv 53 when others =>
ffa_ch8_randomism.kv 54 Eggog("Could not read from RNG!");
ffa_ch8_randomism.kv 55 end;
ffa_ch8_randomism.kv 56 end FZ_Random;
ffa_ch8_randomism.kv 57
ffa_ch8_randomism.kv 58 end FFA_RNG;