From f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 13 Jan 2019 23:38:42 +0100 Subject: patch 8.1.0743: giving error messages is not flexible 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. --- src/gui_w32.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gui_w32.c') diff --git a/src/gui_w32.c b/src/gui_w32.c index ad10e97644..ab60fb5181 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -1582,7 +1582,7 @@ gui_mch_get_font( if (get_logfont(&lf, name, NULL, giveErrorIfMissing) == OK) font = get_font_handle(&lf); if (font == NOFONT && giveErrorIfMissing) - EMSG2(_(e_font), name); + semsg(_(e_font), name); return font; } @@ -5235,7 +5235,7 @@ gui_mch_set_parent(char *title) EnumWindows(FindWindowTitle, (LPARAM)title); if (vim_parent_hwnd == NULL) { - EMSG2(_("E671: Cannot find window title \"%s\""), title); + semsg(_("E671: Cannot find window title \"%s\""), title); mch_exit(2); } } @@ -5246,7 +5246,7 @@ ole_error(char *arg) { char buf[IOSIZE]; - /* Can't use EMSG() here, we have not finished initialisation yet. */ + /* Can't use emsg() here, we have not finished initialisation yet. */ vim_snprintf(buf, IOSIZE, _("E243: Argument not supported: \"-%s\"; Use the OLE version."), arg); @@ -5468,7 +5468,7 @@ gui_mch_init(void) #endif if (s_hwnd == NULL) { - EMSG(_("E672: Unable to open window inside MDI application")); + emsg(_("E672: Unable to open window inside MDI application")); mch_exit(2); } } @@ -8671,7 +8671,7 @@ gui_mch_register_sign(char_u *signfile) { if (sign.hImage) close_signicon_image(&sign); - EMSG(_(e_signdata)); + emsg(_(e_signdata)); } return (void *)psign; @@ -9025,7 +9025,7 @@ gui_mch_create_beval_area( if (mesg != NULL && mesgCB != NULL) { - IEMSG(_("E232: Cannot create BalloonEval with both message and callback")); + iemsg(_("E232: Cannot create BalloonEval with both message and callback")); return NULL; } -- cgit v1.2.3