1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-14 07:40:05 +00:00
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

34 lines
1.2 KiB
Common Lisp

;;;;;;;;;;;;;;;;;;; -*- Mode: Lisp; Package: Macsyma -*- ;;;;;;;;;;;;;;;;;;;
;;; (c) Copyright 1980 Massachusetts Institute of Technology ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(macsyma-module char)
;;; hacks for character manipulation.
(DEFMFUN $GETCHARN (SYMBOL INDEX)
(OR (SYMBOLP SYMBOL)
(MERROR "First arg to GETCHARN: ~A, was not a symbol."
(implode (mstring symbol))))
(OR (AND (FIXP INDEX)
(> INDEX 0))
(MERROR "Second arg to GETCHARN: ~A, was not a positive fixnum."
(implode (mstring index))))
; what happens next is debateable.
; one thing I don't want to do call mstring and take nthcdr.
; what to returns depends on what you would see printed.
; well, or read in.
; the main use for this is to check symbol name conventions,
; so $FOO and &FOO might be the same, same with %FOO I guess,
; but FOO (i.e. ?FOO is different.) poo, all these things
; depend on the setting of global switches. screw it.
(LET ((C1 (GETCHARN SYMBOL 1)))
(COND ((OR (= C1 #/$) (= C1 #/%) (= C1 #/&))
(GETCHARN SYMBOL (1+ INDEX)))
((= INDEX 1) #/?)
(T (GETCHARN SYMBOL (1- INDEX))))))