summaryrefslogtreecommitdiffstats
path: root/scl.c
diff options
context:
space:
mode:
authorRob Browning <rlb@cs.utexas.edu>1997-12-12 17:29:42 -0600
committerBryan Newbold <bnewbold@robocracy.org>2017-02-20 00:05:24 -0800
commitf64b2806c1d66a1341bb8b1491f384169ab1d65f (patch)
tree8b97dbe3640c60927959b0e63461ef9fcae591e0 /scl.c
parent6dcb175d7f34d9f5a0b3ba623f94454ec16a73d6 (diff)
parent1edcb9b62a1a520eddae8403c19d841c9b18737f (diff)
downloadscm-f64b2806c1d66a1341bb8b1491f384169ab1d65f.tar.gz
scm-f64b2806c1d66a1341bb8b1491f384169ab1d65f.zip
Import Debian changes 5b3-1debian/5b3-1
scm (5b3-1) unstable; urgency=low * New maintainer * New version * libc6
Diffstat (limited to 'scl.c')
-rw-r--r--scl.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/scl.c b/scl.c
index 393d0f0..8e89bd8 100644
--- a/scl.c
+++ b/scl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -291,11 +291,13 @@ int floprint(sexp, port, writing)
int writing;
{
#ifdef FLOATS
- char num_buf[FLOBUFLEN];
- lfwrite(num_buf, (sizet)sizeof(char), iflo2str(sexp, num_buf), port);
-#else
- ipruk("float", sexp, port);
+ if (!errjmp_bad) {
+ char num_buf[FLOBUFLEN];
+ lfwrite(num_buf, (sizet)sizeof(char), iflo2str(sexp, num_buf), port);
+ return !0;
+ } else
#endif
+ ipruk("float", sexp, port);
return !0;
}
int bigprint(exp, port, writing)
@@ -304,11 +306,13 @@ int bigprint(exp, port, writing)
int writing;
{
#ifdef BIGDIG
- exp = big2str(exp, (unsigned int)10);
- lfwrite(CHARS(exp), (sizet)sizeof(char), (sizet)LENGTH(exp), port);
-#else
- ipruk("bignum", exp, port);
+ if (!errjmp_bad) {
+ exp = big2str(exp, (unsigned int)10);
+ lfwrite(CHARS(exp), (sizet)sizeof(char), (sizet)LENGTH(exp), port);
+ return !0;
+ } else
#endif
+ ipruk("bignum", exp, port);
return !0;
}
/*** END nums->strs ***/
@@ -588,6 +592,7 @@ SCM istr2flo(str, len, radix)
case '@': { /* polar input for complex number */
/* get a `real' for angle */
second = istr2flo(&str[i], (long)(len-i), radix);
+ if IMP(second) return BOOL_F;
if (!(INEXP(second))) return BOOL_F; /* not `real' */
if (CPLXP(second)) return BOOL_F; /* not `real' */
tmp = REALPART(second);
@@ -602,6 +607,7 @@ SCM istr2flo(str, len, radix)
if (i==(len-1)) return makdbl(res, lead_sgn);
/* get a `ureal' for complex part */
second = istr2flo(&str[i], (long)((len-i)-1), radix);
+ if IMP(second) return BOOL_F;
if (!(INEXP(second))) return BOOL_F; /* not `ureal' */
if (CPLXP(second)) return BOOL_F; /* not `ureal' */
tmp = REALPART(second);
@@ -863,7 +869,6 @@ SCM equal(x, y)
else return BOOL_F;
}
}
- return BOOL_F;
}
SCM numberp(x)
@@ -2328,6 +2333,7 @@ static dblproc cxrs[] = {
{"$abs", fabs},
{"$exp", exp},
{"$log", log},
+ {"$log10", log10},
{"$sin", sin},
{"$cos", cos},
{"$tan", tan},