Skip to content

Commit 764b23c

Browse files
committed
patch 7.4.1214
Problem: Using old style function declarations. Solution: Change to new style function declarations. (script by Hirohito Higashi)
1 parent 0554097 commit 764b23c

10 files changed

Lines changed: 1260 additions & 1889 deletions

File tree

src/search.c

Lines changed: 169 additions & 214 deletions
Large diffs are not rendered by default.

src/sha256.c

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ static void sha256_process(context_sha256_T *ctx, char_u data[64]);
4343
}
4444

4545
void
46-
sha256_start(ctx)
47-
context_sha256_T *ctx;
46+
sha256_start(context_sha256_T *ctx)
4847
{
4948
ctx->total[0] = 0;
5049
ctx->total[1] = 0;
@@ -60,9 +59,7 @@ sha256_start(ctx)
6059
}
6160

6261
static void
63-
sha256_process(ctx, data)
64-
context_sha256_T *ctx;
65-
char_u data[64];
62+
sha256_process(context_sha256_T *ctx, char_u data[64])
6663
{
6764
UINT32_T temp1, temp2, W[64];
6865
UINT32_T A, B, C, D, E, F, G, H;
@@ -194,10 +191,7 @@ sha256_process(ctx, data)
194191
}
195192

196193
void
197-
sha256_update(ctx, input, length)
198-
context_sha256_T *ctx;
199-
char_u *input;
200-
UINT32_T length;
194+
sha256_update(context_sha256_T *ctx, char_u *input, UINT32_T length)
201195
{
202196
UINT32_T left, fill;
203197

@@ -241,9 +235,7 @@ static char_u sha256_padding[64] = {
241235
};
242236

243237
void
244-
sha256_finish(ctx, digest)
245-
context_sha256_T *ctx;
246-
char_u digest[32];
238+
sha256_finish(context_sha256_T *ctx, char_u digest[32])
247239
{
248240
UINT32_T last, padn;
249241
UINT32_T high, low;
@@ -280,11 +272,11 @@ static unsigned int get_some_time(void);
280272
* if "salt" is not NULL also do "salt[salt_len]".
281273
*/
282274
char_u *
283-
sha256_bytes(buf, buf_len, salt, salt_len)
284-
char_u *buf;
285-
int buf_len;
286-
char_u *salt;
287-
int salt_len;
275+
sha256_bytes(
276+
char_u *buf,
277+
int buf_len,
278+
char_u *salt,
279+
int salt_len)
288280
{
289281
char_u sha256sum[32];
290282
static char_u hexit[65];
@@ -308,10 +300,10 @@ sha256_bytes(buf, buf_len, salt, salt_len)
308300
* Returns sha256(buf) as 64 hex chars in static array.
309301
*/
310302
char_u *
311-
sha256_key(buf, salt, salt_len)
312-
char_u *buf;
313-
char_u *salt;
314-
int salt_len;
303+
sha256_key(
304+
char_u *buf,
305+
char_u *salt,
306+
int salt_len)
315307
{
316308
/* No passwd means don't encrypt */
317309
if (buf == NULL || *buf == NUL)
@@ -344,7 +336,7 @@ static char *sha_self_test_vector[] = {
344336
* Return FAIL or OK.
345337
*/
346338
int
347-
sha256_self_test()
339+
sha256_self_test(void)
348340
{
349341
int i, j;
350342
char output[65];
@@ -389,7 +381,7 @@ sha256_self_test()
389381
}
390382

391383
static unsigned int
392-
get_some_time()
384+
get_some_time(void)
393385
{
394386
# ifdef HAVE_GETTIMEOFDAY
395387
struct timeval tv;
@@ -407,11 +399,11 @@ get_some_time()
407399
* Also "salt[salt_len]" when "salt" is not NULL.
408400
*/
409401
void
410-
sha2_seed(header, header_len, salt, salt_len)
411-
char_u *header;
412-
int header_len;
413-
char_u *salt;
414-
int salt_len;
402+
sha2_seed(
403+
char_u *header,
404+
int header_len,
405+
char_u *salt,
406+
int salt_len)
415407
{
416408
int i;
417409
static char_u random_data[1000];

0 commit comments

Comments
 (0)