Blob Blame Raw
Description: <short summary of the patch>
 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-83) unstable; urgency=high
 .
   * Version_2_6_13pre79
   * Fix acl2 arm builds (Closes: #919477).
Author: Camm Maguire <camm@debian.org>
Bug-Debian: https://bugs.debian.org/919477

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2019-03-21

--- gcl-2.6.12.orig/h/notcomp.h
+++ gcl-2.6.12/h/notcomp.h
@@ -175,7 +175,7 @@ TS_MEMBER(t0,TS(t1)|TS(t2)|TS(t3)...)
 #define TS(s) (1<<s)
 #define TS_MEMBER(t1,ts) ((TS(t1)) & (ts))
 
-#define ASSURE_TYPE(val,t) if(type_of(val)!=t) val= Icheck_one_type(val,t)
+#define ASSURE_TYPE(val,t) if (type_of(val)!=t) TYPE_ERROR(val,type_name(t))
 
 object IisArray();
 
--- gcl-2.6.12.orig/o/alloc.c
+++ gcl-2.6.12/o/alloc.c
@@ -526,16 +526,9 @@ exhausted_report(enum type t,struct type
 
   available_pages+=resv_pages;
   resv_pages=0;
-  vs_push(type_name(t));
-  vs_push(make_fixnum(tm->tm_npage));
-  CEerror("The storage for ~A is exhausted.~%\
-Currently, ~D pages are allocated.~%	     \
-Use ALLOCATE to expand the space.",
-	  "Continues execution.",
-	  2, vs_top[-2], vs_top[-1], Cnil, Cnil);
-
-  vs_popp;
-  vs_popp;
+  CEerror("Continues execution.",
+	  "The storage for ~A is exhausted. ~D pages allocated. Use ALLOCATE to expand the space.",
+	  2, type_name(t), make_fixnum(tm->tm_npage));
 
   call_after_gbc_hook(t);
 
--- gcl-2.6.12.orig/o/array.c
+++ gcl-2.6.12/o/array.c
@@ -211,14 +211,18 @@ DEFUN_NEW("ASET1", object, fSaset1, SI,
       break;
     case aet_bit:
       i +=  BV_OFFSET(x);
-    AGAIN_BIT: 
       ASSURE_TYPE(val,t_fixnum);
-      {int v = Mfix(val);
-       if (v == 0) CLEAR_BITREF(x,i);
-       else if (v == 1) SET_BITREF(x,i);
-       else {val= fSincorrect_type(val,sLbit);
-	     goto AGAIN_BIT;}
-       break;}
+      switch (Mfix(val)) {
+      case 0:
+	CLEAR_BITREF(x,i);
+	break;
+      case 1:
+	SET_BITREF(x,i);
+	break;
+      default:
+	TYPE_ERROR(val,sLbit);
+      }
+      break;
     case aet_fix:
       ASSURE_TYPE(val,t_fixnum);
       (x->fixa.fixa_self[i]) = Mfix(val);
--- gcl-2.6.12.orig/o/utils.c
+++ gcl-2.6.12/o/utils.c
@@ -169,20 +169,6 @@ Ifuncall_n(object fun,int n,...) {
 /*   return res; */
 /* } */
 
-object
-Icheck_one_type(object x, enum type t)
-{ if (x->d.t != t)
-    { return CEerror("Expected a ~a ","Supply right type",1,type_name(t),Cnil,Cnil,Cnil);
-    }
-  return x;
-}
-
-
-object
-fSincorrect_type(object val, object type)
-{ return CEerror("Got ~a,Expected a ~a","Supply a new one",1,val,type,Cnil,Cnil);
-}
-
 /* static void */
 /* Ineed_in_image(object (*foo) (/\* ??? *\/)) */
 /* {;} */