parisc-linux-initial-support-20011008
[openafs.git] / src / des / make_e.c
1 /*
2  * Copyright 1987, 1988 by the Massachusetts Institute of Technology.
3  *
4  * For copying and distribution information, please see the file
5  * <mit-copyright.h>.
6  *
7  * Part of the MIT Project Athena Kerberos encryption system,
8  * originally written 8/85 by Steve Miller.
9  */
10
11 #include <afsconfig.h>
12 #include <afs/param.h>
13
14 RCSID("$Header$");
15
16 #include <mit-cpyright.h>
17 #include <stdio.h>
18 #include "tables.h"
19
20 #include "AFS_component_version_number.c"
21
22 main()
23 {
24     register i;
25
26     /* clear the output */
27     fprintf(stdout,"\n\tL2 = 0; R2 = 0;");
28
29     /* only take bits from R1, put into either L2 or R2 */
30     /* first setup E */
31     fprintf(stdout,"\n/* E operations */\n/* right to left */\n");
32     /* first list mapping from left to left */
33
34     for (i = 0; i <= 31; i++)
35         if (E[i] < 32)
36             fprintf(stdout,
37                     "\n\tif (R1 & (1<<%d)) L2 |= 1<<%d;",E[i],i);
38
39     fprintf(stdout,"\n\n/* now from right to right */\n");
40     /*  list mapping from left to right */
41     for (i = 32; i <= 47; i++)
42         if (E[i] <32)
43             fprintf(stdout,
44                     "\n\tif (R1 & (1<<%d)) R2 |= 1<<%d;",E[i],i-32);
45
46     fprintf(stdout,"\n");
47 }