summaryrefslogtreecommitdiff
path: root/src/librandom/randomegd_readb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/librandom/randomegd_readb.c')
-rw-r--r--src/librandom/randomegd_readb.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/librandom/randomegd_readb.c b/src/librandom/randomegd_readb.c
deleted file mode 100644
index 614f7a8..0000000
--- a/src/librandom/randomegd_readb.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* ISC license. */
-
-#include <skalibs/allreadwrite.h>
-#include <skalibs/randomegd.h>
-
-unsigned int randomegd_readb (int s, char *x, unsigned int n)
-{
- unsigned int w = 0 ;
- unsigned int i = 0 ;
- for (; i < (n / 255) ; i++)
- {
- char const c[2] = { 0x02, 0xFF } ;
- register unsigned int wtmp ;
- if (allwrite(s, c, 2) < 2) return w ;
- wtmp = allread(s, x + w, 255) ;
- w += wtmp ;
- if (wtmp < 255) return w ;
- }
- if (w < n)
- {
- char c[2] = "\002" ;
- c[1] = n - w ;
- if (allwrite(s, c, 2) < 2) return w ;
- w += allread(s, x + w, c[1]) ;
- }
- return w ;
-}