mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
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:
4
func.c
4
func.c
@@ -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 {
|
||||
|
Reference in New Issue
Block a user