improve calc error code system

Added help/errorcodes rule to the top level Makefile.

Added E_USERMAX symbol (== 32767) to indicate the maximum value
allowed for user error codes.

Improve help/error.  Added text about error code ranges and
range symbols.
This commit is contained in:
Landon Curt Noll
2023-09-12 14:08:49 -07:00
parent 4c65986502
commit 19819340ff
6 changed files with 105 additions and 17 deletions

View File

@@ -43,6 +43,7 @@ NF > 1 {
END {
printf("\n#define E__HIGHEST\t%d\t/* highest calc error */\n", NR+ebase);
printf("#define E__COUNT\t%d\t/* number of calc errors */\n", NR);
printf("#define E_USERDEF\t20000\t/* base of user defined errors */\n\n");
printf("#define E_USERDEF\t20000\t/* base of user defined errors */\n");
printf("#define E_USERMAX\t32767\t/* maximum user defined error value */\n\n");
printf("/* names of calc error values */\n");
}