Mercurial > vim
comparison src/os_amiga.c @ 15470:55ccc2d353bd v8.1.0743
patch 8.1.0743: giving error messages is not flexible
commit https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 13 23:38:42 2019 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 13 Jan 2019 23:45:08 +0100 |
parents | 6e4e0d43b20b |
children | dd725a8ab112 |
comparison
equal
deleted
inserted
replaced
15469:bc9b5261ed01 | 15470:55ccc2d353bd |
---|---|
961 * set screen mode, always fails. | 961 * set screen mode, always fails. |
962 */ | 962 */ |
963 int | 963 int |
964 mch_screenmode(char_u *arg) | 964 mch_screenmode(char_u *arg) |
965 { | 965 { |
966 EMSG(_(e_screenmode)); | 966 emsg(_(e_screenmode)); |
967 return FAIL; | 967 return FAIL; |
968 } | 968 } |
969 | 969 |
970 /* | 970 /* |
971 * Code for this routine came from the following : | 971 * Code for this routine came from the following : |
1187 int retval = 0; | 1187 int retval = 0; |
1188 | 1188 |
1189 if (close_win) | 1189 if (close_win) |
1190 { | 1190 { |
1191 /* if Vim opened a window: Executing a shell may cause crashes */ | 1191 /* if Vim opened a window: Executing a shell may cause crashes */ |
1192 EMSG(_("E360: Cannot execute shell with -f option")); | 1192 emsg(_("E360: Cannot execute shell with -f option")); |
1193 return -1; | 1193 return -1; |
1194 } | 1194 } |
1195 | 1195 |
1196 if (term_console) | 1196 if (term_console) |
1197 win_resize_off(); /* window resize events de-activated */ | 1197 win_resize_off(); /* window resize events de-activated */ |
1515 #endif | 1515 #endif |
1516 } | 1516 } |
1517 matches = gap->ga_len - start_len; | 1517 matches = gap->ga_len - start_len; |
1518 | 1518 |
1519 if (Result == ERROR_BUFFER_OVERFLOW) | 1519 if (Result == ERROR_BUFFER_OVERFLOW) |
1520 EMSG(_("ANCHOR_BUF_SIZE too small.")); | 1520 emsg(_("ANCHOR_BUF_SIZE too small.")); |
1521 else if (matches == 0 && Result != ERROR_OBJECT_NOT_FOUND | 1521 else if (matches == 0 && Result != ERROR_OBJECT_NOT_FOUND |
1522 && Result != ERROR_DEVICE_NOT_MOUNTED | 1522 && Result != ERROR_DEVICE_NOT_MOUNTED |
1523 && Result != ERROR_NO_MORE_ENTRIES) | 1523 && Result != ERROR_NO_MORE_ENTRIES) |
1524 EMSG(_("I/O ERROR")); | 1524 emsg(_("I/O ERROR")); |
1525 | 1525 |
1526 /* | 1526 /* |
1527 * Sort the files for this pattern. | 1527 * Sort the files for this pattern. |
1528 */ | 1528 */ |
1529 if (matches) | 1529 if (matches) |