Skip to content

Commit b050192

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 8df28f3 + 91c5262 commit b050192

File tree

17 files changed

+154
-83
lines changed

17 files changed

+154
-83
lines changed

src/gui.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ gui_init_check(void)
447447
* See gui_do_fork().
448448
* Use a simpler check if the GUI window can probably be opened.
449449
*/
450-
result = gui.dofork ? gui_mch_early_init_check() : gui_mch_init_check();
450+
result = gui.dofork ? gui_mch_early_init_check(TRUE) : gui_mch_init_check();
451451
# else
452452
result = gui_mch_init_check();
453453
# endif

src/gui.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# include <X11/StringDefs.h>
1717
#endif
1818

19-
#ifdef FEAT_BEVAL
19+
#if defined(FEAT_BEVAL) || defined(PROTO)
2020
# include "gui_beval.h"
2121
#endif
2222

src/gui_gtk_x11.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,10 @@ gui_mch_prepare(int *argc, char **argv)
542542
}
543543

544544
/* These arguments make gnome_program_init() print a message and exit.
545-
* Must start the GUI for this, otherwise ":gui" will exit later! */
546-
if (option->flags & ARG_NEEDS_GUI)
545+
* Must start the GUI for this, otherwise ":gui" will exit later!
546+
* Only when the GUI can start. */
547+
if ((option->flags & ARG_NEEDS_GUI)
548+
&& gui_mch_early_init_check(FALSE) == OK)
547549
gui.starting = TRUE;
548550

549551
if (option->flags & ARG_KEEP)
@@ -1663,7 +1665,7 @@ selection_get_cb(GtkWidget *widget UNUSED,
16631665
* Return OK or FAIL.
16641666
*/
16651667
int
1666-
gui_mch_early_init_check(void)
1668+
gui_mch_early_init_check(int give_message)
16671669
{
16681670
char_u *p;
16691671

@@ -1672,7 +1674,8 @@ gui_mch_early_init_check(void)
16721674
if (p == NULL || *p == NUL)
16731675
{
16741676
gui.dying = TRUE;
1675-
EMSG(_((char *)e_opendisp));
1677+
if (give_message)
1678+
EMSG(_((char *)e_opendisp));
16761679
return FAIL;
16771680
}
16781681
return OK;

src/gui_w32.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ gui_mch_set_rendering_options(char_u *s)
247247
# define CONST
248248
# define FAR
249249
# define NEAR
250+
# undef _cdecl
250251
# define _cdecl
251252
typedef int BOOL;
252253
typedef int BYTE;
@@ -288,6 +289,7 @@ typedef void VOID;
288289
typedef int LPNMHDR;
289290
typedef int LONG;
290291
typedef int WNDPROC;
292+
typedef int UINT_PTR;
291293
#endif
292294

293295
#ifndef GET_X_LPARAM
@@ -3451,7 +3453,7 @@ gui_mch_settitle(
34513453
set_window_title(s_hwnd, (title == NULL ? "VIM" : (char *)title));
34523454
}
34533455

3454-
#ifdef FEAT_MOUSESHAPE
3456+
#if defined(FEAT_MOUSESHAPE) || defined(PROTO)
34553457
/* Table for shape IDCs. Keep in sync with the mshape_names[] table in
34563458
* misc2.c! */
34573459
static LPCSTR mshape_idcs[] =
@@ -3514,7 +3516,7 @@ mch_set_mouse_shape(int shape)
35143516
}
35153517
#endif
35163518

3517-
#ifdef FEAT_BROWSE
3519+
#if defined(FEAT_BROWSE) || defined(PROTO)
35183520
/*
35193521
* The file browser exists in two versions: with "W" uses wide characters,
35203522
* without "W" the current codepage. When FEAT_MBYTE is defined and on

src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ main
436436
#endif
437437
}
438438
#endif /* NO_VIM_MAIN */
439+
#endif /* PROTO */
439440

440441
/*
441442
* vim_main2() is needed for FEAT_MZSCHEME, but we define it always to keep
@@ -942,7 +943,6 @@ vim_main2(void)
942943

943944
return 0;
944945
}
945-
#endif /* PROTO */
946946

947947
/*
948948
* Initialisation shared by main() and some tests.

src/ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6283,7 +6283,7 @@ write_viminfo_registers(FILE *fp)
62836283
* 'permanent' of the two), otherwise the PRIMARY one.
62846284
* For now, use a hard-coded sanity limit of 1Mb of data.
62856285
*/
6286-
#if defined(FEAT_X11) && defined(FEAT_CLIPBOARD)
6286+
#if (defined(FEAT_X11) && defined(FEAT_CLIPBOARD)) || defined(PROTO)
62876287
void
62886288
x11_export_final_selection(void)
62896289
{

src/proto/fileio.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void free_all_autocmds(void);
3333
int check_ei(void);
3434
char_u *au_event_disable(char *what);
3535
void au_event_restore(char_u *old_ei);
36-
void do_autocmd(char_u *arg, int forceit);
36+
void do_autocmd(char_u *arg_in, int forceit);
3737
int do_doautocmd(char_u *arg, int do_msg, int *did_something);
3838
void ex_doautoall(exarg_T *eap);
3939
int check_nomodeline(char_u **argp);

src/proto/gui_gtk_x11.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ int gui_mch_is_blink_off(void);
66
void gui_mch_set_blinking(long waittime, long on, long off);
77
void gui_mch_stop_blink(void);
88
void gui_mch_start_blink(void);
9-
int gui_mch_early_init_check(void);
9+
int gui_mch_early_init_check(int give_message);
1010
int gui_mch_init_check(void);
1111
void gui_mch_show_tabline(int showit);
1212
int gui_mch_showing_tabline(void);

src/proto/main.pro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* main.c */
2-
void common_init(mparm_T *params);
2+
int vim_main2(void);
3+
void common_init(mparm_T *paramp);
34
void main_loop(int cmdwin, int noexmode);
45
void getout_preserve_modified(int exitval);
56
void getout(int exitval);

src/proto/message.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ int verb_msg(char_u *s);
44
int msg_attr(char_u *s, int attr);
55
int msg_attr_keep(char_u *s, int attr, int keep);
66
char_u *msg_strtrunc(char_u *s, int force);
7-
void trunc_string(char_u *s, char_u *buf, int room, int buflen);
7+
void trunc_string(char_u *s, char_u *buf, int room_in, int buflen);
88
void reset_last_sourcing(void);
99
void msg_source(int attr);
1010
int emsg_not_now(void);

0 commit comments

Comments
 (0)