Mercurial > vim
comparison src/crypt_zip.c @ 7817:83861277e6a3 v7.4.1205
commit https://github.com/vim/vim/commit/7454a06e2642d2b37afad1c5e71cec68081ca4ff
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 30 15:14:10 2016 +0100
patch 7.4.1205
Problem: Using old style function declarations.
Solution: Change to new style function declarations. (script by Hirohito
Higashi)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 30 Jan 2016 15:15:05 +0100 |
parents | af3c41a3c53f |
children | 4aead6a9b7a9 |
comparison
equal
deleted
inserted
replaced
7816:fb4674285a7a | 7817:83861277e6a3 |
---|---|
42 | 42 |
43 /* | 43 /* |
44 * Fill the CRC table, if not done already. | 44 * Fill the CRC table, if not done already. |
45 */ | 45 */ |
46 static void | 46 static void |
47 make_crc_tab() | 47 make_crc_tab(void) |
48 { | 48 { |
49 u32_T s, t, v; | 49 u32_T s, t, v; |
50 static int done = FALSE; | 50 static int done = FALSE; |
51 | 51 |
52 if (done) | 52 if (done) |
83 | 83 |
84 /* | 84 /* |
85 * Initialize for encryption/decryption. | 85 * Initialize for encryption/decryption. |
86 */ | 86 */ |
87 void | 87 void |
88 crypt_zip_init(state, key, salt, salt_len, seed, seed_len) | 88 crypt_zip_init( |
89 cryptstate_T *state; | 89 cryptstate_T *state, |
90 char_u *key; | 90 char_u *key, |
91 char_u *salt UNUSED; | 91 char_u *salt UNUSED, |
92 int salt_len UNUSED; | 92 int salt_len UNUSED, |
93 char_u *seed UNUSED; | 93 char_u *seed UNUSED, |
94 int seed_len UNUSED; | 94 int seed_len UNUSED) |
95 { | 95 { |
96 char_u *p; | 96 char_u *p; |
97 zip_state_T *zs; | 97 zip_state_T *zs; |
98 | 98 |
99 zs = (zip_state_T *)alloc(sizeof(zip_state_T)); | 99 zs = (zip_state_T *)alloc(sizeof(zip_state_T)); |
112 /* | 112 /* |
113 * Encrypt "from[len]" into "to[len]". | 113 * Encrypt "from[len]" into "to[len]". |
114 * "from" and "to" can be equal to encrypt in place. | 114 * "from" and "to" can be equal to encrypt in place. |
115 */ | 115 */ |
116 void | 116 void |
117 crypt_zip_encode(state, from, len, to) | 117 crypt_zip_encode( |
118 cryptstate_T *state; | 118 cryptstate_T *state, |
119 char_u *from; | 119 char_u *from, |
120 size_t len; | 120 size_t len, |
121 char_u *to; | 121 char_u *to) |
122 { | 122 { |
123 zip_state_T *zs = state->method_state; | 123 zip_state_T *zs = state->method_state; |
124 size_t i; | 124 size_t i; |
125 int ztemp, t; | 125 int ztemp, t; |
126 | 126 |
135 | 135 |
136 /* | 136 /* |
137 * Decrypt "from[len]" into "to[len]". | 137 * Decrypt "from[len]" into "to[len]". |
138 */ | 138 */ |
139 void | 139 void |
140 crypt_zip_decode(state, from, len, to) | 140 crypt_zip_decode( |
141 cryptstate_T *state; | 141 cryptstate_T *state, |
142 char_u *from; | 142 char_u *from, |
143 size_t len; | 143 size_t len, |
144 char_u *to; | 144 char_u *to) |
145 { | 145 { |
146 zip_state_T *zs = state->method_state; | 146 zip_state_T *zs = state->method_state; |
147 size_t i; | 147 size_t i; |
148 short_u temp; | 148 short_u temp; |
149 | 149 |