Old-I/O Control Variables
CRUNIT
If device and/or directory are specified, the respective components or DEFAULTF will be altered. Whether or not any change is made, a list of the form (dev dir) will be returned, indicating the currently active defaults. device and directory are not evaluated. [Note that if DEFAULTF is in a nonstandard form, CRUNIT will have the side-effect of putting it in standard namelist format.]
Examples:
(CRUNIT TTY FOO) => (TTY FOO) ; Setting both
(CRUNIT DSK) => (DSK FOO) ; Devices are specially known
(CRUNIT BAR) => (DSK BAR) ; Unknown names are directories
(CRUNIT ) => (DSK BAR) ; Just get current defaults
(crunit) => (dsk >udd> Foo> JDoe) ; Multics example
Opening Files for Output
This is the Old-I/O way to open a file in append mode.
Definition:
;;; Official definition from .INFO.;LISP NEWIO (DEFUN UAPPEND FEXPR (FILENAME) (SETQ FILENAME (*UGREAT FILENAME)) (*UWRITE FILENAME 'APPEND FILENAME)) ;;; *UWRITE is an auxiliary function not available to the user (DEFUN *UWRITE (NAME MODE NEWDEFAULT) ;Internal Routine (COND (UWRITE (SETQ OUTFILES (DELQ UWRITE OUTFILES )) (CLOSE UWRITE ) (SETQ UWRITE NIL ))) (PUSH (SETQ UWRITE (OPEN NAME MODE)) OUTFILES ) (CAR (DEFAULTF NEWDEFAULT)))
Opens an output file. When done with this file, UFILE must be used to close it and give it a name. The arguments are the last two elements of a 4-list, specifying the device and directory on which the file is to be written. The first two parts of the 4-list are not specified until the file is UFILE 'd.
Definition:
;;; See UAPPEND info for description of *UWRITE (DEFUN UWRITE FEXPR (DEVDIR), (IF (NOT DEVDIR) (SETQ DEVDIR (CAR (DEFAULTF NIL )))) (*UWRITE (CONS DEVDIR (CASEQ (STATUS FILESYSTEM-TYPE ) ((DEC10 ) (CONS (STATUS JNAME ) '(OUT ))) ((DEC20) '(MACLISP OUTPUT)) ((ITS ) '(/.LISP/. OUTPUT)))) 'OUT (NCONS DEVDIR)))
Opening Files for Input
This function selects an input file. The argument list is a 4-list as described above. The specified file is made the default input source. Note that the ^Q switch must be turned on before input will be automatically taken from this file.
Definition:
;;; This definition is buggy. Should be (EOFFN FILE ...) (DEFUN UREAD FEXPR (FILENAME) (UCLOSE ) (LET ((FILE (OPEN (*UGREAT FILENAME) 'IN ))) (EOFFN UREAD #'(LAMBDA (EOFFILE EOFVAL) (UCLOSE ) EOFVAL)) (INPUSH (SETQ UREAD FILE)) (DEFAULTF FILE)))
Closing Files
Closes file, if any, that has been opened by UREAD .
Definition:
(DEFUN UCLOSE FEXPR (NIL ) (COND (UREAD (LET ((OUREAD UREAD )) (IF (EQ OUREAD INFILE ) (INPUSH -1)) (SETQ UREAD NIL ) (CLOSE OUREAD))) (T NIL )))
Closes the UWRITE output file and gives it the name specified by shortnamelist.
Definition:
(DEFUN UFILE FEXPR (SHORTNAME) (COND ((NULL UWRITE ) (ERROR '|NO UWRITE FILE| (CONS 'UFILE SHORTNAME) 'IO-LOSSAGE )) (T (PROG1 (DEFAULTF (RENAMEF UWRITE (*UGREAT SHORTNAME))) (SETQ OUTFILES (DELQ UWRITE OUTFILES )) (SETQ UWRITE NIL ) (OR OUTFILES (SETQ ^R NIL )))))) ;;; *UGREAT is an auxiliary function not available to the user (DEFUN *UGREAT (NAME) ;INTERNAL ROUTINE (MERGEF NAME (COND ((STATUS FEATURE DEC10 ) '(* . LSP)) ((STATUS FEATURE DEC20) '(* MACLISP * )) ((STATUS FEATURE ITS ) '(* . >)))))
External File Manipulation
Like UREAD , deletes the file specified by namelist.
Definition:
(DEFUN UKILL FEXPR (FILENAME) (DEFAULTF (DELETEF FILENAME)))
Old-I/O Status Options
Archaic. Included for compatibility with Old-I/O syntax. Rewrite your code to call (UREAD . namelist) and see documentation on the UREAD function as a first approximation toward modernization. The better thing to do, however, is to read the section on New-I/O and use the concepts presented there rather than concepts like these. Argument positions are not evaluated.
Archaic. Returns the corresponding list for the current UWRITE output destination.
Synonym:
(IF UWRITE (CAR (TRUENAME UWRITE )) NIL )
Archaic. Included for compatibility with Old-I/O syntax. Rewrite your code to call (UWRITE . namelist) and see documentation on the UWRITE function as a first approximation toward modernization. The better thing to do, however, is to read the section on New-I/O and use the concepts presented there rather than concepts like these. Argument positions are not evaluated.
Archaic. Returns a 2-list giving the file names for the current file in the UREAD I/O system.
Synonym:
(CDR (DEFAULTF NIL ))
Archaic. Included for compatibility with Old-I/O syntax. Rewrite your code to call (CRUNIT . crunitspec) and see documentation on the CRUNIT function as a first approximation toward modernization. The better thing to do, however, is to read the section on New-I/O and use the concepts presented there rather than concepts like these. Argument positions are not evaluated.
Synonym:
(CRUNIT . crunitspec)
Obsolete Status Options
We use the term obsolete here to mean that a functionality no longer exists at all. It is distinguished from archaic which is something being phased out. None of the following exist in Maclisp any more:
Obsolete. Superseded by the ENDPAGEFN facility.
The INTERRUPT option to STATUS used to control a number of service functions for interesting conditions that might arise. The conditions were known by their number. Names have now been given to each of the functionalities; you'll have to look under the particular documentation for each to see how the syntax/semantics have changed. The places to look are the ENDPAGEFN function, the TTYINT option to STATUS and SSTATUS , and the values of the variables ALARMCLOCK (interrupt 3), ERRSET (4), UNDF-FNCTN (5), UNBND-VRBL (6), WRNG-TYPE-ARG (7), UNSEEN-GO-TAG (8), WRNG-NO-ARGS (9), GC-LOSSAGE (10), FAIL-ACT (11), IO-LOSSAGE (12), *RSET-TRAP (19), and GC-DAEMON (20). The variables AUTOLOAD , CLI-MESSAGE , GC-OVERFLOW , MAR-BREAK and PDL-OVERFLOW also belong in that set; I'm not sure of their numbers.