1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-15 16:07:01 +00:00
PDP-10.its/src/maxsrc/mutils.11
Eric Swenson 85994ed770 Added files to support building and running Macsyma.
Resolves #284.

Commented out uses of time-origin in maxtul; mcldmp (init) until we
can figure out why it gives arithmetic overflows under the emulators.

Updated the expect script statements in build_macsyma_portion to not
attempt to match expected strings, but simply sleep for some time
since in some cases the matching appears not to work.
2018-03-11 13:10:19 -07:00

58 lines
1.5 KiB
Common Lisp
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;;;;;;;;;;;;;;;;;;; -*- Mode: Lisp; Package: Macsyma -*- ;;;;;;;;;;;;;;;;;;;
;;; (c) Copyright 1980 Massachusetts Institute of Technology ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(macsyma-module mutils)
;;; General purpose Macsyma utilities. This file contains runtime functions
;;; which perform operations on Macsyma functions or data, but which are
;;; too general for placement in a particular file.
;;;
;;; Every function in this file is known about externally.
;;; (ASSOL item A-list)
;;;
;;; Like ASSOC, but uses ALIKE1 as the comparison predicate rather
;;; than EQUAL.
;;;
;;; Meta-Synonym: (ASS #'ALIKE1 ITEM ALIST)
(DEFMFUN ASSOL (ITEM ALIST)
(DOLIST (PAIR ALIST)
(IF (ALIKE1 ITEM (CAR PAIR)) (RETURN PAIR))))
;;;
(DEFMFUN ASSOLIKE (ITEM ALIST)
(CDR (ASSOL ITEM ALIST)))
; Old ASSOLIKE definition:
;
; (defun assolike (e l)
; (prog nil
; loop (cond ((null l) (return nil))
; ((alike1 e (caar l)) (return (cdar l))))
; (setq l (cdr l))
; (go loop)))
;;; (MEM #'ALIKE1 X L)
(DEFMFUN MEMALIKE (X L)
(DO L L (CDR L) (NULL L)
(COND ((ALIKE1 X (CAR L)) (RETURN L)))))
;;;Do we want MACROS for these on MC and on Multics?? -Jim 1/29/81
#+Multics
(PROGN 'COMPILE
(DEFMFUN MSTRINGP (X)
(AND (SYMBOLP X)
(EQUAL (GETCHARN X 1) #/&)))
(DEFMFUN MSTRING-TO-STRING (X)
(SUBSTRING (STRING X) 1))
(DEFMFUN STRING-TO-MSTRING (X)
(MAKE-SYMBOL (STRING-APPEND "&" X)))
)