Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
i = (int)STRLEN(crypt_magic_head);
if (len >= i && memcmp(ptr, crypt_magic_head, i) == 0)
- emsg(_("E821: File is encrypted with unknown method"));
+ emsg(_(e_file_is_encrypted_with_unknown_method));
return -1;
}
if (!ok)
{
if (io_error)
- emsg(_("E810: Cannot read or write temp files"));
+ emsg(_(e_cannot_read_or_write_temp_files));
emsg(_(e_cannot_create_diffs));
diff_a_works = MAYBE;
#if defined(MSWIN)
// Only continue if the output file was created.
if (mch_stat((char *)tmp_new, &st) < 0 || st.st_size == 0)
- emsg(_("E816: Cannot read patch output"));
+ emsg(_(e_cannot_read_patch_output));
else
{
if (curbuf->b_fname != NULL)
#endif
EXTERN char e_id_is_reserved_for_match_nr[]
INIT(= N_("E798: ID is reserved for \":match\": %d"));
-EXTERN char e_invalid_id_nr_must_be_greater_than_or_equal_to_one[]
- INIT(= N_("E799: Invalid ID: %d (must be greater than or equal to 1)"));
+// E799 unused
#ifndef FEAT_ARABIC
EXTERN char e_arabic_cannot_be_used_not_enabled_at_compile_time[]
INIT(= N_("E800: Arabic cannot be used: Not enabled at compile time\n"));
#endif
-
+EXTERN char e_id_already_taken_nr[]
+ INIT(= N_("E801: ID already taken: %d"));
+EXTERN char e_invalid_id_nr_must_be_greater_than_or_equal_to_one[]
+ INIT(= N_("E802: Invalid ID: %d (must be greater than or equal to 1)"));
+EXTERN char e_id_not_found_nr[]
+ INIT(= N_("E803: ID not found: %d"));
#ifdef FEAT_EVAL
EXTERN char e_cannot_use_percent_with_float[]
INIT(= N_("E804: Cannot use '%' with Float"));
#endif
-
#ifdef FEAT_FLOAT
+EXTERN char e_using_float_as_number[]
+ INIT(= N_("E805: Using a Float as a Number"));
EXTERN char e_using_float_as_string[]
INIT(= N_("E806: using Float as a String"));
#endif
+#ifdef FEAT_FLOAT
+EXTERN char e_expected_float_argument_for_printf[]
+ INIT(= N_("E807: Expected Float argument for printf()"));
+#endif
+#if defined(FEAT_EVAL) && defined(FEAT_FLOAT)
+EXTERN char e_number_or_float_required[]
+ INIT(= N_("E808: Number or Float required"));
+#endif
+#ifndef FEAT_EVAL
+EXTERN char e_hashsmall_is_not_available_without_the_eval_feature[]
+ INIT(= N_("E809: #< is not available without the +eval feature"));
+#endif
+EXTERN char e_cannot_read_or_write_temp_files[]
+ INIT(= N_("E810: Cannot read or write temp files"));
+EXTERN char e_not_allowed_to_change_buffer_information_now[]
+ INIT(= N_("E811: Not allowed to change buffer information now"));
+EXTERN char e_autocommands_changed_buffer_or_buffer_name[]
+ INIT(= N_("E812: Autocommands changed buffer or buffer name"));
EXTERN char e_cannot_close_autocmd_or_popup_window[]
INIT(= N_("E813: Cannot close autocmd or popup window"));
+EXTERN char e_cannot_close_window_only_autocmd_window_would_remain[]
+ INIT(= N_("E814: Cannot close window, only autocmd window would remain"));
+#ifdef FEAT_MZSCHEME
+EXTERN char e_sorry_this_command_is_disabled_the_mzscheme_libraries_could_not_be_loaded[]
+ INIT(= N_("E815: Sorry, this command is disabled, the MzScheme libraries could not be loaded."));
+#endif
+EXTERN char e_cannot_read_patch_output[]
+ INIT(= N_("E816: Cannot read patch output"));
EXTERN char e_blowfish_big_little_endian_use_wrong[]
INIT(= N_("E817: Blowfish big/little endian use wrong"));
EXTERN char e_sha256_test_failed[]
INIT(= N_("E819: Blowfish test failed"));
EXTERN char e_sizeof_uint32_isnot_four[]
INIT(= N_("E820: sizeof(uint32_t) != 4"));
+EXTERN char e_file_is_encrypted_with_unknown_method[]
+ INIT(= N_("E821: File is encrypted with unknown method"));
+EXTERN char e_cannot_open_undo_file_for_reading_str[]
+ INIT(= N_("E822: Cannot open undo file for reading: %s"));
+EXTERN char e_not_an_undo_file_str[]
+ INIT(= N_("E823: Not an undo file: %s"));
+EXTERN char e_incompatible_undo_file_str[]
+ INIT(= N_("E824: Incompatible undo file: %s"));
+EXTERN char e_corrupted_undo_file_str_str[]
+ INIT(= N_("E825: Corrupted undo file (%s): %s"));
+EXTERN char e_undo_file_decryption_failed[]
+ INIT(= N_("E826: Undo file decryption failed: %s"));
+EXTERN char e_undo_file_is_encrypted_str[]
+ INIT(= N_("E827: Undo file is encrypted: %s"));
+EXTERN char e_cannot_open_undo_file_for_writing_str[]
+ INIT(= N_("E828: Cannot open undo file for writing: %s"));
+EXTERN char e_write_error_in_undo_file_str[]
+ INIT(= N_("E829: write error in undo file: %s"));
+EXTERN char e_undo_number_nr_not_found[]
+ INIT(= N_("E830: Undo number %ld not found"));
EXTERN char e_bf_key_init_called_with_empty_password[]
INIT(= N_("E831: bf_key_init() called with empty password"));
+EXTERN char e_non_encrypted_file_has_encrypted_undo_file[]
+ INIT(= N_("E832: Non-encrypted file has encrypted undo file: %s"));
+EXTERN char e_str_is_encrypted_and_this_version_of_vim_does_not_support_encryption[]
+ INIT(= N_("E833: %s is encrypted and this version of Vim does not support encryption"));
EXTERN char e_conflicts_with_value_of_listchars[]
INIT(= N_("E834: Conflicts with value of 'listchars'"));
EXTERN char e_conflicts_with_value_of_fillchars[]
INIT(= N_("E835: Conflicts with value of 'fillchars'"));
+EXTERN char e_this_vim_cannot_execute_python_after_using_py3[]
+ INIT(= N_("E836: This Vim cannot execute :python after using :py3"));
+EXTERN char e_this_vim_cannot_execute_py3_after_using_python[]
+ INIT(= N_("E837: This Vim cannot execute :py3 after using :python"));
#ifdef FEAT_NETBEANS_INTG
EXTERN char e_netbeans_is_not_supported_with_this_GUI[]
INIT(= N_("E838: netbeans is not supported with this GUI"));
#endif
// E839 unused
+# ifdef FEAT_COMPL_FUNC
+EXTERN char e_complete_function_deleted_text[]
+ INIT(= N_("E840: Completion function deleted text"));
+# endif
+EXTERN char e_reserved_name_cannot_be_used_for_user_defined_command[]
+ INIT(= N_("E841: Reserved name, cannot be used for user defined command"));
+EXTERN char e_no_line_number_to_use_for_slnum[]
+ INIT(= N_("E842: no line number to use for \"<slnum>\""));
+EXTERN char e_error_while_updating_swap_file_crypt[]
+ INIT(= N_("E843: Error while updating swap file crypt"));
+EXTERN char e_invalid_cchar_value[]
+ INIT(= N_("E844: invalid cchar value"));
+#ifdef FEAT_SPELL
+EXTERN char e_insufficient_memory_word_list_will_be_incomplete[]
+ INIT(= N_("E845: Insufficient memory, word list will be incomplete"));
+#endif
+EXTERN char e_key_code_not_set[]
+ INIT(= N_("E846: Key code not set"));
+EXTERN char e_too_many_syntax_includes[]
+ INIT(= N_("E847: Too many syntax includes"));
+EXTERN char e_too_many_syntax_clusters[]
+ INIT(= N_("E848: Too many syntax clusters"));
+EXTERN char e_too_many_highlight_and_syntax_groups[]
+ INIT(= N_("E849: Too many highlight and syntax groups"));
#ifndef FEAT_CLIPBOARD
EXTERN char e_invalid_register_name[]
INIT(= N_("E850: Invalid register name"));
#endif
+#ifdef FEAT_GUI
+EXTERN char e_failed_to_create_new_process_for_GUI[]
+ INIT(= N_("E851: Failed to create a new process for the GUI"));
+EXTERN char e_the_child_process_failed_to_start_GUI[]
+ INIT(= N_("E852: The child process failed to start the GUI"));
+#endif
+EXTERN char e_duplicate_argument_name_str[]
+ INIT(= N_("E853: Duplicate argument name: %s"));
+EXTERN char e_path_too_long_for_completion[]
+ INIT(= N_("E854: path too long for completion"));
EXTERN char e_autocommands_caused_command_to_abort[]
INIT(= N_("E855: Autocommands caused command to abort"));
#ifdef FEAT_EVAL
EXTERN char e_dictionary_key_str_required[]
INIT(= N_("E857: Dictionary key \"%s\" required"));
#endif
+#if defined(FEAT_PYTHON) || defined(FEAT_PYTHON3)
+EXTERN char e_eval_did_not_return_valid_python_object[]
+ INIT(= N_("E858: Eval did not return a valid python object"));
+EXTERN char e_failed_to_convert_returned_python_object_to_vim_value[]
+ INIT(= N_("E859: Failed to convert returned python object to a Vim value"));
+#endif
+EXTERN char e_need_id_and_type_with_both[]
+ INIT(= N_("E860: Need 'id' and 'type' with 'both'"));
+EXTERN char e_cannot_open_second_popup_with_terminal[]
+ INIT(= N_("E861: Cannot open a second popup with a terminal"));
+EXTERN char e_cannot_use_g_here[]
+ INIT(= N_("E862: Cannot use g: here"));
+EXTERN char e_not_allowed_for_terminal_in_popup_window[]
+ INIT(= N_("E863: Not allowed for a terminal in a popup window"));
+EXTERN char e_percent_hash_can_only_be_followed_by_zero_one_two_automatic_engine_will_be_used[]
+ INIT(= N_("E864: \\%#= can only be followed by 0, 1, or 2. The automatic engine will be used"));
+EXTERN char e_nfa_regexp_end_encountered_prematurely[]
+ INIT(= N_("E865: (NFA) Regexp end encountered prematurely"));
+EXTERN char e_nfa_regexp_misplaced_chr[]
+ INIT(= N_("E866: (NFA regexp) Misplaced %c"));
+EXTERN char e_nfa_unknown_operator_z_chr[]
+ INIT(= N_("E867: (NFA) Unknown operator '\\z%c'"));
+EXTERN char e_nfa_unknown_operator_percent_chr[]
+ INIT(= N_("E867: (NFA) Unknown operator '\\%%%c'"));
+EXTERN char e_error_building_nfa_with_equivalence_class[]
+ INIT(= N_("E868: Error building NFA with equivalence class!"));
+EXTERN char e_nfa_unknown_operator_at_chr[]
+ INIT(= N_("E869: (NFA) Unknown operator '\\@%c'"));
+
+EXTERN char e_nfa_regexp_invalid_character_class_nr[]
+ INIT(= N_("E877: (NFA regexp) Invalid character class: %d"));
+
#ifdef FEAT_PROP_POPUP
EXTERN char e_number_required[]
INIT(= N_("E889: Number required"));
#endif
EXTERN char e_file_changed_while_writing[]
INIT(= N_("E949: File changed while writing"));
+
+EXTERN char e_percent_value_too_large[]
+ INIT(= N_("E951: \\% value too large"));
EXTERN char e_autocommand_caused_recursive_behavior[]
INIT(= N_("E952: Autocommand caused recursive behavior"));
EXTERN char e_cannot_use_pattern_recursively[]
return NULL;
}
#else
- *errormsg = _("E809: #< is not available without the +eval feature");
+ *errormsg = _(e_hashsmall_is_not_available_without_the_eval_feature);
return NULL;
#endif
}
case SPEC_SLNUM: // line in file for ":so" command
if (SOURCING_NAME == NULL || SOURCING_LNUM == 0)
{
- *errormsg = _("E842: no line number to use for \"<slnum>\"");
+ *errormsg = _(e_no_line_number_to_use_for_slnum);
return NULL;
}
sprintf((char *)strbuf, "%ld", SOURCING_LNUM);
{
if (allbuf_lock > 0)
{
- emsg(_("E811: Not allowed to change buffer information now"));
+ emsg(_(e_not_allowed_to_change_buffer_information_now));
return TRUE;
}
return FALSE;
#endif
static linenr_T readfile_linenr(linenr_T linecnt, char_u *p, char_u *endp);
static char_u *check_for_bom(char_u *p, long size, int *lenp, int flags);
-static char *e_auchangedbuf = N_("E812: Autocommands changed buffer or buffer name");
#ifdef FEAT_EVAL
static int readdirex_sort;
|| (using_b_fname
&& (old_b_fname != curbuf->b_fname)))
{
- emsg(_(e_auchangedbuf));
+ emsg(_(e_autocommands_changed_buffer_or_buffer_name));
return FAIL;
}
}
|| (using_b_ffname && (old_b_ffname != curbuf->b_ffname))
|| (using_b_fname && (old_b_fname != curbuf->b_fname))))
{
- emsg(_(e_auchangedbuf));
+ emsg(_(e_autocommands_changed_buffer_or_buffer_name));
if (!read_buffer)
close(fd);
return FAIL;
if (curbuf != buf)
{
// We are in another buffer now, don't do the renaming.
- emsg(_(e_auchangedbuf));
+ emsg(_(e_autocommands_changed_buffer_or_buffer_name));
return FAIL;
}
static int ff_path_in_stoplist(char_u *, int, char_u **);
#endif
-static char_u e_pathtoolong[] = N_("E854: path too long for completion");
-
static char_u *ff_expand_buffer = NULL; // used for expanding filenames
#if 0
{
if (len + 5 >= MAXPATHL)
{
- emsg(_(e_pathtoolong));
+ emsg(_(e_path_too_long_for_completion));
break;
}
if (STRNCMP(wc_part, "**", 2) == 0)
if (STRLEN(search_ctx->ffsc_start_dir)
+ STRLEN(search_ctx->ffsc_fix_path) + 3 >= MAXPATHL)
{
- emsg(_(e_pathtoolong));
+ emsg(_(e_path_too_long_for_completion));
goto error_return;
}
STRCPY(ff_expand_buffer, search_ctx->ffsc_start_dir);
*f = (float_T)argvars[0].vval.v_number;
return OK;
}
- emsg(_("E808: Number or Float required"));
+ emsg(_(e_number_or_float_required));
return FAIL;
}
pid = fork();
if (pid < 0) // Fork error
{
- emsg(_("E851: Failed to create a new process for the GUI"));
+ emsg(_(e_failed_to_create_new_process_for_GUI));
return;
}
else if (pid > 0) // Parent
# else
waitpid(pid, &exit_status, 0);
# endif
- emsg(_("E852: The child process failed to start the GUI"));
+ emsg(_(e_the_child_process_failed_to_start_GUI));
return;
}
else if (status == GUI_CHILD_IO_ERROR)
if (highlight_ga.ga_len >= MAX_HL_ID)
{
- emsg(_("E849: Too many highlight and syntax groups"));
+ emsg(_(e_too_many_highlight_and_syntax_groups));
vim_free(name);
return 0;
}
#ifdef DYNAMIC_MZSCHEME
if (disabled || !mzscheme_enabled(TRUE))
{
- emsg(_("E815: Sorry, this command is disabled, the MzScheme libraries could not be loaded."));
+ emsg(_(e_sorry_this_command_is_disabled_the_mzscheme_libraries_could_not_be_loaded));
return -1;
}
#endif
{
if (PyErr_Occurred() && !msg_silent)
PyErr_PrintEx(0);
- emsg(_("E858: Eval did not return a valid python object"));
+ emsg(_(e_eval_did_not_return_valid_python_object));
}
}
else
{
if (ConvertFromPyObject(run_ret, rettv) == -1)
- emsg(_("E859: Failed to convert returned python object to a Vim value"));
+ emsg(_(e_failed_to_convert_returned_python_object_to_vim_value));
Py_DECREF(run_ret);
}
PyErr_Clear();
if (python3_loaded())
{
if (verbose)
- emsg(_("E836: This Vim cannot execute :python after using :py3"));
+ emsg(_(e_this_vim_cannot_execute_python_after_using_py3));
return FAIL;
}
# endif
if (python_loaded())
{
if (verbose)
- emsg(_("E837: This Vim cannot execute :py3 after using :python"));
+ emsg(_(e_this_vim_cannot_execute_py3_after_using_python));
return FAIL;
}
# endif
# define CP_FAST 32 // use fast_breakcheck instead of ui_breakcheck
static char e_hitend[] = N_("Hit end of paragraph");
-# ifdef FEAT_COMPL_FUNC
-static char e_compldel[] = N_("E840: Completion function deleted text");
-# endif
/*
* All the current matches are stored in a list.
validate_cursor();
if (!EQUAL_POS(curwin->w_cursor, pos))
{
- emsg(_(e_compldel));
+ emsg(_(e_complete_function_deleted_text));
goto theend;
}
validate_cursor();
if (!EQUAL_POS(curwin->w_cursor, pos))
{
- emsg(_(e_compldel));
+ emsg(_(e_complete_function_deleted_text));
return FAIL;
}
{
if (cur->id == id)
{
- semsg(_("E801: ID already taken: %d"), id);
+ semsg(_(e_id_already_taken_nr), id);
return -1;
}
cur = cur->next;
if (id < 1)
{
if (perr == TRUE)
- semsg(_("E802: Invalid ID: %d (must be greater than or equal to 1)"),
- id);
+ semsg(_(e_invalid_id_nr_must_be_greater_than_or_equal_to_one), id);
return -1;
}
while (cur != NULL && cur->id != id)
if (cur == NULL)
{
if (perr == TRUE)
- semsg(_("E803: ID not found: %d"), id);
+ semsg(_(e_id_not_found_nr), id);
return -1;
}
if (cur == prev)
mf_put(mfp, hp, FALSE, FALSE); // release previous block
if (error > 0)
- emsg(_("E843: Error while updating swap file crypt"));
+ emsg(_(e_error_while_updating_swap_file_crypt));
}
mfp->mf_old_key = NULL;
#else
if (b0p->b0_id[1] != BLOCK0_ID1)
{
- semsg(_("E833: %s is encrypted and this version of Vim does not support encryption"), mfp->mf_fname);
+ semsg(_(e_str_is_encrypted_and_this_version_of_vim_does_not_support_encryption), mfp->mf_fname);
goto theend;
}
#endif
p = find_termcode(key_name);
if (p == NULL)
{
- errmsg = N_("E846: Key code not set");
+ errmsg = N_(e_key_code_not_set);
goto skip;
}
else
#ifdef FEAT_TERMINAL
if (buf->b_term != NULL && popup_terminal_exists())
{
- emsg(_("E861: Cannot open a second popup with a terminal"));
+ emsg(_(e_cannot_open_second_popup_with_terminal));
return NULL;
}
#endif
if (WIN_IS_POPUP(curwin) && curbuf->b_term != NULL
&& term_job_running(curbuf->b_term))
{
- emsg(_("E863: Not allowed for a terminal in a popup window"));
+ emsg(_(e_not_allowed_for_terminal_in_popup_window));
return TRUE;
}
return FALSE;
}
else
{
- emsg(_("E864: \\%#= can only be followed by 0, 1, or 2. The automatic engine will be used "));
+ emsg(_(e_percent_hash_can_only_be_followed_by_zero_one_two_automatic_engine_will_be_used));
regexp_engine = AUTOMATIC_ENGINE;
}
}
NFA_UPPER, NFA_NUPPER
};
-static char_u e_nul_found[] = N_("E865: (NFA) Regexp end encountered prematurely");
-static char_u e_misplaced[] = N_("E866: (NFA regexp) Misplaced %c");
-static char_u e_ill_char_class[] = N_("E877: (NFA regexp) Invalid character class: %d");
-static char_u e_value_too_large[] = N_("E951: \\% value too large");
-
// Variables only used in nfa_regcomp() and descendants.
static int nfa_re_flags; // re_flags passed to nfa_regcomp()
static int *post_start; // holds the postfix form of r.e.
switch (c)
{
case NUL:
- EMSG_RET_FAIL(_(e_nul_found));
+ EMSG_RET_FAIL(_(e_nfa_regexp_end_encountered_prematurely));
case Magic('^'):
EMIT(NFA_BOL);
case Magic('_'):
c = no_Magic(getchr());
if (c == NUL)
- EMSG_RET_FAIL(_(e_nul_found));
+ EMSG_RET_FAIL(_(e_nfa_regexp_end_encountered_prematurely));
if (c == '^') // "\_^" is start-of-line
{
{
if (extra == NFA_ADD_NL)
{
- semsg(_(e_ill_char_class), c);
+ semsg(_(e_nfa_regexp_invalid_character_class_nr), c);
rc_did_emsg = TRUE;
return FAIL;
}
case Magic('|'):
case Magic('&'):
case Magic(')'):
- semsg(_(e_misplaced), no_Magic(c));
+ semsg(_(e_nfa_regexp_misplaced_chr), no_Magic(c));
return FAIL;
case Magic('='):
case Magic('*'):
case Magic('{'):
// these should follow an atom, not form an atom
- semsg(_(e_misplaced), no_Magic(c));
+ semsg(_(e_nfa_regexp_misplaced_chr), no_Magic(c));
return FAIL;
case Magic('~'):
break;
#endif
default:
- semsg(_("E867: (NFA) Unknown operator '\\z%c'"),
- no_Magic(c));
+ semsg(_(e_nfa_unknown_operator_z_chr), no_Magic(c));
return FAIL;
}
break;
if (tmp < n)
{
// overflow.
- emsg(_(e_value_too_large));
+ emsg(_(e_percent_value_too_large));
return FAIL;
}
n = tmp;
}
if (n >= limit)
{
- emsg(_(e_value_too_large));
+ emsg(_(e_percent_value_too_large));
return FAIL;
}
EMIT((int)n);
break;
}
}
- semsg(_("E867: (NFA) Unknown operator '\\%%%c'"),
- no_Magic(c));
+ semsg(_(e_nfa_unknown_operator_percent_chr), no_Magic(c));
return FAIL;
}
break;
if (result == FAIL)
{
// should never happen
- EMSG_RET_FAIL(_("E868: Error building NFA with equivalence class!"));
+ EMSG_RET_FAIL(_(e_error_building_nfa_with_equivalence_class));
}
continue;
}
}
if (i == 0)
{
- semsg(_("E869: (NFA) Unknown operator '\\@%c'"), op);
+ semsg(_(e_nfa_unknown_operator_at_chr), op);
return FAIL;
}
EMIT(i);
default:
// should not be here :P
- siemsg(_(e_ill_char_class), class);
+ siemsg(_(e_nfa_regexp_invalid_character_class_nr), class);
return FAIL;
}
return FAIL;
{
if (!spin->si_did_emsg)
{
- emsg(_("E845: Insufficient memory, word list will be incomplete"));
+ emsg(_(e_insufficient_memory_word_list_will_be_incomplete));
spin->si_did_emsg = TRUE;
}
return NULL;
else if (tvs[idx].v_type == VAR_NUMBER)
f = (double)tvs[idx].vval.v_number;
else
- emsg(_("E807: Expected Float argument for printf()"));
+ emsg(_(e_expected_float_argument_for_printf));
}
return f;
}
#ifdef FEAT_CONCEAL
if (!vim_isprintc_strict(*conceal_char))
{
- emsg(_("E844: invalid cchar value"));
+ emsg(_(e_invalid_cchar_value));
return NULL;
}
#endif
*/
if (running_syn_inc_tag >= MAX_SYN_INC_TAG)
{
- emsg(_("E847: Too many syntax includes"));
+ emsg(_(e_too_many_syntax_includes));
return;
}
prev_syn_inc_tag = current_syn_inc_tag;
len = curwin->w_s->b_syn_clusters.ga_len;
if (len >= MAX_CLUSTER_ID)
{
- emsg(_("E848: Too many syntax clusters"));
+ emsg(_(e_too_many_syntax_clusters));
vim_free(name);
return 0;
}
}
if (both && (!id_found || type_id == -1))
{
- emsg(_("E860: Need 'id' and 'type' with 'both'"));
+ emsg(_(e_need_id_and_type_with_both));
return;
}
}
if (both && (id == -1 || type_id == -1))
{
- emsg(_("E860: Need 'id' and 'type' with 'both'"));
+ emsg(_(e_need_id_and_type_with_both));
return;
}
return varp->vval.v_number;
case VAR_FLOAT:
#ifdef FEAT_FLOAT
- emsg(_("E805: Using a Float as a Number"));
+ emsg(_(e_using_float_as_number));
break;
#endif
case VAR_FUNC:
// extra fields for uhp
# define UHP_SAVE_NR 1
-static char_u e_not_open[] = N_("E828: Cannot open undo file for writing: %s");
-
/*
* Compute the hash for the current buffer text into hash[UNDO_HASH_SIZE].
*/
static void
corruption_error(char *mesg, char_u *file_name)
{
- semsg(_("E825: Corrupted undo file (%s): %s"), mesg, file_name);
+ semsg(_(e_corrupted_undo_file_str_str), mesg, file_name);
}
static void
O_CREAT|O_EXTRA|O_WRONLY|O_EXCL|O_NOFOLLOW, perm);
if (fd < 0)
{
- semsg(_(e_not_open), file_name);
+ semsg(_(e_cannot_open_undo_file_for_writing_str), file_name);
goto theend;
}
(void)mch_setperm(file_name, perm);
fp = fdopen(fd, "w");
if (fp == NULL)
{
- semsg(_(e_not_open), file_name);
+ semsg(_(e_cannot_open_undo_file_for_writing_str), file_name);
close(fd);
mch_remove(file_name);
goto theend;
write_error:
fclose(fp);
if (!write_ok)
- semsg(_("E829: write error in undo file: %s"), file_name);
+ semsg(_(e_write_error_in_undo_file_str), file_name);
#if defined(MSWIN)
// Copy file attributes; for systems where this can only be done after
if (fp == NULL)
{
if (name != NULL || p_verbose > 0)
- semsg(_("E822: Cannot open undo file for reading: %s"), file_name);
+ semsg(_(e_cannot_open_undo_file_for_reading_str), file_name);
goto error;
}
bi.bi_buf = curbuf;
if (fread(magic_buf, UF_START_MAGIC_LEN, 1, fp) != 1
|| memcmp(magic_buf, UF_START_MAGIC, UF_START_MAGIC_LEN) != 0)
{
- semsg(_("E823: Not an undo file: %s"), file_name);
+ semsg(_(e_not_an_undo_file_str), file_name);
goto error;
}
version = get2c(fp);
#ifdef FEAT_CRYPT
if (*curbuf->b_p_key == NUL)
{
- semsg(_("E832: Non-encrypted file has encrypted undo file: %s"),
- file_name);
+ semsg(_(e_non_encrypted_file_has_encrypted_undo_file), file_name);
goto error;
}
bi.bi_state = crypt_create_from_file(fp, curbuf->b_p_key);
if (bi.bi_state == NULL)
{
- semsg(_("E826: Undo file decryption failed: %s"), file_name);
+ semsg(_(e_undo_file_decryption_failed), file_name);
goto error;
}
if (crypt_whole_undofile(bi.bi_state->method_nr))
bi.bi_used = 0;
}
#else
- semsg(_("E827: Undo file is encrypted: %s"), file_name);
+ semsg(_(e_undo_file_is_encrypted_str), file_name);
goto error;
#endif
}
else if (version != UF_VERSION)
{
- semsg(_("E824: Incompatible undo file: %s"), file_name);
+ semsg(_(e_incompatible_undo_file_str), file_name);
goto error;
}
if (absolute)
{
- semsg(_("E830: Undo number %ld not found"), step);
+ semsg(_(e_undo_number_nr_not_found), step);
return;
}
else if ((name_len == 1 && *name == 'X')
|| (name_len <= 4
&& STRNCMP(name, "Next", name_len > 4 ? 4 : name_len) == 0))
- emsg(_("E841: Reserved name, cannot be used for user defined command"));
+ emsg(_(e_reserved_name_cannot_be_used_for_user_defined_command));
else if (compl > 0 && (argt & EX_EXTRA) == 0)
{
// Some plugins rely on silently ignoring the mistake, only make this
for (i = 0; i < newargs->ga_len; ++i)
if (STRCMP(((char_u **)(newargs->ga_data))[i], arg_copy) == 0)
{
- semsg(_("E853: Duplicate argument name: %s"), arg_copy);
+ semsg(_(e_duplicate_argument_name_str), arg_copy);
vim_free(arg_copy);
return arg;
}
// Disallow using the g: dict.
if (fudi.fd_dict != NULL && fudi.fd_dict->dv_scope == VAR_DEF_SCOPE)
{
- emsg(_("E862: Cannot use g: here"));
+ emsg(_(e_cannot_use_g_here));
goto ret_free;
}
}
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 4010,
/**/
4009,
/**/
}
if ((firstwin == aucmd_win || lastwin == aucmd_win) && one_window())
{
- emsg(_("E814: Cannot close window, only autocmd window would remain"));
+ emsg(_(e_cannot_close_window_only_autocmd_window_would_remain));
return FAIL;
}