patch 8.2.3190: error messages are spread out
Problem: Error messages are spread out.
Solution: Move error messages to errors.h and give them a clear name.
diff --git a/src/regexp_bt.c b/src/regexp_bt.c
index dae6d51..1a677d1 100644
--- a/src/regexp_bt.c
+++ b/src/regexp_bt.c
@@ -1424,7 +1424,7 @@
}
}
else
- EMSG_RET_NULL(_(e_nopresub));
+ EMSG_RET_NULL(_(e_no_previous_substitute_regular_expression));
break;
case Magic('1'):
@@ -2491,7 +2491,7 @@
int flags;
if (expr == NULL)
- IEMSG_RET_NULL(_(e_null));
+ IEMSG_RET_NULL(_(e_null_argument));
init_class_tab();
@@ -3115,7 +3115,7 @@
break;
default: // Oh dear. Called inappropriately.
- iemsg(_(e_re_corr));
+ iemsg(_(e_corrupted_regexp_program));
#ifdef DEBUG
printf("Called regrepeat with op code %d\n", OP(p));
#endif
@@ -4309,7 +4309,7 @@
break;
default:
- iemsg(_(e_re_corr));
+ iemsg(_(e_corrupted_regexp_program));
#ifdef DEBUG
printf("Illegal op code %d\n", op);
#endif
@@ -4709,7 +4709,7 @@
{
// We get here only if there's trouble -- normally "case END" is
// the terminating point.
- iemsg(_(e_re_corr));
+ iemsg(_(e_corrupted_regexp_program));
#ifdef DEBUG
printf("Premature EOL\n");
#endif
@@ -4859,7 +4859,7 @@
// Be paranoid...
if (prog == NULL || line == NULL)
{
- iemsg(_(e_null));
+ iemsg(_(e_null_argument));
goto theend;
}