LISTING FOR >dumps>old_dumps>lisp_stuff>work>lisp_old_io_ COMPILED BY Multics LISP Compiler, Version 2.8x, February 27, 1980 ON 02/27/80 2139.0 mst Wed IN BEHALF OF Martinson.SysMaint.a ;;;(c) Copyright 1973, Massachusetts Institute of Technology. ;;; All rights reserved. ;;; lisp_old_io_.lisp ;;; This module provides the lisp functions uread, uwrite, ufile, ukill, and crunit ;;; It is written in terms of the new I/O system. ;;; coded 27-MAR-73 by DAM ;;; fasload added 14 Nov 73 by DAM ;;; Modified 17 Sep 74 by DAM to not use fremob, add uprobe, uappend, uclose functions (declare (system-file t)) (declare (special old-io-defaults uread uwrite infile outfiles)) (setq uread nil uwrite nil old-io-defaults nil) (defun uread fexpr (x) (setq uread (openi (fetch-uread-names x))) (setq old-io-defaults (namelist uread)) (eoffn uread (function (lambda (x y) (setq uread nil) y))) ;provide for clearing of (status uread) on EOF (setq infile uread) ;make ^Q cause input from here (status crunit)) (defun fetch-uread-names (x) (mergef (cond ((null x) '(*.*)) ((or (null (cdr x)) (null (cddr x))) (cons '* x)) ((list (cadddr x) (car x) (cadr x))) ) (or old-io-defaults (namelist nil)) )) (defun fasload fexpr (x) (setq x (fetch-uread-names x)) (and (eq (car (last x)) 'fasl) ;drop fasl suffix (setq x (nreverse (cdr (reverse x)))) ) (load x)) (defun uwrite fexpr (x) (and uwrite (setq outfiles (delq uwrite outfiles 1))) (or x (setq x (status crunit))) (setq uwrite (openo (mergef (list (cadr x) '!lisp 'output) ;temp file name !lisp.output until ufiled (or old-io-defaults (namelist nil)) ))) (apply 'crunit x) ;kludgey way to set the defaults (setq outfiles (cons uwrite outfiles)) ;make this where output goes (status crunit)) (defun crunit fexpr (x) (or x (setq x (status crunit))) (setq old-io-defaults (mergef (cons (cadr x) '*) (or old-io-defaults (namelist nil)))) x) (defun ufile fexpr (x) (setq x (cond (x (list (car x) (cadr x))) (old-io-defaults (cdr old-io-defaults)) )) (setq old-io-defaults (mergef (cons '* x) (or (namelist uwrite) old-io-defaults (namelist nil)) )) (errset (deletef old-io-defaults) nil) ;delete old copy if there (rename uwrite old-io-defaults) ;and rename to new copy (close uwrite) (setq uwrite nil) (status crunit)) (defun ukill fexpr (x) (setq x (cond ((null x) '(* . *)) ((null (cddr x)) (cons '* x)) ((list (cadddr x) (car x) (cadr x))) )) (setq old-io-defaults (setq x (mergef x (or old-io-defaults (namelist nil)) ))) (setq x (deletef x)) (list (cadr x) (caddr x))) (defun uappend fexpr (x) (setq x (fetch-uread-names x)) (and uwrite (setq outfiles (delq uwrite outfiles 1))) (setq old-io-defaults x) (setq x (rename x '(* !lisp !append))) (setq uwrite (opena x)) (setq outfiles (cons uwrite outfiles)) (status crunit)) (defun uprobe fexpr (x) (setq old-io-defaults (mergef (setq x (fetch-uread-names x)) (or old-io-defaults (namelist nil)))) (not (not (allfiles x)))) (defun uclose nil (and uread (close uread)) (setq uread nil)) ;;;remob old-io_defaults because user must not play with it, and ;;;the compiler generated function !g1 that we happen to know is generated. (remob 'old-io-defaults)(remob '!g1)(remob 'fetch-uread-names) ;;;end Functions Defined Name Offset Offset Name !g1 0 0 !g1 crunit 254 5 uread fasload 116 37 fetch-uread-names fetch-uread-names 37 116 fasload uappend 516 154 uwrite uclose 621 254 crunit ufile 310 310 ufile ukill 420 420 ukill uprobe 570 516 uappend uread 5 570 uprobe uwrite 154 621 uclose Functions Referenced allfiles fetch-uread-names opena apply last openi close load openo deletef mergef rename delq namelist reverse eoffn nreverse status ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved