Mercurial > vim
comparison src/memline.c @ 15543:dd725a8ab112 v8.1.0779
patch 8.1.0779: argument for message functions is inconsistent
commit https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 19 17:43:09 2019 +0100
patch 8.1.0779: argument for message functions is inconsistent
Problem: Argument for message functions is inconsistent.
Solution: Make first argument to msg() "char *".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 19 Jan 2019 17:45:07 +0100 |
parents | 55ccc2d353bd |
children | 536dd2bc5ac9 |
comparison
equal
deleted
inserted
replaced
15542:5baedae7ca7a | 15543:dd725a8ab112 |
---|---|
1172 else /* several swap files found, choose */ | 1172 else /* several swap files found, choose */ |
1173 { | 1173 { |
1174 /* list the names of the swap files */ | 1174 /* list the names of the swap files */ |
1175 (void)recover_names(fname, TRUE, 0, NULL); | 1175 (void)recover_names(fname, TRUE, 0, NULL); |
1176 msg_putchar('\n'); | 1176 msg_putchar('\n'); |
1177 MSG_PUTS(_("Enter number of swap file to use (0 to quit): ")); | 1177 msg_puts(_("Enter number of swap file to use (0 to quit): ")); |
1178 i = get_number(FALSE, NULL); | 1178 i = get_number(FALSE, NULL); |
1179 if (i < 1 || i > len) | 1179 if (i < 1 || i > len) |
1180 goto theend; | 1180 goto theend; |
1181 } | 1181 } |
1182 /* get the swap file name that will be used */ | 1182 /* get the swap file name that will be used */ |
1241 * try to read block 0 | 1241 * try to read block 0 |
1242 */ | 1242 */ |
1243 if ((hp = mf_get(mfp, (blocknr_T)0, 1)) == NULL) | 1243 if ((hp = mf_get(mfp, (blocknr_T)0, 1)) == NULL) |
1244 { | 1244 { |
1245 msg_start(); | 1245 msg_start(); |
1246 MSG_PUTS_ATTR(_("Unable to read block 0 from "), attr | MSG_HIST); | 1246 msg_puts_attr(_("Unable to read block 0 from "), attr | MSG_HIST); |
1247 msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST); | 1247 msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST); |
1248 MSG_PUTS_ATTR(_("\nMaybe no changes were made or Vim did not update the swap file."), | 1248 msg_puts_attr(_("\nMaybe no changes were made or Vim did not update the swap file."), |
1249 attr | MSG_HIST); | 1249 attr | MSG_HIST); |
1250 msg_end(); | 1250 msg_end(); |
1251 goto theend; | 1251 goto theend; |
1252 } | 1252 } |
1253 b0p = (ZERO_BL *)(hp->bh_data); | 1253 b0p = (ZERO_BL *)(hp->bh_data); |
1254 if (STRNCMP(b0p->b0_version, "VIM 3.0", 7) == 0) | 1254 if (STRNCMP(b0p->b0_version, "VIM 3.0", 7) == 0) |
1255 { | 1255 { |
1256 msg_start(); | 1256 msg_start(); |
1257 msg_outtrans_attr(mfp->mf_fname, MSG_HIST); | 1257 msg_outtrans_attr(mfp->mf_fname, MSG_HIST); |
1258 MSG_PUTS_ATTR(_(" cannot be used with this version of Vim.\n"), | 1258 msg_puts_attr(_(" cannot be used with this version of Vim.\n"), |
1259 MSG_HIST); | 1259 MSG_HIST); |
1260 MSG_PUTS_ATTR(_("Use Vim version 3.0.\n"), MSG_HIST); | 1260 msg_puts_attr(_("Use Vim version 3.0.\n"), MSG_HIST); |
1261 msg_end(); | 1261 msg_end(); |
1262 goto theend; | 1262 goto theend; |
1263 } | 1263 } |
1264 if (ml_check_b0_id(b0p) == FAIL) | 1264 if (ml_check_b0_id(b0p) == FAIL) |
1265 { | 1265 { |
1270 { | 1270 { |
1271 msg_start(); | 1271 msg_start(); |
1272 msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST); | 1272 msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST); |
1273 #if defined(MSWIN) | 1273 #if defined(MSWIN) |
1274 if (STRNCMP(b0p->b0_hname, "PC ", 3) == 0) | 1274 if (STRNCMP(b0p->b0_hname, "PC ", 3) == 0) |
1275 MSG_PUTS_ATTR(_(" cannot be used with this version of Vim.\n"), | 1275 msg_puts_attr(_(" cannot be used with this version of Vim.\n"), |
1276 attr | MSG_HIST); | 1276 attr | MSG_HIST); |
1277 else | 1277 else |
1278 #endif | 1278 #endif |
1279 MSG_PUTS_ATTR(_(" cannot be used on this computer.\n"), | 1279 msg_puts_attr(_(" cannot be used on this computer.\n"), |
1280 attr | MSG_HIST); | 1280 attr | MSG_HIST); |
1281 MSG_PUTS_ATTR(_("The file was created on "), attr | MSG_HIST); | 1281 msg_puts_attr(_("The file was created on "), attr | MSG_HIST); |
1282 /* avoid going past the end of a corrupted hostname */ | 1282 /* avoid going past the end of a corrupted hostname */ |
1283 b0p->b0_fname[0] = NUL; | 1283 b0p->b0_fname[0] = NUL; |
1284 MSG_PUTS_ATTR(b0p->b0_hname, attr | MSG_HIST); | 1284 msg_puts_attr((char *)b0p->b0_hname, attr | MSG_HIST); |
1285 MSG_PUTS_ATTR(_(",\nor the file has been damaged."), attr | MSG_HIST); | 1285 msg_puts_attr(_(",\nor the file has been damaged."), attr | MSG_HIST); |
1286 msg_end(); | 1286 msg_end(); |
1287 goto theend; | 1287 goto theend; |
1288 } | 1288 } |
1289 | 1289 |
1290 #ifdef FEAT_CRYPT | 1290 #ifdef FEAT_CRYPT |
1313 mf_new_page_size(mfp, (unsigned)char_to_long(b0p->b0_page_size)); | 1313 mf_new_page_size(mfp, (unsigned)char_to_long(b0p->b0_page_size)); |
1314 if (mfp->mf_page_size < previous_page_size) | 1314 if (mfp->mf_page_size < previous_page_size) |
1315 { | 1315 { |
1316 msg_start(); | 1316 msg_start(); |
1317 msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST); | 1317 msg_outtrans_attr(mfp->mf_fname, attr | MSG_HIST); |
1318 MSG_PUTS_ATTR(_(" has been damaged (page size is smaller than minimum value).\n"), | 1318 msg_puts_attr(_(" has been damaged (page size is smaller than minimum value).\n"), |
1319 attr | MSG_HIST); | 1319 attr | MSG_HIST); |
1320 msg_end(); | 1320 msg_end(); |
1321 goto theend; | 1321 goto theend; |
1322 } | 1322 } |
1323 if ((size = vim_lseek(mfp->mf_fd, (off_T)0L, SEEK_END)) <= 0) | 1323 if ((size = vim_lseek(mfp->mf_fd, (off_T)0L, SEEK_END)) <= 0) |
1411 /* Need to ask the user for the crypt key. If this fails we continue | 1411 /* Need to ask the user for the crypt key. If this fails we continue |
1412 * without a key, will probably get garbage text. */ | 1412 * without a key, will probably get garbage text. */ |
1413 if (*curbuf->b_p_key != NUL) | 1413 if (*curbuf->b_p_key != NUL) |
1414 { | 1414 { |
1415 smsg(_("Swap file is encrypted: \"%s\""), fname_used); | 1415 smsg(_("Swap file is encrypted: \"%s\""), fname_used); |
1416 MSG_PUTS(_("\nIf you entered a new crypt key but did not write the text file,")); | 1416 msg_puts(_("\nIf you entered a new crypt key but did not write the text file,")); |
1417 MSG_PUTS(_("\nenter the new crypt key.")); | 1417 msg_puts(_("\nenter the new crypt key.")); |
1418 MSG_PUTS(_("\nIf you wrote the text file after changing the crypt key press enter")); | 1418 msg_puts(_("\nIf you wrote the text file after changing the crypt key press enter")); |
1419 MSG_PUTS(_("\nto use the same key for text file and swap file")); | 1419 msg_puts(_("\nto use the same key for text file and swap file")); |
1420 } | 1420 } |
1421 else | 1421 else |
1422 smsg(_(need_key_msg), fname_used); | 1422 smsg(_(need_key_msg), fname_used); |
1423 buf->b_p_key = crypt_get_key(FALSE, FALSE); | 1423 buf->b_p_key = crypt_get_key(FALSE, FALSE); |
1424 if (buf->b_p_key == NULL) | 1424 if (buf->b_p_key == NULL) |
1679 if (got_int) | 1679 if (got_int) |
1680 emsg(_("E311: Recovery Interrupted")); | 1680 emsg(_("E311: Recovery Interrupted")); |
1681 else if (error) | 1681 else if (error) |
1682 { | 1682 { |
1683 ++no_wait_return; | 1683 ++no_wait_return; |
1684 MSG(">>>>>>>>>>>>>"); | 1684 msg(">>>>>>>>>>>>>"); |
1685 emsg(_("E312: Errors detected while recovering; look for lines starting with ???")); | 1685 emsg(_("E312: Errors detected while recovering; look for lines starting with ???")); |
1686 --no_wait_return; | 1686 --no_wait_return; |
1687 MSG(_("See \":help E312\" for more information.")); | 1687 msg(_("See \":help E312\" for more information.")); |
1688 MSG(">>>>>>>>>>>>>"); | 1688 msg(">>>>>>>>>>>>>"); |
1689 } | 1689 } |
1690 else | 1690 else |
1691 { | 1691 { |
1692 if (curbuf->b_changed) | 1692 if (curbuf->b_changed) |
1693 { | 1693 { |
1694 MSG(_("Recovery completed. You should check if everything is OK.")); | 1694 msg(_("Recovery completed. You should check if everything is OK.")); |
1695 MSG_PUTS(_("\n(You might want to write out this file under another name\n")); | 1695 msg_puts(_("\n(You might want to write out this file under another name\n")); |
1696 MSG_PUTS(_("and run diff with the original file to check for changes)")); | 1696 msg_puts(_("and run diff with the original file to check for changes)")); |
1697 } | 1697 } |
1698 else | 1698 else |
1699 MSG(_("Recovery completed. Buffer contents equals file contents.")); | 1699 msg(_("Recovery completed. Buffer contents equals file contents.")); |
1700 MSG_PUTS(_("\nYou may want to delete the .swp file now.\n\n")); | 1700 msg_puts(_("\nYou may want to delete the .swp file now.\n\n")); |
1701 cmdline_row = msg_row; | 1701 cmdline_row = msg_row; |
1702 } | 1702 } |
1703 #ifdef FEAT_CRYPT | 1703 #ifdef FEAT_CRYPT |
1704 if (*buf->b_p_key != NUL && STRCMP(curbuf->b_p_key, buf->b_p_key) != 0) | 1704 if (*buf->b_p_key != NUL && STRCMP(curbuf->b_p_key, buf->b_p_key) != 0) |
1705 { | 1705 { |
1706 MSG_PUTS(_("Using crypt key from swap file for the text file.\n")); | 1706 msg_puts(_("Using crypt key from swap file for the text file.\n")); |
1707 set_option_value((char_u *)"key", 0L, buf->b_p_key, OPT_LOCAL); | 1707 set_option_value((char_u *)"key", 0L, buf->b_p_key, OPT_LOCAL); |
1708 } | 1708 } |
1709 #endif | 1709 #endif |
1710 redraw_curbuf_later(NOT_VALID); | 1710 redraw_curbuf_later(NOT_VALID); |
1711 | 1711 |
1783 } | 1783 } |
1784 | 1784 |
1785 if (list) | 1785 if (list) |
1786 { | 1786 { |
1787 /* use msg() to start the scrolling properly */ | 1787 /* use msg() to start the scrolling properly */ |
1788 msg((char_u *)_("Swap files found:")); | 1788 msg(_("Swap files found:")); |
1789 msg_putchar('\n'); | 1789 msg_putchar('\n'); |
1790 } | 1790 } |
1791 | 1791 |
1792 /* | 1792 /* |
1793 * Do the loop for every directory in 'directory'. | 1793 * Do the loop for every directory in 'directory'. |
1964 else if (list) | 1964 else if (list) |
1965 { | 1965 { |
1966 if (dir_name[0] == '.' && dir_name[1] == NUL) | 1966 if (dir_name[0] == '.' && dir_name[1] == NUL) |
1967 { | 1967 { |
1968 if (fname == NULL) | 1968 if (fname == NULL) |
1969 MSG_PUTS(_(" In current directory:\n")); | 1969 msg_puts(_(" In current directory:\n")); |
1970 else | 1970 else |
1971 MSG_PUTS(_(" Using specified name:\n")); | 1971 msg_puts(_(" Using specified name:\n")); |
1972 } | 1972 } |
1973 else | 1973 else |
1974 { | 1974 { |
1975 MSG_PUTS(_(" In directory ")); | 1975 msg_puts(_(" In directory ")); |
1976 msg_home_replace(dir_name); | 1976 msg_home_replace(dir_name); |
1977 MSG_PUTS(":\n"); | 1977 msg_puts(":\n"); |
1978 } | 1978 } |
1979 | 1979 |
1980 if (num_files) | 1980 if (num_files) |
1981 { | 1981 { |
1982 for (i = 0; i < num_files; ++i) | 1982 for (i = 0; i < num_files; ++i) |
1983 { | 1983 { |
1984 /* print the swap file name */ | 1984 /* print the swap file name */ |
1985 msg_outnum((long)++file_count); | 1985 msg_outnum((long)++file_count); |
1986 MSG_PUTS(". "); | 1986 msg_puts(". "); |
1987 msg_puts(gettail(files[i])); | 1987 msg_puts((char *)gettail(files[i])); |
1988 msg_putchar('\n'); | 1988 msg_putchar('\n'); |
1989 (void)swapfile_info(files[i]); | 1989 (void)swapfile_info(files[i]); |
1990 } | 1990 } |
1991 } | 1991 } |
1992 else | 1992 else |
1993 MSG_PUTS(_(" -- none --\n")); | 1993 msg_puts(_(" -- none --\n")); |
1994 out_flush(); | 1994 out_flush(); |
1995 } | 1995 } |
1996 else | 1996 else |
1997 file_count += num_files; | 1997 file_count += num_files; |
1998 | 1998 |
2104 { | 2104 { |
2105 #ifdef UNIX | 2105 #ifdef UNIX |
2106 /* print name of owner of the file */ | 2106 /* print name of owner of the file */ |
2107 if (mch_get_uname(st.st_uid, uname, B0_UNAME_SIZE) == OK) | 2107 if (mch_get_uname(st.st_uid, uname, B0_UNAME_SIZE) == OK) |
2108 { | 2108 { |
2109 MSG_PUTS(_(" owned by: ")); | 2109 msg_puts(_(" owned by: ")); |
2110 msg_outtrans(uname); | 2110 msg_outtrans(uname); |
2111 MSG_PUTS(_(" dated: ")); | 2111 msg_puts(_(" dated: ")); |
2112 } | 2112 } |
2113 else | 2113 else |
2114 #endif | 2114 #endif |
2115 MSG_PUTS(_(" dated: ")); | 2115 msg_puts(_(" dated: ")); |
2116 x = st.st_mtime; /* Manx C can't do &st.st_mtime */ | 2116 x = st.st_mtime; /* Manx C can't do &st.st_mtime */ |
2117 p = ctime(&x); /* includes '\n' */ | 2117 p = ctime(&x); /* includes '\n' */ |
2118 if (p == NULL) | 2118 if (p == NULL) |
2119 MSG_PUTS("(invalid)\n"); | 2119 msg_puts("(invalid)\n"); |
2120 else | 2120 else |
2121 MSG_PUTS(p); | 2121 msg_puts(p); |
2122 } | 2122 } |
2123 | 2123 |
2124 /* | 2124 /* |
2125 * print the original file name | 2125 * print the original file name |
2126 */ | 2126 */ |
2129 { | 2129 { |
2130 if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0)) | 2130 if (read_eintr(fd, &b0, sizeof(b0)) == sizeof(b0)) |
2131 { | 2131 { |
2132 if (STRNCMP(b0.b0_version, "VIM 3.0", 7) == 0) | 2132 if (STRNCMP(b0.b0_version, "VIM 3.0", 7) == 0) |
2133 { | 2133 { |
2134 MSG_PUTS(_(" [from Vim version 3.0]")); | 2134 msg_puts(_(" [from Vim version 3.0]")); |
2135 } | 2135 } |
2136 else if (ml_check_b0_id(&b0) == FAIL) | 2136 else if (ml_check_b0_id(&b0) == FAIL) |
2137 { | 2137 { |
2138 MSG_PUTS(_(" [does not look like a Vim swap file]")); | 2138 msg_puts(_(" [does not look like a Vim swap file]")); |
2139 } | 2139 } |
2140 else | 2140 else |
2141 { | 2141 { |
2142 MSG_PUTS(_(" file name: ")); | 2142 msg_puts(_(" file name: ")); |
2143 if (b0.b0_fname[0] == NUL) | 2143 if (b0.b0_fname[0] == NUL) |
2144 MSG_PUTS(_("[No Name]")); | 2144 msg_puts(_("[No Name]")); |
2145 else | 2145 else |
2146 msg_outtrans(b0.b0_fname); | 2146 msg_outtrans(b0.b0_fname); |
2147 | 2147 |
2148 MSG_PUTS(_("\n modified: ")); | 2148 msg_puts(_("\n modified: ")); |
2149 MSG_PUTS(b0.b0_dirty ? _("YES") : _("no")); | 2149 msg_puts(b0.b0_dirty ? _("YES") : _("no")); |
2150 | 2150 |
2151 if (*(b0.b0_uname) != NUL) | 2151 if (*(b0.b0_uname) != NUL) |
2152 { | 2152 { |
2153 MSG_PUTS(_("\n user name: ")); | 2153 msg_puts(_("\n user name: ")); |
2154 msg_outtrans(b0.b0_uname); | 2154 msg_outtrans(b0.b0_uname); |
2155 } | 2155 } |
2156 | 2156 |
2157 if (*(b0.b0_hname) != NUL) | 2157 if (*(b0.b0_hname) != NUL) |
2158 { | 2158 { |
2159 if (*(b0.b0_uname) != NUL) | 2159 if (*(b0.b0_uname) != NUL) |
2160 MSG_PUTS(_(" host name: ")); | 2160 msg_puts(_(" host name: ")); |
2161 else | 2161 else |
2162 MSG_PUTS(_("\n host name: ")); | 2162 msg_puts(_("\n host name: ")); |
2163 msg_outtrans(b0.b0_hname); | 2163 msg_outtrans(b0.b0_hname); |
2164 } | 2164 } |
2165 | 2165 |
2166 if (char_to_long(b0.b0_pid) != 0L) | 2166 if (char_to_long(b0.b0_pid) != 0L) |
2167 { | 2167 { |
2168 MSG_PUTS(_("\n process ID: ")); | 2168 msg_puts(_("\n process ID: ")); |
2169 msg_outnum(char_to_long(b0.b0_pid)); | 2169 msg_outnum(char_to_long(b0.b0_pid)); |
2170 #if defined(UNIX) | 2170 #if defined(UNIX) |
2171 /* EMX kill() not working correctly, it seems */ | 2171 /* EMX kill() not working correctly, it seems */ |
2172 if (kill((pid_t)char_to_long(b0.b0_pid), 0) == 0) | 2172 if (kill((pid_t)char_to_long(b0.b0_pid), 0) == 0) |
2173 { | 2173 { |
2174 MSG_PUTS(_(" (STILL RUNNING)")); | 2174 msg_puts(_(" (STILL RUNNING)")); |
2175 # if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) | 2175 # if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) |
2176 process_still_running = TRUE; | 2176 process_still_running = TRUE; |
2177 # endif | 2177 # endif |
2178 } | 2178 } |
2179 #endif | 2179 #endif |
2181 | 2181 |
2182 if (b0_magic_wrong(&b0)) | 2182 if (b0_magic_wrong(&b0)) |
2183 { | 2183 { |
2184 #if defined(MSWIN) | 2184 #if defined(MSWIN) |
2185 if (STRNCMP(b0.b0_hname, "PC ", 3) == 0) | 2185 if (STRNCMP(b0.b0_hname, "PC ", 3) == 0) |
2186 MSG_PUTS(_("\n [not usable with this version of Vim]")); | 2186 msg_puts(_("\n [not usable with this version of Vim]")); |
2187 else | 2187 else |
2188 #endif | 2188 #endif |
2189 MSG_PUTS(_("\n [not usable on this computer]")); | 2189 msg_puts(_("\n [not usable on this computer]")); |
2190 } | 2190 } |
2191 } | 2191 } |
2192 } | 2192 } |
2193 else | 2193 else |
2194 MSG_PUTS(_(" [cannot be read]")); | 2194 msg_puts(_(" [cannot be read]")); |
2195 close(fd); | 2195 close(fd); |
2196 } | 2196 } |
2197 else | 2197 else |
2198 MSG_PUTS(_(" [cannot be opened]")); | 2198 msg_puts(_(" [cannot be opened]")); |
2199 msg_putchar('\n'); | 2199 msg_putchar('\n'); |
2200 | 2200 |
2201 return x; | 2201 return x; |
2202 } | 2202 } |
2203 | 2203 |
2412 got_int |= got_int_save; | 2412 got_int |= got_int_save; |
2413 | 2413 |
2414 if (message) | 2414 if (message) |
2415 { | 2415 { |
2416 if (status == OK) | 2416 if (status == OK) |
2417 MSG(_("File preserved")); | 2417 msg(_("File preserved")); |
2418 else | 2418 else |
2419 emsg(_("E314: Preserve failed")); | 2419 emsg(_("E314: Preserve failed")); |
2420 } | 2420 } |
2421 } | 2421 } |
2422 | 2422 |
4371 time_t x, sx; | 4371 time_t x, sx; |
4372 char *p; | 4372 char *p; |
4373 | 4373 |
4374 ++no_wait_return; | 4374 ++no_wait_return; |
4375 (void)emsg(_("E325: ATTENTION")); | 4375 (void)emsg(_("E325: ATTENTION")); |
4376 MSG_PUTS(_("\nFound a swap file by the name \"")); | 4376 msg_puts(_("\nFound a swap file by the name \"")); |
4377 msg_home_replace(fname); | 4377 msg_home_replace(fname); |
4378 MSG_PUTS("\"\n"); | 4378 msg_puts("\"\n"); |
4379 sx = swapfile_info(fname); | 4379 sx = swapfile_info(fname); |
4380 MSG_PUTS(_("While opening file \"")); | 4380 msg_puts(_("While opening file \"")); |
4381 msg_outtrans(buf->b_fname); | 4381 msg_outtrans(buf->b_fname); |
4382 MSG_PUTS("\"\n"); | 4382 msg_puts("\"\n"); |
4383 if (mch_stat((char *)buf->b_fname, &st) == -1) | 4383 if (mch_stat((char *)buf->b_fname, &st) == -1) |
4384 { | 4384 { |
4385 MSG_PUTS(_(" CANNOT BE FOUND")); | 4385 msg_puts(_(" CANNOT BE FOUND")); |
4386 } | 4386 } |
4387 else | 4387 else |
4388 { | 4388 { |
4389 MSG_PUTS(_(" dated: ")); | 4389 msg_puts(_(" dated: ")); |
4390 x = st.st_mtime; /* Manx C can't do &st.st_mtime */ | 4390 x = st.st_mtime; /* Manx C can't do &st.st_mtime */ |
4391 p = ctime(&x); /* includes '\n' */ | 4391 p = ctime(&x); /* includes '\n' */ |
4392 if (p == NULL) | 4392 if (p == NULL) |
4393 MSG_PUTS("(invalid)\n"); | 4393 msg_puts("(invalid)\n"); |
4394 else | 4394 else |
4395 MSG_PUTS(p); | 4395 msg_puts(p); |
4396 if (sx != 0 && x > sx) | 4396 if (sx != 0 && x > sx) |
4397 MSG_PUTS(_(" NEWER than swap file!\n")); | 4397 msg_puts(_(" NEWER than swap file!\n")); |
4398 } | 4398 } |
4399 /* Some of these messages are long to allow translation to | 4399 /* Some of these messages are long to allow translation to |
4400 * other languages. */ | 4400 * other languages. */ |
4401 MSG_PUTS(_("\n(1) Another program may be editing the same file. If this is the case,\n be careful not to end up with two different instances of the same\n file when making changes. Quit, or continue with caution.\n")); | 4401 msg_puts(_("\n(1) Another program may be editing the same file. If this is the case,\n be careful not to end up with two different instances of the same\n file when making changes. Quit, or continue with caution.\n")); |
4402 MSG_PUTS(_("(2) An edit session for this file crashed.\n")); | 4402 msg_puts(_("(2) An edit session for this file crashed.\n")); |
4403 MSG_PUTS(_(" If this is the case, use \":recover\" or \"vim -r ")); | 4403 msg_puts(_(" If this is the case, use \":recover\" or \"vim -r ")); |
4404 msg_outtrans(buf->b_fname); | 4404 msg_outtrans(buf->b_fname); |
4405 MSG_PUTS(_("\"\n to recover the changes (see \":help recovery\").\n")); | 4405 msg_puts(_("\"\n to recover the changes (see \":help recovery\").\n")); |
4406 MSG_PUTS(_(" If you did this already, delete the swap file \"")); | 4406 msg_puts(_(" If you did this already, delete the swap file \"")); |
4407 msg_outtrans(fname); | 4407 msg_outtrans(fname); |
4408 MSG_PUTS(_("\"\n to avoid this message.\n")); | 4408 msg_puts(_("\"\n to avoid this message.\n")); |
4409 cmdline_row = msg_row; | 4409 cmdline_row = msg_row; |
4410 --no_wait_return; | 4410 --no_wait_return; |
4411 } | 4411 } |
4412 | 4412 |
4413 #if defined(FEAT_EVAL) | 4413 #if defined(FEAT_EVAL) |
4888 break; | 4888 break; |
4889 } | 4889 } |
4890 else | 4890 else |
4891 #endif | 4891 #endif |
4892 { | 4892 { |
4893 MSG_PUTS("\n"); | 4893 msg_puts("\n"); |
4894 if (msg_silent == 0) | 4894 if (msg_silent == 0) |
4895 /* call wait_return() later */ | 4895 /* call wait_return() later */ |
4896 need_wait_return = TRUE; | 4896 need_wait_return = TRUE; |
4897 } | 4897 } |
4898 | 4898 |