Patch 8.2.3987

6 views
Skip to first unread message

Bram Moolenaar

unread,
Jan 2, 2022, 4:26:52 PM1/2/22
to vim...@googlegroups.com

Patch 8.2.3987
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
Files: src/errors.h, src/digraph.c, src/ex_eval.c, src/gui.c,
src/hardcopy.c, src/if_cscope.c, src/if_tcl.c, src/if_xcmdsrv.c,
src/mbyte.c, src/misc2.c, src/netbeans.c, src/option.c,
src/optionstr.c, src/quickfix.c, src/regexp.c, src/tag.c,
src/term.c, src/viminfo.c


*** ../vim-8.2.3986/src/errors.h 2022-01-02 20:20:41.373033185 +0000
--- src/errors.h 2022-01-02 21:24:00.011388261 +0000
***************
*** 1203,1222 ****
INIT(= N_("E516: No buffers were deleted"));
EXTERN char e_no_buffers_were_wiped_out[]
INIT(= N_("E517: No buffers were wiped out"));
!
EXTERN char e_not_allowed_here[]
INIT(= N_("E523: Not allowed here"));
EXTERN char e_not_allowed_to_change_text_or_change_window[]
INIT(= N_("E565: Not allowed to change text or change window"));
EXTERN char e_not_allowed_to_change_text_here[]
INIT(= N_("E578: Not allowed to change text here"));
#ifdef FEAT_EVAL
EXTERN char e_endif_without_if[]
INIT(= N_("E580: :endif without :if"));
EXTERN char e_else_without_if[]
INIT(= N_("E581: :else without :if"));
EXTERN char e_elseif_without_if[]
INIT(= N_("E582: :elseif without :if"));
EXTERN char e_continue_without_while_or_for[]
INIT(= N_("E586: :continue without :while or :for"));
EXTERN char e_break_without_while_or_for[]
--- 1203,1359 ----
INIT(= N_("E516: No buffers were deleted"));
EXTERN char e_no_buffers_were_wiped_out[]
INIT(= N_("E517: No buffers were wiped out"));
! EXTERN char e_unknown_option[]
! INIT(= N_("E518: Unknown option"));
! EXTERN char e_option_not_supported[]
! INIT(= N_("E519: Option not supported"));
! EXTERN char e_not_allowed_in_modeline[]
! INIT(= N_("E520: Not allowed in a modeline"));
! EXTERN char e_number_required_after_equal[]
! INIT(= N_("E521: Number required after ="));
! EXTERN char e_number_required_after_str_equal_str[]
! INIT(= N_("E521: Number required: &%s = '%s'"));
! EXTERN char e_not_found_in_termcap[]
! INIT(= N_("E522: Not found in termcap"));
EXTERN char e_not_allowed_here[]
INIT(= N_("E523: Not allowed here"));
+ EXTERN char e_missing_colon[]
+ INIT(= N_("E524: Missing colon"));
+ EXTERN char e_zero_length_string[]
+ INIT(= N_("E525: Zero length string"));
+ EXTERN char e_missing_number_after_angle_str_angle[]
+ INIT(= N_("E526: Missing number after <%s>"));
+ EXTERN char e_missing_comma[]
+ INIT(= N_("E527: Missing comma"));
+ EXTERN char e_must_specify_a_value[]
+ INIT(= N_("E528: Must specify a ' value"));
+ EXTERN char e_cannot_set_term_to_empty_string[]
+ INIT(= N_("E529: Cannot set 'term' to empty string"));
+ EXTERN char e_cannot_change_term_in_GUI[]
+ INIT(= N_("E530: Cannot change 'term' in the GUI"));
+ EXTERN char e_use_gui_to_start_GUI[]
+ INIT(= N_("E531: Use \":gui\" to start the GUI"));
+ #ifdef FEAT_NETBEANS_INTG
+ EXTERN char e_highlighting_color_name_too_long_in_defineAnnoType[]
+ INIT(= N_("E532: highlighting color name too long in defineAnnoType"));
+ #endif
+ EXTERN char e_cant_select_wide_font[]
+ INIT(= N_("E533: can't select wide font"));
+ EXTERN char e_invalid_wide_font[]
+ INIT(= N_("E534: Invalid wide font"));
+ EXTERN char e_illegal_character_after_chr[]
+ INIT(= N_("E535: Illegal character after <%c>"));
+ EXTERN char e_comma_required[]
+ INIT(= N_("E536: comma required"));
+ EXTERN char e_commentstring_must_be_empty_or_contain_str[]
+ INIT(= N_("E537: 'commentstring' must be empty or contain %s"));
+ // E538 unused (perhaps 538.nl ?)
+ EXTERN char e_illegal_character_str[]
+ INIT(= N_("E539: Illegal character <%s>"));
+ EXTERN char e_unclosed_expression_sequence[]
+ INIT(= N_("E540: Unclosed expression sequence"));
+ // E541 unused
+ EXTERN char e_unbalanced_groups[]
+ INIT(= N_("E542: unbalanced groups"));
+ #ifdef MSWIN
+ EXTERN char e_not_valid_codepage[]
+ INIT(= N_("E543: Not a valid codepage"));
+ #endif
+ EXTERN char e_keymap_file_not_found[]
+ INIT(= N_("E544: Keymap file not found"));
+ EXTERN char e_missing_colon_2[]
+ #ifdef CURSOR_SHAPE
+ INIT(= N_("E545: Missing colon"));
+ EXTERN char e_illegal_mode[]
+ INIT(= N_("E546: Illegal mode"));
+ #endif
+ #ifdef FEAT_MOUSESHAPE
+ EXTERN char e_illegal_mouseshape[]
+ INIT(= N_("E547: Illegal mouseshape"));
+ #endif
+ EXTERN char e_digit_expected[]
+ INIT(= N_("E548: digit expected"));
+ EXTERN char e_illegal_percentage[]
+ INIT(= N_("E549: Illegal percentage"));
+ EXTERN char e_missing_colon_3[]
+ INIT(= N_("E550: Missing colon"));
+ EXTERN char e_illegal_component[]
+ INIT(= N_("E551: Illegal component"));
+ EXTERN char e_digit_expected_2[]
+ INIT(= N_("E552: digit expected"));
+ EXTERN char e_no_more_items[]
+ INIT(= N_("E553: No more items"));
+ EXTERN char e_syntax_error_in_str_curlies[]
+ INIT(= N_("E554: Syntax error in %s{...}"));
+ EXTERN char e_at_bottom_of_tag_stack[]
+ INIT(= N_("E555: at bottom of tag stack"));
+ EXTERN char e_at_top_of_tag_stack[]
+ INIT(= N_("E556: at top of tag stack"));
+ EXTERN char e_cannot_open_termcap_file[]
+ INIT(= N_("E557: Cannot open termcap file"));
+ EXTERN char e_terminal_entry_not_found_in_terminfo[]
+ INIT(= N_("E558: Terminal entry not found in terminfo"));
+ EXTERN char e_terminal_entry_not_found_in_termcap[]
+ INIT(= N_("E559: Terminal entry not found in termcap"));
+ EXTERN char e_usage_cscope_str[]
+ INIT(= N_("E560: Usage: cs[cope] %s"));
+ EXTERN char e_unknown_cscope_search_type[]
+ INIT(= N_("E561: unknown cscope search type"));
+ EXTERN char e_usage_cstag_ident[]
+ INIT(= N_("E562: Usage: cstag <ident>"));
+ EXTERN char e_stat_str_error_nr[]
+ INIT(= N_("E563: stat(%s) error: %d"));
+ EXTERN char e_str_is_not_directory_or_valid_cscope_database[]
+ INIT(= N_("E564: %s is not a directory or a valid cscope database"));
EXTERN char e_not_allowed_to_change_text_or_change_window[]
INIT(= N_("E565: Not allowed to change text or change window"));
+ EXTERN char e_could_not_create_cscope_pipes[]
+ INIT(= N_("E566: Could not create cscope pipes"));
+ EXTERN char e_no_cscope_connections[]
+ INIT(= N_("E567: no cscope connections"));
+ EXTERN char e_duplicate_cscope_database_not_added[]
+ INIT(= N_("E568: duplicate cscope database not added"));
+ // E569 unused
+ EXTERN char e_fatal_error_in_cs_manage_matches[]
+ INIT(= N_("E570: fatal error in cs_manage_matches"));
+ #ifdef DYNAMIC_TCL
+ EXTERN char e_sorry_this_command_is_disabled_tcl_library_could_not_be_loaded[]
+ INIT(= N_("E571: Sorry, this command is disabled: the Tcl library could not be loaded."));
+ #endif
+ EXTERN char e_exit_code_nr[]
+ INIT(= N_("E572: exit code %d"));
+ EXTERN char e_invalid_server_id_used_str[]
+ INIT(= N_("E573: Invalid server id used: %s"));
+ EXTERN char e_unknown_register_type_nr[]
+ INIT(= N_("E574: Unknown register type %d"));
+ // E575
+ EXTERN char e_illegal_starting_char[]
+ INIT(= N_("Illegal starting char"));
+ // E576
+ EXTERN char e_nonr_missing_gt[]
+ INIT(= N_("Missing '>'"));
+ // E577
+ EXTERN char e_illegal_register_name[]
+ INIT(= N_("Illegal register name"));
EXTERN char e_not_allowed_to_change_text_here[]
INIT(= N_("E578: Not allowed to change text here"));
#ifdef FEAT_EVAL
+ EXTERN char e_if_nesting_too_deep[]
+ INIT(= N_("E579: :if nesting too deep"));
+ EXTERN char e_block_nesting_too_deep[]
+ INIT(= N_("E579: block nesting too deep"));
EXTERN char e_endif_without_if[]
INIT(= N_("E580: :endif without :if"));
EXTERN char e_else_without_if[]
INIT(= N_("E581: :else without :if"));
EXTERN char e_elseif_without_if[]
INIT(= N_("E582: :elseif without :if"));
+ EXTERN char e_multiple_else[]
+ INIT(= N_("E583: multiple :else"));
+ EXTERN char e_elseif_after_else[]
+ INIT(= N_("E584: :elseif after :else"));
+ EXTERN char e_while_for_nesting_too_deep[]
+ INIT(= N_("E585: :while/:for nesting too deep"));
EXTERN char e_continue_without_while_or_for[]
INIT(= N_("E586: :continue without :while or :for"));
EXTERN char e_break_without_while_or_for[]
***************
*** 1226,1239 ****
EXTERN char e_endfor_without_for[]
INIT(= N_("E588: :endfor without :for"));
#endif
EXTERN char e_winheight_cannot_be_smaller_than_winminheight[]
INIT(= N_("E591: 'winheight' cannot be smaller than 'winminheight'"));
EXTERN char e_winwidth_cannot_be_smaller_than_winminwidth[]
INIT(= N_("E592: 'winwidth' cannot be smaller than 'winminwidth'"));
!
#ifdef FEAT_EVAL
EXTERN char e_missing_endtry[]
INIT(= N_("E600: Missing :endtry"));
EXTERN char e_endtry_without_try[]
INIT(= N_("E602: :endtry without :try"));
EXTERN char e_catch_without_try[]
--- 1363,1394 ----
EXTERN char e_endfor_without_for[]
INIT(= N_("E588: :endfor without :for"));
#endif
+ EXTERN char e_backupext_and_patchmode_are_equal[]
+ INIT(= N_("E589: 'backupext' and 'patchmode' are equal"));
+ EXTERN char e_preview_window_already_exists[]
+ INIT(= N_("E590: A preview window already exists"));
EXTERN char e_winheight_cannot_be_smaller_than_winminheight[]
INIT(= N_("E591: 'winheight' cannot be smaller than 'winminheight'"));
EXTERN char e_winwidth_cannot_be_smaller_than_winminwidth[]
INIT(= N_("E592: 'winwidth' cannot be smaller than 'winminwidth'"));
! EXTERN char e_need_at_least_nr_lines[]
! INIT(= N_("E593: Need at least %d lines"));
! EXTERN char e_need_at_least_nr_columns[]
! INIT(= N_("E594: Need at least %d columns"));
! EXTERN char e_showbreak_contains_unprintable_or_wide_character[]
! INIT(= N_("E595: 'showbreak' contains unprintable or wide character"));
! EXTERN char e_invalid_fonts[]
! INIT(= N_("E596: Invalid font(s)"));
! EXTERN char e_cant_select_fontset[]
! INIT(= N_("E597: can't select fontset"));
! EXTERN char e_invalid_fontset[]
! INIT(= N_("E598: Invalid fontset"));
! EXTERN char e_value_of_imactivatekey_is_invalid[]
! INIT(= N_("E599: Value of 'imactivatekey' is invalid"));
#ifdef FEAT_EVAL
EXTERN char e_missing_endtry[]
INIT(= N_("E600: Missing :endtry"));
+
EXTERN char e_endtry_without_try[]
INIT(= N_("E602: :endtry without :try"));
EXTERN char e_catch_without_try[]
*** ../vim-8.2.3986/src/digraph.c 2021-12-16 20:56:52.952098567 +0000
--- src/digraph.c 2022-01-02 20:43:13.363779698 +0000
***************
*** 2596,2602 ****
if (source_runtime(buf, 0) == FAIL)
{
vim_free(buf);
! return N_("E544: Keymap file not found");
}
}
vim_free(buf);
--- 2596,2602 ----
if (source_runtime(buf, 0) == FAIL)
{
vim_free(buf);
! return N_(e_keymap_file_not_found);
}
}
vim_free(buf);
*** ../vim-8.2.3986/src/ex_eval.c 2022-01-01 16:20:56.900401501 +0000
--- src/ex_eval.c 2022-01-02 21:12:08.812567188 +0000
***************
*** 1017,1023 ****
cstack_T *cstack = eap->cstack;

