#include <string.h>
#include <mLib/bits.h>
+#include <mLib/macros.h>
/*----- Static variables --------------------------------------------------*/
* 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];
* DES tables [generated]\n\
*/\n\
\n\
-#ifndef CATACOMB_DES_TAB_H\n\
-#define CATACOMB_DES_TAB_H\n\
+#include \"des-base.h\"\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);
- 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 = ", \\\n ";
+ sep = ",\n ";
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");