Skip to content

Commit 0554097

Browse files
committed
patch 7.4.1213
Problem: Using old style function declarations. Solution: Change to new style function declarations. (script by Hirohito Higashi)
1 parent c1ab676 commit 0554097

15 files changed

Lines changed: 911 additions & 1363 deletions

src/os_amiga.c

Lines changed: 65 additions & 106 deletions
Large diffs are not rendered by default.

src/os_mac_conv.c

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ static TECObjectRef gUTF16ToUTF8Converter;
4444
* A Mac version of string_convert_ext() for special cases.
4545
*/
4646
char_u *
47-
mac_string_convert(ptr, len, lenp, fail_on_error, from_enc, to_enc, unconvlenp)
48-
char_u *ptr;
49-
int len;
50-
int *lenp;
51-
int fail_on_error;
52-
int from_enc;
53-
int to_enc;
54-
int *unconvlenp;
47+
mac_string_convert(
48+
char_u *ptr,
49+
int len,
50+
int *lenp,
51+
int fail_on_error,
52+
int from_enc,
53+
int to_enc,
54+
int *unconvlenp)
5555
{
5656
char_u *retval, *d;
5757
CFStringRef cfstr;
@@ -180,10 +180,10 @@ mac_string_convert(ptr, len, lenp, fail_on_error, from_enc, to_enc, unconvlenp)
180180
* Returns OK or FAIL.
181181
*/
182182
int
183-
macroman2enc(ptr, sizep, real_size)
184-
char_u *ptr;
185-
long *sizep;
186-
long real_size;
183+
macroman2enc(
184+
char_u *ptr,
185+
long *sizep,
186+
long real_size)
187187
{
188188
CFStringRef cfstr;
189189
CFRange r;
@@ -226,14 +226,14 @@ macroman2enc(ptr, sizep, real_size)
226226
* Returns OK or FAIL.
227227
*/
228228
int
229-
enc2macroman(from, fromlen, to, tolenp, maxtolen, rest, restlenp)
230-
char_u *from;
231-
size_t fromlen;
232-
char_u *to;
233-
int *tolenp;
234-
int maxtolen;
235-
char_u *rest;
236-
int *restlenp;
229+
enc2macroman(
230+
char_u *from,
231+
size_t fromlen,
232+
char_u *to,
233+
int *tolenp,
234+
int maxtolen,
235+
char_u *rest,
236+
int *restlenp)
237237
{
238238
CFStringRef cfstr;
239239
CFRange r;
@@ -274,7 +274,7 @@ enc2macroman(from, fromlen, to, tolenp, maxtolen, rest, restlenp)
274274
* Initializes text converters
275275
*/
276276
void
277-
mac_conv_init()
277+
mac_conv_init(void)
278278
{
279279
TextEncoding utf8_encoding;
280280
TextEncoding utf8_hfsplus_encoding;
@@ -309,7 +309,7 @@ mac_conv_init()
309309
* Destroys text converters
310310
*/
311311
void
312-
mac_conv_cleanup()
312+
mac_conv_cleanup(void)
313313
{
314314
if (gUTF16ToUTF8Converter)
315315
{
@@ -330,10 +330,10 @@ mac_conv_cleanup()
330330
* CFBase.h) to avoid clashes with X11 header files in the .pro file
331331
*/
332332
char_u *
333-
mac_utf16_to_enc(from, fromLen, actualLen)
334-
unsigned short *from;
335-
size_t fromLen;
336-
size_t *actualLen;
333+
mac_utf16_to_enc(
334+
unsigned short *from,
335+
size_t fromLen,
336+
size_t *actualLen)
337337
{
338338
/* Following code borrows somewhat from os_mswin.c */
339339
vimconv_T conv;
@@ -384,10 +384,10 @@ mac_utf16_to_enc(from, fromLen, actualLen)
384384
* CFBase.h) to avoid clashes with X11 header files in the .pro file
385385
*/
386386
unsigned short *
387-
mac_enc_to_utf16(from, fromLen, actualLen)
388-
char_u *from;
389-
size_t fromLen;
390-
size_t *actualLen;
387+
mac_enc_to_utf16(
388+
char_u *from,
389+
size_t fromLen,
390+
size_t *actualLen)
391391
{
392392
/* Following code borrows somewhat from os_mswin.c */
393393
vimconv_T conv;
@@ -443,9 +443,9 @@ mac_enc_to_utf16(from, fromLen, actualLen)
443443
* The void * return type is actually a CFStringRef
444444
*/
445445
void *
446-
mac_enc_to_cfstring(from, fromLen)
447-
char_u *from;
448-
size_t fromLen;
446+
mac_enc_to_cfstring(
447+
char_u *from,
448+
size_t fromLen)
449449
{
450450
UniChar *utf16_str;
451451
size_t utf16_len;
@@ -465,10 +465,10 @@ mac_enc_to_cfstring(from, fromLen)
465465
* Converts a decomposed HFS+ UTF-8 path to precomposed UTF-8
466466
*/
467467
char_u *
468-
mac_precompose_path(decompPath, decompLen, precompLen)
469-
char_u *decompPath;
470-
size_t decompLen;
471-
size_t *precompLen;
468+
mac_precompose_path(
469+
char_u *decompPath,
470+
size_t decompLen,
471+
size_t *precompLen)
472472
{
473473
char_u *result = NULL;
474474
size_t actualLen = 0;
@@ -498,10 +498,10 @@ mac_precompose_path(decompPath, decompLen, precompLen)
498498
* Converts from UTF-16 UniChars to precomposed UTF-8
499499
*/
500500
static char_u *
501-
mac_utf16_to_utf8(from, fromLen, actualLen)
502-
UniChar *from;
503-
size_t fromLen;
504-
size_t *actualLen;
501+
mac_utf16_to_utf8(
502+
UniChar *from,
503+
size_t fromLen,
504+
size_t *actualLen)
505505
{
506506
ByteCount utf8_len;
507507
ByteCount inputRead;
@@ -538,10 +538,10 @@ mac_utf16_to_utf8(from, fromLen, actualLen)
538538
* Converts from UTF-8 to UTF-16 UniChars
539539
*/
540540
static UniChar *
541-
mac_utf8_to_utf16(from, fromLen, actualLen)
542-
char_u *from;
543-
size_t fromLen;
544-
size_t *actualLen;
541+
mac_utf8_to_utf16(
542+
char_u *from,
543+
size_t fromLen,
544+
size_t *actualLen)
545545
{
546546
CFStringRef utf8_str;
547547
CFRange convertRange;
@@ -573,7 +573,8 @@ mac_utf8_to_utf16(from, fromLen, actualLen)
573573
* Sets LANG environment variable in Vim from Mac locale
574574
*/
575575
void
576-
mac_lang_init() {
576+
mac_lang_init(void)
577+
{
577578
if (mch_getenv((char_u *)"LANG") == NULL)
578579
{
579580
char buf[20];

src/os_mswin.c

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ mch_early_init(void)
286286
* Return TRUE if the input comes from a terminal, FALSE otherwise.
287287
*/
288288
int
289-
mch_input_isatty()
289+
mch_input_isatty(void)
290290
{
291291
#ifdef FEAT_GUI_MSWIN
292292
return OK; /* GUI always has a tty */
@@ -355,7 +355,7 @@ mch_restore_title(
355355
* Return TRUE if we can restore the title (we can)
356356
*/
357357
int
358-
mch_can_restore_title()
358+
mch_can_restore_title(void)
359359
{
360360
return TRUE;
361361
}
@@ -365,7 +365,7 @@ mch_can_restore_title()
365365
* Return TRUE if we can restore the icon title (we can't)
366366
*/
367367
int
368-
mch_can_restore_icon()
368+
mch_can_restore_icon(void)
369369
{
370370
return FALSE;
371371
}
@@ -486,8 +486,7 @@ mch_isFullName(char_u *fname)
486486
* When the path looks like a URL leave it unmodified.
487487
*/
488488
void
489-
slash_adjust(p)
490-
char_u *p;
489+
slash_adjust(char_u *p)
491490
{
492491
if (path_with_url(p))
493492
return;
@@ -708,7 +707,7 @@ mch_new_shellsize(void)
708707
* We have no job control, so fake it by starting a new shell.
709708
*/
710709
void
711-
mch_suspend()
710+
mch_suspend(void)
712711
{
713712
suspend_shell();
714713
}
@@ -723,7 +722,7 @@ mch_suspend()
723722
* Display the saved error message(s).
724723
*/
725724
void
726-
display_errors()
725+
display_errors(void)
727726
{
728727
char *p;
729728

@@ -864,7 +863,7 @@ can_end_termcap_mode(
864863
* return non-zero if a character is available
865864
*/
866865
int
867-
mch_char_avail()
866+
mch_char_avail(void)
868867
{
869868
/* never used */
870869
return TRUE;
@@ -965,8 +964,7 @@ mch_icon_load_cb(char_u *fname, void *cookie)
965964
* Try loading an icon file from 'runtimepath'.
966965
*/
967966
int
968-
mch_icon_load(iconp)
969-
HANDLE *iconp;
967+
mch_icon_load(HANDLE *iconp)
970968
{
971969
return do_in_runtimepath((char_u *)"bitmaps/vim.ico",
972970
FALSE, mch_icon_load_cb, iconp);
@@ -1831,9 +1829,7 @@ static int prt_pos_x = 0;
18311829
static int prt_pos_y = 0;
18321830

18331831
void
1834-
mch_print_start_line(margin, page_line)
1835-
int margin;
1836-
int page_line;
1832+
mch_print_start_line(int margin, int page_line)
18371833
{
18381834
if (margin)
18391835
prt_pos_x = -prt_number_width;
@@ -2070,7 +2066,7 @@ mch_resolve_shortcut(char_u *fname)
20702066
* Bring ourselves to the foreground. Does work if the OS doesn't allow it.
20712067
*/
20722068
void
2073-
win32_set_foreground()
2069+
win32_set_foreground(void)
20742070
{
20752071
# ifndef FEAT_GUI
20762072
GetConsoleHwnd(); /* get value of s_hwnd */
@@ -2486,9 +2482,9 @@ serverGetVimNames(void)
24862482
}
24872483

24882484
int
2489-
serverSendReply(name, reply)
2490-
char_u *name; /* Where to send. */
2491-
char_u *reply; /* What to send. */
2485+
serverSendReply(
2486+
char_u *name, /* Where to send. */
2487+
char_u *reply) /* What to send. */
24922488
{
24932489
HWND target;
24942490
COPYDATASTRUCT data;
@@ -2519,13 +2515,13 @@ serverSendReply(name, reply)
25192515
}
25202516

25212517
int
2522-
serverSendToVim(name, cmd, result, ptarget, asExpr, silent)
2523-
char_u *name; /* Where to send. */
2524-
char_u *cmd; /* What to send. */
2525-
char_u **result; /* Result of eval'ed expression */
2526-
void *ptarget; /* HWND of server */
2527-
int asExpr; /* Expression or keys? */
2528-
int silent; /* don't complain about no server */
2518+
serverSendToVim(
2519+
char_u *name, /* Where to send. */
2520+
char_u *cmd, /* What to send. */
2521+
char_u **result, /* Result of eval'ed expression */
2522+
void *ptarget, /* HWND of server */
2523+
int asExpr, /* Expression or keys? */
2524+
int silent) /* don't complain about no server */
25292525
{
25302526
HWND target;
25312527
COPYDATASTRUCT data;
@@ -2578,8 +2574,7 @@ serverSendToVim(name, cmd, result, ptarget, asExpr, silent)
25782574
* Bring the server to the foreground.
25792575
*/
25802576
void
2581-
serverForeground(name)
2582-
char_u *name;
2577+
serverForeground(char_u *name)
25832578
{
25842579
HWND target = findServer(name);
25852580

@@ -3101,7 +3096,7 @@ get_logfont(
31013096
* Initialize the Winsock dll.
31023097
*/
31033098
void
3104-
channel_init_winsock()
3099+
channel_init_winsock(void)
31053100
{
31063101
WSADATA wsaData;
31073102
int wsaerr;

src/os_qnx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
int is_photon_available;
2020
#endif
2121

22-
void qnx_init()
22+
void qnx_init(void)
2323
{
2424
#if defined(FEAT_GUI_PHOTON)
2525
PhChannelParms_t parms;
@@ -37,7 +37,7 @@ void qnx_init()
3737
#define CLIP_TYPE_TEXT "TEXT"
3838

3939
/* Turn on the clipboard for a console vim when photon is running */
40-
void qnx_clip_init()
40+
void qnx_clip_init(void)
4141
{
4242
if (is_photon_available == TRUE && !gui.in_use)
4343
clip_init(TRUE);

0 commit comments

Comments
 (0)