mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
add errsym builtin function
NOTE: errstr was renamed to errsym. Added errsym builtin function. The errsym(errnum | "E_STRING") builtin, , when given a valid integer errnum that corresponds to a calc error condition, will return an E_STRING string, AND when given a valid E_STRING string that is associated with a calc error condition, will return errnum integer that corresponds to a calc error condition. Supplying a non-integer numeric errnum code to error(), errno(), strerror(), or errsym() will result in an error.
This commit is contained in:
2
errtbl.h
2
errtbl.h
@@ -100,7 +100,7 @@ E_FUNC bool is_errnum_in_error_table(int errnum);
|
||||
E_FUNC int e_digits_2_errnum(CONST char *errsym);
|
||||
E_FUNC bool is_e_1string(CONST char *errsym);
|
||||
E_FUNC bool is_e_2string(CONST char *errsym);
|
||||
E_FUNC struct errtbl *find_estring_in_errtbl(CONST char *errsym, CONST struct errtbl *tbl);
|
||||
E_FUNC struct errtbl *find_errsym_in_errtbl(CONST char *errsym, CONST struct errtbl *tbl);
|
||||
E_FUNC struct errtbl *find_errnum_in_errtbl(int errnum, CONST struct errtbl *tbl);
|
||||
E_FUNC CONST struct errtbl *lookup_errnum_in_error_table(int errnum);
|
||||
E_FUNC void verify_error_table(void);
|
||||
|
Reference in New Issue
Block a user