comparison src/os_mswin.c @ 7833:c079097365f3 v7.4.1213

commit https://github.com/vim/vim/commit/055409764ca5f7978d4c399d2c440af0ce971c4f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 30 20:31:25 2016 +0100 patch 7.4.1213 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 20:45:04 +0100
parents 0d46cea25641
children b6cb94ad97a4
comparison
equal deleted inserted replaced
7832:f1ac913b8ff3 7833:c079097365f3
284 284
285 /* 285 /*
286 * Return TRUE if the input comes from a terminal, FALSE otherwise. 286 * Return TRUE if the input comes from a terminal, FALSE otherwise.
287 */ 287 */
288 int 288 int
289 mch_input_isatty() 289 mch_input_isatty(void)
290 { 290 {
291 #ifdef FEAT_GUI_MSWIN 291 #ifdef FEAT_GUI_MSWIN
292 return OK; /* GUI always has a tty */ 292 return OK; /* GUI always has a tty */
293 #else 293 #else
294 if (isatty(read_cmd_fd)) 294 if (isatty(read_cmd_fd))
353 353
354 /* 354 /*
355 * Return TRUE if we can restore the title (we can) 355 * Return TRUE if we can restore the title (we can)
356 */ 356 */
357 int 357 int
358 mch_can_restore_title() 358 mch_can_restore_title(void)
359 { 359 {
360 return TRUE; 360 return TRUE;
361 } 361 }
362 362
363 363
364 /* 364 /*
365 * Return TRUE if we can restore the icon title (we can't) 365 * Return TRUE if we can restore the icon title (we can't)
366 */ 366 */
367 int 367 int
368 mch_can_restore_icon() 368 mch_can_restore_icon(void)
369 { 369 {
370 return FALSE; 370 return FALSE;
371 } 371 }
372 #endif /* FEAT_TITLE */ 372 #endif /* FEAT_TITLE */
373 373
484 * backslash twice. 484 * backslash twice.
485 * When 'shellslash' set do it the other way around. 485 * When 'shellslash' set do it the other way around.
486 * When the path looks like a URL leave it unmodified. 486 * When the path looks like a URL leave it unmodified.
487 */ 487 */
488 void 488 void
489 slash_adjust(p) 489 slash_adjust(char_u *p)
490 char_u *p;
491 { 490 {
492 if (path_with_url(p)) 491 if (path_with_url(p))
493 return; 492 return;
494 while (*p) 493 while (*p)
495 { 494 {
706 705
707 /* 706 /*
708 * We have no job control, so fake it by starting a new shell. 707 * We have no job control, so fake it by starting a new shell.
709 */ 708 */
710 void 709 void
711 mch_suspend() 710 mch_suspend(void)
712 { 711 {
713 suspend_shell(); 712 suspend_shell();
714 } 713 }
715 714
716 #if defined(USE_MCH_ERRMSG) || defined(PROTO) 715 #if defined(USE_MCH_ERRMSG) || defined(PROTO)
721 720
722 /* 721 /*
723 * Display the saved error message(s). 722 * Display the saved error message(s).
724 */ 723 */
725 void 724 void
726 display_errors() 725 display_errors(void)
727 { 726 {
728 char *p; 727 char *p;
729 728
730 if (error_ga.ga_data != NULL) 729 if (error_ga.ga_data != NULL)
731 { 730 {
862 #ifdef FEAT_GUI_MSWIN 861 #ifdef FEAT_GUI_MSWIN
863 /* 862 /*
864 * return non-zero if a character is available 863 * return non-zero if a character is available
865 */ 864 */
866 int 865 int
867 mch_char_avail() 866 mch_char_avail(void)
868 { 867 {
869 /* never used */ 868 /* never used */
870 return TRUE; 869 return TRUE;
871 } 870 }
872 #endif 871 #endif
963 962
964 /* 963 /*
965 * Try loading an icon file from 'runtimepath'. 964 * Try loading an icon file from 'runtimepath'.
966 */ 965 */
967 int 966 int
968 mch_icon_load(iconp) 967 mch_icon_load(HANDLE *iconp)
969 HANDLE *iconp;
970 { 968 {
971 return do_in_runtimepath((char_u *)"bitmaps/vim.ico", 969 return do_in_runtimepath((char_u *)"bitmaps/vim.ico",
972 FALSE, mch_icon_load_cb, iconp); 970 FALSE, mch_icon_load_cb, iconp);
973 } 971 }
974 972
1829 1827
1830 static int prt_pos_x = 0; 1828 static int prt_pos_x = 0;
1831 static int prt_pos_y = 0; 1829 static int prt_pos_y = 0;
1832 1830
1833 void 1831 void
1834 mch_print_start_line(margin, page_line) 1832 mch_print_start_line(int margin, int page_line)
1835 int margin;
1836 int page_line;
1837 { 1833 {
1838 if (margin) 1834 if (margin)
1839 prt_pos_x = -prt_number_width; 1835 prt_pos_x = -prt_number_width;
1840 else 1836 else
1841 prt_pos_x = 0; 1837 prt_pos_x = 0;
2068 #if (defined(FEAT_EVAL) && !defined(FEAT_GUI)) || defined(PROTO) 2064 #if (defined(FEAT_EVAL) && !defined(FEAT_GUI)) || defined(PROTO)
2069 /* 2065 /*
2070 * Bring ourselves to the foreground. Does work if the OS doesn't allow it. 2066 * Bring ourselves to the foreground. Does work if the OS doesn't allow it.
2071 */ 2067 */
2072 void 2068 void
2073 win32_set_foreground() 2069 win32_set_foreground(void)
2074 { 2070 {
2075 # ifndef FEAT_GUI 2071 # ifndef FEAT_GUI
2076 GetConsoleHwnd(); /* get value of s_hwnd */ 2072 GetConsoleHwnd(); /* get value of s_hwnd */
2077 # endif 2073 # endif
2078 if (s_hwnd != 0) 2074 if (s_hwnd != 0)
2484 2480
2485 return ga.ga_data; 2481 return ga.ga_data;
2486 } 2482 }
2487 2483
2488 int 2484 int
2489 serverSendReply(name, reply) 2485 serverSendReply(
2490 char_u *name; /* Where to send. */ 2486 char_u *name, /* Where to send. */
2491 char_u *reply; /* What to send. */ 2487 char_u *reply) /* What to send. */
2492 { 2488 {
2493 HWND target; 2489 HWND target;
2494 COPYDATASTRUCT data; 2490 COPYDATASTRUCT data;
2495 long_u n = 0; 2491 long_u n = 0;
2496 2492
2517 2513
2518 return -1; 2514 return -1;
2519 } 2515 }
2520 2516
2521 int 2517 int
2522 serverSendToVim(name, cmd, result, ptarget, asExpr, silent) 2518 serverSendToVim(
2523 char_u *name; /* Where to send. */ 2519 char_u *name, /* Where to send. */
2524 char_u *cmd; /* What to send. */ 2520 char_u *cmd, /* What to send. */
2525 char_u **result; /* Result of eval'ed expression */ 2521 char_u **result, /* Result of eval'ed expression */
2526 void *ptarget; /* HWND of server */ 2522 void *ptarget, /* HWND of server */
2527 int asExpr; /* Expression or keys? */ 2523 int asExpr, /* Expression or keys? */
2528 int silent; /* don't complain about no server */ 2524 int silent) /* don't complain about no server */
2529 { 2525 {
2530 HWND target; 2526 HWND target;
2531 COPYDATASTRUCT data; 2527 COPYDATASTRUCT data;
2532 char_u *retval = NULL; 2528 char_u *retval = NULL;
2533 int retcode = 0; 2529 int retcode = 0;
2576 2572
2577 /* 2573 /*
2578 * Bring the server to the foreground. 2574 * Bring the server to the foreground.
2579 */ 2575 */
2580 void 2576 void
2581 serverForeground(name) 2577 serverForeground(char_u *name)
2582 char_u *name;
2583 { 2578 {
2584 HWND target = findServer(name); 2579 HWND target = findServer(name);
2585 2580
2586 if (target != 0) 2581 if (target != 0)
2587 SetForegroundWindow(target); 2582 SetForegroundWindow(target);
3099 #if defined(FEAT_CHANNEL) || defined(PROTO) 3094 #if defined(FEAT_CHANNEL) || defined(PROTO)
3100 /* 3095 /*
3101 * Initialize the Winsock dll. 3096 * Initialize the Winsock dll.
3102 */ 3097 */
3103 void 3098 void
3104 channel_init_winsock() 3099 channel_init_winsock(void)
3105 { 3100 {
3106 WSADATA wsaData; 3101 WSADATA wsaData;
3107 int wsaerr; 3102 int wsaerr;
3108 3103
3109 if (WSInitialized) 3104 if (WSInitialized)