Expunge revision histories in files.
[u/mdw/catacomb] / gfreduce.c
index 929c46c..ae31d5c 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: gfreduce.c,v 1.3 2004/03/23 15:19:32 mdw Exp $
+ * $Id: gfreduce.c,v 1.5 2004/04/08 01:36:15 mdw Exp $
  *
  * Efficient reduction modulo sparse binary polynomials
  *
  * MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: gfreduce.c,v $
- * Revision 1.3  2004/03/23 15:19:32  mdw
- * Test elliptic curves more thoroughly.
- *
- * Revision 1.2  2004/03/21 22:52:06  mdw
- * Merge and close elliptic curve branch.
- *
- * Revision 1.1.2.1  2004/03/21 22:39:46  mdw
- * Elliptic curves on binary fields work.
- *
- */
-
 /*----- Header files ------------------------------------------------------*/
 
 #include <mLib/alloc.h>
@@ -98,7 +84,8 @@ DA_DECL(instr_v, gfreduce_instr);
 void gfreduce_create(gfreduce *r, mp *p)
 {
   instr_v iv = DA_INIT;
-  unsigned long d, dw;
+  unsigned long d;
+  unsigned dw;
   mpscan sc;
   unsigned long i;
   gfreduce_instr *ip;
@@ -162,8 +149,8 @@ void gfreduce_create(gfreduce *r, mp *p)
       w = ww;
       wi = DA_LEN(&iv);
     }
-    INSTR(GFRI_LSL, (i - d)%MPW_BITS);
-    if ((i - d)%MPW_BITS)
+    INSTR(GFRI_LSL, (MPW_BITS + i - d)%MPW_BITS);
+    if ((MPW_BITS + i - d)%MPW_BITS)
       f |= f_lsr;
   }
   wl = DA_LEN(&iv);