mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
clarify how old code may use the new error_table[] array
Code that used the old array error_table[] of error message strings such as: #include "calcerr.h" char *msg; /* calc computation error message */ msg = error_table[errnum - E__BASE]; where errnum is the calc computation error code E__BASE <= errnum <= E__HIGHEST, may now use: #include "errtbl.h" #include "errsym.h" char *msg; /* calc computation error message */ msg = error_table[errnum - E__BASE].errmsg;
This commit is contained in:
19
CHANGES
19
CHANGES
@@ -270,6 +270,25 @@ The following are the changes from calc version 2.14.3.5 to date:
|
|||||||
The Makefile uses ./errcode -d to generate the contents of the
|
The Makefile uses ./errcode -d to generate the contents of the
|
||||||
errsym.h include file.
|
errsym.h include file.
|
||||||
|
|
||||||
|
Code that used the old array error_table[] of error message strings
|
||||||
|
such as:
|
||||||
|
|
||||||
|
#include "calcerr.h"
|
||||||
|
|
||||||
|
char *msg; /* calc computation error message */
|
||||||
|
|
||||||
|
msg = error_table[errnum - E__BASE];
|
||||||
|
|
||||||
|
where errnum is the calc computation error code
|
||||||
|
E__BASE <= errnum <= E__HIGHEST, may now use:
|
||||||
|
|
||||||
|
#include "errtbl.h"
|
||||||
|
#include "errsym.h"
|
||||||
|
|
||||||
|
char *msg; /* calc computation error message */
|
||||||
|
|
||||||
|
msg = error_table[errnum - E__BASE].errmsg;
|
||||||
|
|
||||||
|
|
||||||
The following are the changes from calc version 2.14.3.4 to 2.14.3.5:
|
The following are the changes from calc version 2.14.3.4 to 2.14.3.5:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user