add and use internal header for *rand48 lcg
authorRich Felker <dalias@aerifal.cx>
Sat, 8 Sep 2018 03:02:40 +0000 (23:02 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 12 Sep 2018 18:34:30 +0000 (14:34 -0400)
src/prng/__rand48_step.c
src/prng/__seed48.c
src/prng/drand48.c
src/prng/lcong48.c
src/prng/lrand48.c
src/prng/mrand48.c
src/prng/rand48.h [new file with mode: 0644]
src/prng/seed48.c

index 961d30f..94703d0 100644 (file)
@@ -1,4 +1,5 @@
 #include <stdint.h>
+#include "rand48.h"
 
 uint64_t __rand48_step(unsigned short *xi, unsigned short *lc)
 {
index 05a4539..e436b4d 100644 (file)
@@ -1 +1,3 @@
+#include "rand48.h"
+
 unsigned short __seed48[7] = { 0, 0, 0, 0xe66d, 0xdeec, 0x5, 0xb };
index d808353..08283e2 100644 (file)
@@ -1,8 +1,6 @@
 #include <stdlib.h>
 #include <inttypes.h>
-
-uint64_t __rand48_step(unsigned short *xi, unsigned short *lc);
-extern unsigned short __seed48[7];
+#include "rand48.h"
 
 double erand48(unsigned short s[3])
 {
index 32b27d4..030e514 100644 (file)
@@ -1,7 +1,6 @@
 #include <stdlib.h>
 #include <string.h>
-
-extern unsigned short __seed48[7];
+#include "rand48.h"
 
 void lcong48(unsigned short p[7])
 {
index a3c4e4e..07e2b78 100644 (file)
@@ -1,8 +1,6 @@
 #include <stdlib.h>
 #include <inttypes.h>
-
-uint64_t __rand48_step(unsigned short *xi, unsigned short *lc);
-extern unsigned short __seed48[7];
+#include "rand48.h"
 
 long nrand48(unsigned short s[3])
 {
index 0519d66..f4a56e6 100644 (file)
@@ -1,8 +1,6 @@
 #include <stdlib.h>
 #include <inttypes.h>
-
-uint64_t __rand48_step(unsigned short *xi, unsigned short *lc);
-extern unsigned short __seed48[7];
+#include "rand48.h"
 
 long jrand48(unsigned short s[3])
 {
diff --git a/src/prng/rand48.h b/src/prng/rand48.h
new file mode 100644 (file)
index 0000000..4ed6ae5
--- /dev/null
@@ -0,0 +1,4 @@
+#include <stdint.h>
+
+uint64_t __rand48_step(unsigned short *xi, unsigned short *lc);
+extern unsigned short __seed48[7];
index e0699c0..bce7b33 100644 (file)
@@ -1,7 +1,6 @@
 #include <stdlib.h>
 #include <string.h>
-
-extern unsigned short __seed48[7];
+#include "rand48.h"
 
 unsigned short *seed48(unsigned short *s)
 {