Release calc version 2.11.0t7.1

This commit is contained in:
Landon Curt Noll
1999-10-14 10:45:35 -07:00
parent 4c0f2691e9
commit 35982c7cc8
6 changed files with 65 additions and 13 deletions

28
func.c
View File

@@ -84,6 +84,8 @@ extern void matrandperm(MATRIX *M);
extern void listrandperm(LIST *lp);
extern int idungetc(FILEID id, int ch);
extern int stoponerror;
/*
* if HZ & CLK_TCK are not defined, pick typical values, hope for the best
@@ -4476,6 +4478,30 @@ f_errmax(int count, VALUE **vals)
}
static VALUE
f_stoponerror(int count, VALUE **vals)
{
int oldval;
VALUE *vp;
VALUE result;
oldval = stoponerror;
if (count > 0) {
vp = vals[0];
if (vp->v_type != V_NUM || qisfrac(vp->v_num) ||
zge31b(vp->v_num->num))
fprintf(stderr,
"Out-of-range arg for stoponerror ignored\n");
else
stoponerror = (int) ztoi(vp->v_num->num);
}
result.v_type = V_NUM;
result.v_num = itoq((long) oldval);
return result;
}
static VALUE
f_fclose(int count, VALUE **vals)
{
@@ -7206,6 +7232,8 @@ static CONST struct builtin builtins[] = {
"seed the random() function"},
{"ssq", 1, IN, 0, OP_NOP, 0, f_ssq,
"sum of squares of values"},
{"stoponerror", 0, 1, 0, OP_NOP, 0, f_stoponerror,
"assign value to stoponerror flag"},
{"str", 1, 1, 0, OP_NOP, 0, f_str,
"simple value converted to string"},
{"strcat", 1,IN, 0, OP_NOP, 0, f_strcat,