<short summary of the patch>
authorCamm Maguire <camm@debian.org>
Thu, 11 Aug 2022 17:16:42 +0000 (18:16 +0100)
committerCamm Maguire <camm@debian.org>
Thu, 11 Aug 2022 17:16:42 +0000 (18:16 +0100)
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.

gcl (2.6.12-116) unstable; urgency=medium

  * Version_2.6.13pre113

Gbp-Pq: Name Version_2.6.13pre113

lsp/gcl_mislib.lsp
o/format.c
o/makefile
o/num_sfun.c
o/usig.c
xgcl-2/sysdef.lisp

index 4bf92b1fd46036d29d9e41bebe3a0d743f475fbc..730ce8cba313b480836aac46a878e49ff5370a01 100755 (executable)
@@ -75,7 +75,7 @@
 (defun decode-universal-time (ut &optional (tz (current-timezone) tzp) 
                                 &aux (dstp (unless tzp (current-dstp))) (ut (- ut (* tz 3600))))
   (declare (optimize (safety 2)))
-  (check-type ut (integer 0))
+  (check-type ut integer)
   (check-type tz rational)
   (multiple-value-bind
    (d ut) (floor ut seconds-per-day)
   (check-type h (integer 0 23))
   (check-type d (integer 1 31))
   (check-type m (integer 1 12))
-  (check-type y (integer 1900))
+  (check-type y integer)
   (check-type tz rational)
   (when (<= 0 y 99)
     (multiple-value-bind
index 94135ad01923170029e4b8be090c8106f74c1ab9..f62da47925077b405b58f9b2b8096312a32b9465 100755 (executable)
@@ -1089,7 +1089,7 @@ fmt_fix_float(bool colon, bool atsign)
        }
        f = number_to_double(x);
        edit_double(n, f, &sign, buff, &exp, dp);
-       if (exp + k > 100 || exp + k < -100 || d > 100) {
+       if (sign==2) {
                prin1(x, fmt_stream);
                vs_reset;
                return;
@@ -1288,7 +1288,7 @@ fmt_exponential_float(bool colon, bool atsign)
        }
        f = number_to_double(x);
        edit_double(n, f, &sign, buff, &exp, dp);
-       if (exp + k > 100 || exp + k < -100 || d > 100) {
+       if (sign==2) {
                prin1(x, fmt_stream);
                vs_reset;
                return;
index 4a023a35817766c6a5fe8cf2cb6a7328968b92a9..db1e2923302379e1850599b873a42a60790a04ad 100644 (file)
@@ -74,10 +74,11 @@ $(DPP):     ../bin/dpp.c
        ${CC} ${DEFS} -o $@ $<
 
 new_init.c: ${INI_FILES}
-       echo '#include "make-init.h"' > new_init.c
-       echo 'void NewInit(void){' >> new_init.c
-       cat ${INI_FILES} >> new_init.c
-       echo '}' >> new_init.c
+       echo '#include "make-init.h"' > $@
+       echo 'void NewInit(void){' >> $@
+       cat ${INI_FILES} >> $@
+       echo '}' >> $@
+       ! cat $@ | awk -F, '/DEFUN/ {print $2}' | grep -v object || (rm $@ && false)
 
 ifneq ($(NIFLAGS),)
 new_init.o: new_init.c $(DECL)
index cfd8bce8af16a25a3e15e894443b4b5b18da5de3..958de2b5c365305b86947cff4f997787d3c61244 100755 (executable)
@@ -434,7 +434,7 @@ number_atan2(object y, object x)
                if (dy > 0.0)
                        dz = PI / 2.0;
                else if (dy == 0.0)
-                       FEerror("Logarithmic singularity.", 0);
+                       dz = 0.0;
                else
                        dz = -PI / 2.0;
        else
index 148aecb6c0a4e501211794b159691f68a3d3bf61..1e64e0849bfb13aa309ecbc0f2bfa07a42baddc4 100755 (executable)
--- a/o/usig.c
+++ b/o/usig.c
@@ -160,7 +160,7 @@ DEFUN_NEW("*DOUBLE",object,fSAdouble,SI,4,4,NONE,OI,OO,OO,OO,(fixnum addr,object
   RETURN1(make_longfloat(*(double *)addr));
 }
 
-DEFUN_NEW("FEENABLEEXCEPT",fixnum,fSfeenableexcept,SI,1,1,NONE,II,OO,OO,OO,(fixnum x),"") {
+DEFUN_NEW("FEENABLEEXCEPT",object,fSfeenableexcept,SI,1,1,NONE,II,OO,OO,OO,(fixnum x),"") {
 
 #ifdef HAVE_FEENABLEEXCEPT
 
@@ -180,11 +180,11 @@ DEFUN_NEW("FEENABLEEXCEPT",fixnum,fSfeenableexcept,SI,1,1,NONE,II,OO,OO,OO,(fixn
   }    
 #endif
 
-  RETURN1(x);
+  RETURN1((object)x);
 
 }
 
-DEFUN_NEW("FEDISABLEEXCEPT",fixnum,fSfedisableexcept,SI,0,0,NONE,IO,OO,OO,OO,(void),"") {
+DEFUN_NEW("FEDISABLEEXCEPT",object,fSfedisableexcept,SI,0,0,NONE,IO,OO,OO,OO,(void),"") {
 
   fixnum x;
 
@@ -205,33 +205,33 @@ DEFUN_NEW("FEDISABLEEXCEPT",fixnum,fSfedisableexcept,SI,0,0,NONE,IO,OO,OO,OO,(vo
   }
 #endif
 
-  RETURN1(x);
+  RETURN1((object)x);
 }
 
 #if defined(__x86_64__) || defined(__i386__)
 
 #define FE_TEST(x87sw_,mxcsr_,excepts_) ((x87sw_)&(excepts_))|(~((mxcsr_)>>7)&excepts_)
 
-DEFUN_NEW("FPE_CODE",fixnum,fSfpe_code,SI,2,2,NONE,II,OO,OO,OO,(fixnum x87sw,fixnum mxcsr),"") {
+DEFUN_NEW("FPE_CODE",object,fSfpe_code,SI,2,2,NONE,II,OO,OO,OO,(fixnum x87sw,fixnum mxcsr),"") {
 
-  RETURN1(FE_TEST(x87sw,mxcsr,FE_INVALID) ? FPE_FLTINV :
-         (FE_TEST(x87sw,mxcsr,FE_DIVBYZERO) ? FPE_FLTDIV :
-          (FE_TEST(x87sw,mxcsr,FE_OVERFLOW) ? FPE_FLTOVF :
-           (FE_TEST(x87sw,mxcsr,FE_UNDERFLOW) ? FPE_FLTUND :
-            (FE_TEST(x87sw,mxcsr,FE_INEXACT) ? FPE_FLTRES : 0)))));
+  RETURN1((object)(FE_TEST(x87sw,mxcsr,FE_INVALID) ? FPE_FLTINV :
+                  (FE_TEST(x87sw,mxcsr,FE_DIVBYZERO) ? FPE_FLTDIV :
+                   (FE_TEST(x87sw,mxcsr,FE_OVERFLOW) ? FPE_FLTOVF :
+                    (FE_TEST(x87sw,mxcsr,FE_UNDERFLOW) ? FPE_FLTUND :
+                     (FE_TEST(x87sw,mxcsr,FE_INEXACT) ? FPE_FLTRES : 0))))));
 }
 
 #if defined(__MINGW32__) || defined(__CYGWIN__)
 
-DEFUN_NEW("FNSTSW",fixnum,fSfnstsw,SI,0,0,NONE,II,OO,OO,OO,(void),"") {
+DEFUN_NEW("FNSTSW",object,fSfnstsw,SI,0,0,NONE,II,OO,OO,OO,(void),"") {
   volatile unsigned short t;
   ASM ("fnstsw %0" :: "m" (t));
-  RETURN1(t);
+  RETURN1((object)t);
 }
-DEFUN_NEW("STMXCSR",fixnum,fSstmxcsr,SI,0,0,NONE,II,OO,OO,OO,(void),"") {
+DEFUN_NEW("STMXCSR",object,fSstmxcsr,SI,0,0,NONE,II,OO,OO,OO,(void),"") {
   volatile unsigned int t;
   ASM ("stmxcsr %0" :: "m" (t));
-  RETURN1(t);
+  RETURN1((object)t);
 }
 
 #endif
index 00c27d97122de9275cde4fdc08a2ed7a67f7ee63..acb75411f71cd293840763ebfdbf4c0b73054fff 100644 (file)
@@ -41,6 +41,9 @@
 
 
 (defun compile-xgcl()
+  #+m68k(progn (trace si::readdir si::opendir si::closedir si::pathname-match-p)
+              (print (directory "*.c"))
+              (untrace si::readdir si::opendir si::closedir si::pathname-match-p))
   (mapc (lambda (x) 
          (let ((x (concatenate 'string compiler::*cc* " -I../h " (namestring x))))
            (unless (zerop (system x))