summaryrefslogtreecommitdiff
path: root/src/prng/seed48.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/prng/seed48.c')
-rw-r--r--src/prng/seed48.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/prng/seed48.c b/src/prng/seed48.c
new file mode 100644
index 00000000..e0699c09
--- /dev/null
+++ b/src/prng/seed48.c
@@ -0,0 +1,12 @@
+#include <stdlib.h>
+#include <string.h>
+
+extern unsigned short __seed48[7];
+
+unsigned short *seed48(unsigned short *s)
+{
+ static unsigned short p[3];
+ memcpy(p, __seed48, sizeof p);
+ memcpy(__seed48, s, sizeof p);
+ return p;
+}