]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Split random number functions off io.c, so that they can be documented
authorMartin Mares <mj@ucw.cz>
Mon, 5 Jun 2000 11:46:40 +0000 (11:46 +0000)
committerMartin Mares <mj@ucw.cz>
Mon, 5 Jun 2000 11:46:40 +0000 (11:46 +0000)
separately.

sysdep/unix/Doc
sysdep/unix/Modules
sysdep/unix/io.c
sysdep/unix/random.c [new file with mode: 0644]

index d4dab05fe981eb8d12f5c4fd984f1d97c3d69045..5ab11b4c16b720dd77c268e38ffa0cce17b5efff 100644 (file)
@@ -1,4 +1,4 @@
 H UNIX system dependent parts
-S io.c
 S log.c
 S krt.c
+# io.c is documented under Resources
index 017623e73076fb7f8abdbfade48b1991c48ae603..2666f9d635fb5b231fed8a565f7ed78eb8a3a7ef 100644 (file)
@@ -5,6 +5,7 @@ io.c
 unix.h
 endian.h
 config.Y
+random.c
 
 krt.c
 krt.h
index 9d80b7dd278bda970fc2474cbc89660d1cb5eb1e..ca233113848263a3a914d7ec178865ece0248a50 100644 (file)
 #include "lib/unix.h"
 #include "lib/sysio.h"
 
-/*
- *     Random Numbers
- */
-
-u32
-random_u32(void)
-{
-  long int rand_low, rand_high;
-
-  rand_low = random();
-  rand_high = random();
-  return (rand_low & 0xffff) | ((rand_high & 0xffff) << 16);
-}
-
 /*
  *     Tracked Files
  */
diff --git a/sysdep/unix/random.c b/sysdep/unix/random.c
new file mode 100644 (file)
index 0000000..b1f5086
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ *     BIRD Internet Routing Daemon -- Random Numbers
+ *
+ *     (c) 2000 Martin Mares <mj@ucw.cz>
+ *
+ *     Can be freely distributed and used under the terms of the GNU GPL.
+ */
+
+#include <stdlib.h>
+
+#include "nest/bird.h"
+
+u32
+random_u32(void)
+{
+  long int rand_low, rand_high;
+
+  rand_low = random();
+  rand_high = random();
+  return (rand_low & 0xffff) | ((rand_high & 0xffff) << 16);
+}