projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
utils/mpreducetests.py: Tool to generate unpleasant mpreduce tests.
[u/mdw/catacomb]
/
des-mktab.c
diff --git
a/des-mktab.c
b/des-mktab.c
index
07cff39
..
e41e372
100644
(file)
--- a/
des-mktab.c
+++ b/
des-mktab.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: des-mktab.c,v 1.
1 1999/09/03 08:41:11
mdw Exp $
+ * $Id: des-mktab.c,v 1.
5 2004/04/08 01:36:15
mdw Exp $
*
* Build combined S-P tables for DES
*
*
* Build combined S-P tables for DES
*
@@
-27,14
+27,6
@@
* MA 02111-1307, USA.
*/
* MA 02111-1307, USA.
*/
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: des-mktab.c,v $
- * Revision 1.1 1999/09/03 08:41:11 mdw
- * Initial import.
- *
- */
-
/*----- Header files ------------------------------------------------------*/
#include <stdarg.h>
/*----- Header files ------------------------------------------------------*/
#include <stdarg.h>
@@
-48,7
+40,7
@@
/* --- S boxes --- */
/* --- S boxes --- */
-static char s[8][4][16] = {
+static c
onst c
har s[8][4][16] = {
/* --- S1 --- */
/* --- S1 --- */
@@
-130,7
+122,7
@@
static char p[32] = {
* unique.
*/
* unique.
*/
-static int unique(char *t, int base, int sz, const char *name, ...)
+static int unique(c
onst c
har *t, int base, int sz, const char *name, ...)
{
char u[32];
char nbuf[128];
{
char u[32];
char nbuf[128];
@@
-251,7
+243,13
@@
int main(void)
validate();
fputs("\
validate();
fputs("\
-/* DES SP table (generated) */\n\
+/* -*-c-*-\n\
+ *\n\
+ * DES tables [generated]\n\
+ */\n\
+\n\
+#ifndef CATACOMB_DES_TAB_H\n\
+#define CATACOMB_DES_TAB_H\n\
\n\
#define DES_SP { \\\n\
", stdout);
\n\
#define DES_SP { \\\n\
", stdout);
@@
-272,7
+270,17
@@
int main(void)
}
printf(" }%s \\\n", i == 7 ? "" : ",");
}
}
printf(" }%s \\\n", i == 7 ? "" : ",");
}
- fputs("}\n", stdout);
+ fputs("\
+}\n\
+\n\
+#endif\n\
+", stdout);
+
+ if (fclose(stdout)) {
+ fprintf(stderr, "error writing data\n");
+ exit(EXIT_FAILURE);
+ }
+
return (0);
}
return (0);
}