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.
 .
 axiom (20170501-14) unstable; urgency=medium
 .
   * support gcl27
Author: Camm Maguire <camm@debian.org>

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

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2025-02-14

--- axiom-20170501.orig/Makefile.pamphlet
+++ axiom-20170501/Makefile.pamphlet
@@ -87,17 +87,10 @@ Note that make cannot handle recursively
 directory so we have to expand the serial forms inline. Cheesy.
 
 \begin{chunk}{parallel}
-all: rootdirs axiom.sty $(BOOKS)/tanglec libspad input_files book_files src_files
-#	@ echo 1 making a ${SYS} system, PART=${PART} SUBPART=${SUBPART}
-#	@ echo 2 Environment '${ENV}'
-#	@ ${BOOKS}/tanglec Makefile.pamphlet "Makefile.${SYS}" >Makefile.${SYS}
-#	@ cp ${BOOKS}/dvipdfm.def ${MNT}/${SYS}/doc
-#	@ cp ${BOOKS}/changepage.sty ${MNT}/${SYS}/doc
-#	@ ${EXTRACT} Makefile.pamphlet
-#	@ cp Makefile.pdf ${MNT}/${SYS}/doc/src/root.Makefile.pdf
-#	@ echo p7 starting make of src
-#	@ ${ENV} $(MAKE) -f Makefile.${SYS} 
-#	@ echo 3 finished system build on `date` | tee >lastBuildDate
+all: rootdirs axiom.sty $(BOOKS)/tanglec libspad lspdir input_files book_files src_files
+	@ echo 1 making a ${SYS} system, PART=${PART} SUBPART=${SUBPART}
+	@ echo 2 Environment '${ENV}'
+	@ echo 3 finished system build on `date` | tee >lastBuildDate
 
 Makefile.${SYS}: Makefile.pamphlet ${BOOKS}/tanglec
 	${BOOKS}/tanglec $< "Makefile.${SYS}" >$@
