Skip to content

Commit d14e00e

Browse files
committed
patch 7.4.1225
Problem: Still a few old style function declarations. Solution: Make them new style. (Hirohito Higashi)
1 parent bbb3339 commit d14e00e

12 files changed

Lines changed: 66 additions & 84 deletions

File tree

runtime/tools/blink.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#include <stdio.h>
99

10+
int
1011
main()
1112
{
1213
while (1)
@@ -18,4 +19,5 @@ main()
1819
fflush(stdout);
1920
usleep(250000); /* off time */
2021
}
22+
return 0;
2123
}

src/eval.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6001,7 +6001,7 @@ list_free(
60016001
* It is not initialized, don't forget to set v_lock.
60026002
*/
60036003
listitem_T *
6004-
listitem_alloc()
6004+
listitem_alloc(void)
60056005
{
60066006
return (listitem_T *)alloc(sizeof(listitem_T));
60076007
}
@@ -10902,13 +10902,11 @@ f_filewritable(typval_T *argvars, typval_T *rettv)
1090210902
rettv->vval.v_number = filewritable(get_tv_string(&argvars[0]));
1090310903
}
1090410904

10905-
static void findfilendir(typval_T *argvars, typval_T *rettv, int find_what);
10906-
1090710905
static void
10908-
findfilendir(argvars, rettv, find_what)
10909-
typval_T *argvars UNUSED;
10910-
typval_T *rettv;
10911-
int find_what UNUSED;
10906+
findfilendir(
10907+
typval_T *argvars UNUSED,
10908+
typval_T *rettv,
10909+
int find_what UNUSED)
1091210910
{
1091310911
#ifdef FEAT_SEARCHPATH
1091410912
char_u *fname;

src/ex_cmds2.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3627,10 +3627,7 @@ fgets_cr(char *s, int n, FILE *stream)
36273627
* At least CodeWarrior 9 needed this code.
36283628
*/
36293629
char *
3630-
fgets_cr(s, n, stream)
3631-
char *s;
3632-
int n;
3633-
FILE *stream;
3630+
fgets_cr(char *s, int n, FILE *stream)
36343631
{
36353632
int c = 0;
36363633
int char_read = 0;

src/ex_getln.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5646,7 +5646,7 @@ set_cmdline_pos(
56465646
* Returns NUL when something is wrong.
56475647
*/
56485648
int
5649-
get_cmdline_type()
5649+
get_cmdline_type(void)
56505650
{
56515651
struct cmdline_info *p = get_ccline_ptr();
56525652

src/fileio.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9987,9 +9987,9 @@ au_exists(char_u *arg)
99879987
* "curbuf" and "curwin" to match "buf".
99889988
*/
99899989
void
9990-
aucmd_prepbuf(aco, buf)
9991-
aco_save_T *aco; /* structure to save values in */
9992-
buf_T *buf; /* new curbuf */
9990+
aucmd_prepbuf(
9991+
aco_save_T *aco, /* structure to save values in */
9992+
buf_T *buf) /* new curbuf */
99939993
{
99949994
aco->save_curbuf = curbuf;
99959995
--curbuf->b_nwindows;
@@ -10003,8 +10003,8 @@ aucmd_prepbuf(aco, buf)
1000310003
* This is the non-autocommand version.
1000410004
*/
1000510005
void
10006-
aucmd_restbuf(aco)
10007-
aco_save_T *aco; /* structure holding saved values */
10006+
aucmd_restbuf(
10007+
aco_save_T *aco) /* structure holding saved values */
1000810008
{
1000910009
--curbuf->b_nwindows;
1001010010
curbuf = aco->save_curbuf;

src/gui_w32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2292,7 +2292,7 @@ im_set_active(int active)
22922292
* Get IM status. When IM is on, return not 0. Else return 0.
22932293
*/
22942294
int
2295-
im_get_status()
2295+
im_get_status(void)
22962296
{
22972297
return global_ime_get_status();
22982298
}

src/gui_x11.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,8 +2234,7 @@ fontset_height2(XFontSet fs)
22342234

22352235
/* NOT USED YET
22362236
static int
2237-
fontset_descent(fs)
2238-
XFontSet fs;
2237+
fontset_descent(XFontSet fs)
22392238
{
22402239
XFontSetExtents *extents;
22412240

src/if_perl.xs

Lines changed: 37 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,7 @@ perl_runtime_link_init(char *libname, int verbose)
631631
* There were no DLL loaded, return FALSE.
632632
*/
633633
int
634-
perl_enabled(verbose)
635-
int verbose;
634+
perl_enabled(int verbose)
636635
{
637636
return perl_runtime_link_init((char *)p_perldll, verbose) == OK;
638637
}
@@ -644,7 +643,7 @@ perl_enabled(verbose)
644643
* there's nothing to actually parse.
645644
*/
646645
static void
647-
perl_init()
646+
perl_init(void)
648647
{
649648
char *bootargs[] = { "VI", NULL };
650649
int argc = 3;
@@ -670,7 +669,7 @@ perl_init()
670669
* perl_end(): clean up after ourselves
671670
*/
672671
void
673-
perl_end()
672+
perl_end(void)
674673
{
675674
if (perl_interp)
676675
{
@@ -696,9 +695,9 @@ perl_end()
696695
* split at '\n' first though.
697696
*/
698697
void
699-
msg_split(s, attr)
700-
char_u *s;
701-
int attr; /* highlighting attributes */
698+
msg_split(
699+
char_u *s,
700+
int attr) /* highlighting attributes */
702701
{
703702
char *next;
704703
char *token = (char *)s;
@@ -719,10 +718,10 @@ msg_split(s, attr)
719718
* work properly.
720719
*/
721720
char_u *
722-
eval_to_string(arg, nextcmd, dolist)
723-
char_u *arg UNUSED;
724-
char_u **nextcmd UNUSED;
725-
int dolist UNUSED;
721+
eval_to_string(
722+
char_u *arg UNUSED,
723+
char_u **nextcmd UNUSED,
724+
int dolist UNUSED)
726725
{
727726
return NULL;
728727
}
@@ -740,9 +739,7 @@ eval_to_string(arg, nextcmd, dolist)
740739
*/
741740

742741
static SV *
743-
newWINrv(rv, ptr)
744-
SV *rv;
745-
win_T *ptr;
742+
newWINrv(SV *rv, win_T *ptr)
746743
{
747744
sv_upgrade(rv, SVt_RV);
748745
if (ptr->w_perl_private == NULL)
@@ -758,9 +755,7 @@ newWINrv(rv, ptr)
758755
}
759756

760757
static SV *
761-
newBUFrv(rv, ptr)
762-
SV *rv;
763-
buf_T *ptr;
758+
newBUFrv(SV *rv, buf_T *ptr)
764759
{
765760
sv_upgrade(rv, SVt_RV);
766761
if (ptr->b_perl_private == NULL)
@@ -780,17 +775,15 @@ newBUFrv(rv, ptr)
780775
* Remove all references to the window to be destroyed
781776
*/
782777
void
783-
perl_win_free(wp)
784-
win_T *wp;
778+
perl_win_free(win_T *wp)
785779
{
786780
if (wp->w_perl_private)
787781
sv_setiv((SV *)wp->w_perl_private, 0);
788782
return;
789783
}
790784

791785
void
792-
perl_buf_free(bp)
793-
buf_T *bp;
786+
perl_buf_free(buf_T *bp)
794787
{
795788
if (bp->b_perl_private)
796789
sv_setiv((SV *)bp->b_perl_private, 0);
@@ -834,7 +827,7 @@ struct ufuncs cb_funcs = { cur_val, 0, 1 };
834827
* Make the magical main::curwin and main::curbuf variables
835828
*/
836829
static void
837-
VIM_init()
830+
VIM_init(void)
838831
{
839832
static char cw[] = "main::curwin";
840833
static char cb[] = "main::curbuf";
@@ -866,8 +859,7 @@ static char *e_noperl = N_("Sorry, this command is disabled: the Perl library co
866859
* ":perl"
867860
*/
868861
void
869-
ex_perl(eap)
870-
exarg_T *eap;
862+
ex_perl(exarg_T *eap)
871863
{
872864
char *err;
873865
char *script;
@@ -947,8 +939,7 @@ ex_perl(eap)
947939
}
948940

949941
static int
950-
replace_line(line, end)
951-
linenr_T *line, *end;
942+
replace_line(linenr_T *line, linenr_T *end)
952943
{
953944
char *str;
954945

@@ -989,8 +980,7 @@ ref_map_free(void)
989980
}
990981

991982
static struct ref_map_S *
992-
ref_map_find_SV(sv)
993-
SV *const sv;
983+
ref_map_find_SV(SV *const sv)
994984
{
995985
struct ref_map_S *refs = ref_map;
996986
int count = 350;
@@ -1016,9 +1006,7 @@ ref_map_find_SV(sv)
10161006
}
10171007

10181008
static int
1019-
perl_to_vim(sv, rettv)
1020-
SV *sv;
1021-
typval_T *rettv;
1009+
perl_to_vim(SV *sv, typval_T *rettv)
10221010
{
10231011
if (SvROK(sv))
10241012
sv = SvRV(sv);
@@ -1171,9 +1159,7 @@ perl_to_vim(sv, rettv)
11711159
* "perleval()"
11721160
*/
11731161
void
1174-
do_perleval(str, rettv)
1175-
char_u *str;
1176-
typval_T *rettv;
1162+
do_perleval(char_u *str, typval_T *rettv)
11771163
{
11781164
char *err = NULL;
11791165
STRLEN err_len = 0;
@@ -1241,8 +1227,7 @@ do_perleval(str, rettv)
12411227
* ":perldo".
12421228
*/
12431229
void
1244-
ex_perldo(eap)
1245-
exarg_T *eap;
1230+
ex_perldo(exarg_T *eap)
12461231
{
12471232
STRLEN length;
12481233
SV *sv;
@@ -1314,9 +1299,21 @@ err:
13141299
}
13151300

13161301
#ifndef FEAT_WINDOWS
1317-
int win_valid(win_T *w) { return TRUE; }
1318-
int win_count() { return 1; }
1319-
win_T *win_find_nr(int n) { return curwin; }
1302+
int
1303+
win_valid(win_T *w)
1304+
{
1305+
return TRUE;
1306+
}
1307+
int
1308+
win_count(void)
1309+
{
1310+
return 1;
1311+
}
1312+
win_T *
1313+
win_find_nr(int n)
1314+
{
1315+
return curwin;
1316+
}
13201317
#endif
13211318

13221319
XS(boot_VIM);
@@ -1513,8 +1510,7 @@ SetHeight(win, height)
15131510
curwin = savewin;
15141511

15151512
void
1516-
Cursor(win, ...)
1517-
VIWIN win
1513+
Cursor(VIWIN win, ...)
15181514

15191515
PPCODE:
15201516
if (items == 1)

src/os_unix.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,15 +2041,13 @@ set_x11_icon(char_u *icon)
20412041
#else /* FEAT_X11 */
20422042

20432043
static int
2044-
get_x11_title(test_only)
2045-
int test_only UNUSED;
2044+
get_x11_title(int test_only UNUSED)
20462045
{
20472046
return FALSE;
20482047
}
20492048

20502049
static int
2051-
get_x11_icon(test_only)
2052-
int test_only;
2050+
get_x11_icon(int test_only)
20532051
{
20542052
if (!test_only)
20552053
{
@@ -2333,9 +2331,7 @@ mch_get_host_name(char_u *s, int len)
23332331
# endif
23342332

23352333
void
2336-
mch_get_host_name(s, len)
2337-
char_u *s;
2338-
int len;
2334+
mch_get_host_name(char_u *s, int len)
23392335
{
23402336
# ifdef VAXC
23412337
vaxc$gethostname((char *)s, len);
@@ -2743,9 +2739,7 @@ mch_copy_sec(char_u *from_file, char_u *to_file)
27432739
* Copy security info from "from_file" to "to_file".
27442740
*/
27452741
void
2746-
mch_copy_sec(from_file, to_file)
2747-
char_u *from_file;
2748-
char_u *to_file;
2742+
mch_copy_sec(char_u *from_file, char_u *to_file)
27492743
{
27502744
static const char * const smack_copied_attributes[] =
27512745
{

src/po/sjiscorr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <string.h>
88

99
int
10-
main(int argc, char **argv);
10+
main(int argc, char **argv)
1111
{
1212
char buffer[BUFSIZ];
1313
char *p;

0 commit comments

Comments
 (0)