From d943fda3eb0e1532ee6f375ea7884829c66da3ac Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Wed, 13 Sep 2023 03:16:20 -0700 Subject: [PATCH] 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; --- CHANGES | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CHANGES b/CHANGES index 08b8b41..a77b833 100644 --- a/CHANGES +++ b/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 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: