[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

What does TYIPEEK mean?



I recently got Forgy's OPS5 interpreter, written in fairly
Common Lisp, running on our VAX (under VMS).  When I ran
it thru the VAXLisp compiler, there were a few error messages,
most of which I can handle (eg, spell GREATERP as ">"),
but there were several references to an undefined TYIPEEK function,
like 'frinstance:


;;; RHS Functions

(defmacro accept (&rest z)
  `(prog (port arg)
        (cond ((> (length ',z) 1.)
               (%warn '|accept: wrong number of arguments| ',z)
               (return nil)))
        (setq port t)
        (cond (*accept-file*
               (setq port ($ifile *accept-file*))
               (cond ((null port)
                      (%warn '|accept: file has been closed| *accept-file*)
                      (return nil)))))
        (cond ((= (length ',z) 1)
               (setq arg ($varbind (car ',z)))
               (cond ((not (symbolp arg))
                      (%warn '|accept: illegal file name| arg)
                      (return nil)))
               (setq port ($ifile arg))
               (cond ((null port)
                      (%warn '|accept: file not open for input| arg)
                      (return nil)))))

;;  HERE'S ONE
        (cond ((= (tyipeek port) -1.)   

               ($value 'end-of-file)
               (return nil)))
        (flat-value (read port))))




(defun span-chars (x prt)

;;  HERE'S ANOTHER
  (do ((ch (tyipeek prt) (tyipeek prt))) 
         ((not (member ch x #'char-equal))) (read-char prt)))


I think this may be left over from MacLisp.  Is the following an
OK implementation?

    (defun tyipeek (port)
       (peek-char nil port nil -1.))

Thanks for any advice....

John Cugini  <Cugini@icst-ecf>

------