projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
key-binary.c
[u/mdw/catacomb]
/
des-mktab.c
diff --git
a/des-mktab.c
b/des-mktab.c
index
ed03fbc
..
a4914b2
100644
(file)
--- a/
des-mktab.c
+++ b/
des-mktab.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: des-mktab.c,v 1.
2 1999/12/22 16:02:30
mdw Exp $
+ * $Id: des-mktab.c,v 1.
4 2000/10/08 12:12:23
mdw Exp $
*
* Build combined S-P tables for DES
*
*
* Build combined S-P tables for DES
*
@@
-30,6
+30,12
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: des-mktab.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: des-mktab.c,v $
+ * Revision 1.4 2000/10/08 12:12:23 mdw
+ * Improve @const@-correctness.
+ *
+ * Revision 1.3 2000/06/17 10:52:14 mdw
+ * Change name for S-box header file.
+ *
* Revision 1.2 1999/12/22 16:02:30 mdw
* Output the table with the correct new header guard names.
*
* Revision 1.2 1999/12/22 16:02:30 mdw
* Output the table with the correct new header guard names.
*
@@
-51,7
+57,7
@@
/* --- S boxes --- */
/* --- S boxes --- */
-static char s[8][4][16] = {
+static c
onst c
har s[8][4][16] = {
/* --- S1 --- */
/* --- S1 --- */
@@
-133,7
+139,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];
@@
-256,11
+262,11
@@
int main(void)
fputs("\
/* -*-c-*-\n\
*\n\
fputs("\
/* -*-c-*-\n\
*\n\
- * DES
SP table
[generated]\n\
+ * DES
tables
[generated]\n\
*/\n\
\n\
*/\n\
\n\
-#ifndef CATACOMB_DES_
SP
_H\n\
-#define CATACOMB_DES_
SP
_H\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);
@@
-286,6
+292,12
@@
int main(void)
\n\
#endif\n\
", stdout);
\n\
#endif\n\
", stdout);
+
+ if (fclose(stdout)) {
+ fprintf(stderr, "error writing data\n");
+ exit(EXIT_FAILURE);
+ }
+
return (0);
}
return (0);
}