General utilities cleanup. Add signature support to catcrypt. Throw in
[u/mdw/catacomb] / maurer.c
index 9846f89..e657969 100644 (file)
--- a/maurer.c
+++ b/maurer.c
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: maurer.c,v 1.2 2000/08/11 21:34:59 mdw Exp $
+ * $Id: maurer.c,v 1.4 2004/04/08 01:36:15 mdw Exp $
  *
  * Maurer's universal statistical test
  *
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: maurer.c,v $
- * Revision 1.2  2000/08/11 21:34:59  mdw
- * New restartable interface to Maurer testing.
- *
- * Revision 1.1  2000/06/17 11:29:49  mdw
- * Maurer's universal statistical test.
- *
- */
-
 /*----- Header files ------------------------------------------------------*/
 
 #include <assert.h>
@@ -60,33 +49,6 @@ typedef struct bitscan {
 
 /*----- Main code ---------------------------------------------------------*/
 
-/* --- @more@ --- *
- *
- * Arguments:  @bitscan *b@ = pointer to a bitscanner structure
- *             @unsigned l@ = number of bits wanted
- *
- * Returns:    An integer representing the next @l@ bits of the stream.
- *
- * Use:                Fetches the next @l@ bits of a data stream.  The bitscanner
- *             has no way of knowing whether it's run out of data, so make
- *             sure that doesn't happen.
- */
-
-static unsigned more(bitscan *b, unsigned l)
-{
-  unsigned x, m;
-
-  while (b->b < l) {
-    b->a |= U8(*b->p++) << b->b;
-    b->b += 8;
-  }
-  m = (1 << l) - 1;
-  x = b->a & m;
-  b->a >>= l;
-  b->b -= l;
-  return (x);
-}
-
 /* --- @maurer_init@ --- *
  *
  * Arguments:  @maurer_ctx *m@ = pointer to a context to initialize