mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
improve calc error code system
Changed calc_errno a global int variable so that is may be directly accessed by libcalc users. Further improve help files for help/errno, help/error, help/newerror, help/stoponerror and help/strerror by adding to documentation of the calc error code system as well as libcalc interface where applicable.
This commit is contained in:
10
opcodes.c
10
opcodes.c
@@ -57,7 +57,6 @@
|
||||
STATIC VALUE stackarray[MAXSTACK]; /* storage for stack */
|
||||
STATIC VALUE oldvalue; /* previous calculation value */
|
||||
STATIC bool saveval = true; /* to enable or disable saving */
|
||||
STATIC int calc_errno; /* most recent error-number */
|
||||
STATIC int errcount; /* counts calls to error_value */
|
||||
STATIC bool go;
|
||||
STATIC long calc_depth;
|
||||
@@ -65,10 +64,11 @@ STATIC long calc_depth;
|
||||
/*
|
||||
* global symbols
|
||||
*/
|
||||
VALUE *stack; /* current location of top of stack */
|
||||
int dumpnames; /* names if true, otherwise indices */
|
||||
char *funcname; /* function being executed */
|
||||
long funcline; /* function line being executed */
|
||||
VALUE *stack = NULL; /* current location of top of stack */
|
||||
int dumpnames = false; /* names if true, otherwise indices */
|
||||
char *funcname = NULL; /* function being executed */
|
||||
long funcline = 0; /* function line being executed */
|
||||
int calc_errno = 0; /* global calc_errno value */
|
||||
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user