@@ -114,7 +107,8 @@ ${MNT}/${SYS}/doc/changepage.sty: ${BOOK
 Makefile.pdf: Makefile.pamphlet $(BOOKS)/tanglec 
 	@ ${EXTRACT} $<
 
-src_files: Makefile.${SYS} ${MNT}/${SYS}/doc/src/root.Makefile.pdf ${MNT}/${SYS}/doc/dvipdfm.def ${MNT}/${SYS}/doc/changepage.sty $(BOOKS)/tanglec 
+src_files: Makefile.${SYS} ${MNT}/${SYS}/doc/src/root.Makefile.pdf \
+	   ${MNT}/${SYS}/doc/dvipdfm.def ${MNT}/${SYS}/doc/changepage.sty $(BOOKS)/tanglec 
 	@ echo 1 making a ${SYS} system, PART=${PART} SUBPART=${SUBPART}
 	@ echo 2 Environment '${ENV}'
 	@ ${ENV} $(MAKE) -f $<
@@ -624,8 +618,7 @@ book:
 
 $(BOOKS)/tanglec: books/tanglec.c
 	@echo t01 making tanglec from books/tanglec.c
-	gcc -o $@ $< ; sleep 15
-#	@( cd books ; gcc -o tanglec tanglec.c )
+	gcc -o $@ $<
 
 \end{chunk}
 
@@ -690,7 +683,7 @@ It looks for a chunk name that matches t
 \begin{chunk}{LSPMakefile}
 ${LSP}/Makefile: ${BOOKS}/tanglec ${LSP}/Makefile.pamphlet
 	@echo 20 making ${LSP}/Makefile from ${LSP}/Makefile.pamphlet
-	( cd lsp ; \
+	@( cd lsp ; \
 	 ${EXTRACT} Makefile.pamphlet ; \
 	 if [ "${GCLVERSION}" != "gcl-2.4.1" ] ; then \
 	 ${BOOKS}/tanglec Makefile.pamphlet ${GCLVERSION} >Makefile ; \
@@ -966,7 +959,7 @@ O:=o
 \getchunk{GCLOPTS-CUSTRELOC}
 \getchunk{ENVAR}
 
-all: srcsetup lspdir srcdir
+all: srcsetup srcdir
 	@echo 45 Makefile.FreeBSD called
 	@echo 46 Environment : ${ENV} 
 	@echo 47 finished system build on `date` | tee >lastBuildDate
@@ -1030,7 +1023,7 @@ all: srcsetup lspdir srcdir
 ####3 C related variables
 INC:=${SPD}/src/include
 PLF:=LINUXplatform
-CCF:="-O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
+CCF:="${CFLAGS} -O2 -fno-strength-reduce -D_GNU_SOURCE -D${PLF} -I/usr/X11/include -std=gnu89 -w"
 CC:=gcc
 XLIB:=/usr/X11R6/lib
 LDF:=" -L/usr/X11R6/lib -L/usr/lib  -lXpm"
--- axiom-20170501.orig/books/Makefile.pamphlet
+++ axiom-20170501/books/Makefile.pamphlet
@@ -93,7 +93,6 @@ tanglecopy: ${BOOKS}/tanglec
 	@ echo ==================================
 	@ echo COPY TANGLEC TO BIN
 	@ echo ==================================
-#	@ gcc -o tanglec tanglec.c
 	@ cp $< ${OUTBIN}
 
 axbook: axbook.tgz
@@ -198,7 +197,7 @@ ${PDF}/%.pdf ${PDF}/%.toc: ${IN}/%.pamph
 	  cp ${IN}/$*.pamphlet ${PDF} ; \
 	  cp ${IN}/bookheader.tex ${PDF} ; \
 	  cp -pr ${IN}/ps ${PDF} ; \
-	  ${RM} $*.toc ; \
+	  ${RM} $*.toc $*.aux $*.out ; \
 	  touch signatures.$*.tex ; \
 	  touch $*.sigs ; \
 	  if [ -z "${NOISE}" ] ; then \
@@ -435,12 +434,6 @@ ${OUT1}/SPADEDIT: ${BOOKS}/bookvol5.pamp
 	@${BOOKS}/tanglec $< spadedit >$@
 	@chmod +x $@
 
-#spadedit:
-#	@echo b4 making spadedit from ${BOOKS}/bookvol5 to ${OUT1}
-#	@${BOOKS}/tanglec ${BOOKS}/bookvol5.pamphlet spadedit \
-#            >${OUT1}/SPADEDIT
-#	@chmod +x ${OUT1}/SPADEDIT
-
 \end{chunk}
 \section{Combined Bibliography}
 \eject
--- axiom-20170501.orig/books/bookvol10.pamphlet
+++ axiom-20170501/books/bookvol10.pamphlet
@@ -17532,7 +17532,7 @@ ${MID}/%.nrlib/code.o: %.spad
 	    echo ")co $<" | ${INTERPSYS} ) ; \
            else \
 	   (cd ${MID} ; \
-	     echo ")co $<" | ${INTERPSYS} ) 1>/dev/null 2>/dev/null ; \
+	     echo ")co $<" | ${INTERPSYS} ) >$(TMP)/trace.$* ; \
 	   fi 
 
 ${MID}/%-.nrlib/code.o: ${MID}/%.nrlib/code.o
--- axiom-20170501.orig/books/bookvol5.pamphlet
+++ axiom-20170501/books/bookvol5.pamphlet
@@ -3071,7 +3071,7 @@ The trace1 function handles the options
               (when ops (setq ops (|getTraceOption| ops)) nil)
               (when lops 
                (setq lops (cdr (|getTraceOption| lops)))
-               (|untraceDomainLocalOps|))))))); constructor lops
+               (|untraceDomainLocalOps|)))))))
       ((and (< 1 (length options))
             (null (|hasOption| options '|nonquietly|)))
           (|throwKeyedMsg|
@@ -3489,7 +3489,7 @@ it shows up as
 \begin{chunk}{defun monitorX}
 (defun monitorX (args funct opts)
  (declare (special |$monitorDepth| |$depthAlist|))
-  (monitorXX args funct opts |$monitorDepth| |$depthAlist|));))
+  (monitorXX args funct opts |$monitorDepth| |$depthAlist|))
 
 \end{chunk}
 
@@ -16986,7 +16986,6 @@ Note that incRgen recursively wraps this
 \begin{chunk}{postvars}
 (eval-when (eval load)
 (defvar |scanKeyWords|
- (nconc	
  (list
   (list "add" 'add)
   (list "and" 'and)
@@ -17047,8 +17046,7 @@ Note that incRgen recursively wraps this
   (list "^" 'carat)
   (list ".." 'seg)
   (list "#" '|#|)
-  (list "&" 'ampersand))
-  (list
+  (list "&" 'ampersand)
   (list "$" '$)
   (list "/" 'slash)
   (list "\\" 'backslash)
@@ -17082,7 +17080,7 @@ Note that incRgen recursively wraps this
   (list "<<" 'oangle)
   (list ">>" 'cangle)
   (list "'" '|'|)
-  (list "`" 'backquote)))))
+  (list "`" 'backquote))))
 
 \end{chunk}
 
@@ -30236,7 +30234,7 @@ This function is funcalled from code con
   (when (and (eq (first t2) '|SimpleAlgebraicExtension|)
              (equal (second t2) (|objMode| triple)))
     (unless (setq x (|coerceInt| triple (third t2)))
-     (|coerceInt| x t2)))));)
+     (|coerceInt| x t2)))))
 
 \end{chunk}
 
@@ -48837,7 +48835,7 @@ filetype and filemode. We also UPCASE ev
 \begin{chunk}{defun pathname}
 (defun |pathname| (p)
  (cond
-  ((symbolp p) (pathname (string p)));((null p) p)
+  ((symbolp p) (pathname (string p)))
   ((pathnamep p) p)
   ((null (consp p)) (pathname p))
   (t
@@ -49346,7 +49344,7 @@ Map the 2nd and the 4th quadrants to fir
 \begin{chunk}{defun cgammaG 0}
 (defun cgammaG (real imag)
   (- (+ (log (* 2 Pi)) (* Pi imag))
-     (* (* (complex 0.0 1.0) Pi) (- real 0.5))));))
+     (* (* (complex 0.0 1.0) Pi) (- real 0.5))))
 
 \end{chunk}
 
@@ -50524,7 +50522,7 @@ up to overflow.  See Hart and Cheney.
 \calls{rbesselj}{BesselJ}
 \begin{chunk}{defun rbesselj}
 (defun rbesselj (n x)
-  (c-to-r (BesselJ n x)));)
+  (c-to-r (BesselJ n x)))
 
 \end{chunk}
 
@@ -50543,7 +50541,7 @@ up to overflow.  See Hart and Cheney.
 \calls{rbesseli}{BesselI}
 \begin{chunk}{defun rbesseli}
 (defun rbesseli (n x)
-  (c-to-r (BesselI n x)));)
+  (c-to-r (BesselI n x)))
 
 \end{chunk}
 
@@ -57400,7 +57398,6 @@ title and a function to call when presse
 \calls{bcSeriesByFormulaGen}{bcNotReady}
 \begin{chunk}{defun bcSeriesByFormulaGen}
 (defun |bcSeriesByFormulaGen| (htPage) 
-; (declare (ignore htPage))
  (|bcNotReady| htPage))
 
 \end{chunk}
--- axiom-20170501.orig/books/bookvol8.pamphlet
+++ axiom-20170501/books/bookvol8.pamphlet
@@ -27068,11 +27068,12 @@ open_server(char *server_name)
     server[1].socket = 0;
     return -2;
   } else {
-    struct sockaddr_un nn;
-    memset(&nn, 0, sizeof(nn));
-    nn.sun_family = AF_UNIX;
-    strncpy(nn.sun_path, name, sizeof(nn.sun_path) - 1);
-    if (bind(server[1].socket,(const struct sockaddr *) &nn,sizeof(nn))) {
+    server[1].addr.u_addr.sa_family = AF_UNIX;
+    memset(server[1].addr.u_addr.sa_data, 0,
+           sizeof(server[1].addr.u_addr.sa_data));
+    strncpy(server[1].addr.u_addr.sa_data, name,sizeof(server[1].addr.u_addr)-1);
+    if (bind(server[1].socket, &server[1].addr.u_addr,
+                 sizeof(server[1].addr.u_addr))) {
       perror("binding UNIX server socket");
       server[1].socket = 0;
       return -2;
--- axiom-20170501.orig/books/bookvol9.pamphlet
+++ axiom-20170501/books/bookvol9.pamphlet
@@ -20592,11 +20592,11 @@ digraph hierarchy {
             (equal (car (setq v (ifcdr v))) #\}))
         (setq u v) 
         acc)
-      ((string= x "$");(or (char= x #\$) )
+      ((string= x "$")
         (cons "\\$" acc))
-      ((string= x "%");(or (char= x #\%))
+      ((string= x "%")
         (cons "\\%" acc))
-      ( (string= x ",");(or (char= x #\,))
+      ((string= x ",")
         (cons ",{}" acc))
       ((string= x "\\spad")
         (cons "\\spad" acc))
--- axiom-20170501.orig/lsp/Makefile.pamphlet
+++ axiom-20170501/lsp/Makefile.pamphlet
@@ -2141,12 +2141,6 @@ ${OUT}/lisp: ${GCL} ${BOOKS}/tangle1.lis
 		     (si::save-system \"${OUT}/lisp\"))" | ${GCL}
 
 gcldir: ${OUT}/lisp
-#	@echo 2 building ${GCLVERSION}
-#	@tar -zxf ${ZIPS}/${GCLVERSION}.tgz
-#	(cd ${GCLVERSION} ; \
-#	./configure ${GCLOPTS} ; \
-#	${ENV} ${MAKE} ; \
-#	echo '(compiler::link (list (compile-file "${BOOKS}/tangle.lisp")) "${OUT}/lisp" (format nil "(progn (let ((*load-path* (cons ~S *load-path*)) (si::*load-types* ~S)) (compiler::emit-fn t)) (makunbound (quote *system-banner*)) (when (fboundp (quote si::sgc-on)) (si::sgc-on nil)) #-native-reloc (setq compiler::*default-system-p* t))" si::*system-directory* (quote (list #+native-reloc".o" ".lsp"))) "${OBJ}/${SYS}/lib/cfuns-c.o ${OBJ}/${SYS}/lib/sockio-c.o ${OBJ}/${SYS}/lib/libspad.a")' | bin/gcl )
 	@echo 13 finished system build on `date` | tee >gcldir
 
 ccldir: ${LSP}/ccl/Makefile
--- axiom-20170501.orig/src/Makefile.pamphlet
+++ axiom-20170501/src/Makefile.pamphlet
@@ -139,11 +139,6 @@ interpdir: ${SRC}/interp/Makefile \
 	   interp/bookvol5.pamphlet interp/bookvol9.pamphlet interp/bookvol10.5.pamphlet \
 	   ${MNT}/${SYS}/doc/util.ht
 	@echo 25 making ${SRC}/interp
-#	@cp ${SPD}/books/bookvol5.pamphlet interp
-#	@cp ${SPD}/books/bookvol9.pamphlet interp
-#	@cp ${SPD}/books/bookvol10.5.pamphlet interp
-#	@(cd ${MNT}/${SYS}/doc ; \
-#          ${BOOKS}/tanglec ${BOOKS}/bookvol7.1.pamphlet util.ht >util.ht )
 	@(cd interp ; ${ENV} ${MAKE} )
 
 ${SRC}/interp/Makefile: ${SRC}/interp/Makefile.pamphlet
--- axiom-20170501.orig/src/algebra/libdb.text
+++ axiom-20170501/src/algebra/libdb.text
@@ -9,7 +9,7 @@ cArcHyperbolicFunctionCategory`0`x`()->C
 cIntegerNumberSystem`0`x`()->Category``INS`An \spad{IntegerNumberSystem} is a model for the integers.
 dPlaneAlgebraicCurvePlot`0`x`()->Join(PlottablePlaneCurveCategory,etc)``ACPLOT`\indented{1}{Plot a NON-SINGULAR plane algebraic curve \spad{p}(\spad{x},{}\spad{y}) = 0.} Author: Clifton \spad{J}. Williamson Date Created: Fall 1988 Date Last Updated: 27 April 1990 Keywords: algebraic curve,{} non-singular,{} plot Examples: References:
 dSingleInteger`0`x`()->Join(IntegerNumberSystem,etc)``SINT`SingleInteger is intended to support machine integer arithmetic.
-dSparseUnivariateLaurentSeries`3`x`(:(Coef,Ring),:(var,Symbol),:(cen,Coef))->Join(UnivariateLaurentSeriesConstructorCategory(Coef,SparseUnivariateTaylorSeries(Coef,var,cen)),etc)`(Coef,var,cen)`SULS`Sparse Laurent series in one variable \spadtype{SparseUnivariateLaurentSeries} is a domain representing Laurent series in one variable with coefficients in an arbitrary ring. The parameters of the type specify the coefficient ring, the power series variable, and the center of the power series expansi------on. For example, \spad{SparseUnivariateLaurentSeries(Integer,x,3)} represents Laurent series in \spad{(x - 3)} with integer coefficients.
+dSparseUnivariateLaurentSeries`3`x`(:(Coef,Ring),:(var,Symbol),:(cen,Coef))->Join(UnivariateLaurentSeriesConstructorCategory(Coef,SparseUnivariateTaylorSeries(Coef,var,cen)),etc)`(Coef,var,cen)`SULS`Sparse Laurent series in one variable \spadtype{SparseUnivariateLaurentSeries} is a domain representing Laurent series in one variable with coefficients in an arbitrary ring. The parameters of the type specify the coefficient ring, the power series variable, and the center of the power series expansi--------on. For example, \spad{SparseUnivariateLaurentSeries(Integer,x,3)} represents Laurent series in \spad{(x - 3)} with integer coefficients.
 o/\`2`x`(_$,_$)->_$`dSingleInteger``\spad{n} \spad{/\} \spad{m} returns the bit-by-bit logical {\em and} of the single integers \spad{n} and \spad{m}.
 oAnd`2`x`(_$,_$)->_$`dSingleInteger``\spad{And(n,{}m)} returns the bit-by-bit logical {\em and} of the single integers \spad{n} and \spad{m}.
 oNot`1`x`(_$)->_$`dSingleInteger``\spad{Not(n)} returns the bit-by-bit logical {\em not} of the single integer \spad{n}.
@@ -26,8 +26,15 @@ obase`0`x`()->_$`cIntegerNumberSystem``\
 obinomial`2`x`(S,S)->S`xIntegerNumberSystem&(S)``
 obit?`2`x`(S,S)->Boolean`xIntegerNumberSystem&(S)``
 obit?`2`x`(_$,_$)->Boolean`cIntegerNumberSystem``\spad{bit?(n,{}i)} returns \spad{true} if and only if \spad{i}-th bit of \spad{n} is a 1.
-obtwFact`4`x`(UP,Boolean,Set(NonNegativeInteger),NonNegativeInteger)->Record(contp:Integer,factors:List(Record(irr:UP,pow:Integer)))`pGaloisGroupFactorizer(UP)``\spad{btwFact(p,sqf,pd,r)} returns the factorization of \spad{p,} the result is a Record such that \spad{contp=}content \spad{p,} \spad{factors=}List of irreducible factors of \spad{p} with exponent. If \spad{sqf=true} the polynomial is assumed to be square free (without repeated factors). \spad{pd} is the \spadtype{Set} of possible degr----ees. \spad{r} is a lower bound for the number of factors of \spad{p.} Please do not use this function in your code because its design may change.
+obtwFact`4`x`(UP,Boolean,Set(NonNegativeInteger),NonNegativeInteger)->Record(contp:Integer,factors:List(Record(irr:UP,pow:Integer)))`pGaloisGroupFactorizer(UP)``\spad{btwFact(p,sqf,pd,r)} returns the factorization of \spad{p,} the result is a Record such that \spad{contp=}content \spad{p,} \spad{factors=}List of irreducible factors of \spad{p} with exponent. If \spad{sqf=true} the polynomial is assumed to be square free (without repeated factors). \spad{pd} is the \spadtype{Set} of possible degr------ees. \spad{r} is a lower bound for the number of factors of \spad{p.} Please do not use this function in your code because its design may change.
 ocharacteristic`0`x`()->NonNegativeInteger`xIntegerNumberSystem&(S)``
+oclipParametric`1`x`(Plot)->Record(brans:List(List(Point(DoubleFloat))),xValues:Segment(DoubleFloat),yValues:Segment(DoubleFloat))`pTwoDimensionalPlotClipping``\spad{clipParametric(p)} performs two-dimensional clipping on a plot, \spad{p,} from the domain \spadtype{Plot} for the parametric curve \spad{x = f(t)}, \spad{y = g(t)}; the default parameters \spad{1/2} for the fraction and \spad{5/1} for the scale are used in the \fakeAxiomFun{iClipParametric} subroutine, which is called by this functi----on.
+oclipParametric`3`x`(Plot,Fraction(Integer),Fraction(Integer))->Record(brans:List(List(Point(DoubleFloat))),xValues:Segment(DoubleFloat),yValues:Segment(DoubleFloat))`pTwoDimensionalPlotClipping``\spad{clipParametric(p,frac,sc)} performs two-dimensional clipping on a plot, \spad{p,} from the domain \spadtype{Plot} for the parametric curve \spad{x = f(t)}, \spad{y = g(t)}; the fraction parameter is specified by \spad{frac} and the scale parameter is specified by \spad{sc} for use in the \fakeAxio----mFun{iClipParametric} subroutine, which is called by this function.
+oclipWithRanges`5`x`(List(List(Point(DoubleFloat))),DoubleFloat,DoubleFloat,DoubleFloat,DoubleFloat)->Record(brans:List(List(Point(DoubleFloat))),xValues:Segment(DoubleFloat),yValues:Segment(DoubleFloat))`pTwoDimensionalPlotClipping``\spad{clipWithRanges(pointLists,xMin,xMax,yMin,yMax)} performs clipping on a list of lists of points, \spad{pointLists}. Clipping is done within the specified ranges of \spad{xMin}, \spad{xMax} and \spad{yMin}, \spad{yMax}. This function is used internally by the \f----akeAxiomFun{iClipParametric} subroutine in this package.
+oclip`1`x`(List(List(Point(DoubleFloat))))->Record(brans:List(List(Point(DoubleFloat))),xValues:Segment(DoubleFloat),yValues:Segment(DoubleFloat))`pTwoDimensionalPlotClipping``\spad{clip(ll)} performs two-dimensional clipping on a list of lists of points, \spad{ll}; the default parameters \spad{1/2} for the fraction and \spad{5/1} for the scale are used in the \fakeAxiomFun{iClipParametric} subroutine, which is called by this function.
+oclip`1`x`(List(Point(DoubleFloat)))->Record(brans:List(List(Point(DoubleFloat))),xValues:Segment(DoubleFloat),yValues:Segment(DoubleFloat))`pTwoDimensionalPlotClipping``\spad{clip(l)} performs two-dimensional clipping on a curve \spad{l,} which is a list of points; the default parameters \spad{1/2} for the fraction and \spad{5/1} for the scale are used in the \fakeAxiomFun{iClipParametric} subroutine, which is called by this function.
+oclip`1`x`(Plot)->Record(brans:List(List(Point(DoubleFloat))),xValues:Segment(DoubleFloat),yValues:Segment(DoubleFloat))`pTwoDimensionalPlotClipping``\spad{clip(p)} performs two-dimensional clipping on a plot, \spad{p,} from the domain \spadtype{Plot} for the graph of one variable, \spad{y = f(x)}; the default parameters \spad{1/4} for the fraction and \spad{5/1} for the scale are used in the \spadfun{clip} function.
+oclip`3`x`(Plot,Fraction(Integer),Fraction(Integer))->Record(brans:List(List(Point(DoubleFloat))),xValues:Segment(DoubleFloat),yValues:Segment(DoubleFloat))`pTwoDimensionalPlotClipping``\spad{clip(p,frac,sc)} performs two-dimensional clipping on a plot, \spad{p,} from the domain \spadtype{Plot} for the graph of one variable \spad{y = f(x)}; the fraction parameter is specified by \spad{frac} and the scale parameter is specified by \spad{sc} for use in the \spadfun{clip} function.
 ocoerce`1`x`(Variable(var))->_$`dSparseUnivariateLaurentSeries(Coef,var,cen)``\spad{coerce(var)} converts the series variable \spad{var} into a Laurent series.
 oconvert`1`x`(S)->DoubleFloat`xIntegerNumberSystem&(S)``
 oconvert`1`x`(S)->Float`xIntegerNumberSystem&(S)``
@@ -71,7 +78,7 @@ oinvmod`2`x`(S,S)->S`xIntegerNumberSyste
 oinvmod`2`x`(_$,_$)->_$`cIntegerNumberSystem``\spad{invmod(a,{}b)},{} \spad{0<=a<b>1},{} \spad{(a,{}b)=1} means \spad{1/a mod b}.
 olength`1`x`(_$)->_$`cIntegerNumberSystem``\spad{length(a)} length of \spad{a} in digits.
 omakeFR`1`x`(Record(contp:Integer,factors:List(Record(irr:UP,pow:Integer))))->Factored(UP)`pGaloisGroupFactorizer(UP)``\spad{makeFR(flist)} turns the final factorization of henselFact into a \spadtype{Factored} object.
-omakeSketch`5`x`(Polynomial(Integer),Symbol,Symbol,Segment(Fraction(Integer)),Segment(Fraction(Integer)))->_$`dPlaneAlgebraicCurvePlot``\spad{makeSketch(p,{}x,{}y,{}a..b,{}c..d)} creates an ACPLOT of the curve \spad{p = 0} in the region {\em a <= x <= b,{} c <= y <= d}. More specifically,{} 'makeSketch' plots a non-singular algebraic curve \spad{p = 0} in an rectangular region {\em xMin <= x <= xMax},{} {\em yMin <= y <= yMax}. The user inputs \spad{makeSketch(p,{}x,{}y,{}xMin..xMax,{}yMin..yMax--------------)}. Here \spad{p} is a polynomial in the variables \spad{x} and \spad{y} with integer coefficients (\spad{p} belongs to the domain \spad{Polynomial Integer}). The case where \spad{p} is a polynomial in only one of the variables is allowed. The variables \spad{x} and \spad{y} are input to specify the the coordinate axes. The horizontal axis is the \spad{x}-axis and the vertical axis is the \spad{y}-axis. The rational numbers xMin,{}...,{}yMax specify the boundaries of the region in --wh--ic--h --th--e --cu--rve is to be plotted.
+omakeSketch`5`x`(Polynomial(Integer),Symbol,Symbol,Segment(Fraction(Integer)),Segment(Fraction(Integer)))->_$`dPlaneAlgebraicCurvePlot``\spad{makeSketch(p,{}x,{}y,{}a..b,{}c..d)} creates an ACPLOT of the curve \spad{p = 0} in the region {\em a <= x <= b,{} c <= y <= d}. More specifically,{} 'makeSketch' plots a non-singular algebraic curve \spad{p = 0} in an rectangular region {\em xMin <= x <= xMax},{} {\em yMin <= y <= yMax}. The user inputs \spad{makeSketch(p,{}x,{}y,{}xMin..xMax,{}yMin..yMax----------------)}. Here \spad{p} is a polynomial in the variables \spad{x} and \spad{y} with integer coefficients (\spad{p} belongs to the domain \spad{Polynomial Integer}). The case where \spad{p} is a polynomial in only one of the variables is allowed. The variables \spad{x} and \spad{y} are input to specify the the coordinate axes. The horizontal axis is the \spad{x}-axis and the vertical axis is the \spad{y}-axis. The rational numbers xMin,{}...,{}yMax specify the boundaries of the region i--n --wh--ic--h --th--e --cu--rve is to be plotted.
 omask`1`x`(S)->S`xIntegerNumberSystem&(S)``
 omask`1`x`(_$)->_$`cIntegerNumberSystem``\spad{mask(n)} returns \spad{2**n-1} (an \spad{n} bit mask).
 omax`0`x`()->_$`dSingleInteger``\spad{max()} returns the largest single integer.
@@ -121,4 +128,5 @@ oxor`2`x`(_$,_$)->_$`dSingleInteger``\sp
 o~`1`x`(_$)->_$`dSingleInteger``\spad{~ n} returns the bit-by-bit logical {\em not } of the single integer \spad{n}.
 pGaloisGroupFactorizer`1`x`(UnivariatePolynomialCategory(Integer))->etc`(UP)`GALFACT`\spadtype{GaloisGroupFactorizer} provides functions to factor resolvents.
 pRealSolvePackage`0`x`()->etc``REALSOLV`\indented{1}{This package provides numerical solutions of systems of polynomial} equations for use in ACPLOT.
+pTwoDimensionalPlotClipping`0`x`()->etc``CLIP`Automatic clipping for 2-dimensional plots The purpose of this package is to provide reasonable plots of functions with singularities.
 xIntegerNumberSystem&`1`x`(IntegerNumberSystem)->etc`(S)`INS-`An \spad{IntegerNumberSystem} is a model for the integers.
--- axiom-20170501.orig/src/interp/Makefile.pamphlet
+++ axiom-20170501/src/interp/Makefile.pamphlet
@@ -664,7 +664,7 @@ ${SAVESYS}:	${DEPSYS} ${OBJS} ${OUT}/boo
 	@ echo OBJ= ${OBJ} 
 	@ echo MNT= ${MNT} 
 	@ echo O=${O} LISP=${LISP} BYE=${BYE}
-	@ find ${OUT} -name "*.fn" -exec cp {} ${MID} \; #cp -p ${OUT}/*.fn ${MID}
+	@ find ${OUT} -name "*.fn" -exec cp {} ${MID} \;
 	@ cp -p ${SRC}/doc/msgs/s2-us.msgs ${SPAD}/doc/msgs
 	@ echo '${PROCLAIMS}' > ${OUT}/makeint.lisp
 	@ echo '(load "${OUT}/nocompil")' >> ${OUT}/makeint.lisp
--- axiom-20170501.orig/src/interp/br-con.lisp.pamphlet
+++ axiom-20170501/src/interp/br-con.lisp.pamphlet
@@ -13997,7 +13997,7 @@
                                         NIL))
                                       NIL))
                             (|htSay| "}"))
-             (|htEndTable|));)
+             (|htEndTable|))
 
 ;bcNameConTable u ==
 ;  $bcMultipleNames: local := (#u ^= 1)
@@ -14693,18 +14693,14 @@
 ;  n = 1 => SUBSTRING(line,k + 1,charPosition($tick,line,k + 1) - k - 1)
 ;  dbPart(line,n - 1,charPosition($tick,line,k + 1))
 
-(defun |dbPart| (|line| |n| |k|)
+(defun |dbPart| (|line| |n| |k|
+       			&aux (|m| (min (+ |k| 1) (length line)))
+       			     (|x| (|charPosition| |$tick| |line| |m|)))
   (declare (special |$tick|))
   (COND
-    ((EQL |n| 1)
-     (SUBSTRING |line| (+ |k| 1)
-         (-
-             (-
-                 (|charPosition| |$tick| |line| (+ |k| 1)) |k|)
-             1)))
-    (t
-     (|dbPart| |line| (- |n| 1)
-         (|charPosition| |$tick| |line| (+ |k| 1))))))
+    ((or (EQL |n| 1) (eql |x| (length |line|)))
+     (SUBSTRING |line| |m| (- |x| |m|)))
+    (t (|dbPart| |line| (- |n| 1) |x|))))
 
 ;dbXParts(line,n,m) ==
 ;  [.,nargs,:r] := dbParts(line,n,m)
--- axiom-20170501.orig/src/interp/c-util.lisp.pamphlet
+++ axiom-20170501/src/interp/c-util.lisp.pamphlet
@@ -57,7 +57,7 @@
               (PROGN (setq |n| (QCAR |l|)) 'T) (INTEGERP |n|))
          (|displayComp| (setq |$level| |n|)))
         ('T
-         (SAY            "Correct format: (level n) where n is the level you want to go to"           ))))));)
+         (SAY            "Correct format: (level n) where n is the level you want to go to"           ))))))
 
 ;
 ;UP() == up()
--- axiom-20170501.orig/src/interp/clam.lisp.pamphlet
+++ axiom-20170501/src/interp/clam.lisp.pamphlet
@@ -2298,7 +2298,7 @@
                                 (APPEND (|rightJustifyString| |n| 6)
                                         (CONS '|  |
                                          (CONS |fn| (CONS '|: | NIL)))))
-                            (|pp| |args|)))))))));)
+                            (|pp| |args|)))))))))
 
 ;constructor2ConstructorForm x ==
 ;  VECP x => x.0
