0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

patch 8.2.3967: error messages are spread out

Problem:    Error messages are spread out.
Solution:   Move more errors to errors.h.
This commit is contained in:
Bram Moolenaar
2022-01-01 14:19:49 +00:00
parent b37a65e4bf
commit 460ae5dfca
70 changed files with 403 additions and 334 deletions

View File

@@ -2702,7 +2702,7 @@ mch_FullName(
#endif
l = mch_chdir((char *)olddir);
if (l != 0)
emsg(_(e_prev_dir));
emsg(_(e_cannot_go_back_to_previous_directory));
}
#ifdef HAVE_FCHDIR
if (fd >= 0)
@@ -5528,7 +5528,7 @@ mch_job_start(char **argv, job_T *job, jobopt_T *options, int is_terminal)
fd_in[0] = mch_open((char *)fname, O_RDONLY, 0);
if (fd_in[0] < 0)
{
semsg(_(e_notopen), fname);
semsg(_(e_cant_open_file_str), fname);
goto failed;
}
}
@@ -5546,7 +5546,7 @@ mch_job_start(char **argv, job_T *job, jobopt_T *options, int is_terminal)
fd_out[1] = mch_open((char *)fname, O_WRONLY | O_CREAT | O_TRUNC, 0644);
if (fd_out[1] < 0)
{
semsg(_(e_notopen), fname);
semsg(_(e_cant_open_file_str), fname);
goto failed;
}
}
@@ -5560,7 +5560,7 @@ mch_job_start(char **argv, job_T *job, jobopt_T *options, int is_terminal)
fd_err[1] = mch_open((char *)fname, O_WRONLY | O_CREAT | O_TRUNC, 0600);
if (fd_err[1] < 0)
{
semsg(_(e_notopen), fname);
semsg(_(e_cant_open_file_str), fname);
goto failed;
}
}
@@ -6627,7 +6627,7 @@ mch_expand_wildcards(
*/
if ((tempname = vim_tempname('o', FALSE)) == NULL)
{
emsg(_(e_notmp));
emsg(_(e_cant_get_temp_file_name));
return FAIL;
}
@@ -6888,7 +6888,7 @@ mch_expand_wildcards(
if (i != (int)len)
{
// unexpected read error
semsg(_(e_notread), tempname);
semsg(_(e_cant_read_file_str), tempname);
vim_free(tempname);
vim_free(buffer);
return FAIL;
@@ -7594,7 +7594,7 @@ mch_libcall(
if (!success)
{
semsg(_(e_libcall), funcname);
semsg(_(e_library_call_failed_for_str), funcname);
return FAIL;
}