Skip to content

Commit 7454a06

Browse files
committed
patch 7.4.1205
Problem: Using old style function declarations. Solution: Change to new style function declarations. (script by Hirohito Higashi)
1 parent 305598b commit 7454a06

12 files changed

Lines changed: 1712 additions & 2908 deletions

File tree

src/arabic.c

Lines changed: 28 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ static int A_is_special(int c);
4343
* Returns True if c is an ISO-8859-6 shaped ARABIC letter (user entered)
4444
*/
4545
static int
46-
A_is_a(cur_c)
47-
int cur_c;
46+
A_is_a(int cur_c)
4847
{
4948
switch (cur_c)
5049
{
@@ -96,8 +95,7 @@ A_is_a(cur_c)
9695
* Returns True if c is an Isolated Form-B ARABIC letter
9796
*/
9897
static int
99-
A_is_s(cur_c)
100-
int cur_c;
98+
A_is_s(int cur_c)
10199
{
102100
switch (cur_c)
103101
{
@@ -148,8 +146,7 @@ A_is_s(cur_c)
148146
* Returns True if c is a Final shape of an ARABIC letter
149147
*/
150148
static int
151-
A_is_f(cur_c)
152-
int cur_c;
149+
A_is_f(int cur_c)
153150
{
154151
switch (cur_c)
155152
{
@@ -202,8 +199,7 @@ A_is_f(cur_c)
202199
* Change shape - from ISO-8859-6/Isolated to Form-B Isolated
203200
*/
204201
static int
205-
chg_c_a2s(cur_c)
206-
int cur_c;
202+
chg_c_a2s(int cur_c)
207203
{
208204
int tempc;
209205

@@ -332,8 +328,7 @@ chg_c_a2s(cur_c)
332328
* Change shape - from ISO-8859-6/Isolated to Initial
333329
*/
334330
static int
335-
chg_c_a2i(cur_c)
336-
int cur_c;
331+
chg_c_a2i(int cur_c)
337332
{
338333
int tempc;
339334

@@ -462,8 +457,7 @@ chg_c_a2i(cur_c)
462457
* Change shape - from ISO-8859-6/Isolated to Medial
463458
*/
464459
static int
465-
chg_c_a2m(cur_c)
466-
int cur_c;
460+
chg_c_a2m(int cur_c)
467461
{
468462
int tempc;
469463

@@ -592,8 +586,7 @@ chg_c_a2m(cur_c)
592586
* Change shape - from ISO-8859-6/Isolated to final
593587
*/
594588
static int
595-
chg_c_a2f(cur_c)
596-
int cur_c;
589+
chg_c_a2f(int cur_c)
597590
{
598591
int tempc;
599592

@@ -732,8 +725,7 @@ chg_c_a2f(cur_c)
732725
* Change shape - from Initial to Medial
733726
*/
734727
static int
735-
chg_c_i2m(cur_c)
736-
int cur_c;
728+
chg_c_i2m(int cur_c)
737729
{
738730
int tempc;
739731

@@ -820,8 +812,7 @@ chg_c_i2m(cur_c)
820812
* Change shape - from Final to Medial
821813
*/
822814
static int
823-
chg_c_f2m(cur_c)
824-
int cur_c;
815+
chg_c_f2m(int cur_c)
825816
{
826817
int tempc;
827818

@@ -930,8 +921,7 @@ chg_c_f2m(cur_c)
930921
* Change shape - from Combination (2 char) to an Isolated
931922
*/
932923
static int
933-
chg_c_laa2i(hid_c)
934-
int hid_c;
924+
chg_c_laa2i(int hid_c)
935925
{
936926
int tempc;
937927

@@ -961,8 +951,7 @@ chg_c_laa2i(hid_c)
961951
* Change shape - from Combination-Isolated to Final
962952
*/
963953
static int
964-
chg_c_laa2f(hid_c)
965-
int hid_c;
954+
chg_c_laa2f(int hid_c)
966955
{
967956
int tempc;
968957

@@ -991,8 +980,7 @@ chg_c_laa2f(hid_c)
991980
* Do "half-shaping" on character "c". Return zero if no shaping.
992981
*/
993982
static int
994-
half_shape(c)
995-
int c;
983+
half_shape(int c)
996984
{
997985
if (A_is_a(c))
998986
return chg_c_a2i(c);
@@ -1011,13 +999,13 @@ half_shape(c)
1011999
* in: "next_c" is the next character (not shaped).
10121000
*/
10131001
int
1014-
arabic_shape(c, ccp, c1p, prev_c, prev_c1, next_c)
1015-
int c;
1016-
int *ccp;
1017-
int *c1p;
1018-
int prev_c;
1019-
int prev_c1;
1020-
int next_c;
1002+
arabic_shape(
1003+
int c,
1004+
int *ccp,
1005+
int *c1p,
1006+
int prev_c,
1007+
int prev_c1,
1008+
int next_c)
10211009
{
10221010
int curr_c;
10231011
int shape_c;
@@ -1082,9 +1070,9 @@ arabic_shape(c, ccp, c1p, prev_c, prev_c1, next_c)
10821070
* A_firstc_laa returns first character of LAA combination if it exists
10831071
*/
10841072
static int
1085-
A_firstc_laa(c, c1)
1086-
int c; /* base character */
1087-
int c1; /* first composing character */
1073+
A_firstc_laa(
1074+
int c, /* base character */
1075+
int c1) /* first composing character */
10881076
{
10891077
if (c1 != NUL && c == a_LAM && !A_is_harakat(c1))
10901078
return c1;
@@ -1097,8 +1085,7 @@ A_firstc_laa(c, c1)
10971085
* (harakat/tanween)
10981086
*/
10991087
static int
1100-
A_is_harakat(c)
1101-
int c;
1088+
A_is_harakat(int c)
11021089
{
11031090
return (c >= a_FATHATAN && c <= a_SUKUN);
11041091
}
@@ -1109,8 +1096,7 @@ A_is_harakat(c)
11091096
* (alphabet/number/punctuation)
11101097
*/
11111098
static int
1112-
A_is_iso(c)
1113-
int c;
1099+
A_is_iso(int c)
11141100
{
11151101
return ((c >= a_HAMZA && c <= a_GHAIN)
11161102
|| (c >= a_TATWEEL && c <= a_HAMZA_BELOW)
@@ -1123,8 +1109,7 @@ A_is_iso(c)
11231109
* (alphabet/number/punctuation)
11241110
*/
11251111
static int
1126-
A_is_formb(c)
1127-
int c;
1112+
A_is_formb(int c)
11281113
{
11291114
return ((c >= a_s_FATHATAN && c <= a_s_DAMMATAN)
11301115
|| c == a_s_KASRATAN
@@ -1137,8 +1122,7 @@ A_is_formb(c)
11371122
* A_is_ok returns TRUE if 'c' is an Arabic 10646 (8859-6 or Form-B)
11381123
*/
11391124
static int
1140-
A_is_ok(c)
1141-
int c;
1125+
A_is_ok(int c)
11421126
{
11431127
return (A_is_iso(c) || A_is_formb(c));
11441128
}
@@ -1149,8 +1133,7 @@ A_is_ok(c)
11491133
* with some exceptions/exclusions
11501134
*/
11511135
static int
1152-
A_is_valid(c)
1153-
int c;
1136+
A_is_valid(int c)
11541137
{
11551138
return (A_is_ok(c) && !A_is_special(c));
11561139
}
@@ -1161,8 +1144,7 @@ A_is_valid(c)
11611144
* Specials don't adhere to most of the rules.
11621145
*/
11631146
static int
1164-
A_is_special(c)
1165-
int c;
1147+
A_is_special(int c)
11661148
{
11671149
return (c == a_HAMZA || c == a_s_HAMZA);
11681150
}

src/blowfish.c

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,10 @@ static UINT32_T sbx_init[4][256] = {
348348
bfs->sbx[3][xr & 0xFF];
349349

350350
static void
351-
bf_e_block(bfs, p_xl, p_xr)
352-
bf_state_T *bfs;
353-
UINT32_T *p_xl;
354-
UINT32_T *p_xr;
351+
bf_e_block(
352+
bf_state_T *bfs,
353+
UINT32_T *p_xl,
354+
UINT32_T *p_xr)
355355
{
356356
UINT32_T temp;
357357
UINT32_T xl = *p_xl;
@@ -384,9 +384,9 @@ bf_e_block(bfs, p_xl, p_xr)
384384
#endif
385385

386386
static void
387-
bf_e_cblock(bfs, block)
388-
bf_state_T *bfs;
389-
char_u *block;
387+
bf_e_cblock(
388+
bf_state_T *bfs,
389+
char_u *block)
390390
{
391391
block8 bk;
392392

@@ -404,11 +404,11 @@ bf_e_cblock(bfs, block)
404404
* "salt[salt_len]" as the salt.
405405
*/
406406
static void
407-
bf_key_init(bfs, password, salt, salt_len)
408-
bf_state_T *bfs;
409-
char_u *password;
410-
char_u *salt;
411-
int salt_len;
407+
bf_key_init(
408+
bf_state_T *bfs,
409+
char_u *password,
410+
char_u *salt,
411+
int salt_len)
412412
{
413413
int i, j, keypos = 0;
414414
unsigned u;
@@ -470,10 +470,10 @@ bf_key_init(bfs, password, salt, salt_len)
470470
* Blowfish self-test for corrupted tables or instructions.
471471
*/
472472
static int
473-
bf_check_tables(pax, sbx, val)
474-
UINT32_T pax[18];
475-
UINT32_T sbx[4][256];
476-
UINT32_T val;
473+
bf_check_tables(
474+
UINT32_T pax[18],
475+
UINT32_T sbx[4][256],
476+
UINT32_T val)
477477
{
478478
int i, j;
479479
UINT32_T c = 0;
@@ -514,7 +514,7 @@ static struct_bf_test_data bf_test_data[] = {
514514
* Return FAIL when there is something wrong with blowfish encryption.
515515
*/
516516
static int
517-
bf_self_test()
517+
bf_self_test(void)
518518
{
519519
int i, bn;
520520
int err = 0;
@@ -566,10 +566,10 @@ bf_self_test()
566566
* Initialize with seed "seed[seed_len]".
567567
*/
568568
static void
569-
bf_cfb_init(bfs, seed, seed_len)
570-
bf_state_T *bfs;
571-
char_u *seed;
572-
int seed_len;
569+
bf_cfb_init(
570+
bf_state_T *bfs,
571+
char_u *seed,
572+
int seed_len)
573573
{
574574
int i, mi;
575575

@@ -602,11 +602,11 @@ bf_cfb_init(bfs, seed, seed_len)
602602
* "from" and "to" can be equal to encrypt in place.
603603
*/
604604
void
605-
crypt_blowfish_encode(state, from, len, to)
606-
cryptstate_T *state;
607-
char_u *from;
608-
size_t len;
609-
char_u *to;
605+
crypt_blowfish_encode(
606+
cryptstate_T *state,
607+
char_u *from,
608+
size_t len,
609+
char_u *to)
610610
{
611611
bf_state_T *bfs = state->method_state;
612612
size_t i;
@@ -625,11 +625,11 @@ crypt_blowfish_encode(state, from, len, to)
625625
* Decrypt "from[len]" into "to[len]".
626626
*/
627627
void
628-
crypt_blowfish_decode(state, from, len, to)
629-
cryptstate_T *state;
630-
char_u *from;
631-
size_t len;
632-
char_u *to;
628+
crypt_blowfish_decode(
629+
cryptstate_T *state,
630+
char_u *from,
631+
size_t len,
632+
char_u *to)
633633
{
634634
bf_state_T *bfs = state->method_state;
635635
size_t i;
@@ -644,13 +644,13 @@ crypt_blowfish_decode(state, from, len, to)
644644
}
645645

646646
void
647-
crypt_blowfish_init(state, key, salt, salt_len, seed, seed_len)
648-
cryptstate_T *state;
649-
char_u* key;
650-
char_u* salt;
651-
int salt_len;
652-
char_u* seed;
653-
int seed_len;
647+
crypt_blowfish_init(
648+
cryptstate_T *state,
649+
char_u* key,
650+
char_u* salt,
651+
int salt_len,
652+
char_u* seed,
653+
int seed_len)
654654
{
655655
bf_state_T *bfs = (bf_state_T *)alloc_clear(sizeof(bf_state_T));
656656

@@ -672,7 +672,7 @@ crypt_blowfish_init(state, key, salt, salt_len, seed, seed_len)
672672
* Give an error and return FAIL when not.
673673
*/
674674
int
675-
blowfish_self_test()
675+
blowfish_self_test(void)
676676
{
677677
if (sha256_self_test() == FAIL)
678678
{

0 commit comments

Comments
 (0)