mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix a bunch of compiler warnings
Caused by ancient (K&R?) syntax
This commit is contained in:
parent
3fa26cc7b7
commit
664e620fab
@ -60,9 +60,7 @@ static unsigned char pc2[48] = {
|
|||||||
40, 51, 30, 36, 46, 54, 29, 39, 50, 44, 32, 47,
|
40, 51, 30, 36, 46, 54, 29, 39, 50, 44, 32, 47,
|
||||||
43, 48, 38, 55, 33, 52, 45, 41, 49, 35, 28, 31 };
|
43, 48, 38, 55, 33, 52, 45, 41, 49, 35, 28, 31 };
|
||||||
|
|
||||||
void deskey(key, edf) /* Thanks to James Gillogly & Phil Karn! */
|
void deskey(unsigned char *key, short edf) /* Thanks to James Gillogly & Phil Karn! */
|
||||||
unsigned char *key;
|
|
||||||
short edf;
|
|
||||||
{
|
{
|
||||||
int i, j, l, m, n;
|
int i, j, l, m, n;
|
||||||
unsigned char pc1m[56], pcr[56];
|
unsigned char pc1m[56], pcr[56];
|
||||||
@ -97,8 +95,7 @@ short edf;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cookey(raw1)
|
static void cookey(unsigned long *raw1)
|
||||||
unsigned long *raw1;
|
|
||||||
{
|
{
|
||||||
unsigned long *cook, *raw0;
|
unsigned long *cook, *raw0;
|
||||||
unsigned long dough[32];
|
unsigned long dough[32];
|
||||||
@ -120,8 +117,7 @@ unsigned long *raw1;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cpkey(into)
|
void cpkey(unsigned long *into)
|
||||||
unsigned long *into;
|
|
||||||
{
|
{
|
||||||
unsigned long *from, *endp;
|
unsigned long *from, *endp;
|
||||||
|
|
||||||
@ -130,8 +126,7 @@ unsigned long *into;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void usekey(from)
|
void usekey(unsigned long *from)
|
||||||
unsigned long *from;
|
|
||||||
{
|
{
|
||||||
unsigned long *to, *endp;
|
unsigned long *to, *endp;
|
||||||
|
|
||||||
@ -140,8 +135,7 @@ unsigned long *from;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void des(inblock, outblock)
|
void des(unsigned char *inblock, unsigned char *outblock)
|
||||||
unsigned char *inblock, *outblock;
|
|
||||||
{
|
{
|
||||||
unsigned long work[2];
|
unsigned long work[2];
|
||||||
|
|
||||||
@ -152,9 +146,7 @@ unsigned char *inblock, *outblock;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void scrunch(outof, into)
|
static void scrunch(unsigned char *outof, unsigned long *into)
|
||||||
unsigned char *outof;
|
|
||||||
unsigned long *into;
|
|
||||||
{
|
{
|
||||||
*into = (*outof++ & 0xffL) << 24;
|
*into = (*outof++ & 0xffL) << 24;
|
||||||
*into |= (*outof++ & 0xffL) << 16;
|
*into |= (*outof++ & 0xffL) << 16;
|
||||||
@ -168,9 +160,7 @@ unsigned long *into;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void unscrun(outof, into)
|
static void unscrun(unsigned long *outof, unsigned char *into)
|
||||||
unsigned long *outof;
|
|
||||||
unsigned char *into;
|
|
||||||
{
|
{
|
||||||
*into++ = (*outof >> 24) & 0xffL;
|
*into++ = (*outof >> 24) & 0xffL;
|
||||||
*into++ = (*outof >> 16) & 0xffL;
|
*into++ = (*outof >> 16) & 0xffL;
|
||||||
@ -331,8 +321,7 @@ static unsigned long SP8[64] = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
static void desfunc(block, keys)
|
static void desfunc(unsigned long *block, unsigned long *keys)
|
||||||
unsigned long *block, *keys;
|
|
||||||
{
|
{
|
||||||
unsigned long fval, work, right, leftt;
|
unsigned long fval, work, right, leftt;
|
||||||
int round;
|
int round;
|
||||||
@ -408,9 +397,7 @@ unsigned long *block, *keys;
|
|||||||
|
|
||||||
#ifdef D2_DES
|
#ifdef D2_DES
|
||||||
|
|
||||||
void des2key(hexkey, mode) /* stomps on Kn3 too */
|
static void des2key(unsigned char *hexkey, short mode) /* stomps on Kn3 too */
|
||||||
unsigned char *hexkey; /* unsigned char[16] */
|
|
||||||
short mode;
|
|
||||||
{
|
{
|
||||||
short revmod;
|
short revmod;
|
||||||
|
|
||||||
@ -690,4 +677,3 @@ unsigned char *kptr; /* unsigned char[24] */
|
|||||||
*
|
*
|
||||||
* d3des V5.09 rwo 9208.04 20:31 Graven Imagery
|
* d3des V5.09 rwo 9208.04 20:31 Graven Imagery
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user