--- axiom-20170501.orig/src/interp/functor.lisp.pamphlet
+++ axiom-20170501/src/interp/functor.lisp.pamphlet
@@ -92,7 +92,7 @@
                                              NIL))))
                                          (|DomainPrint1| (CDR |u|)
                                           |brief| |env|)))))))))
-                (SAY "-----------------------------------------------------------------------" ))))))));)
+                (SAY "-----------------------------------------------------------------------" ))))))))
 
 
 ;DomainPrint1(D,brief,$e) ==
--- axiom-20170501.orig/src/interp/msgdb.lisp.pamphlet
+++ axiom-20170501/src/interp/msgdb.lisp.pamphlet
@@ -703,7 +703,7 @@
 
 (defun |keyedSystemError| (|key| |args|)
   (|sayKeyedMsg| "Internal Error" nil)
-  (|breakKeyedMsg| |key| |args|));)
+  (|breakKeyedMsg| |key| |args|))
 
 ;systemErrorHere functionName ==
 ;  keyedSystemError("S2GE0017",[functionName])
--- axiom-20170501.orig/src/interp/util.lisp.pamphlet
+++ axiom-20170501/src/interp/util.lisp.pamphlet
@@ -1457,16 +1457,6 @@ function assumes that \\ can only appear
   (values longnames names)))
 
 
-;#+(and :AKCL (not :dos))
-;(in-package "COMPILER")
-;#+(and :AKCL (not :dos))
-;(defun gazonk-name ( &aux tem)
-; "return the name of the intermediate compiler file"
-; (dotimes (i 1000)
-;  (setq tem (merge-pathnames (format nil "/tmp/gazonk~d.lsp" i)))
-;  (unless (probe-file tem)
-;    (return-from gazonk-name (pathname tem))))
-; (error "1000 gazonk names used already!"))
 
 (in-package "BOOT")
 
