Skip to content

Commit b638a7b

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

9 files changed

Lines changed: 324 additions & 458 deletions

File tree

runtime/doc/doctags.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
#define LINELEN 200
1515

1616
int
17-
main(argc, argv)
18-
int argc;
19-
char **argv;
17+
main(int argc, char **argv)
2018
{
2119
char line[LINELEN];
2220
char *p1, *p2;

runtime/tools/xcmdsrv_client.c

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ static int got_x_error = FALSE;
9494
*/
9595

9696
char *
97-
sendToVim(dpy, name, cmd, asKeys, code)
98-
Display *dpy; /* Where to send. */
99-
char *name; /* Where to send. */
100-
char *cmd; /* What to send. */
101-
int asKeys; /* Interpret as keystrokes or expr ? */
102-
int *code; /* Return code. 0 => OK */
97+
sendToVim(
98+
Display *dpy, /* Where to send. */
99+
char *name, /* Where to send. */
100+
char *cmd, /* What to send. */
101+
int asKeys, /* Interpret as keystrokes or expr ? */
102+
int *code) /* Return code. 0 => OK */
103103
{
104104
Window w;
105105
Atom *plist;
@@ -245,8 +245,7 @@ sendToVim(dpy, name, cmd, asKeys, code)
245245
*/
246246

247247
static int
248-
SendInit(dpy)
249-
Display *dpy;
248+
SendInit(Display *dpy)
250249
{
251250
XErrorHandler old_handler;
252251

@@ -289,11 +288,11 @@ SendInit(dpy)
289288
*/
290289

291290
static Window
292-
LookupName(dpy, name, delete, loose)
293-
Display *dpy; /* Display whose registry to check. */
294-
char *name; /* Name of an interpreter. */
295-
int delete; /* If non-zero, delete info about name. */
296-
char **loose; /* Do another search matching -999 if not found
291+
LookupName(
292+
Display *dpy, /* Display whose registry to check. */
293+
char *name, /* Name of an interpreter. */
294+
int delete, /* If non-zero, delete info about name. */
295+
char **loose) /* Do another search matching -999 if not found
297296
Return result here if a match is found */
298297
{
299298
unsigned char *regProp, *entry;
@@ -396,11 +395,11 @@ LookupName(dpy, name, delete, loose)
396395
}
397396

398397
static char *
399-
SendEventProc(dpy, eventPtr, expected, code)
400-
Display *dpy;
401-
XEvent *eventPtr; /* Information about event. */
402-
int expected; /* The one were waiting for */
403-
int *code; /* Return code. 0 => OK */
398+
SendEventProc(
399+
Display *dpy,
400+
XEvent *eventPtr, /* Information about event. */
401+
int expected, /* The one were waiting for */
402+
int *code) /* Return code. 0 => OK */
404403
{
405404
unsigned char *propInfo;
406405
unsigned char *p;
@@ -535,13 +534,13 @@ SendEventProc(dpy, eventPtr, expected, code)
535534
*/
536535

537536
static int
538-
AppendPropCarefully(dpy, window, property, value, length)
539-
Display *dpy; /* Display on which to operate. */
540-
Window window; /* Window whose property is to
537+
AppendPropCarefully(
538+
Display *dpy, /* Display on which to operate. */
539+
Window window, /* Window whose property is to
541540
* be modified. */
542-
Atom property; /* Name of property. */
543-
char *value; /* Characters to append to property. */
544-
int length; /* How much to append */
541+
Atom property, /* Name of property. */
542+
char *value, /* Characters to append to property. */
543+
int length) /* How much to append */
545544
{
546545
XErrorHandler old_handler;
547546

@@ -560,9 +559,7 @@ AppendPropCarefully(dpy, window, property, value, length)
560559
*/
561560
/* ARGSUSED */
562561
static int
563-
x_error_check(dpy, error_event)
564-
Display *dpy;
565-
XErrorEvent *error_event;
562+
x_error_check(Display *dpy, XErrorEvent *error_event)
566563
{
567564
got_x_error = TRUE;
568565
return 0;
@@ -573,8 +570,7 @@ x_error_check(dpy, error_event)
573570
* Actually just checks if the name ends in a digit.
574571
*/
575572
static int
576-
IsSerialName(str)
577-
char *str;
573+
IsSerialName(char *str)
578574
{
579575
int len = strlen(str);
580576

src/po/sjiscorr.c

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

99
int
10-
main(argc, argv)
11-
int argc;
12-
char **argv;
10+
main(int argc, char **argv);
1311
{
1412
char buffer[BUFSIZ];
1513
char *p;

src/version.c

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ char longVersion[sizeof(VIM_VERSION_LONG_DATE) + sizeof(__DATE__)
3636
+ sizeof(__TIME__) + 3];
3737

3838
void
39-
make_version()
39+
make_version(void)
4040
{
4141
/*
4242
* Construct the long version string. Necessary because
@@ -746,6 +746,8 @@ static char *(features[]) =
746746

747747
static int included_patches[] =
748748
{ /* Add new patch number below this line */
749+
/**/
750+
1215,
749751
/**/
750752
1214,
751753
/**/
@@ -3192,7 +3194,7 @@ static char *(extra_patches[]) =
31923194
};
31933195

31943196
int
3195-
highest_patch()
3197+
highest_patch(void)
31963198
{
31973199
int i;
31983200
int h = 0;
@@ -3208,8 +3210,7 @@ highest_patch()
32083210
* Return TRUE if patch "n" has been included.
32093211
*/
32103212
int
3211-
has_patch(n)
3212-
int n;
3213+
has_patch(int n)
32133214
{
32143215
int i;
32153216

@@ -3221,8 +3222,7 @@ has_patch(n)
32213222
#endif
32223223

32233224
void
3224-
ex_version(eap)
3225-
exarg_T *eap;
3225+
ex_version(exarg_T *eap)
32263226
{
32273227
/*
32283228
* Ignore a ":version 9.99" command.
@@ -3238,7 +3238,7 @@ ex_version(eap)
32383238
* List all features aligned in columns, dictionary style.
32393239
*/
32403240
static void
3241-
list_features()
3241+
list_features(void)
32423242
{
32433243
int i;
32443244
int ncol;
@@ -3305,7 +3305,7 @@ list_features()
33053305
}
33063306

33073307
void
3308-
list_version()
3308+
list_version(void)
33093309
{
33103310
int i;
33113311
int first;
@@ -3598,8 +3598,7 @@ list_version()
35983598
* newline, unless the message is too long to fit on the screen anyway.
35993599
*/
36003600
static void
3601-
version_msg(s)
3602-
char *s;
3601+
version_msg(char *s)
36033602
{
36043603
int len = (int)STRLEN(s);
36053604

@@ -3616,7 +3615,7 @@ static void do_intro_line(int row, char_u *mesg, int add_version, int attr);
36163615
* Show the intro message when not editing a file.
36173616
*/
36183617
void
3619-
maybe_intro_message()
3618+
maybe_intro_message(void)
36203619
{
36213620
if (bufempty()
36223621
&& curbuf->b_fname == NULL
@@ -3633,8 +3632,8 @@ maybe_intro_message()
36333632
* Or with the ":intro" command (for Sven :-).
36343633
*/
36353634
void
3636-
intro_message(colon)
3637-
int colon; /* TRUE for ":intro" */
3635+
intro_message(
3636+
int colon) /* TRUE for ":intro" */
36383637
{
36393638
int i;
36403639
int row;
@@ -3765,11 +3764,11 @@ intro_message(colon)
37653764
}
37663765

37673766
static void
3768-
do_intro_line(row, mesg, add_version, attr)
3769-
int row;
3770-
char_u *mesg;
3771-
int add_version;
3772-
int attr;
3767+
do_intro_line(
3768+
int row,
3769+
char_u *mesg,
3770+
int add_version,
3771+
int attr)
37733772
{
37743773
char_u vers[20];
37753774
int col;
@@ -3842,8 +3841,7 @@ do_intro_line(row, mesg, add_version, attr)
38423841
* ":intro": clear screen, display intro screen and wait for return.
38433842
*/
38443843
void
3845-
ex_intro(eap)
3846-
exarg_T *eap UNUSED;
3844+
ex_intro(exarg_T *eap UNUSED)
38473845
{
38483846
screenclear();
38493847
intro_message(TRUE);

src/winclip.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -779,11 +779,11 @@ utf16_to_enc(short_u *str, int *lenp)
779779
* The result is in allocated memory: "out[outlen]". With terminating NUL.
780780
*/
781781
void
782-
acp_to_enc(str, str_size, out, outlen)
783-
char_u *str;
784-
int str_size;
785-
char_u **out;
786-
int *outlen;
782+
acp_to_enc(
783+
char_u *str,
784+
int str_size,
785+
char_u **out,
786+
int *outlen)
787787

788788
{
789789
LPWSTR widestr;
@@ -804,11 +804,11 @@ acp_to_enc(str, str_size, out, outlen)
804804
* The result is in allocated memory: "out[outlen]". With terminating NUL.
805805
*/
806806
void
807-
enc_to_acp(str, str_size, out, outlen)
808-
char_u *str;
809-
int str_size;
810-
char_u **out;
811-
int *outlen;
807+
enc_to_acp(
808+
char_u *str,
809+
int str_size,
810+
char_u **out,
811+
int *outlen)
812812

813813
{
814814
LPWSTR widestr;

0 commit comments

Comments
 (0)