(DEFINE-FILE-INFO READTABLE "XCL" PACKAGE "INTERLISP") (FILECREATED "10-Sep-87 12:12:37" {DSK}<OST>STREAMDECLS.\;1 10202 |changes| |to:| (VARS STREAMDECLSCOMS) (RECORDS STREAM)) (PRETTYCOMPRINT STREAMDECLSCOMS) (RPAQQ STREAMDECLSCOMS ((RECORDS STREAM))) (DECLARE\: EVAL@COMPILE (DATATYPE STREAM ( (* |;;| "First 8 words are fixed for BIN, BOUT opcodes. Used to require length of whole datatype be multiple of 4, but Dolphin dead now.") (COFFSET WORD) (* \; "Offset in CPPTR of next bin or bout") (CBUFSIZE WORD) (* \; "Offset past last byte in that buffer") (BINABLE FLAG) (* \; "BIN punts unless this bit on") (BOUTABLE FLAG) (* \; "BOUT punts unless this bit on") (EXTENDABLE FLAG) (* \; "BOUT punts when COFFSET ge CBUFFSIZE unless this bit set and COFFSET lt 512") (CBUFDIRTY FLAG) (* \; "true if BOUT has sullied the current buffer") (PEEKEDCHARP FLAG) (* \; "if true, PEEKEDCHAR contains value of recent call to unread-char") (ACCESSBITS BITS 3) (* \; "What kind of access file is open for (read, write, append)") (CBUFPTR POINTER) (* \; "Pointer to current buffer") (BYTESIZE BYTE) (* \; "Byte size of stream, always 8 for now") (CHARSET BYTE) (* \; "the current character set for this stream. If 255, stream is not runcoded, so read-char consumes two bytes every time") (PEEKEDCHAR WORD) (* \; "value of unread-char call") (CHARPOSITION WORD) (* \; "Used by POSITION etc.") (CBUFMAXSIZE WORD) (* \; "on output, the size of the physical buffer--can't extend beyond this") (* |;;| "-------- Above fields (8 words) potentially known to microcode. --------") (NONDEFAULTDATEFLG FLAG) (REVALIDATEFLG FLAG) (MULTIBUFFERHINT FLAG) (* \; "True if stream likes to read and write more than one buffer at a time") (USERCLOSEABLE FLAG) (* \; "Can be closed by CLOSEF; NIL for terminal, dribble...") (USERVISIBLE FLAG) (* \; "Listed by OPENP; NIL for terminal, dribble ...") (EOLCONVENTION BITS 2) (* \; "End-of-line convention") (NIL FLAG) (FULLFILENAME POINTER) (* \; "Name by which file is known to user") (DEVICE POINTER) (* \; "FDEV of this guy") (VALIDATION POINTER) (* \; "A number somehow identifying file, used to determine if file has changed in our absence") (CPAGE POINTER) (* \; "CPAGE,,COFFSET constitutes current file pointer for most randaccess streams") (EPAGE POINTER) (EOFFSET WORD) (* \; "Page, byte offset of eof") (LINELENGTH WORD) (* \; "LINELENGTH of stream, or -1 for no line length") (* |;;| "----Following are device-specific fields----") (F1 POINTER) (F2 POINTER) (F3 POINTER) (F4 POINTER) (F5 POINTER) (FW6 WORD) (FW7 WORD) (FW8 WORD) (FW9 WORD) (F10 POINTER) (* |;;| "----Following only filled in for open streams----") (STRMBINFN POINTER) (* \; "Either the BIN fn from the FDEV, or a trap") (STRMBOUTFN POINTER) (* \; "Either the BIN fn from the FDEV, or a trap") (OUTCHARFN POINTER) (ENDOFSTREAMOP POINTER) (OTHERPROPS POINTER) (IMAGEOPS POINTER) (* \; "Image operations vector") (IMAGEDATA POINTER) (* \; "Image instance variables--format depends on IMAGEOPS value") (BUFFS POINTER) (* \; "Buffer chain for pmapped streams") (MAXBUFFERS WORD) (NIL WORD) (EXTRASTREAMOP POINTER) (* \; "For use of applications programs, not devices") ) (BLOCKRECORD STREAM ((NIL 2 WORD) (UCODEFLAGS BITS 5) (* |;;| "respecification of access bits:") (RANDOMWRITEABLE FLAG) (* \; "File open for output (access = OUTPUT or BOTH)") (APPENDABLE FLAG) (* \; "File open for append (OUTPUT or APPEND or BOTH)") (READABLE FLAG) (* \; "File open for read (READ or BOTH)") (NIL POINTER))) (ACCESSFNS STREAM ((ACCESS \\GETACCESS \\SETACCESS) (FULLNAME (OR (|fetch| (STREAM FULLFILENAME) |of| DATUM) DATUM)) (NAMEDP (AND (|fetch| (STREAM FULLFILENAME) |of| DATUM) T)))) (SYNONYM CBUFPTR (CPPTR)) USERCLOSEABLE ← T USERVISIBLE ← T ACCESSBITS ← |NoBits| CPAGE ← 0 EPAGE ← 0 BUFFS ← NIL BYTESIZE ← 8 CBUFPTR ← NIL MAXBUFFERS ← (LET NIL (DECLARE (GLOBALVARS \\STREAM.DEFAULT.MAXBUFFERS )) \\STREAM.DEFAULT.MAXBUFFERS) CHARPOSITION ← 0 LINELENGTH ← (LET NIL (DECLARE (GLOBALVARS FILELINELENGTH)) FILELINELENGTH) OUTCHARFN ← (FUNCTION \\FILEOUTCHARFN) ENDOFSTREAMOP ← (FUNCTION \\EOSERROR) IMAGEOPS ← \\NOIMAGEOPS EOLCONVENTION ← (SELECTQ (SYSTEMTYPE) (D CR.EOLC) (VAX LF.EOLC) (JERICHO CRLF.EOLC) CR.EOLC) STRMBINFN ← (FUNCTION \\STREAM.NOT.OPEN) STRMBOUTFN ← (FUNCTION \\STREAM.NOT.OPEN)) ) (/DECLAREDATATYPE 'STREAM '(WORD WORD FLAG FLAG FLAG FLAG FLAG (BITS 3) POINTER BYTE BYTE WORD WORD WORD FLAG FLAG FLAG FLAG FLAG (BITS 2) FLAG POINTER POINTER POINTER POINTER POINTER WORD WORD POINTER POINTER POINTER POINTER POINTER WORD WORD WORD WORD POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER POINTER WORD WORD POINTER) '((STREAM 0 (BITS . 15)) (STREAM 1 (BITS . 15)) (STREAM 2 (FLAGBITS . 0)) (STREAM 2 (FLAGBITS . 16)) (STREAM 2 (FLAGBITS . 32)) (STREAM 2 (FLAGBITS . 48)) (STREAM 2 (FLAGBITS . 64)) (STREAM 2 (BITS . 82)) (STREAM 2 POINTER) (STREAM 4 (BITS . 7)) (STREAM 4 (BITS . 135)) (STREAM 5 (BITS . 15)) (STREAM 6 (BITS . 15)) (STREAM 7 (BITS . 15)) (STREAM 8 (FLAGBITS . 0)) (STREAM 8 (FLAGBITS . 16)) (STREAM 8 (FLAGBITS . 32)) (STREAM 8 (FLAGBITS . 48)) (STREAM 8 (FLAGBITS . 64)) (STREAM 8 (BITS . 81)) (STREAM 8 (FLAGBITS . 112)) (STREAM 8 POINTER) (STREAM 10 POINTER) (STREAM 12 POINTER) (STREAM 14 POINTER) (STREAM 16 POINTER) (STREAM 18 (BITS . 15)) (STREAM 19 (BITS . 15)) (STREAM 20 POINTER) (STREAM 22 POINTER) (STREAM 24 POINTER) (STREAM 26 POINTER) (STREAM 28 POINTER) (STREAM 30 (BITS . 15)) (STREAM 31 (BITS . 15)) (STREAM 32 (BITS . 15)) (STREAM 33 (BITS . 15)) (STREAM 34 POINTER) (STREAM 36 POINTER) (STREAM 38 POINTER) (STREAM 40 POINTER) (STREAM 42 POINTER) (STREAM 44 POINTER) (STREAM 46 POINTER) (STREAM 48 POINTER) (STREAM 50 POINTER) (STREAM 52 (BITS . 15)) (STREAM 53 (BITS . 15)) (STREAM 54 POINTER)) '56) (DECLARE\: DONTCOPY (FILEMAP (NIL))) STOP