fix redundant #defines

Removed from errsym.h (as built by errcode -d via the Makefile),
E__NONE, E__BASE, E__USERDEF, and E__USERMAX.  These symbols were
also defined in errtbl.h, which is NOW the place of the #define.

Update .gitigore with another temporary file.
This commit is contained in:
Landon Curt Noll
2023-09-13 20:55:22 -07:00
parent 40c8f875c1
commit 3b9393a8ac
5 changed files with 16 additions and 19 deletions

4
func.c
View File

@@ -8087,7 +8087,7 @@ f_newerror(int count, VALUE **vals)
if (index >= 0) {
errnum = E__USERDEF + index;
} else {
if (nexterrnum == 32767)
if (nexterrnum == E__USERMAX)
math_error("Too many new error values");
errnum = nexterrnum++;
addstr(&newerrorstr, str);
@@ -8116,7 +8116,7 @@ f_strerror(int count, VALUE **vals)
if (vp->v_type != V_NUM || qisfrac(vp->v_num))
return error_value(E_STRERROR1);
i = qtoi(vp->v_num);
if (i < 0 || i > 32767)
if (i < 0 || i > E__USERMAX)
return error_value(E_STRERROR2);
}
} else {