diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-01-13 23:38:42 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-01-13 23:38:42 +0100 |
commit | f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d (patch) | |
tree | a6b07005c19279a4f5d01be14f14861c2657fa95 /src/gui.c | |
parent | 05500ece6282407f9f7227aaf564e24147326863 (diff) | |
download | vim-git-f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d.tar.gz |
patch 8.1.0743: giving error messages is not flexiblev8.1.0743
Problem: Giving error messages is not flexible.
Solution: Add semsg(). Change argument from "char_u *" to "char *", also
for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes
#3302) Also make emsg() accept a "char *" argument. Get rid of
an enormous number of type casts.
Diffstat (limited to 'src/gui.c')
-rw-r--r-- | src/gui.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -215,7 +215,7 @@ gui_do_fork(void) pid = fork(); if (pid < 0) /* Fork error */ { - EMSG(_("E851: Failed to create a new process for the GUI")); + emsg(_("E851: Failed to create a new process for the GUI")); return; } else if (pid > 0) /* Parent */ @@ -239,7 +239,7 @@ gui_do_fork(void) # else waitpid(pid, &exit_status, 0); # endif - EMSG(_("E852: The child process failed to start the GUI")); + emsg(_("E852: The child process failed to start the GUI")); return; } else if (status == GUI_CHILD_IO_ERROR) @@ -362,7 +362,7 @@ gui_init_check(void) if (result != MAYBE) { if (result == FAIL) - EMSG(_("E229: Cannot start the GUI")); + emsg(_("E229: Cannot start the GUI")); return result; } @@ -515,7 +515,7 @@ gui_init(void) if (STRCMP(use_gvimrc, "NONE") != 0 && STRCMP(use_gvimrc, "NORC") != 0 && do_source(use_gvimrc, FALSE, DOSO_NONE) != OK) - EMSG2(_("E230: Cannot read from \"%s\""), use_gvimrc); + semsg(_("E230: Cannot read from \"%s\""), use_gvimrc); } else { @@ -649,12 +649,12 @@ gui_init(void) gui_init_font(*p_guifont == NUL ? hl_get_font_name() : p_guifont, FALSE) == FAIL) { - EMSG(_("E665: Cannot start GUI, no valid font found")); + emsg(_("E665: Cannot start GUI, no valid font found")); goto error2; } #ifdef FEAT_MBYTE if (gui_get_wide_font() == FAIL) - EMSG(_("E231: 'guifontwide' invalid")); + emsg(_("E231: 'guifontwide' invalid")); #endif gui.num_cols = Columns; @@ -769,7 +769,7 @@ gui_init(void) #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK) if (!im_xim_isvalid_imactivate()) - EMSG(_("E599: Value of 'imactivatekey' is invalid")); + emsg(_("E599: Value of 'imactivatekey' is invalid")); #endif /* When 'cmdheight' was set during startup it may not have taken * effect yet. */ @@ -4785,7 +4785,7 @@ gui_get_color(char_u *name) && gui.in_use #endif ) - EMSG2(_("E254: Cannot allocate color %s"), name); + semsg(_("E254: Cannot allocate color %s"), name); return t; } |