reindent-20030715
[openafs.git] / src / des / make_p_table.c
index a344fec..ffcc5f5 100644 (file)
@@ -9,7 +9,8 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
-RCSID("$Header$");
+RCSID
+    ("$Header$");
 
 #include <mit-cpyright.h>
 #include <stdio.h>
@@ -23,51 +24,52 @@ RCSID("$Header$");
 static unsigned char P_temp[32];
 static afs_uint32 P_prime[4][256];
 
-void gen(FILE *stream)
+void
+gen(FILE * stream)
 {
-    register int i,j,k,m;
+    register int i, j, k, m;
     /* P permutes 32 bit input R1 into 32 bit output R2 */
 
 #ifdef BIG
     /* flip p into p_temp */
-    for (i = 0; i<32; i++)
-       P_temp[(int) P[rev_swap_bit_pos_0(i)]] = rev_swap_bit_pos_0(i);
+    for (i = 0; i < 32; i++)
+       P_temp[(int)P[rev_swap_bit_pos_0(i)]] = rev_swap_bit_pos_0(i);
 
     /*
      * now for each byte of input, figure out all possible combinations
      */
-    for (i = 0; i <4 ; i ++) { /* each input byte */
-       for (j = 0; j<256; j++) { /* each possible byte value */
+    for (i = 0; i < 4; i++) {  /* each input byte */
+       for (j = 0; j < 256; j++) {     /* each possible byte value */
            /* flip bit order */
            k = j;
            /* swap_byte_bits(j); */
-           for (m = 0; m < 8; m++) { /* each bit */
+           for (m = 0; m < 8; m++) {   /* each bit */
                if (k & (1 << m)) {
                    /* set output values */
-                   P_prime[i][j] |= 1 << P_temp[(i*8)+m];
+                   P_prime[i][j] |= 1 << P_temp[(i * 8) + m];
                }
            }
        }
     }
 
-    fprintf(stream,
-           "\n\tstatic afs_uint32 const P_prime[4][256] = {\n\t");
+    fprintf(stream, "\n\tstatic afs_uint32 const P_prime[4][256] = {\n\t");
     for (i = 0; i < 4; i++) {
-       fprintf(stream,"\n{ ");
+       fprintf(stream, "\n{ ");
        for (j = 0; j < 64; j++) {
-           fprintf(stream,"\n");
+           fprintf(stream, "\n");
            for (k = 0; k < 4; k++) {
-               fprintf(stream,"0x%08lX",(unsigned long)P_prime[i][j*4+k]);
+               fprintf(stream, "0x%08lX",
+                       (unsigned long)P_prime[i][j * 4 + k]);
                if ((j == 63) && (k == 3))
                    fprintf(stream, "}");
                if ((i == 3) && (j == 63) && (k == 3))
-                   fprintf(stream,"\n};");
+                   fprintf(stream, "\n};");
                else
-                   fprintf(stream,", ");
+                   fprintf(stream, ", ");
            }
        }
     }
 
 #endif
-    fprintf(stream,"\n");
+    fprintf(stream, "\n");
 }