From a5ef1a6d2ab7c555bba52a11e554230007f5eafb Mon Sep 17 00:00:00 2001 From: sam Date: Tue, 19 Aug 2003 19:27:51 +0000 Subject: [PATCH] elk (3.0-15) unstable; urgency=low * In math.c:Exact_Modulo(), follow R5RS's definition of Modulo: if x/y is an integer, return Zero (Closes: #197831). * Made /usr/bin/elk a symlink to /usr/bin/scheme-elk. -- Sam Hocevar (Debian packages) Wed, 18 Jun 2003 01:42:54 +0200 git-svn-id: svn://svn.zoy.org/elk/trunk@9 55e467fa-43c5-0310-a8a2-de718669efc6 --- debian/changelog | 8 ++++++++ debian/rules | 2 +- doc/man/elk.1 | 6 +++--- src/math.c | 10 ++++++---- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 090316c..7c028f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +elk (3.0-15) unstable; urgency=low + + * In math.c:Exact_Modulo(), follow R5RS's definition of Modulo: if x/y is an + integer, return Zero (Closes: #197831). + * Made /usr/bin/elk a symlink to /usr/bin/scheme-elk. + + -- Sam Hocevar (Debian packages) Wed, 18 Jun 2003 01:42:54 +0200 + elk (3.0-14) unstable; urgency=low * Rebuilt package against libgdbm's new version. diff --git a/debian/rules b/debian/rules index 4c68177..313a873 100644 --- a/debian/rules +++ b/debian/rules @@ -105,7 +105,7 @@ binary-arch: build install # dh_undocumented dh_installchangelogs CHANGES dh_strip -# dh_link + dh_link usr/bin/scheme-elk usr/bin/elk dh_compress dh_fixperms dh_installdeb diff --git a/doc/man/elk.1 b/doc/man/elk.1 index 5a2b391..2f486f2 100644 --- a/doc/man/elk.1 +++ b/doc/man/elk.1 @@ -2,9 +2,9 @@ .TH ELK 1 "15 January 1991" .UC 4 .SH NAME -elk, scheme \- extensible Scheme interpreter +elk, scheme-elk \- extensible Scheme interpreter .SH SYNOPSIS -.B scheme +.B elk [ .B \-l \f2file\fP ] [ @@ -32,7 +32,7 @@ Normally, is linked with the application it serves, but a stand-alone version of the Scheme interpreter is installed as well (usually under the name -.BR scheme ). +.BR elk ). This interpreter, together with the standard Scheme toplevel, .I Elk can be used as an ordinary, stand-alone implementation of the diff --git a/src/math.c b/src/math.c index d9b716e..c53386b 100644 --- a/src/math.c +++ b/src/math.c @@ -886,10 +886,12 @@ Object Exact_Modulo (Object x, Object y) { GC_Link2 (x, y); rem = General_Integer_Divide (x, y, 1); - xneg = P_Negativep (x); - yneg = P_Negativep (y); - if (!EQ(xneg,yneg)) - rem = Generic_Plus (rem, y); + if (!EQ(rem,Zero)) { + xneg = P_Negativep (x); + yneg = P_Negativep (y); + if (!EQ(xneg,yneg)) + rem = Generic_Plus (rem, y); + } GC_Unlink; return rem; }