diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-02 21:26:16 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-02 21:26:16 +0000 |
commit | 1d423ef75fc8bce2edfd2aab61cc9beaa63e31aa (patch) | |
tree | 6db703ecd2dc317aa69c9c03f3130002a857e4af /src/if_cscope.c | |
parent | b09feaa86ecc53b9b953710082496951776dc5c6 (diff) | |
download | vim-git-1d423ef75fc8bce2edfd2aab61cc9beaa63e31aa.tar.gz |
patch 8.2.3987: error messages are spread outv8.2.3987
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
Diffstat (limited to 'src/if_cscope.c')
-rw-r--r-- | src/if_cscope.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/if_cscope.c b/src/if_cscope.c index d76f1dd87..e0dd759ab 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -76,7 +76,7 @@ static cscmd_T cs_cmds[] = static void cs_usage_msg(csid_e x) { - (void)semsg(_("E560: Usage: cs[cope] %s"), cs_cmds[(int)x].usage); + (void)semsg(_(e_usage_cscope_str), cs_cmds[(int)x].usage); } static enum @@ -250,7 +250,7 @@ ex_cstag(exarg_T *eap) if (*eap->arg == NUL) { - (void)emsg(_("E562: Usage: cstag <ident>")); + (void)emsg(_(e_usage_cstag_ident)); return; } @@ -463,7 +463,7 @@ cs_add(exarg_T *eap UNUSED) cs_stat_emsg(char *fname) { int err = errno; - (void)semsg(_("E563: stat(%s) error: %d"), fname, err); + (void)semsg(_(e_stat_str_error_nr), fname, err); } @@ -564,9 +564,8 @@ staterr: else { if (p_csverbose) - (void)semsg( - _("E564: %s is not a directory or a valid cscope database"), - fname); + (void)semsg(_(e_str_is_not_directory_or_valid_cscope_database), + fname); goto add_err; } @@ -742,7 +741,7 @@ cs_create_cmd(char *csoption, char *pattern) search = 9; break; default : - (void)emsg(_("E561: unknown cscope search type")); + (void)emsg(_(e_unknown_cscope_search_type)); cs_usage_msg(Find); return NULL; } @@ -799,7 +798,7 @@ cs_create_connection(int i) 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")); + (void)emsg(_(e_could_not_create_cscope_pipes)); err_closing: if (to_cs[0] != -1) (void)close(to_cs[0]); @@ -838,7 +837,7 @@ err_closing: 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")); + (void)emsg(_(e_could_not_create_cscope_pipes)); err_closing: if (pipe_stdin) { @@ -1014,7 +1013,7 @@ cs_find(exarg_T *eap) if (cs_check_for_connections() == FALSE) { - (void)emsg(_("E567: no cscope connections")); + (void)emsg(_(e_no_cscope_connections)); return FALSE; } @@ -1356,7 +1355,7 @@ cs_insert_filelist( ) { if (p_csverbose) - (void)emsg(_("E568: duplicate cscope database not added")); + (void)emsg(_(e_duplicate_cscope_database_not_added)); return -1; } @@ -1665,7 +1664,7 @@ cs_manage_matches( cs_print_tags_priv(mp, cp, cnt); break; default: // should not reach here - iemsg(_("E570: fatal error in cs_manage_matches")); + iemsg(_(e_fatal_error_in_cs_manage_matches)); return NULL; } |