Mercurial > vim
comparison src/regexp.c @ 26958:d92e0d85923f v8.2.4008
patch 8.2.4008: error messages are spread out
Commit: https://github.com/vim/vim/commit/677658ae49de31fe2e5b1fa6d93fdfab85a4362e
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 5 16:09:06 2022 +0000
patch 8.2.4008: error messages are spread out
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 05 Jan 2022 17:15:05 +0100 |
parents | b34ddbca305c |
children | 85866e069c24 |
comparison
equal
deleted
inserted
replaced
26957:e5b81e2bed22 | 26958:d92e0d85923f |
---|---|
68 #define EMSG2_RET_FAIL(m, c) return (semsg((const char *)(m), (c) ? "" : "\\"), rc_did_emsg = TRUE, FAIL) | 68 #define EMSG2_RET_FAIL(m, c) return (semsg((const char *)(m), (c) ? "" : "\\"), rc_did_emsg = TRUE, FAIL) |
69 #define EMSG_ONE_RET_NULL EMSG2_RET_NULL(_(e_invalid_item_in_str_brackets), reg_magic == MAGIC_ALL) | 69 #define EMSG_ONE_RET_NULL EMSG2_RET_NULL(_(e_invalid_item_in_str_brackets), reg_magic == MAGIC_ALL) |
70 | 70 |
71 | 71 |
72 #define MAX_LIMIT (32767L << 16L) | 72 #define MAX_LIMIT (32767L << 16L) |
73 | |
74 static char_u e_missingbracket[] = N_("E769: Missing ] after %s["); | |
75 static char_u e_reverse_range[] = N_("E944: Reverse range in character class"); | |
76 static char_u e_large_class[] = N_("E945: Range too large in character class"); | |
77 static char_u e_recursive[] = N_("E956: Cannot use pattern recursively"); | |
78 | 73 |
79 #define NOT_MULTI 0 | 74 #define NOT_MULTI 0 |
80 #define MULTI_ONE 1 | 75 #define MULTI_ONE 1 |
81 #define MULTI_MULT 2 | 76 #define MULTI_MULT 2 |
82 | 77 |
2777 int rex_in_use_save = rex_in_use; | 2772 int rex_in_use_save = rex_in_use; |
2778 | 2773 |
2779 // Cannot use the same prog recursively, it contains state. | 2774 // Cannot use the same prog recursively, it contains state. |
2780 if (rmp->regprog->re_in_use) | 2775 if (rmp->regprog->re_in_use) |
2781 { | 2776 { |
2782 emsg(_(e_recursive)); | 2777 emsg(_(e_cannot_use_pattern_recursively)); |
2783 return FALSE; | 2778 return FALSE; |
2784 } | 2779 } |
2785 rmp->regprog->re_in_use = TRUE; | 2780 rmp->regprog->re_in_use = TRUE; |
2786 | 2781 |
2787 if (rex_in_use) | 2782 if (rex_in_use) |
2898 int rex_in_use_save = rex_in_use; | 2893 int rex_in_use_save = rex_in_use; |
2899 | 2894 |
2900 // Cannot use the same prog recursively, it contains state. | 2895 // Cannot use the same prog recursively, it contains state. |
2901 if (rmp->regprog->re_in_use) | 2896 if (rmp->regprog->re_in_use) |
2902 { | 2897 { |
2903 emsg(_(e_recursive)); | 2898 emsg(_(e_cannot_use_pattern_recursively)); |
2904 return FALSE; | 2899 return FALSE; |
2905 } | 2900 } |
2906 rmp->regprog->re_in_use = TRUE; | 2901 rmp->regprog->re_in_use = TRUE; |
2907 | 2902 |
2908 if (rex_in_use) | 2903 if (rex_in_use) |