commit 80c5ab46ba3651b98bbcb4b8bf74bb9500829608
parent 8f931fba1350142edb9a076f91cd452181f3c10d
Author: sin <sin@2f30.org>
Date: Tue, 12 Nov 2013 13:36:58 +0000
Fix style for function definitions
Diffstat:
4 files changed, 40 insertions(+), 20 deletions(-)
diff --git a/util/md5.c b/util/md5.c
@@ -24,7 +24,8 @@ static const uint32_t tab[64] = {
0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391
};
-static void processblock(struct md5 *s, const uint8_t *buf)
+static void
+processblock(struct md5 *s, const uint8_t *buf)
{
uint32_t i, W[16], a, b, c, d;
@@ -72,7 +73,8 @@ static void processblock(struct md5 *s, const uint8_t *buf)
s->h[3] += d;
}
-static void pad(struct md5 *s)
+static void
+pad(struct md5 *s)
{
unsigned r = s->len % 64;
@@ -95,7 +97,8 @@ static void pad(struct md5 *s)
processblock(s, s->buf);
}
-void md5_init(void *ctx)
+void
+md5_init(void *ctx)
{
struct md5 *s = ctx;
s->len = 0;
@@ -105,7 +108,8 @@ void md5_init(void *ctx)
s->h[3] = 0x10325476;
}
-void md5_sum(void *ctx, uint8_t md[MD5_DIGEST_LENGTH])
+void
+md5_sum(void *ctx, uint8_t md[MD5_DIGEST_LENGTH])
{
struct md5 *s = ctx;
int i;
@@ -119,7 +123,8 @@ void md5_sum(void *ctx, uint8_t md[MD5_DIGEST_LENGTH])
}
}
-void md5_update(void *ctx, const void *m, unsigned long len)
+void
+md5_update(void *ctx, const void *m, unsigned long len)
{
struct md5 *s = ctx;
const uint8_t *p = m;
diff --git a/util/sha1.c b/util/sha1.c
@@ -13,7 +13,8 @@ static uint32_t rol(uint32_t n, int k) { return (n << k) | (n >> (32-k)); }
#define G2(a,b,c,d,e,i) e += rol(a,5)+F2(b,c,d)+W[i]+0x8F1BBCDC; b = rol(b,30)
#define G3(a,b,c,d,e,i) e += rol(a,5)+F3(b,c,d)+W[i]+0xCA62C1D6; b = rol(b,30)
-static void processblock(struct sha1 *s, const uint8_t *buf)
+static void
+processblock(struct sha1 *s, const uint8_t *buf)
{
uint32_t W[80], a, b, c, d, e;
int i;
@@ -66,7 +67,8 @@ static void processblock(struct sha1 *s, const uint8_t *buf)
s->h[4] += e;
}
-static void pad(struct sha1 *s)
+static void
+pad(struct sha1 *s)
{
unsigned r = s->len % 64;
@@ -89,7 +91,8 @@ static void pad(struct sha1 *s)
processblock(s, s->buf);
}
-void sha1_init(void *ctx)
+void
+sha1_init(void *ctx)
{
struct sha1 *s = ctx;
@@ -101,7 +104,8 @@ void sha1_init(void *ctx)
s->h[4] = 0xC3D2E1F0;
}
-void sha1_sum(void *ctx, uint8_t md[SHA1_DIGEST_LENGTH])
+void
+sha1_sum(void *ctx, uint8_t md[SHA1_DIGEST_LENGTH])
{
struct sha1 *s = ctx;
int i;
@@ -115,7 +119,8 @@ void sha1_sum(void *ctx, uint8_t md[SHA1_DIGEST_LENGTH])
}
}
-void sha1_update(void *ctx, const void *m, unsigned long len)
+void
+sha1_update(void *ctx, const void *m, unsigned long len)
{
struct sha1 *s = ctx;
const uint8_t *p = m;
diff --git a/util/sha256.c b/util/sha256.c
@@ -25,7 +25,8 @@ static const uint32_t K[64] = {
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
};
-static void processblock(struct sha256 *s, const uint8_t *buf)
+static void
+processblock(struct sha256 *s, const uint8_t *buf)
{
uint32_t W[64], t1, t2, a, b, c, d, e, f, g, h;
int i;
@@ -68,7 +69,8 @@ static void processblock(struct sha256 *s, const uint8_t *buf)
s->h[7] += h;
}
-static void pad(struct sha256 *s)
+static void
+pad(struct sha256 *s)
{
unsigned r = s->len % 64;
@@ -91,7 +93,8 @@ static void pad(struct sha256 *s)
processblock(s, s->buf);
}
-void sha256_init(void *ctx)
+void
+sha256_init(void *ctx)
{
struct sha256 *s = ctx;
s->len = 0;
@@ -105,7 +108,8 @@ void sha256_init(void *ctx)
s->h[7] = 0x5be0cd19;
}
-void sha256_sum(void *ctx, uint8_t md[SHA256_DIGEST_LENGTH])
+void
+sha256_sum(void *ctx, uint8_t md[SHA256_DIGEST_LENGTH])
{
struct sha256 *s = ctx;
int i;
@@ -119,7 +123,8 @@ void sha256_sum(void *ctx, uint8_t md[SHA256_DIGEST_LENGTH])
}
}
-void sha256_update(void *ctx, const void *m, unsigned long len)
+void
+sha256_update(void *ctx, const void *m, unsigned long len)
{
struct sha256 *s = ctx;
const uint8_t *p = m;
diff --git a/util/sha512.c b/util/sha512.c
@@ -38,7 +38,8 @@ static const uint64_t K[80] = {
0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL, 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL
};
-static void processblock(struct sha512 *s, const uint8_t *buf)
+static void
+processblock(struct sha512 *s, const uint8_t *buf)
{
uint64_t W[80], t1, t2, a, b, c, d, e, f, g, h;
int i;
@@ -85,7 +86,8 @@ static void processblock(struct sha512 *s, const uint8_t *buf)
s->h[7] += h;
}
-static void pad(struct sha512 *s)
+static void
+pad(struct sha512 *s)
{
unsigned r = s->len % 128;
@@ -108,7 +110,8 @@ static void pad(struct sha512 *s)
processblock(s, s->buf);
}
-void sha512_init(void *ctx)
+void
+sha512_init(void *ctx)
{
struct sha512 *s = ctx;
s->len = 0;
@@ -122,7 +125,8 @@ void sha512_init(void *ctx)
s->h[7] = 0x5be0cd19137e2179ULL;
}
-void sha512_sum(void *ctx, uint8_t md[SHA512_DIGEST_LENGTH])
+void
+sha512_sum(void *ctx, uint8_t md[SHA512_DIGEST_LENGTH])
{
struct sha512 *s = ctx;
int i;
@@ -140,7 +144,8 @@ void sha512_sum(void *ctx, uint8_t md[SHA512_DIGEST_LENGTH])
}
}
-void sha512_update(void *ctx, const void *m, unsigned long len)
+void
+sha512_update(void *ctx, const void *m, unsigned long len)
{
struct sha512 *s = ctx;
const uint8_t *p = m;