diff --git a/books/bookvol10.3.pamphlet b/books/bookvol10.3.pamphlet index b306b68..cdff0fa 100644 --- a/books/bookvol10.3.pamphlet +++ b/books/bookvol10.3.pamphlet @@ -13367,7 +13367,7 @@ Character: OrderedFinite() with import CC OutChars:PrimitiveArray(OutputForm) := - construct [NUM2CHAR(i)$Lisp for i in 0..255] + construct [CODE_-CHAR(i)$Lisp for i in 0..255] minChar := minIndex OutChars @@ -13399,10 +13399,10 @@ Character: OrderedFinite() with error "String is not a single character" upperCase c == - QENUM(PNAME(UPCASE(NUM2CHAR(ord c)$Lisp)$Lisp)$Lisp,0$Lisp)$Lisp + QENUM(PNAME(UPCASE(CODE_-CHAR(ord c)$Lisp)$Lisp)$Lisp,0$Lisp)$Lisp lowerCase c == - QENUM(PNAME(DOWNCASE(NUM2CHAR(ord c)$Lisp)$Lisp)$Lisp,0$Lisp)$Lisp + QENUM(PNAME(DOWNCASE(CODE_-CHAR(ord c)$Lisp)$Lisp)$Lisp,0$Lisp)$Lisp @ <>= @@ -115727,10 +115727,10 @@ Note that this code is not included in the generated catdef.spad file. ((QUOTE T) (|error| "String is not a single character")))) (DEFUN |CHAR;upperCase;2$;21| (|c| |$|) - (QENUM (PNAME (UPCASE (NUM2CHAR (SPADCALL |c| (QREFELT |$| 21))))) 0)) + (QENUM (PNAME (UPCASE (code-char (SPADCALL |c| (QREFELT |$| 21))))) 0)) (DEFUN |CHAR;lowerCase;2$;22| (|c| |$|) - (QENUM (PNAME (DOWNCASE (NUM2CHAR (SPADCALL |c| (QREFELT |$| 21))))) 0)) + (QENUM (PNAME (DOWNCASE (code-char (SPADCALL |c| (QREFELT |$| 21))))) 0)) (DEFUN |Character| () (PROG () @@ -115770,7 +115770,7 @@ Note that this code is not included in the generated catdef.spad file. (SEQ (LETT |i| 0 |Character|) G190 (COND ((QSGREATERP |i| 255) (GO G191))) (SEQ (EXIT (LETT G90939 - (CONS (NUM2CHAR |i|) G90939) + (CONS (code-char |i|) G90939) |Character|))) (LETT |i| (QSADD1 |i|) |Character|) (GO G190) G191 (EXIT (NREVERSE0 G90939)))) diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet index 328b0fb..5fddb87 100644 --- a/books/bookvol5.pamphlet +++ b/books/bookvol5.pamphlet @@ -499,6 +499,23 @@ $directory-list = @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\defdollar{InitialModemapFrame} + +The \verb|$InitialModemapFrame| is used as the initial value. + +See the function \fnref{makeInitialModemapFrame}. + +An example of a runtime value is: +\begin{verbatim} +$InitialModemapFrame = '((nil)) +\end{verbatim} + +<>= +(defvar |$InitialModemapFrame| '((nil))) + +@ + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \defdollar{library-directory-list} The \verb|$library-directory-list| variable is the system-wide search @@ -512,7 +529,7 @@ $library-directory-list = ("/research/test/mnt/ubuntu/algebra/") \end{verbatim} <>= -(defvar $library-directory-list nil) +(defvar $library-directory-list '("/algebra/")) @ @@ -533,6 +550,26 @@ An example of a runtime value is: @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\defdollar{openServerIfTrue} + +The \verb|$openServerIfTrue| It appears to control whether the interpreter +will be used as an open server, probably for OpenMath use. + +If an open server is not requested then this variable to NIL + +See the function \fnref{openserver}. + +An example of a runtime value is: +\begin{verbatim} +$openServerIfTrue = nil +\end{verbatim} + +<>= +(defvar $openServerIfTrue nil) + +@ + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \defdollar{relative-directory-list} The \verb|$relative-directory-list| variable contains a hand-generated @@ -603,6 +640,41 @@ $spadroot = "/research/test/mnt/ubuntu" @ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\defdollar{SpadServer} + +The \verb|$SpadServer| determines whether Axiom acts as a remote server. + +See the function \fnref{openserver}. + +An example of a runtime value is: +\begin{verbatim} +$SpadServer = nil +\end{verbatim} + +<>= +(defvar $SpadServer nil "t means Axiom acts as a remote server") + +@ + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\defdollar{SpadServerName} + +The \verb|$SpadServerName| defines the name of the spad server socket. +In unix these exist in the tmp directory as names. + +See the function \fnref{openserver}. + +An example of a runtime value is: +\begin{verbatim} +$SpadServerName = "/tmp/.d" +\end{verbatim} + +<>= +(defvar $SpadServerName "/tmp/.d" "the name of the spad server socket") + +@ + \chapter{Starting Axiom} Axiom starts by invoking a function value of the lisp symbol \verb|*top-level-hook*|. The function invocation path to from this @@ -1294,6 +1366,7 @@ and default to the {\bf \$spadroot} variable (which was the value of the {\bf AXIOM} shell variable at build time) if we can't. \calls{initroot}{reroot} +\calls{initroot}{getenviron} \usesdollar{initroot}{spadroot} <>= (defun initroot (&optional (newroot (getenviron "AXIOM"))) @@ -3951,7 +4024,6 @@ Note that incRgen1 recursively calls this function. This function reads a line from the stream and then conses it up with a recursive call to incRgen. Note that incRgen recursively wraps this function in a delay list. -\calls{incRgen1}{shoeread-line} \calls{incRgen1}{incRgen} \uses{incRgen1}{StreamNil} <>= @@ -3959,7 +4031,7 @@ Note that incRgen recursively wraps this function in a delay list. (let (a s) (declare (special |StreamNil|)) (setq s (car z)) - (setq a (|shoeread-line| s)) + (setq a (read-line s nil nil)) (if (null a) (progn (close s) @@ -19299,7 +19371,7 @@ o )read \calls{updateSourceFiles}{pathname} \calls{updateSourceFiles}{pathnameName} \calls{updateSourceFiles}{pathnameType} -\calls{updateSourceFiles}{make-input-filename} +\calls{updateSourceFiles}{makeInputFilename} \calls{updateSourceFiles}{member} \calls{updateSourceFiles}{pathnameTypeId} \calls{updateSourceFiles}{insert} @@ -19309,7 +19381,7 @@ o )read (declare (special |$sourceFiles|)) (setq arg (|pathname| arg)) (setq arg (|pathname| (list (|pathnameName| arg) (|pathnameType| arg) "*"))) - (when (and (make-input-filename arg) + (when (and (makeInputFilename arg) (|member| (|pathnameTypeId| arg) '(boot lisp meta))) (setq |$sourceFiles| (|insert| arg |$sourceFiles|))) arg) @@ -20299,7 +20371,7 @@ Available algebra help topics are: @ \defun{newHelpSpad2Cmd}{newHelpSpad2Cmd} -\calls{newHelpSpad2Cmd}{make-input-filename} +\calls{newHelpSpad2Cmd}{makeInputFilename} \calls{newHelpSpad2Cmd}{obey} \calls{newHelpSpad2Cmd}{concat} \calls{newHelpSpad2Cmd}{namestring} @@ -20332,7 +20404,7 @@ Available algebra help topics are: (cond ((null (setq helpfile - (make-input-filename + (makeInputFilename (cons narg (cons 'helpspad (cons '* nil)))))) nil) (|$useFullScreenHelp| @@ -20583,7 +20655,7 @@ environment to \verb|$HistList| and \verb|$HistRecord|. \calls{initHist}{oldHistFileName} \calls{initHist}{histFileName} \calls{initHist}{histFileErase} -\calls{initHist}{make-input-filename} +\calls{initHist}{makeInputFilename} \callsdollar{initHist}{replace} \usesdollar{initHist}{useInternalHistoryTable} \usesdollar{initHist}{HiFiAccess} @@ -20597,7 +20669,7 @@ environment to \verb|$HistList| and \verb|$HistRecord|. (setq oldFile (|oldHistFileName|)) (setq newFile (|histFileName|)) (|histFileErase| oldFile) - (when (make-input-filename newFile) ($replace oldFile newFile)) + (when (makeInputFilename newFile) (replaceFile oldFile newFile)) (setq |$HiFiAccess| t) (|initHistList|))))) @@ -20614,8 +20686,8 @@ environment to \verb|$HistList| and \verb|$HistRecord|. (setq |$HistListLen| 20) (setq |$HistList| (list nil)) (setq li |$HistList|) - (do ((i 1 (qsadd1 i))) - ((qsgreaterp i |$HistListLen|) nil) + (do ((i 1 (1+ i))) + ((> i |$HistListLen|) nil) (setq li (cons nil li))) (rplacd |$HistList| li) (setq |$HistListAct| 0) @@ -20798,8 +20870,8 @@ file and then write the in-memory history to a new file (cond ((nequal |$IOindex| 0) (setq l (length (rkeyids (|histFileName|)))) - (do ((i 1 (qsadd1 i))) - ((qsgreaterp i l) nil) + (do ((i 1 (1+ i))) + ((> i l) nil) (setq vec (unwind-protect (|readHiFi| i) (|disableHist|))) (setq |$internalHistoryTable| (cons (cons i vec) |$internalHistoryTable|))) @@ -20882,8 +20954,8 @@ Also used in the output routines. (do () ((null (> n maxn)) nil) (setq done nil) - (do ((j 1 (qsadd1 j))) - ((or (qsgreaterp j maxn) (null (null done))) nil) + (do ((j 1 (1+ j))) + ((or (> j maxn) (null (null done))) nil) (setq k (spaddifference (1+ maxn) j)) (when (memq (elt vec k) breakChars) (setq svec (concat (substring vec 0 (1+ k)) underbar)) @@ -20918,8 +20990,8 @@ Also used in the output routines. (defun |resetInCoreHist| () (declare (special |$HistListAct| |$HistListLen| |$HistList|)) (setq |$HistListAct| 0) - (do ((i 1 (qsadd1 i))) - ((qsgreaterp i |$HistListLen|) nil) + (do ((i 1 (1+ i))) + ((> i |$HistListLen|) nil) (setq |$HistList| (cdr |$HistList|)) (rplaca |$HistList| nil))) @@ -20942,13 +21014,13 @@ Also used in the output routines. (setq l (cdr |$HistList|)) (cond ((> dif 0) - (do ((i 1 (qsadd1 i))) - ((qsgreaterp i dif) nil) + (do ((i 1 (1+ i))) + ((> i dif) nil) (setq l (cons nil l)))) ((minusp dif) (do ((tmp0 (spaddifference dif)) - (i 1 (qsadd1 i))) - ((qsgreaterp i tmp0) nil) + (i 1 (1+ i))) + ((> i tmp0) nil) (setq l (cdr l))) (cond ((> |$HistListAct| n) (setq |$HistListAct| n)) @@ -21164,8 +21236,8 @@ Also used in the output routines. (when |$HiFiAccess| (|recordNewValue| x prop val)) (rplacd p nil)))))))))) - (do ((i 1 (qsadd1 i))) - ((qsgreaterp i n) nil) + (do ((i 1 (1+ i))) + ((> i n) nil) (setq vec (unwind-protect (cdr (|readHiFi| i)) (|disableHist|))) (do ((tmp3 vec (cdr tmp3)) (p1 nil)) @@ -21186,7 +21258,7 @@ Also used in the output routines. @ \defun{saveHistory}{saveHistory} \calls{saveHistory}{sayKeyedMsg} -\calls{saveHistory}{make-input-filename} +\calls{saveHistory}{makeInputFilename} \calls{saveHistory}{histFileName} \calls{saveHistory}{throwKeyedMsg} \calls{saveHistory}{makeHistFileName} @@ -21212,7 +21284,7 @@ Also used in the output routines. ((null |$HiFiAccess|) (|sayKeyedMsg| 's2ih0016 nil)) ; the history file is not on ((and (null |$useInternalHistoryTable|) - (null (make-input-filename (|histFileName|)))) + (null (makeInputFilename (|histFileName|)))) (|sayKeyedMsg| 's2ih0022 nil)) ; no history saved yet ((null fn) (|throwKeyedMsg| 's2ih0037 nil)) ; need to specify a history filename @@ -21255,7 +21327,7 @@ Also used in the output routines. \calls{restoreHistory}{throwKeyedMsg} \calls{restoreHistory}{makeHistFileName} \calls{restoreHistory}{putHist} -\calls{restoreHistory}{make-input-filename} +\calls{restoreHistory}{makeInputFilename} \calls{restoreHistory}{sayKeyedMsg} \calls{restoreHistory}{namestring} \calls{restoreHistory}{clearSpad2Cmd} @@ -21292,7 +21364,7 @@ Also used in the output routines. (setq fnq fnq)) (t (|throwKeyedMsg| 's2ih0023 (cons fnq nil)))) ; invalid filename (setq restfile (|makeHistFileName| fnq)) - (if (null (make-input-filename restfile)) + (if (null (makeInputFilename restfile)) (|sayKeyedMsg| 's2ih0024 ; file does not exist (cons (|namestring| restfile) nil)) (progn @@ -21306,8 +21378,8 @@ Also used in the output routines. (setq oldInternal |$useInternalHistoryTable|) (setq |$useInternalHistoryTable| nil) (when oldInternal (setq |$internalHistoryTable| nil)) - (do ((i 1 (qsadd1 i))) - ((qsgreaterp i l) nil) + (do ((i 1 (1+ i))) + ((> i l) nil) (setq vec (unwind-protect (|readHiFi| i) (|disableHist|))) (when oldInternal (setq |$internalHistoryTable| @@ -21741,8 +21813,8 @@ back. (setq nob (make-array (1+ n))) (hput |$seen| ob nob) (hput |$seen| nob nob) - (do ((i 0 (qsadd1 i))) - ((qsgreaterp i n) nil) + (do ((i 0 (=! i))) + ((> i n) nil) (qsetvelt nob i (|writify,writifyInner| (qvelt ob i)))) (exit nob)))) (when (eq ob 'writified!!) @@ -22001,8 +22073,8 @@ back. (setq nob (make-array (1+ n))) (hput |$seen| ob nob) (hput |$seen| nob nob) - (do ((i 0 (qsadd1 i))) - ((qsgreaterp i n) nil) + (do ((i 0 (1+ i))) + ((> i n) nil) (seq (exit (qsetvelt nob i @@ -22049,8 +22121,8 @@ back. (|ScanOrPairVec,ScanOrInner| f (qcdr ob))) (when (vecp ob) (hput |$seen| ob t) - (do ((tmp0 (spaddifference (|#| ob) 1)) (i 0 (qsadd1 i))) - ((qsgreaterp i tmp0) nil) + (do ((tmp0 (spaddifference (|#| ob) 1)) (i 0 (1+ i))) + ((> i tmp0) nil) (|ScanOrPairVec,ScanOrInner| f (elt ob i)))) (when (funcall f ob) (throw '|ScanOrPairVecAnswer| t)) nil) @@ -22073,7 +22145,6 @@ back. \calls{gensymInt}{gensymp} \calls{gensymInt}{error} \calls{gensymInt}{pname} -\calls{gensymInt}{times} \calls{gensymInt}{charDigitVal} <>= (defun |gensymInt| (g) @@ -22083,9 +22154,9 @@ back. (progn (setq p (pname g)) (setq n 0) - (do ((tmp0 (spaddifference (|#| p) 1)) (i 2 (qsadd1 i))) - ((qsgreaterp i tmp0) nil) - (setq n (+ (times 10 n) (|charDigitVal| (elt p i))))) + (do ((tmp0 (spaddifference (|#| p) 1)) (i 2 (1+ i))) + ((> i tmp0) nil) + (setq n (+ (* 10 n) (|charDigitVal| (elt p i))))) n)))) @ @@ -22097,8 +22168,8 @@ back. (let (digits n) (setq digits "0123456789") (setq n (spaddifference 1)) - (do ((tmp0 (spaddifference (|#| digits) 1)) (i 0 (qsadd1 i))) - ((or (qsgreaterp i tmp0) (null (minusp n))) nil) + (do ((tmp0 (spaddifference (|#| digits) 1)) (i 0 (1+ i))) + ((or (> i tmp0) (null (minusp n))) nil) (if (char= c (elt digits i)) (setq n i) nil)) @@ -30141,31 +30212,29 @@ synonyms at the current user level. \defun{processSynonymLine,removeKeyFromLine}{Remove system keyword} \calls{processSynonymLine,removeKeyFromLine}{dropLeadingBlanks} \calls{processSynonymLine,removeKeyFromLine}{maxindex} -\calls{processSynonymLine,removeKeyFromLine}{qsadd1} -\calls{processSynonymLine,removeKeyFromLine}{qsgreaterp} <>= -(defun |processSynonymLine,removeKeyFromLine| (|line|) - (prog (|mx|) +(defun |processSynonymLine,removeKeyFromLine| (line) + (prog (mx) (return (seq - (setq |line| (|dropLeadingBlanks| |line|)) - (setq |mx| (maxindex |line|)) + (setq line (|dropLeadingBlanks| line)) + (setq mx (maxindex line)) (exit - (do ((i 0 (qsadd1 i))) - ((qsgreaterp i |mx|) nil) + (do ((i 0 (1+ i))) + ((> i mx) nil) (seq (exit - (if (char= (elt |line| i) #\space) + (if (char= (elt line i) #\space) (exit (return - (do ((j (PLUS i 1) (+ j 1))) - ((> j |mx|) nil) + (do ((j (1+ i) (1+ j))) + ((> j mx) nil) (seq (exit - (if (char\= (elt |line| j) #\space) + (if (char\= (elt line j) #\space) (exit (return - (substring |line| j nil)))))))))))))))))) + (substring line j nil)))))))))))))))))) @ @@ -31982,7 +32051,8 @@ This reports the traced functions @ -\defun{untraceDomainConstructor}{untraceDomainConstructor} +\defun{untraceDomainConstructor,keepTraced?}{% +untraceDomainConstructor,keepTraced?} \calls{untraceDomainConstructor,keepTraced?}{seq} \calls{untraceDomainConstructor,keepTraced?}{pairp} \calls{untraceDomainConstructor,keepTraced?}{qcar} @@ -33541,8 +33611,8 @@ Properties of r :: (|writeInputLines| '|redo| (spaddifference |$IOindex| m)) (|recordFrame| '|normal|) (setq env (copy (caar |$InteractiveFrame|))) - (do ((i 0 (qsadd1 i)) (framelist |$frameRecord| (cdr framelist))) - ((or (qsgreaterp i m) (atom framelist)) nil) + (do ((i 0 (1+ i)) (framelist |$frameRecord| (cdr framelist))) + ((or (> i m) (atom framelist)) nil) (setq env (|undoSingleStep| (CAR framelist) env)) (if (and (pairp framelist) (progn @@ -34225,7 +34295,7 @@ o )library \calls{workfilesSpad2Cmd}{selectOptionLC} \calls{workfilesSpad2Cmd}{pathname} \calls{workfilesSpad2Cmd}{delete} -\calls{workfilesSpad2Cmd}{make-input-filename} +\calls{workfilesSpad2Cmd}{makeInputFilename} \calls{workfilesSpad2Cmd}{sayKeyedMsg} \calls{workfilesSpad2Cmd}{namestring} \calls{workfilesSpad2Cmd}{updateSourceFiles} @@ -34271,7 +34341,7 @@ o )library (cond (deleteflag (setq |$sourceFiles| (|delete| fl |$sourceFiles|))) - ((null (make-input-filename fl)) + ((null (makeInputFilename fl)) (|sayKeyedMsg| 's2iz0035 (list (|namestring| fl)))) (t (|updateSourceFiles| fl)))))) (say " ") @@ -34411,7 +34481,7 @@ o )library (defun |readSpadProfileIfThere| () (let ((file (list '|.axiom| '|input|))) (declare (special /editfile)) - (when (make-input-filename file) (setq /editfile file) (/rq)))) + (when (makeInputFilename file) (setq /editfile file) (/rq)))) @ @@ -34433,7 +34503,7 @@ o )library <>= (defun /rf-1 (ignore) (declare (ignore ignore)) - (let* ((input-file (vmlisp::make-input-filename /editfile)) + (let* ((input-file (makeInputFilename /editfile)) (type (pathname-type input-file))) (declare (special |$useNewParser| Echo-Meta /editfile)) (cond @@ -34945,15 +35015,15 @@ gets the index into the EBCDIC table, and returns the appropriate character. @ -\chapter{Stream Handling} +\chapter{Stream and File Handling} \defun{make-instream}{make-instream} -\calls{make-instream}{make-input-filename} +\calls{make-instream}{makeInputFilename} <>= (defun make-instream (filespec &optional (recnum 0)) (declare (ignore recnum)) (cond ((numberp filespec) (make-synonym-stream '*terminal-io*)) ((null filespec) (error "not handled yet")) - (t (open (make-input-filename filespec) + (t (open (makeInputFilename filespec) :direction :input :if-does-not-exist nil)))) @ @@ -34994,7 +35064,7 @@ gets the index into the EBCDIC table, and returns the appropriate character. (let ((strm (case mode ((output o) (open (make-filename filename) :direction :output)) - ((input i) (open (make-input-filename filename) + ((input i) (open (makeInputFilename filename) :direction :input))))) (if (and (numberp char-position) (> char-position 0)) (file-position strm char-position)) @@ -35028,25 +35098,69 @@ gets the index into the EBCDIC table, and returns the appropriate character. (make-outstream filename i j))) @ -\chapter{The Spad Server Mechanism} -\defdollar{openServerIfTrue} -<>= -(defvar $openServerIfTrue nil "t means try starting an open server") + +\defun{makeInputFilename}{Construct a new input file name} +<>= +(defun makeInputFilename (filearg &optional (filetype nil)) + (let* + ((filename (make-filename filearg filetype)) + (dirname (pathname-directory filename)) + (ft (pathname-type filename)) + (dirs (getDirectoryList ft)) + (newfn nil)) + (if (or (null dirname) (eqcar dirname :relative)) + (dolist (dir dirs (probeName filename)) + (when (probe-file (setq newfn (concatenate 'string dir filename))) + (return newfn))) + (probeName filename)))) @ -\defdollar{SpadServerName} -<>= -(defconstant $SpadServerName "/tmp/.d" "the name of the spad server socket") +\defun{getDirectoryList}{getDirectoryList} +\usesdollar{getDirectoryList}{current-directory} +\usesdollar{getDirectoryList}{UserLevel} +\usesdollar{getDirectoryList}{library-directory-list} +\usesdollar{getDirectoryList}{directory-list} +<>= +(defun getDirectoryList (ft &aux (cd (namestring $current-directory))) + (declare (special $current-directory |$UserLevel| $library-directory-list + $directory-list)) + (if (member ft '("nrlib" "daase" "exposed") :test #'string=) + (if (eq |$UserLevel| '|development|) + (cons cd $library-directory-list) + $library-directory-list) + (adjoin cd + (adjoin (namestring (user-homedir-pathname)) $directory-list + :test #'string=) + :test #'string=))) + @ -\defdollar{SpadServer} -<>= -(defvar $SpadServer nil "t means Scratchpad acts as a remote server") +\defun{probeName}{probeName} +<>= +(defun probeName (file) + (if (probe-file file) (namestring file) nil)) + +@ + +\defun{makeFullNamestring}{makeFullNamestring} +<>= +(defun makeFullNamestring (filearg &optional (filetype nil)) + (namestring (merge-pathnames (make-filename filearg filetype)))) @ +\defun{replaceFile}{Replace a file by erase and rename} +\calls{makeStream}{makeFullNamestring} +<>= +(defun replaceFile (filespec1 filespec2) + ($erase (setq filespec1 (makeFullNamestring filespec1))) + (rename-file (makeFullNamestring filespec2) filespec1)) + +@ + +\chapter{The Spad Server Mechanism} \defun{openserver}{openserver} This is a cover function for the C code used for communication interface. <>= @@ -37089,7 +37203,6 @@ database format. @ \chapter{System Statistics} -\pagehead{statisticsInitialization}{statisticsInitialization} \calls{statisticsInitialization}{gbc-time} <>= (defun |statisticsInitialization| () @@ -39298,6 +39411,7 @@ This needs to work off the internal exposure list, not the file. <> <> <> +<> <> <> <> @@ -39516,8 +39630,10 @@ This needs to work off the internal exposure list, not the file. <> <> <> +<> <> <> +<> <> <> <> @@ -40084,6 +40200,7 @@ This needs to work off the internal exposure list, not the file. <> <> <> +<> <> <> <> @@ -40131,6 +40248,7 @@ This needs to work off the internal exposure list, not the file. <> <> <> +<> <> <> <> @@ -40493,7 +40611,6 @@ curoutstream & ncIntLoop & \\ \$internalHistoryTable & initvars & \\ \$interpreterFrameName & initializeInterpreterFrameRing & \\ \$interpreterFrameRing & initializeInterpreterFrameRing & \\ -\$InitialModemapFrame & & makeInitialModemapFrame \\ \$intRestart & & intloop \\ \$intTopLevel & intloop & \\ \$IOindex & restart & historySpad2Cmd \\ @@ -40514,9 +40631,6 @@ curoutstream & ncIntLoop & \\ \$nopos & & SpadInterpretStream \\ \$okToExecuteMachineCode & SpadInterpretStream & \\ \$oldHistoryFileName & initvars & oldHistFileName \\ -\$openServerIfTrue & restart & restart \\ - & spad-save & \\ - & initvars & \\ \$options & & history \\ & historySpad2Cmd & historySpad2Cmd \\ & & undo \\ @@ -40652,11 +40766,6 @@ move around the ring. The \verb|$interpreterFrameRing| is set to a pair whose car is set to the result of emptyInterpreterFrame -\subsection{\$InitialModemapFrame} -This variable is copied and returned by the function -\verb|makeInitialModemapFrame|. There is no initial value so this -is probably a bug. - \subsection{\$inLispVM} The \verb|$inLispVM| is set to NIL in spad. LispVM is a non-common lisp that runs on IBM/370 mainframes. This is probably dead @@ -40752,13 +40861,6 @@ This is part of the undo mechanism. \subsection{\$PrintCompilerMessageIfTrue} The \verb|$PrintCompilerMessageIfTrue| variable is set to NIL in spad. -\subsection{\$openServerIfTrue} -The \verb|$openServerIfTrue| is tested in restart before it has been -set (and is thus a bug). It appears to control whether the interpreter -will be used as an open server, probably for OpenMath use. - -If an open server is not requested then this variable to NIL - \subsection{\$reportUndo} The \verb|$reportUndo| variable is used in diffAlist. It was not normally bound but has been set to T in initvars. If the variable is set diff --git a/changelog b/changelog index 947d7f9..877a8f2 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,18 @@ +20100227 tpd src/axiom-website/patches.html 20100227.01.tpd.patch +20100227 tpd books/bookvol5 rewrite to common lisp functions +20100227 tpd src/interp/vmlisp.lisp remove some define-functions +20100227 tpd src/interp/parsing.lisp rewrite to common lisp functions +20100227 tpd src/interp/nruncomp.lisp rewrite to common lisp functions +20100227 tpd src/interp/newaux.lisp rewrite to common lisp functions +20100227 tpd src/interp/lisplib.lisp rewrite to common lisp functions +20100227 tpd src/interp/i-util.lisp rewrite to common lisp functions +20100227 tpd src/interp/i-resolv.lisp rewrite to common lisp functions +20100227 tpd src/interp/i-output.lisp rewrite to common lisp functions +20100227 tpd src/interp/i-intern.lisp rewrite to common lisp functions +20100227 tpd src/interp/g-opt.lisp rewrite to common lisp functions +20100227 tpd src/interp/define.lisp rewrite to common lisp functions +20100227 tpd src/interp/c-util.lisp rewrite to common lisp functions +20100227 tpd books/bookvol10.3 rewrite to common lisp functions 20100224 tpd src/axiom-website/patches.html 20100224.02.tpd.patch 20100224 tpd src/interp/util.lisp move global variables to bookvol5 20100224 tpd src/interp/posit.lisp move position functions to bookvol5 diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index 1337023..e7a4947 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -2497,5 +2497,7 @@ books/bookvol5 merge and remove ptrees.lisp
faq FAQ 51: How can I do unicode in xterm?
20100224.02.tpd.patch books/bookvol5 merge and remove macex, begin documentation
+20100227.01.tpd.patch +src/interp/vmlisp.lisp remove some define-functions
diff --git a/src/interp/c-util.lisp.pamphlet b/src/interp/c-util.lisp.pamphlet index a37b2e4..fb40c02 100644 --- a/src/interp/c-util.lisp.pamphlet +++ b/src/interp/c-util.lisp.pamphlet @@ -2046,7 +2046,7 @@ (declare (special |$previousTime| |$timerTicksPerSecond|)) (RETURN (PROGN - (SPADLET |currentTime| (TEMPUS-FUGIT)) + (SPADLET |currentTime| (get-internal-run-time)) (SPADLET |elapsedSeconds| (QUOTIENT (TIMES (SPADDIFFERENCE |currentTime| diff --git a/src/interp/define.lisp.pamphlet b/src/interp/define.lisp.pamphlet index 30f179c..1b5362a 100644 --- a/src/interp/define.lisp.pamphlet +++ b/src/interp/define.lisp.pamphlet @@ -2653,7 +2653,7 @@ (SPADLET |oplist| (|getOperationAlistFromLisplib| (|opOf| (ELT |dom| 0)))) - (SPADLET |ops| (MAKE-VEC (|#| |siglist|))) + (SPADLET |ops| (make-array (|#| |siglist|))) (DO ((G167928 |siglist| (CDR G167928)) (|opSig| NIL) (|i| 0 (QSADD1 |i|))) ((OR (ATOM G167928) diff --git a/src/interp/g-opt.lisp.pamphlet b/src/interp/g-opt.lisp.pamphlet index 8d32b91..61bc5f0 100644 --- a/src/interp/g-opt.lisp.pamphlet +++ b/src/interp/g-opt.lisp.pamphlet @@ -1383,8 +1383,8 @@ (CONS (CONS 'CAR (CONS |name| NIL)) (CONS (CONS 'CDR (CONS |name| NIL)) NIL)))) ('T - (CONS 'MOVEVEC - (CONS (CONS 'MAKE-VEC (CONS |len| NIL)) + (CONS 'replace + (CONS (CONS 'make-array (CONS |len| NIL)) (CONS |name| NIL))))))))) ;--mkRecordAccessFunction(ind,len) == diff --git a/src/interp/i-intern.lisp.pamphlet b/src/interp/i-intern.lisp.pamphlet index 1ae1202..bdbe34b 100644 --- a/src/interp/i-intern.lisp.pamphlet +++ b/src/interp/i-intern.lisp.pamphlet @@ -55,7 +55,7 @@ slot & description\\ (DEFUN |mkAtreeNode| (|x|) (PROG (|v|) - (RETURN (PROGN (SPADLET |v| (MAKE-VEC 5)) (SETELT |v| 0 |x|) |v|)))) + (RETURN (PROGN (SPADLET |v| (make-array 5)) (SETELT |v| 0 |x|) |v|)))) @ \subsection{mkAtree} diff --git a/src/interp/i-output.lisp.pamphlet b/src/interp/i-output.lisp.pamphlet index 33f4703..dae346a 100644 --- a/src/interp/i-output.lisp.pamphlet +++ b/src/interp/i-output.lisp.pamphlet @@ -6775,7 +6775,7 @@ NIL (RETURN (COND ((STRINGP |x|) |x|) - ((EQ '|\|| (FETCHCHAR (SPADLET |s| (STRINGIMAGE |x|)) 0)) + ((EQ '|\|| (char (SPADLET |s| (STRINGIMAGE |x|)) 0)) (RPLACSTR |s| 0 1 '|| NIL NIL)) ('T |s|))))) diff --git a/src/interp/i-resolv.lisp.pamphlet b/src/interp/i-resolv.lisp.pamphlet index ef52dbe..0c5843f 100644 --- a/src/interp/i-resolv.lisp.pamphlet +++ b/src/interp/i-resolv.lisp.pamphlet @@ -2722,9 +2722,8 @@ this symmetric resolution is done the following way: (CONS '|SimpleAlgebraicExtension| NIL))) NIL) ('T - (CGREATERP (PRIN2CVEC (|opOf| |t1|)) - (PRIN2CVEC (|opOf| |t2|))))))) - + (CGREATERP (princ-to-string (|opOf| |t1|)) + (princ-to-string (|opOf| |t2|))))))) @ \eject diff --git a/src/interp/i-util.lisp.pamphlet b/src/interp/i-util.lisp.pamphlet index f4eb939..e07d858 100644 --- a/src/interp/i-util.lisp.pamphlet +++ b/src/interp/i-util.lisp.pamphlet @@ -172,7 +172,7 @@ lisp code is unwrapped. ((AND (BOUNDP '|$ZeroVecCache|) (BOOT-EQUAL (|#| |$ZeroVecCache|) |n|)) |$ZeroVecCache|) - ('T (SPADLET |$ZeroVecCache| (MAKE-VEC |n|)) + ('T (SPADLET |$ZeroVecCache| (make-array |n|)) (DO ((G166122 (SPADDIFFERENCE |n| 1)) (|i| 0 (QSADD1 |i|))) ((QSGREATERP |i| G166122) NIL) (SEQ (EXIT (SETELT |$ZeroVecCache| |i| 0)))) diff --git a/src/interp/lisplib.lisp.pamphlet b/src/interp/lisplib.lisp.pamphlet index a84f29b..4e9dd91 100644 --- a/src/interp/lisplib.lisp.pamphlet +++ b/src/interp/lisplib.lisp.pamphlet @@ -1112,7 +1112,7 @@ (DEFUN |compileDocumentation| (|libName|) (PROG (|filename| |stream|) - (declare (special |$e| |$EmptyMode| |$spadLibFT| $REPLACE $FCOPY)) + (declare (special |$e| |$EmptyMode| |$spadLibFT| $FCOPY)) (RETURN (PROGN (SPADLET |filename| @@ -1127,7 +1127,7 @@ (|finalizeDocumentation|) |stream|) (RSHUT |stream|) (RPACKFILE (CONS |libName| (CONS 'DOCLB NIL))) - ($REPLACE (CONS |libName| (CONS |$spadLibFT| NIL)) + (replaceFile (CONS |libName| (CONS |$spadLibFT| NIL)) (CONS |libName| (CONS 'DOCLB NIL))) (CONS '|dummy| (CONS |$EmptyMode| (CONS |$e| NIL))))))) @@ -1345,8 +1345,8 @@ ; [libName,'ERRORLIB,$libraryDirectory]) (DEFUN |lisplibDoRename| (|libName|) - (declare (special |$libraryDirectory| |$spadLibFT| $REPLACE)) - ($REPLACE + (declare (special |$libraryDirectory| |$spadLibFT|)) + (replaceFile (CONS |libName| (CONS |$spadLibFT| (CONS |$libraryDirectory| NIL))) (CONS |libName| (CONS 'ERRORLIB (CONS |$libraryDirectory| NIL))))) diff --git a/src/interp/newaux.lisp.pamphlet b/src/interp/newaux.lisp.pamphlet index ce51b7b..700f4db 100644 --- a/src/interp/newaux.lisp.pamphlet +++ b/src/interp/newaux.lisp.pamphlet @@ -53,6 +53,13 @@ ; legitimate value signifying no precedence. If the Special-Handler is NIL, ; this is just an ordinary operator (as opposed to a surfix operator like ; if-then-else). +; +; The Nud value gives the precedence when the operator is a prefix op. +; The Led value gives the precedence when the operator is an infix op. +; Each op has 2 priorities, left and right. +; If the right priority of the first is greater than or equal to the +; left priority of the second then collect the second operator into +; the right argument of the first operator. \end{verbatim} <>= diff --git a/src/interp/nruncomp.lisp.pamphlet b/src/interp/nruncomp.lisp.pamphlet index 7c569bc..be90366 100644 --- a/src/interp/nruncomp.lisp.pamphlet +++ b/src/interp/nruncomp.lisp.pamphlet @@ -1297,7 +1297,7 @@ G166745)))))))) (SPADLET |$supplementaries| NIL) (SPADLET |$maximalViews| NIL) - (SPADLET |oldtime| (TEMPUS-FUGIT)) + (SPADLET |oldtime| (get-internal-run-time)) (SPADLET |$catsig| (CAR |sig|)) (SPADLET |argsig| (CDR |sig|)) (SPADLET |catvecListMaker| @@ -1586,7 +1586,7 @@ (SPADLET |$getDomainCode| NIL) (SPADLET |ans| (|minimalise| |ans|)) (SAY (CONS (MAKESTRING "time taken in buildFunctor: ") - (CONS (SPADDIFFERENCE (TEMPUS-FUGIT) |oldtime|) + (CONS (SPADDIFFERENCE (get-internal-run-time) |oldtime|) NIL))) |ans|))))) diff --git a/src/interp/parsing.lisp.pamphlet b/src/interp/parsing.lisp.pamphlet index b445197..18b986a 100644 --- a/src/interp/parsing.lisp.pamphlet +++ b/src/interp/parsing.lisp.pamphlet @@ -3610,7 +3610,7 @@ C. If the entire line consists of the single keyword then or else, leave it alon (defun ADDCLOSE (LINE CHAR) - (cond ((char= (FETCHCHAR LINE (MAXINDEX LINE)) #\; ) + (cond ((char= (char LINE (MAXINDEX LINE)) #\; ) (SETELT LINE (MAXINDEX LINE) CHAR) (if (char= CHAR #\;) LINE (suffix #\; LINE))) ((suffix char LINE)))) @@ -4425,7 +4425,7 @@ postpar ;;; *** |postBigFloat| REDEFINED -(DEFUN |postBigFloat| (|x|) (PROG (|mant| |expon| |eltword|) (RETURN (PROGN (SPADLET |mant| (CADR |x|)) (SPADLET |expon| (CDDR |x|)) (COND ($BOOT (TIMES (INT2RNUM |mant|) (EXPT (INT2RNUM 10) |expon|))) ((QUOTE T) (SPADLET |eltword| (COND (|$InteractiveMode| (QUOTE |$elt|)) ((QUOTE T) (QUOTE |elt|)))) (|postTran| (CONS (CONS |eltword| (CONS (QUOTE (|Float|)) (CONS (QUOTE |float|) NIL))) (CONS (CONS (QUOTE |,|) (CONS (CONS (QUOTE |,|) (CONS |mant| (CONS |expon| NIL))) (CONS 10 NIL))) NIL))))))))) +(DEFUN |postBigFloat| (|x|) (PROG (|mant| |expon| |eltword|) (RETURN (PROGN (SPADLET |mant| (CADR |x|)) (SPADLET |expon| (CDDR |x|)) (COND ($BOOT (TIMES (float |mant|) (EXPT (float 10) |expon|))) ((QUOTE T) (SPADLET |eltword| (COND (|$InteractiveMode| (QUOTE |$elt|)) ((QUOTE T) (QUOTE |elt|)))) (|postTran| (CONS (CONS |eltword| (CONS (QUOTE (|Float|)) (CONS (QUOTE |float|) NIL))) (CONS (CONS (QUOTE |,|) (CONS (CONS (QUOTE |,|) (CONS |mant| (CONS |expon| NIL))) (CONS 10 NIL))) NIL))))))))) ;postAdd ['add,a,:b] == ; null b => postCapsule a ; ['add,postTran a,postCapsule first b] diff --git a/src/interp/vmlisp.lisp.pamphlet b/src/interp/vmlisp.lisp.pamphlet index 8619b47..4d4f486 100644 --- a/src/interp/vmlisp.lisp.pamphlet +++ b/src/interp/vmlisp.lisp.pamphlet @@ -131,9 +131,6 @@ documentclass{article} (defmacro exit (&rest value) `(return-from seq ,@value)) -(defmacro fetchchar (x i) - `(char ,x ,i)) - (defmacro fixp (x) `(integerp ,x)) @@ -223,9 +220,6 @@ documentclass{article} `(let ((,xx ,x)) (if (consp ,xx) (qcar ,xx) ,xx))))) -(defmacro oraddtempdefs (filearg) - `(eval-when (compile) (load ,filearg))) - (defmacro pairp (x) `(consp ,x)) @@ -306,9 +300,6 @@ documentclass{article} (defmacro qcsize (x) `(the fixnum (length (the simple-string ,x)))) -(defmacro qeqq (pattern exp) - `(,(ecqexp pattern 1) ,exp)) - (defmacro qlength (a) `(length ,a)) @@ -450,9 +441,6 @@ documentclass{article} (defmacro |shoeInputFile| (filespec) `(open ,filespec :direction :input :if-does-not-exist nil)) -(defmacro |shoeread-line| (st) - `(read-line ,st nil nil)) - (defmacro sintp (n) `(typep ,n 'fixnum)) @@ -487,8 +475,6 @@ documentclass{article} (defun define-function (f v) (setf (symbol-function f) v)) -(define-function 'tempus-fugit #'get-internal-run-time) - (defun $TOTAL-ELAPSED-TIME () (list (get-internal-run-time) (get-internal-real-time))) @@ -545,8 +531,6 @@ documentclass{article} (declare (ignore sd)) (macroexpand `(,arg ,item))) -(define-function 'MDEFX #'MDEF) - ; 8.0 Operator Definition and Transformation ; 8.1 Definition and Transformation Operations @@ -608,8 +592,6 @@ documentclass{article} (t (cons (remove-fluids (car arglist)) (remove-fluids (cdr arglist)))))) -(define-function 'KOMPILE #'COMP370) - ; 9.4 Vectors and Bpis (defun IVECP (x) (and (vectorp x) (subtypep (array-element-type x) 'integer))) @@ -662,9 +644,6 @@ documentclass{article} ((atom l) l) (t (mapcar #'upcase l)))) -(define-function 'U-CASE #'upcase) -(define-function 'LC2UC #'upcase) - (defun downcase (l) (cond ((stringp l) (string-downcase l)) ((identp l) (intern (string-downcase (symbol-name l)))) @@ -758,7 +737,6 @@ the calculation by repeated divisions using the radix itself. ; 12.1 Conversion (define-function 'FIX #'truncate) -(define-function 'INT2RNUM #'float) ; 12.2 Predicates @@ -783,8 +761,6 @@ the calculation by repeated divisions using the radix itself. (cond ((or (floatp x) (floatp y)) (lisp:/ x y)) (t (truncate x y)))) -(define-function 'vm/ #'quotient) - (defun REMAINDER (x y) (if (and (integerp x) (integerp y)) (rem x y) @@ -887,8 +863,6 @@ the calculation by repeated divisions using the radix itself. ; 16.1 Creation -(defun MAKE-VEC (n) (make-array n)) - (define-function 'GETREFV #'make-array) @ @@ -919,17 +893,11 @@ can be restored. ; 16.2 Accessing -;(define-function 'FETCHCHAR #'char) - -(define-function 'MOVEVEC #'replace) - ; 17.0 Operations on Character and Bit Vectors (defun charp (a) (or (characterp a) (and (identp a) (= (length (symbol-name a)) 1)))) -(defun NUM2CHAR (n) (code-char n)) - (defun CHAR2NUM (c) (char-code (character c))) (defun CGREATERP (s1 s2) (string> (string s1) (string s2))) @@ -1359,7 +1327,6 @@ The princ-to-string function assumes *print-escape* is nil and works properly. <<*>>= -(define-function 'prin2cvec #'princ-to-string) (define-function 'stringimage #'princ-to-string) (define-function 'printexp #'princ) (define-function 'prin0 #'prin1) @@ -2015,7 +1982,6 @@ Camm issued a fix. This used to read: (fullname nil) (indextable nil)) (cond ((equal (elt (string mode) 0) #\I) - ;;(setq fullname (make-input-filename (cdr file) 'LISPLIB)) (setq fullname (make-input-filename (cdr file) 'NIL)) (setq stream (get-input-index-stream fullname)) (if (null stream) @@ -2123,10 +2089,6 @@ Camm issued a fix. This used to read: (defun rkeyids (&rest filearg) (mapcar #'intern (mapcar #'car (getindextable (make-input-filename filearg 'NIL))))) -;;(defun rkeyids (&rest filearg) -;; (mapcar #'intern (mapcar #'car (getindextable -;; (make-input-filename filearg 'LISPLIB))))) - ;; (RWRITE cvec item rstream) (defun rwrite (key item rstream) (if (equal (libstream-mode rstream) 'input) (error "not output stream")) @@ -2281,20 +2243,6 @@ do the compile, and then rename the result back to code.o. (defun make-full-namestring (filearg &optional (filetype nil)) (namestring (merge-pathnames (make-filename filearg filetype)))) -(defun probe-name (file) - (if (probe-file file) (namestring file) nil)) - -(defun get-directory-list (ft &aux (cd (namestring $current-directory))) - (declare (special $current-directory)) - (cond ((member ft '("nrlib" "daase") :test #'string=) - (if (eq BOOT::|$UserLevel| 'BOOT::|development|) - (cons cd $library-directory-list) - $library-directory-list)) - (t (adjoin cd - (adjoin (namestring (user-homedir-pathname)) $directory-list - :test #'string=) - :test #'string=)))) - (defun make-input-filename (filearg &optional (filetype nil)) (let* ((filename (make-filename filearg filetype)) @@ -2310,6 +2258,20 @@ do the compile, and then rename the result back to code.o. (return newfn))) (probe-name filename)))) +(defun probe-name (file) + (if (probe-file file) (namestring file) nil)) + +(defun get-directory-list (ft &aux (cd (namestring $current-directory))) + (declare (special $current-directory)) + (cond ((member ft '("nrlib" "daase") :test #'string=) + (if (eq BOOT::|$UserLevel| 'BOOT::|development|) + (cons cd $library-directory-list) + $library-directory-list)) + (t (adjoin cd + (adjoin (namestring (user-homedir-pathname)) $directory-list + :test #'string=) + :test #'string=)))) + (defun $FILEP (&rest filearg) (make-full-namestring filearg)) (define-function '$OUTFILEP #'$FILEP) ;;temporary bogus def @@ -2324,11 +2286,6 @@ do the compile, and then rename the result back to code.o. (defun $erase (&rest filearg) (system (concat "rm -rf "(make-full-namestring filearg)))) -(defun $REPLACE (filespec1 filespec2) - ($erase (setq filespec1 (make-full-namestring filespec1))) - (rename-file (make-full-namestring filespec2) filespec1)) - - ;;(defun move-file (namestring1 namestring2) ;; (rename-file namestring1 namestring2)) @@ -2581,7 +2538,6 @@ which will walk the structure $Y$ looking for this constant. (def-boot-val |$InitialDomainsInScope| '((|Boolean|) |$EmptyMode| |$NoValueMode|) "???") -(def-boot-val |$InitialModemapFrame| '((NIL)) "???") (def-boot-var |$inLispVM| "Interpreter>Eval.boot") (def-boot-var |$insideCapsuleFunctionIfTrue| "???") (def-boot-var |$insideCategoryIfTrue| "???") @@ -4790,22 +4746,8 @@ terminals and empty or at-end files. In Common Lisp, we must assume record size (defmacro /C (&rest L) `',(/D-1 L (/COMP) NIL NIL)) -(defmacro /CT (&rest L) `',(/D-1 L (/COMP) NIL 'T)) - -(defmacro /CTL (&rest L) `',(/D-1 L (/COMP) NIL 'TRACELET)) - (defmacro /D (&rest L) `',(/D-1 L 'DEFINE NIL NIL)) -(defmacro /EC (&rest L) `', (/D-1 L (/COMP) 'T NIL)) - -(defmacro /ECT (&rest L) `',(/D-1 L (/COMP) 'T 'T)) - -(defmacro /ECTL (&rest L) `',(/D-1 L (/COMP) 'T 'TRACELET)) - -(defmacro /E (&rest L) `',(/D-1 L NIL 'T NIL)) - -(defmacro /ED (&rest L) `',(/D-1 L 'DEFINE 'T NIL)) - (defun heapelapsed () 0) (defun /COMP () (if (fboundp 'COMP) 'COMP 'COMP370)) @@ -5320,7 +5262,7 @@ EXAMINE (SETQ RECNO (NOTE INPUTSTREAM)) ((ATOM (CAR L)) (|spadThrowBrightly| (format nil "~A has wrong format for an option" (car L)))) - ((CONS (CONS (LC2UC (CAAR L)) (CDAR L)) (OPTIONS2UC (CDR L)))))) + ((CONS (CONS (upcase (CAAR L)) (CDAR L)) (OPTIONS2UC (CDR L)))))) (DEFUN COND-UCASE (X) (COND ((INTEGERP X) X) ((UPCASE X)))) @@ -5717,7 +5659,7 @@ EXAMINE (SETQ RECNO (NOTE INPUTSTREAM)) (if (member '|before| BREAK :test #'eq) (|break| (LIST "Break on entering" '|%b| NAME1 '|%d| ":"))) (if TIMERNAM (SETQ INIT_TIME (|startTimer|))) - (SETQ /VALUE (if (EQ TYPE 'MACRO) (MDEFX FUNCT /ARGS) + (SETQ /VALUE (if (EQ TYPE 'MACRO) (MDEF FUNCT /ARGS) (APPLY FUNCT /ARGS))) (|stopTimer|) (if TIMERNAM (SETQ EVAL_TIME (- (|clock|) INIT_TIME)) ) @@ -5752,14 +5694,15 @@ EXAMINE (SETQ RECNO (NOTE INPUTSTREAM)) ; on and off (defun |startTimer| () - (SETQ $delay (PLUS $delay (DIFFERENCE (TEMPUS-FUGIT) |$oldTime|))) + (SETQ $delay (PLUS $delay (DIFFERENCE (get-internal-run-time) |$oldTime|))) (SETQ |$timerOn| 'T) (|clock|)) -(defun |stopTimer| () (SETQ |$oldTime| (TEMPUS-FUGIT) |$timerOn| NIL) (|clock|)) +(defun |stopTimer| () + (SETQ |$oldTime| (get-internal-run-time) |$timerOn| NIL) (|clock|)) (defun |clock| () - (if |$timerOn| (- (TEMPUS-FUGIT) $delay) (- |$oldTime| $delay))) + (if |$timerOn| (- (get-internal-run-time) $delay) (- |$oldTime| $delay))) ; Functions to trace/untrace a BPI; use as follows: ; To trace a BPI-value , evaluate (SETQ (BPITRACE )) @@ -6091,7 +6034,7 @@ now the function is defined but does nothing. (defun STRINGREST (X) (if (EQ (SIZE X) 1) (make-string 0) (SUBSTRING X 1 NIL))) (defun STREAM2UC (STRM) - (LET ((X (ELT (LASTATOM STRM) 1))) (SETELT X 0 (LC2UC (ELT X 0))))) + (LET ((X (ELT (LASTATOM STRM) 1))) (SETELT X 0 (upcase (ELT X 0))))) (defun NEWNAMTRANS (X) (COND @@ -6172,7 +6115,7 @@ now the function is defined but does nothing. (|$genFVar| 0) (|$genSDVar| 0) (|$VariableCount| 0) - (|$previousTime| (TEMPUS-FUGIT)) + (|$previousTime| (get-internal-run-time)) (|$LocalFrame| '((NIL)))) (prog ((CURSTRM CUROUTSTREAM) |$s| |$x| |$m| u) (declare (special CURSTRM |$s| |$x| |$m| CUROUTSTREAM)) @@ -6262,7 +6205,7 @@ special. (defun |New,ENTRY,2| (RULE FN INPUTSTREAM) (declare (special INPUTSTREAM)) (let (zz) (INITIALIZE) - (SETQ $previousTime (TEMPUS-FUGIT)) + (SETQ $previousTime (get-internal-run-time)) (setq ZZ (CONVERSATION '|PARSE-NewExpr| '|process|)) (REMFLAG |boot-NewKEY| 'KEY) INPUTSTREAM)) @@ -7011,8 +6954,6 @@ special. (SETQ |$InitialDomainsInScope| '(|$EmptyMode| |$NoValueMode|)) -(SETQ |$InitialModemapFrame| '((NIL))) - (SETQ NRTPARSE NIL) (SETQ |$NRTflag| T) (SETQ |$NRTaddForm| NIL)