if (cstack->cs_idx == CSTACK_LEN - 1)
! eap->errmsg = _("E579: :if nesting too deep");
else
{
enter_block(cstack);
--- 1017,1023 ----
cstack_T *cstack = eap->cstack;

if (cstack->cs_idx == CSTACK_LEN - 1)
! eap->errmsg = _(e_if_nesting_too_deep);
else
{
enter_block(cstack);
***************
*** 1111,1120 ****
{
if (eap->cmdidx == CMD_else)
{
! eap->errmsg = _("E583: multiple :else");
return;
}
! eap->errmsg = _("E584: :elseif after :else");
skip = TRUE;
}

--- 1111,1120 ----
{
if (eap->cmdidx == CMD_else)
{
! eap->errmsg = _(e_multiple_else);
return;
}
! eap->errmsg = _(e_elseif_after_else);
skip = TRUE;
}

***************
*** 1180,1186 ****
cstack_T *cstack = eap->cstack;

if (cstack->cs_idx == CSTACK_LEN - 1)
! eap->errmsg = _("E585: :while/:for nesting too deep");
else
{
/*
--- 1180,1186 ----
cstack_T *cstack = eap->cstack;

if (cstack->cs_idx == CSTACK_LEN - 1)
! eap->errmsg = _(e_while_for_nesting_too_deep);
else
{
/*
***************
*** 1465,1471 ****
cstack_T *cstack = eap->cstack;

if (cstack->cs_idx == CSTACK_LEN - 1)
! eap->errmsg = _("E579: block nesting too deep");
else
{
enter_block(cstack);
--- 1465,1471 ----
cstack_T *cstack = eap->cstack;

if (cstack->cs_idx == CSTACK_LEN - 1)
! eap->errmsg = _(e_block_nesting_too_deep);
else
{
enter_block(cstack);
*** ../vim-8.2.3986/src/gui.c 2022-01-01 19:33:46.769076797 +0000
--- src/gui.c 2022-01-02 21:13:50.308396088 +0000
***************
*** 814,820 ****

#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
if (!im_xim_isvalid_imactivate())
! emsg(_("E599: Value of 'imactivatekey' is invalid"));
#endif
// When 'cmdheight' was set during startup it may not have taken
// effect yet.
--- 814,820 ----

#if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
if (!im_xim_isvalid_imactivate())
! emsg(_(e_value_of_imactivatekey_is_invalid));
#endif
// When 'cmdheight' was set during startup it may not have taken
// effect yet.
*** ../vim-8.2.3986/src/hardcopy.c 2022-01-02 20:20:41.377033186 +0000
--- src/hardcopy.c 2022-01-02 21:21:35.655624858 +0000
***************
*** 205,211 ****
colonp = vim_strchr(stringp, ':');
if (colonp == NULL)
{
! ret = N_("E550: Missing colon");
break;
}
commap = vim_strchr(stringp, ',');
--- 205,211 ----
colonp = vim_strchr(stringp, ':');
if (colonp == NULL)
{
! ret = e_missing_colon_3;
break;
}
commap = vim_strchr(stringp, ',');
***************
*** 220,226 ****

if (idx == table_size)
{
! ret = N_("E551: Illegal component");
break;
}
p = colonp + 1;
--- 220,226 ----

if (idx == table_size)
{
! ret = e_illegal_component;
break;
}
p = colonp + 1;
***************
*** 230,236 ****
{
if (!VIM_ISDIGIT(*p))
{
! ret = N_("E552: digit expected");
break;
}

--- 230,236 ----
{
if (!VIM_ISDIGIT(*p))
{
! ret = e_digit_expected_2;
break;
}

*** ../vim-8.2.3986/src/if_cscope.c 2022-01-02 20:20:41.377033186 +0000
--- src/if_cscope.c 2022-01-02 21:04:56.097318632 +0000
***************
*** 76,82 ****
static void
cs_usage_msg(csid_e x)
{
! (void)semsg(_("E560: Usage: cs[cope] %s"), cs_cmds[(int)x].usage);
}

static enum
--- 76,82 ----
static void
cs_usage_msg(csid_e x)
{
! (void)semsg(_(e_usage_cscope_str), cs_cmds[(int)x].usage);
}

static enum
***************
*** 250,256 ****

if (*eap->arg == NUL)
{
! (void)emsg(_("E562: Usage: cstag <ident>"));
return;
}

--- 250,256 ----

if (*eap->arg == NUL)
{
! (void)emsg(_(e_usage_cstag_ident));
return;
}

***************
*** 463,469 ****
cs_stat_emsg(char *fname)
{
int err = errno;
! (void)semsg(_("E563: stat(%s) error: %d"), fname, err);
}


--- 463,469 ----
cs_stat_emsg(char *fname)
{
int err = errno;
! (void)semsg(_(e_stat_str_error_nr), fname, err);
}


***************
*** 564,572 ****
else
{
if (p_csverbose)
! (void)semsg(
! _("E564: %s is not a directory or a valid cscope database"),
! fname);
goto add_err;
}

--- 564,571 ----
else
{
if (p_csverbose)
! (void)semsg(_(e_str_is_not_directory_or_valid_cscope_database),
! fname);
goto add_err;
}

***************
*** 742,748 ****
search = 9;
break;
default :
! (void)emsg(_("E561: unknown cscope search type"));
cs_usage_msg(Find);
return NULL;
}
--- 741,747 ----
search = 9;
break;
default :
! (void)emsg(_(e_unknown_cscope_search_type));
cs_usage_msg(Find);
return NULL;
}
***************
*** 799,805 ****
to_cs[0] = to_cs[1] = from_cs[0] = from_cs[1] = -1;
if (pipe(to_cs) < 0 || pipe(from_cs) < 0)
{
! (void)emsg(_("E566: Could not create cscope pipes"));
err_closing:
if (to_cs[0] != -1)
(void)close(to_cs[0]);
--- 798,804 ----
to_cs[0] = to_cs[1] = from_cs[0] = from_cs[1] = -1;
if (pipe(to_cs) < 0 || pipe(from_cs) < 0)
{
! (void)emsg(_(e_could_not_create_cscope_pipes));
err_closing:
if (to_cs[0] != -1)
(void)close(to_cs[0]);
***************
*** 838,844 ****
if (!(pipe_stdin = CreatePipe(&stdin_rd, &stdin_wr, &sa, 0))
|| !(pipe_stdout = CreatePipe(&stdout_rd, &stdout_wr, &sa, 0)))
{
! (void)emsg(_("E566: Could not create cscope pipes"));
err_closing:
if (pipe_stdin)
{
--- 837,843 ----
if (!(pipe_stdin = CreatePipe(&stdin_rd, &stdin_wr, &sa, 0))
|| !(pipe_stdout = CreatePipe(&stdout_rd, &stdout_wr, &sa, 0)))
{
! (void)emsg(_(e_could_not_create_cscope_pipes));
err_closing:
if (pipe_stdin)
{
***************
*** 1014,1020 ****

if (cs_check_for_connections() == FALSE)
{
! (void)emsg(_("E567: no cscope connections"));
return FALSE;
}

--- 1013,1019 ----

if (cs_check_for_connections() == FALSE)
{
! (void)emsg(_(e_no_cscope_connections));
return FALSE;
}

***************
*** 1356,1362 ****
)
{
if (p_csverbose)
! (void)emsg(_("E568: duplicate cscope database not added"));
return -1;
}

--- 1355,1361 ----
)
{
if (p_csverbose)
! (void)emsg(_(e_duplicate_cscope_database_not_added));
return -1;
}

***************
*** 1665,1671 ****
cs_print_tags_priv(mp, cp, cnt);
break;
default: // should not reach here
! iemsg(_("E570: fatal error in cs_manage_matches"));
return NULL;
}

--- 1664,1670 ----
cs_print_tags_priv(mp, cp, cnt);
break;
default: // should not reach here
! iemsg(_(e_fatal_error_in_cs_manage_matches));
return NULL;
}

*** ../vim-8.2.3986/src/if_tcl.c 2022-01-01 21:59:11.034521924 +0000
--- src/if_tcl.c 2022-01-02 21:06:24.557161186 +0000
***************
*** 1710,1716 ****
#ifdef DYNAMIC_TCL
if (!tcl_enabled(TRUE))
{
! emsg(_("E571: Sorry, this command is disabled: the Tcl library could not be loaded."));
return FAIL;
}
#endif
--- 1710,1716 ----
#ifdef DYNAMIC_TCL
if (!tcl_enabled(TRUE))
{
! emsg(_(e_sorry_this_command_is_disabled_tcl_library_could_not_be_loaded));
return FAIL;
}
#endif
***************
*** 1874,1880 ****
{
char buf[50];

! sprintf(buf, _("E572: exit code %d"), tclinfo.exitvalue);
tclerrmsg(buf);
if (tclinfo.exitvalue == 0)
{
--- 1874,1880 ----
{
char buf[50];

! sprintf(buf, _(e_exit_code_nr), tclinfo.exitvalue);
tclerrmsg(buf);
if (tclinfo.exitvalue == 0)
{
*** ../vim-8.2.3986/src/if_xcmdsrv.c 2022-01-01 19:33:46.773076795 +0000
--- src/if_xcmdsrv.c 2022-01-02 21:06:56.717104529 +0000
***************
*** 720,726 ****

sscanf((char *)str, "0x%x", &id);
if (id == None)
! semsg(_("E573: Invalid server id used: %s"), str);

return (Window)id;
}
--- 720,726 ----

sscanf((char *)str, "0x%x", &id);
if (id == None)
! semsg(_(e_invalid_server_id_used_str), str);

return (Window)id;
}
*** ../vim-8.2.3986/src/mbyte.c 2022-01-01 14:19:44.048353841 +0000
--- src/mbyte.c 2022-01-02 20:43:53.295724540 +0000
***************
*** 513,519 ****
else if (GetLastError() == ERROR_INVALID_PARAMETER)
{
codepage_invalid:
! return N_("E543: Not a valid codepage");
}
}
#endif
--- 513,519 ----
else if (GetLastError() == ERROR_INVALID_PARAMETER)
{
codepage_invalid:
! return N_(e_not_valid_codepage);
}
}
#endif
*** ../vim-8.2.3986/src/misc2.c 2021-12-31 22:48:56.587368898 +0000
--- src/misc2.c 2022-01-02 20:47:38.919407436 +0000
***************
*** 2066,2074 ****
commap = vim_strchr(modep, ',');

if (colonp == NULL || (commap != NULL && commap < colonp))
! return N_("E545: Missing colon");
if (colonp == modep)
! return N_("E546: Illegal mode");

/*
* Repeat for all mode's before the colon.
--- 2066,2074 ----
commap = vim_strchr(modep, ',');

if (colonp == NULL || (commap != NULL && commap < colonp))
! return e_missing_colon_2;
if (colonp == modep)
! return e_illegal_mode;

/*
* Repeat for all mode's before the colon.
***************
*** 2094,2100 ****
break;
if (idx == SHAPE_IDX_COUNT
|| (shape_table[idx].used_for & what) == 0)
! return N_("E546: Illegal mode");
if (len == 2 && modep[0] == 'v' && modep[1] == 'e')
found_ve = TRUE;
}
--- 2094,2100 ----
break;
if (idx == SHAPE_IDX_COUNT
|| (shape_table[idx].used_for & what) == 0)
! return e_illegal_mode;
if (len == 2 && modep[0] == 'v' && modep[1] == 'e')
found_ve = TRUE;
}
***************
*** 2133,2139 ****
if (mshape_names[i] == NULL)
{
if (!VIM_ISDIGIT(*p))
! return N_("E547: Illegal mouseshape");
if (round == 2)
shape_table[idx].mshape =
getdigits(&p) + MSHAPE_NUMBERED;
--- 2133,2139 ----
if (mshape_names[i] == NULL)
{
if (!VIM_ISDIGIT(*p))
! return e_illegal_mouseshape;
if (round == 2)
shape_table[idx].mshape =
getdigits(&p) + MSHAPE_NUMBERED;
***************
*** 2173,2184 ****
{
p += len;
if (!VIM_ISDIGIT(*p))
! return N_("E548: digit expected");
n = getdigits(&p);
if (len == 3) // "ver" or "hor"
{
if (n == 0)
! return N_("E549: Illegal percentage");
if (round == 2)
{
if (TOLOWER_ASC(i) == 'v')
--- 2173,2184 ----
{
p += len;
if (!VIM_ISDIGIT(*p))
! return e_digit_expected;
n = getdigits(&p);
if (len == 3) // "ver" or "hor"
{
if (n == 0)
! return e_illegal_percentage;
if (round == 2)
{
if (TOLOWER_ASC(i) == 'v')
*** ../vim-8.2.3986/src/netbeans.c 2022-01-02 20:20:41.381033185 +0000
--- src/netbeans.c 2022-01-02 20:36:26.056315424 +0000
***************
*** 1941,1947 ****
bg = vim_strsave(p);
if (STRLEN(fg) > MAX_COLOR_LENGTH || STRLEN(bg) > MAX_COLOR_LENGTH)
{
! emsg("E532: highlighting color name too long in defineAnnoType");
VIM_CLEAR(typeName);
parse_error = TRUE;
}
--- 1941,1947 ----
bg = vim_strsave(p);
if (STRLEN(fg) > MAX_COLOR_LENGTH || STRLEN(bg) > MAX_COLOR_LENGTH)
{
! emsg(e_highlighting_color_name_too_long_in_defineAnnoType);
VIM_CLEAR(typeName);
parse_error = TRUE;
}
*** ../vim-8.2.3986/src/option.c 2022-01-02 19:25:22.846078499 +0000
--- src/option.c 2022-01-02 21:15:09.104264151 +0000
***************
*** 1406,1412 ****
&& vim_strchr((char_u *)"!&<", *arg) != NULL)
errmsg = e_no_white_space_allowed_between_option_and;
else
! errmsg = N_("E518: Unknown option");
goto skip;
}

--- 1406,1412 ----
&& vim_strchr((char_u *)"!&<", *arg) != NULL)
errmsg = e_no_white_space_allowed_between_option_and;
else
! errmsg = N_(e_unknown_option);
goto skip;
}

***************
*** 1419,1425 ****
if (vim_strchr((char_u *)"=:!&<", nextchar) == NULL
&& (!(options[opt_idx].flags & P_BOOL)
|| nextchar == '?'))
! errmsg = N_("E519: Option not supported");
goto skip;
}

--- 1419,1425 ----
if (vim_strchr((char_u *)"=:!&<", nextchar) == NULL
&& (!(options[opt_idx].flags & P_BOOL)
|| nextchar == '?'))
! errmsg = N_(e_option_not_supported);
goto skip;
}

***************
*** 1457,1463 ****
{
if (flags & (P_SECURE | P_NO_ML))
{
! errmsg = N_("E520: Not allowed in a modeline");
goto skip;
}
if ((flags & P_MLE) && !p_mle)
--- 1457,1463 ----
{
if (flags & (P_SECURE | P_NO_ML))
{
! errmsg = N_(e_not_allowed_in_modeline);
goto skip;
}
if ((flags & P_MLE) && !p_mle)
***************
*** 1682,1694 ****
if (i == 0 || (arg[i] != NUL
&& !VIM_ISWHITE(arg[i])))
{
! errmsg = N_("E521: Number required after =");
goto skip;
}
}
else
{
! errmsg = N_("E521: Number required after =");
goto skip;
}

--- 1682,1694 ----
if (i == 0 || (arg[i] != NUL
&& !VIM_ISWHITE(arg[i])))
{
! errmsg = N_(e_number_required_after_equal);
goto skip;
}
}
else
{
! errmsg = N_(e_number_required_after_equal);
goto skip;
}

***************
*** 2140,2146 ****
if (nextchar == '&')
{
if (add_termcap_entry(key_name, TRUE) == FAIL)
! errmsg = N_("E522: Not found in termcap");
}
else
{
--- 2140,2146 ----
if (nextchar == '&')
{
if (add_termcap_entry(key_name, TRUE) == FAIL)
! errmsg = N_(e_not_found_in_termcap);
}
else
{
***************
*** 2950,2956 ****
if (win->w_p_pvw && win != curwin)
{
curwin->w_p_pvw = FALSE;
! return N_("E590: A preview window already exists");
}
}
}
--- 2950,2956 ----
if (win->w_p_pvw && win != curwin)
{
curwin->w_p_pvw = FALSE;
! return N_(e_preview_window_already_exists);
}
}
}
***************
*** 3680,3686 ****
if (errbuf != NULL)
{
vim_snprintf((char *)errbuf, errbuflen,
! _("E593: Need at least %d lines"), min_rows());
errmsg = errbuf;
}
Rows = min_rows();
--- 3680,3686 ----
if (errbuf != NULL)
{
vim_snprintf((char *)errbuf, errbuflen,
! _(e_need_at_least_nr_lines), min_rows());
errmsg = errbuf;
}
Rows = min_rows();
***************
*** 3690,3696 ****
if (errbuf != NULL)
{
vim_snprintf((char *)errbuf, errbuflen,
! _("E594: Need at least %d columns"), MIN_COLUMNS);
errmsg = errbuf;
}
Columns = MIN_COLUMNS;
--- 3690,3696 ----
if (errbuf != NULL)
{
vim_snprintf((char *)errbuf, errbuflen,
! _(e_need_at_least_nr_columns), MIN_COLUMNS);
errmsg = errbuf;
}
Columns = MIN_COLUMNS;
***************
*** 4385,4391 ****
// There's another character after zeros or the string
// is empty. In both cases, we are trying to set a
// num option using a string.
! semsg(_("E521: Number required: &%s = '%s'"),
name, string);
return NULL; // do nothing as we hit an error

--- 4385,4391 ----
// There's another character after zeros or the string
// is empty. In both cases, we are trying to set a
// num option using a string.
! semsg(_(e_number_required_after_str_equal_str),
name, string);
return NULL; // do nothing as we hit an error

*** ../vim-8.2.3986/src/optionstr.c 2022-01-01 15:58:19.118486361 +0000
--- src/optionstr.c 2022-01-02 21:16:46.508101975 +0000
***************
*** 193,200 ****
{
if (errbuf == NULL)
return "";
! sprintf((char *)errbuf, _("E539: Illegal character <%s>"),
! (char *)transchar(c));
return errbuf;
}

--- 193,199 ----
{
if (errbuf == NULL)
return "";
! sprintf((char *)errbuf, _(e_illegal_character_str), (char *)transchar(c));
return errbuf;
}

***************
*** 629,639 ****
while ((*s != '}' || (reevaluate && s[-1] != '%')) && *s)
s++;
if (*s != '}')
! return N_("E540: Unclosed expression sequence");
}
}
if (groupdepth != 0)
! return N_("E542: unbalanced groups");
return NULL;
}
#endif
--- 628,638 ----
while ((*s != '}' || (reevaluate && s[-1] != '%')) && *s)
s++;
if (*s != '}')
! return N_(e_unclosed_expression_sequence);
}
}
if (groupdepth != 0)
! return N_(e_unbalanced_groups);
return NULL;
}
#endif
***************
*** 693,707 ****
else if (varp == &T_NAME)
{
if (T_NAME[0] == NUL)
! errmsg = N_("E529: Cannot set 'term' to empty string");
#ifdef FEAT_GUI
else if (gui.in_use)
! errmsg = N_("E530: Cannot change term in GUI");
else if (term_is_gui(T_NAME))
! errmsg = N_("E531: Use \":gui\" to start the GUI");
#endif
else if (set_termname(T_NAME) == FAIL)
! errmsg = N_("E522: Not found in termcap");
else
{
// Screen colors may have changed.
--- 692,706 ----
else if (varp == &T_NAME)
{
if (T_NAME[0] == NUL)
! errmsg = e_cannot_set_term_to_empty_string;
#ifdef FEAT_GUI
else if (gui.in_use)
! errmsg = e_cannot_change_term_in_GUI;
else if (term_is_gui(T_NAME))
! errmsg = e_use_gui_to_start_GUI;
#endif
else if (set_termname(T_NAME) == FAIL)
! errmsg = e_not_found_in_termcap;
else
{
// Screen colors may have changed.
***************
*** 749,755 ****
{
if (STRCMP(*p_bex == '.' ? p_bex + 1 : p_bex,
*p_pm == '.' ? p_pm + 1 : p_pm) == 0)
! errmsg = N_("E589: 'backupext' and 'patchmode' are equal");
}
#ifdef FEAT_LINEBREAK
// 'breakindentopt'
--- 748,754 ----
{
if (STRCMP(*p_bex == '.' ? p_bex + 1 : p_bex,
*p_pm == '.' ? p_pm + 1 : p_pm) == 0)
! errmsg = N_(e_backupext_and_patchmode_are_equal);
}
#ifdef FEAT_LINEBREAK
// 'breakindentopt'
***************
*** 1296,1304 ****
++s;
}
if (*s++ == NUL)
! errmsg = N_("E524: Missing colon");
else if (*s == ',' || *s == NUL)
! errmsg = N_("E525: Zero length string");
if (errmsg != NULL)
break;
while (*s && *s != ',')
--- 1295,1303 ----
++s;
}
if (*s++ == NUL)
! errmsg = e_missing_colon;
else if (*s == ',' || *s == NUL)
! errmsg = e_zero_length_string;
if (errmsg != NULL)
break;
while (*s && *s != ',')
***************
*** 1395,1401 ****
{
if (errbuf != NULL)
{
! sprintf(errbuf, _("E526: Missing number after <%s>"),
transchar_byte(*(s - 1)));
errmsg = errbuf;
}
--- 1394,1401 ----
{
if (errbuf != NULL)
{
! sprintf(errbuf,
! _(e_missing_number_after_angle_str_angle),
transchar_byte(*(s - 1)));
errmsg = errbuf;
}
***************
*** 1409,1422 ****
else if (*s)
{
if (errbuf != NULL)
! errmsg = N_("E527: Missing comma");
else
errmsg = "";
break;
}
}
if (*p_viminfo && errmsg == NULL && get_viminfo_parameter('\'') < 0)
! errmsg = N_("E528: Must specify a ' value");
}
#endif // FEAT_VIMINFO

--- 1409,1422 ----
else if (*s)
{
if (errbuf != NULL)
! errmsg = e_missing_comma;
else
errmsg = "";
break;
}
}
if (*p_viminfo && errmsg == NULL && get_viminfo_parameter('\'') < 0)
! errmsg = e_must_specify_a_value;
}
#endif // FEAT_VIMINFO

***************
*** 1487,1493 ****
for (s = *varp; *s; )
{
if (ptr2cells(s) != 1)
! errmsg = N_("E595: 'showbreak' contains unprintable or wide character");
MB_PTR_ADV(s);
}
}
--- 1487,1493 ----
for (s = *varp; *s; )
{
if (ptr2cells(s) != 1)
! errmsg = N_(e_showbreak_contains_unprintable_or_wide_character);
MB_PTR_ADV(s);
}
}
***************
*** 1529,1535 ****
}
else
# endif
! errmsg = N_("E596: Invalid font(s)");
}
}
redraw_gui_only = TRUE;
--- 1529,1535 ----
}
else
# endif
! errmsg = N_(e_invalid_fonts);
}
}
redraw_gui_only = TRUE;
***************
*** 1538,1555 ****
else if (varp == &p_guifontset)
{
if (STRCMP(p_guifontset, "*") == 0)
! errmsg = N_("E597: can't select fontset");
else if (gui.in_use && gui_init_font(p_guifontset, TRUE) != OK)
! errmsg = N_("E598: Invalid fontset");
redraw_gui_only = TRUE;
}
# endif
else if (varp == &p_guifontwide)
{
if (STRCMP(p_guifontwide, "*") == 0)
! errmsg = N_("E533: can't select wide font");
else if (gui_get_wide_font() == FAIL)
! errmsg = N_("E534: Invalid wide font");
redraw_gui_only = TRUE;
}
#endif
--- 1538,1555 ----
else if (varp == &p_guifontset)
{
if (STRCMP(p_guifontset, "*") == 0)
! errmsg = N_(e_cant_select_fontset);
else if (gui.in_use && gui_init_font(p_guifontset, TRUE) != OK)
! errmsg = N_(e_invalid_fontset);
redraw_gui_only = TRUE;
}
# endif
else if (varp == &p_guifontwide)
{
if (STRCMP(p_guifontwide, "*") == 0)
! errmsg = e_cant_select_wide_font;
else if (gui_get_wide_font() == FAIL)
! errmsg = e_invalid_wide_font;
redraw_gui_only = TRUE;
}
#endif
***************
*** 1860,1867 ****
if (errbuf != NULL)
{
sprintf((char *)errbuf,
! _("E535: Illegal character after <%c>"),
! *--s);
errmsg = errbuf;
}
else
--- 1860,1866 ----
if (errbuf != NULL)
{
sprintf((char *)errbuf,
! _(e_illegal_character_after_chr), *--s);
errmsg = errbuf;
}
else
***************
*** 2031,2037 ****
{
p = vim_strchr(*varp, ',');
if (p == NULL)
! errmsg = N_("E536: comma required");
else if (p == *varp || p[1] == NUL)
errmsg = e_invalid_argument;
else if (foldmethodIsMarker(curwin))
--- 2030,2036 ----
{
p = vim_strchr(*varp, ',');
if (p == NULL)
! errmsg = e_comma_required;
else if (p == *varp || p[1] == NUL)
errmsg = e_invalid_argument;
else if (foldmethodIsMarker(curwin))
***************
*** 2041,2047 ****
else if (gvarp == &p_cms)
{
if (**varp != NUL && strstr((char *)*varp, "%s") == NULL)
! errmsg = N_("E537: 'commentstring' must be empty or contain %s");
}
// 'foldopen'
else if (varp == &p_fdo)
--- 2040,2046 ----
else if (gvarp == &p_cms)
{
if (**varp != NUL && strstr((char *)*varp, "%s") == NULL)
! errmsg = e_commentstring_must_be_empty_or_contain_str;
}
// 'foldopen'
else if (varp == &p_fdo)
*** ../vim-8.2.3986/src/quickfix.c 2022-01-02 19:25:22.850078488 +0000
--- src/quickfix.c 2022-01-02 20:53:21.154703860 +0000
***************
*** 187,193 ****
static void wipe_dummy_buffer(buf_T *buf, char_u *dirname_start);
static void unload_dummy_buffer(buf_T *buf, char_u *dirname_start);
static qf_info_T *ll_get_or_alloc_list(win_T *);
- static char_u *e_no_more_items = (char_u *)N_("E553: No more items");

// Quickfix window check helper macro
#define IS_QF_WINDOW(wp) (bt_quickfix(wp->w_buffer) && wp->w_llist_ref == NULL)
--- 187,192 ----
***************
*** 2733,2739 ****
int qf_idx = qfl->qf_index;
qfline_T *prev_qf_ptr;
int prev_index;
! char_u *err = e_no_more_items;

while (errornr--)
{
--- 2732,2738 ----
int qf_idx = qfl->qf_index;
qfline_T *prev_qf_ptr;
int prev_index;
! char *err = e_no_more_items;

while (errornr--)
{
*** ../vim-8.2.3986/src/regexp.c 2022-01-02 19:25:22.850078488 +0000
--- src/regexp.c 2022-01-02 20:54:02.686609285 +0000
***************
*** 1050,1056 ****
if (*regparse == '\\')
regparse++; // Allow either \{...} or \{...\}
if (*regparse != '}')
! EMSG2_RET_FAIL(_("E554: Syntax error in %s{...}"),
reg_magic == MAGIC_ALL);

/*
--- 1050,1056 ----
if (*regparse == '\\')
regparse++; // Allow either \{...} or \{...\}
if (*regparse != '}')
! EMSG2_RET_FAIL(_(e_syntax_error_in_str_curlies),
reg_magic == MAGIC_ALL);

/*
*** ../vim-8.2.3986/src/tag.c 2022-01-02 19:25:22.854078479 +0000
--- src/tag.c 2022-01-02 20:55:56.810359921 +0000
***************
*** 84,91 ****
#endif
static void tagstack_clear_entry(taggy_T *item);

- static char_u *bottommsg = (char_u *)N_("E555: at bottom of tag stack");
- static char_u *topmsg = (char_u *)N_("E556: at top of tag stack");
#ifdef FEAT_EVAL
static char_u *recurmsg = (char_u *)N_("E986: cannot modify the tag stack within tagfunc");
static char_u *tfu_inv_ret_msg = (char_u *)N_("E987: invalid return value from tagfunc");
--- 84,89 ----
***************
*** 377,383 ****
#endif
if ((tagstackidx -= count) < 0)
{
! emsg(_(bottommsg));
if (tagstackidx + count == 0)
{
// We did [num]^T from the bottom of the stack
--- 375,381 ----
#endif
if ((tagstackidx -= count) < 0)
{
! emsg(_(e_at_bottom_of_tag_stack));
if (tagstackidx + count == 0)
{
// We did [num]^T from the bottom of the stack
***************
*** 390,396 ****
}
else if (tagstackidx >= tagstacklen) // count == 0?
{
! emsg(_(topmsg));
goto end_do_tag;
}

--- 388,394 ----
}
else if (tagstackidx >= tagstacklen) // count == 0?
{
! emsg(_(e_at_top_of_tag_stack));
goto end_do_tag;
}

***************
*** 461,472 ****
* position.
*/
tagstackidx = tagstacklen - 1;
! emsg(_(topmsg));
save_pos = FALSE;
}
else if (tagstackidx < 0) // must have been count == 0
{
! emsg(_(bottommsg));
tagstackidx = 0;
goto end_do_tag;
}
--- 459,470 ----
* position.
*/
tagstackidx = tagstacklen - 1;
! emsg(_(e_at_top_of_tag_stack));
save_pos = FALSE;
}
else if (tagstackidx < 0) // must have been count == 0
{
! emsg(_(e_at_bottom_of_tag_stack));
tagstackidx = 0;
goto end_do_tag;
}
*** ../vim-8.2.3986/src/term.c 2022-01-02 19:25:22.854078479 +0000
--- src/term.c 2022-01-02 20:57:28.982168127 +0000
***************
*** 2222,2234 ****

if (i < 0)
# ifdef TGETENT_ZERO_ERR
! return _("E557: Cannot open termcap file");
if (i == 0)
# endif
#ifdef TERMINFO
! return _("E558: Terminal entry not found in terminfo");
#else
! return _("E559: Terminal entry not found in termcap");
#endif
}
return NULL;
--- 2222,2234 ----

