[gtk-vnc] Update to use modern function decl style
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Update to use modern function decl style
- Date: Fri, 10 Feb 2012 17:16:26 +0000 (UTC)
commit 8d1af921b90ccd1947c25b06cdb87c2d36aaa03b
Author: Daniel P. Berrange <berrange redhat com>
Date: Fri Feb 10 17:00:50 2012 +0000
Update to use modern function decl style
src/d3des.c | 70 ++++++++++++++++------------------------------------------
1 files changed, 20 insertions(+), 50 deletions(-)
---
diff --git a/src/d3des.c b/src/d3des.c
index 081673e..efa0106 100644
--- a/src/d3des.c
+++ b/src/d3des.c
@@ -69,9 +69,7 @@ static unsigned char pc2[48] = {
40, 51, 30, 36, 46, 54, 29, 39, 50, 44, 32, 47,
43, 48, 38, 55, 33, 52, 45, 41, 49, 35, 28, 31 };
-void deskey(key, edf) /* Thanks to James Gillogly & Phil Karn! */
- unsigned char *key;
- short edf;
+void deskey(unsigned char *key, short edf) /* Thanks to James Gillogly & Phil Karn! */
{
int i, j, l, m, n;
unsigned char pc1m[56], pcr[56];
@@ -106,8 +104,7 @@ void deskey(key, edf) /* Thanks to James Gillogly & Phil Karn! */
return;
}
-static void cookey(raw1)
- unsigned long *raw1;
+static void cookey(unsigned long *raw1)
{
unsigned long *cook, *raw0;
unsigned long dough[32];
@@ -129,8 +126,7 @@ static void cookey(raw1)
return;
}
-void cpkey(into)
- unsigned long *into;
+void cpkey(unsigned long *into)
{
unsigned long *from, *endp;
@@ -139,8 +135,7 @@ void cpkey(into)
return;
}
-void usekey(from)
- unsigned long *from;
+void usekey(unsigned long *from)
{
unsigned long *to, *endp;
@@ -149,8 +144,7 @@ void usekey(from)
return;
}
-void des(inblock, outblock)
- unsigned char *inblock, *outblock;
+void des(unsigned char *inblock, unsigned char *outblock)
{
unsigned long work[2];
@@ -161,9 +155,7 @@ void des(inblock, outblock)
}
-static void scrunch(outof, into)
- unsigned char *outof;
- unsigned long *into;
+static void scrunch(unsigned char *outof, unsigned long *into)
{
*into = (*outof++ & 0xffL) << 24;
*into |= (*outof++ & 0xffL) << 16;
@@ -177,9 +169,7 @@ static void scrunch(outof, into)
}
-static void unscrun(outof, into)
- unsigned long *outof;
- unsigned char *into;
+static void unscrun(unsigned long *outof, unsigned char *into)
{
*into++ = (*outof >> 24) & 0xffL;
*into++ = (*outof >> 16) & 0xffL;
@@ -336,8 +326,7 @@ static unsigned long SP8[64] = {
0x10041040L, 0x00041000L, 0x00041000L, 0x00001040L,
0x00001040L, 0x00040040L, 0x10000000L, 0x10041000L };
-static void desfunc(block, keys)
- unsigned long *block, *keys;
+static void desfunc(unsigned long *block, unsigned long *keys)
{
unsigned long fval, work, right, leftt;
int round;
@@ -413,9 +402,7 @@ static void desfunc(block, keys)
#ifdef D2_DES
-void des2key(hexkey, mode) /* stomps on Kn3 too */
- unsigned char *hexkey; /* unsigned char[16] */
- short mode;
+void des2key(unsigned char *hexkey, short mode) /* stomps on Kn3 too */
{
short revmod;
@@ -427,8 +414,7 @@ void des2key(hexkey, mode) /* stomps on Kn3 too */
return;
}
-void Ddes(from, into)
- unsigned char *from, *into; /* unsigned char[8] */
+void Ddes(unsigned char *from, unsigned char *into)
{
unsigned long work[2];
@@ -440,9 +426,7 @@ void Ddes(from, into)
return;
}
-void D2des(from, into)
- unsigned char *from; /* unsigned char[16] */
- unsigned char *into; /* unsigned char[16] */
+void D2des(unsigned char *from, unsigned char *into)
{
unsigned long *right, *l1, swap;
unsigned long leftt[2], bufR[2];
@@ -468,9 +452,7 @@ void D2des(from, into)
return;
}
-void makekey(aptr, kptr)
- char *aptr; /* NULL-terminated */
- unsigned char *kptr; /* unsigned char[8] */
+void makekey(char *aptr, unsigned char *kptr)
{
unsigned char *store;
int first, i;
@@ -493,9 +475,7 @@ void makekey(aptr, kptr)
return;
}
-void make2key(aptr, kptr)
- char *aptr; /* NULL-terminated */
- unsigned char *kptr; /* unsigned char[16] */
+void make2key(char *aptr, unsigned char *kptr)
{
unsigned char *store;
int first, i;
@@ -520,8 +500,7 @@ void make2key(aptr, kptr)
#ifndef D3_DES /* D2_DES only */
-void cp2key(into)
- unsigned long *into; /* unsigned long[64] */
+void cp2key(unsigned long *into)
{
unsigned long *from, *endp;
@@ -532,8 +511,7 @@ void cp2key(into)
return;
}
-void use2key(from) /* stomps on Kn3 too */
- unsigned long *from; /* unsigned long[64] */
+void use2key(unsigned long *from) /* stomps on Kn3 too */
{
unsigned long *to, *endp;
@@ -547,9 +525,7 @@ void use2key(from) /* stomps on Kn3 too */
#else /* D3_DES too */
-void des3key(hexkey, mode)
- unsigned char *hexkey; /* unsigned char[24] */
- short mode;
+void des3key(unsigned char *hexkey, short mode)
{
unsigned char *first, *third;
short revmod;
@@ -572,8 +548,7 @@ void des3key(hexkey, mode)
return;
}
-void cp3key(into)
- unsigned long *into; /* unsigned long[96] */
+void cp3key(unsigned long *into)
{
unsigned long *from, *endp;
@@ -586,8 +561,7 @@ void cp3key(into)
return;
}
-void use3key(from)
- unsigned long *from; /* unsigned long[96] */
+void use3key(unsigned long *from)
{
unsigned long *to, *endp;
@@ -602,9 +576,7 @@ void use3key(from)
static void D3des(unsigned char *, unsigned char *);
-static void D3des(from, into) /* amateur theatrics */
- unsigned char *from; /* unsigned char[24] */
- unsigned char *into; /* unsigned char[24] */
+static void D3des(unsigned char *from, unsigned char *into) /* amateur theatrics */
{
unsigned long swap, leftt[2], middl[2], right[2];
@@ -638,9 +610,7 @@ static void D3des(from, into) /* amateur theatrics */
return;
}
-void make3key(aptr, kptr)
- char *aptr; /* NULL-terminated */
- unsigned char *kptr; /* unsigned char[24] */
+void make3key(char *aptr, unsigned char *kptr)
{
unsigned char *store;
int first, i;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]