~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
math/t/mpx-mul4: Fix comment markers.
[catacomb]
/
symm
/
des-mktab.c
diff --git
a/symm/des-mktab.c
b/symm/des-mktab.c
index
5dc8c4a
..
aa01a9c
100644
(file)
--- a/
symm/des-mktab.c
+++ b/
symm/des-mktab.c
@@
-33,6
+33,7
@@
#include <string.h>
#include <mLib/bits.h>
#include <string.h>
#include <mLib/bits.h>
+#include <mLib/macros.h>
/*----- Static variables --------------------------------------------------*/
/*----- Static variables --------------------------------------------------*/
@@
-120,7
+121,8
@@
static char p[32] = {
* unique.
*/
* unique.
*/
-static int unique(const char *t, int base, int sz, const char *name, ...)
+static int PRINTF_LIKE(4, 5)
+ unique(const char *t, int base, int sz, const char *name, ...)
{
char u[32];
char nbuf[128];
{
char u[32];
char nbuf[128];
@@
-246,33
+248,24
@@
int main(void)
* DES tables [generated]\n\
*/\n\
\n\
* DES tables [generated]\n\
*/\n\
\n\
-#ifndef CATACOMB_DES_TAB_H\n\
-#define CATACOMB_DES_TAB_H\n\
+#include \"des-base.h\"\n\
\n\
\n\
-
#define DES_SP { \\
\n\
+
const uint32 des_sp[8][64] = {
\n\
", stdout);
for (i = 0; i < 8; i++) {
mangle(s[i], ss, 28 - 4 * i);
", stdout);
for (i = 0; i < 8; i++) {
mangle(s[i], ss, 28 - 4 * i);
- printf("\
- \\\n\
- /* --- SP[%i] --- */ \\\n\
- \\\n\
-", i);
+ printf("\n /* --- SP[%i] --- */\n\n", i);
sep = " { ";
for (j = 0; j < 64; j++) {
printf("%s0x%08lx", sep, ss[j]);
if (j % 4 == 3)
sep = " { ";
for (j = 0; j < 64; j++) {
printf("%s0x%08lx", sep, ss[j]);
if (j % 4 == 3)
- sep = ",
\\
\n ";
+ sep = ",\n ";
else
sep = ", ";
}
else
sep = ", ";
}
- printf(" }%s
\\
\n", i == 7 ? "" : ",");
+ printf(" }%s\n", i == 7 ? "" : ",");
}
}
- fputs("\
-}\n\
-\n\
-#endif\n\
-", stdout);
+ fputs("};\n", stdout);
if (fclose(stdout)) {
fprintf(stderr, "error writing data\n");
if (fclose(stdout)) {
fprintf(stderr, "error writing data\n");