X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/680bedf81bb4e939d3137ef0a4d9ca25a4638355..0f9bd85aa42c06b55d7a4e1693981233d95c62ff:/des-mktab.c diff --git a/des-mktab.c b/des-mktab.c index 1a984d1..9f27e62 100644 --- a/des-mktab.c +++ b/des-mktab.c @@ -1,13 +1,13 @@ /* -*-c-*- * - * $Id: des-mktab.c,v 1.3 2000/06/17 10:52:14 mdw Exp $ + * $Id: des-mktab.c,v 1.5 2004/04/08 01:36:15 mdw Exp $ * * Build combined S-P tables for DES * * (c) 1999 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of Catacomb. * @@ -15,32 +15,18 @@ * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. - * + * * Catacomb is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. - * + * * You should have received a copy of the GNU Library General Public * License along with Catacomb; if not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: des-mktab.c,v $ - * 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.1 1999/09/03 08:41:11 mdw - * Initial import. - * - */ - /*----- Header files ------------------------------------------------------*/ #include @@ -54,7 +40,7 @@ /* --- S boxes --- */ -static char s[8][4][16] = { +static const char s[8][4][16] = { /* --- S1 --- */ @@ -136,7 +122,7 @@ static char p[32] = { * unique. */ -static int unique(char *t, int base, int sz, const char *name, ...) +static int unique(const char *t, int base, int sz, const char *name, ...) { char u[32]; char nbuf[128]; @@ -278,11 +264,11 @@ int main(void) 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\