if (i < 0)
# ifdef TGETENT_ZERO_ERR
! return _(e_cannot_open_termcap_file);
if (i == 0)
# endif
#ifdef TERMINFO
! return _(e_terminal_entry_not_found_in_terminfo);
#else
! return _(e_terminal_entry_not_found_in_termcap);
#endif
}
return NULL;
*** ../vim-8.2.3986/src/viminfo.c 2022-01-01 19:33:46.773076795 +0000
--- src/viminfo.c 2022-01-02 21:23:58.619390532 +0000
***************
*** 1611,1617 ****

if (!ASCII_ISALNUM(*str) && *str != '-')
{
! if (viminfo_error("E577: ", _("Illegal register name"), virp->vir_line))
return TRUE; // too many errors, pretend end-of-file
do_it = FALSE;
}
--- 1611,1617 ----

if (!ASCII_ISALNUM(*str) && *str != '-')
{
! if (viminfo_error("E577: ", _(e_illegal_register_name), virp->vir_line))
return TRUE; // too many errors, pretend end-of-file
do_it = FALSE;
}
***************
*** 1891,1897 ****
type = (char_u *)"BLOCK";
break;
default:
! semsg(_("E574: Unknown register type %d"), y_ptr->y_type);
type = (char_u *)"LINE";
break;
}
--- 1891,1897 ----
type = (char_u *)"BLOCK";
break;
default:
! semsg(_(e_unknown_register_type_nr), y_ptr->y_type);
type = (char_u *)"LINE";
break;
}
***************
*** 2272,2278 ****
{
if (line[0] != '\n' && line[0] != '\r' && line[0] != '#')
{
! if (viminfo_error("E576: ", _("Missing '>'"), line))
break; // too many errors, return now
}
eof = vim_fgets(line, LSIZE, virp->vir_fd);
--- 2272,2278 ----
{
if (line[0] != '\n' && line[0] != '\r' && line[0] != '#')
{
! if (viminfo_error("E576: ", _(e_nonr_missing_gt), line))
break; // too many errors, return now
}
eof = vim_fgets(line, LSIZE, virp->vir_fd);
***************
*** 2876,2882 ****
eof = viminfo_readline(virp);
break;
default:
! if (viminfo_error("E575: ", _("Illegal starting char"),
virp->vir_line))
eof = TRUE;
else
--- 2876,2882 ----
eof = viminfo_readline(virp);
break;
default:
! if (viminfo_error("E575: ", _(e_illegal_starting_char),
virp->vir_line))
eof = TRUE;
else
*** ../vim-8.2.3986/src/version.c 2022-01-02 20:20:41.381033185 +0000
--- src/version.c 2022-01-02 21:25:36.151299785 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 3987,
/**/

--
Some of the well known MS-Windows errors:
EHUH Unexpected error
EUSER User error, not our fault!
EGOD Horrible problem, god knows what has happened
EERR Errornous error: nothing wrong

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages