0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 7.4.1214

Problem:    Using old style function declarations.
Solution:   Change to new style function declarations. (script by Hirohito
            Higashi)
This commit is contained in:
Bram Moolenaar
2016-01-30 21:10:09 +01:00
parent 055409764c
commit 764b23c8fd
10 changed files with 1260 additions and 1889 deletions

View File

@@ -43,8 +43,7 @@ static void sha256_process(context_sha256_T *ctx, char_u data[64]);
}
void
sha256_start(ctx)
context_sha256_T *ctx;
sha256_start(context_sha256_T *ctx)
{
ctx->total[0] = 0;
ctx->total[1] = 0;
@@ -60,9 +59,7 @@ sha256_start(ctx)
}
static void
sha256_process(ctx, data)
context_sha256_T *ctx;
char_u data[64];
sha256_process(context_sha256_T *ctx, char_u data[64])
{
UINT32_T temp1, temp2, W[64];
UINT32_T A, B, C, D, E, F, G, H;
@@ -194,10 +191,7 @@ sha256_process(ctx, data)
}
void
sha256_update(ctx, input, length)
context_sha256_T *ctx;
char_u *input;
UINT32_T length;
sha256_update(context_sha256_T *ctx, char_u *input, UINT32_T length)
{
UINT32_T left, fill;
@@ -241,9 +235,7 @@ static char_u sha256_padding[64] = {
};
void
sha256_finish(ctx, digest)
context_sha256_T *ctx;
char_u digest[32];
sha256_finish(context_sha256_T *ctx, char_u digest[32])
{
UINT32_T last, padn;
UINT32_T high, low;
@@ -280,11 +272,11 @@ static unsigned int get_some_time(void);
* if "salt" is not NULL also do "salt[salt_len]".
*/
char_u *
sha256_bytes(buf, buf_len, salt, salt_len)
char_u *buf;
int buf_len;
char_u *salt;
int salt_len;
sha256_bytes(
char_u *buf,
int buf_len,
char_u *salt,
int salt_len)
{
char_u sha256sum[32];
static char_u hexit[65];
@@ -308,10 +300,10 @@ sha256_bytes(buf, buf_len, salt, salt_len)
* Returns sha256(buf) as 64 hex chars in static array.
*/
char_u *
sha256_key(buf, salt, salt_len)
char_u *buf;
char_u *salt;
int salt_len;
sha256_key(
char_u *buf,
char_u *salt,
int salt_len)
{
/* No passwd means don't encrypt */
if (buf == NULL || *buf == NUL)
@@ -344,7 +336,7 @@ static char *sha_self_test_vector[] = {
* Return FAIL or OK.
*/
int
sha256_self_test()
sha256_self_test(void)
{
int i, j;
char output[65];
@@ -389,7 +381,7 @@ sha256_self_test()
}
static unsigned int
get_some_time()
get_some_time(void)
{
# ifdef HAVE_GETTIMEOFDAY
struct timeval tv;
@@ -407,11 +399,11 @@ get_some_time()
* Also "salt[salt_len]" when "salt" is not NULL.
*/
void
sha2_seed(header, header_len, salt, salt_len)
char_u *header;
int header_len;
char_u *salt;
int salt_len;
sha2_seed(
char_u *header,
int header_len,
char_u *salt,
int salt_len)
{
int i;
static char_u random_data[1000];