1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2% 3% File: PXNK:IO-DATA.SL 4% Description: Data structures used by input and output 5% Author: Eric Benson 6% Created: 4-May-84 7% Modified: 26-Jun-84 15:17:39 8% Package: 9% 10% (c) Copyright 1987, University of Utah, all rights reserved. 11% 12%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 13% 14% Revisions: 15% 16% 27-May-87 (Leigh Stoller & Harold Carr) 17% Added global declaration of $eol$ to avoid error messages when compiling. 18% 11-Aug-84 (Brian Beach) 19% Changed linelength of channel 2 (bldmsg channel) to 0 (infinity). This 20% Prevents the insertion of extraneous linefeeds in built messages. 21% 4-May-84 11:20:48 (Brian Beach) 22% Translated from RLISP to LISP. 23% Edit by Russ Fish, Mon Feb 27 21:02:56 1984 24% Converted to system-independent I/O package, constants to io-const.red . 25% MLGriss, 9 July 1983 26% Added TerminalWriteChar as "standard" function 27% Renamed TerminalOutputHandler to TerminalWriteChar 28% Added PAGEPOSITION warray 29% 30%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 31 32(compiletime (load io-decls sys-macros)) 33(compiletime (remprop 'cons 'opencode)) 34(compiletime (remprop 'xcons 'opencode)) 35(compiletime (remprop 'ncons 'opencode)) 36 37(global '($eol$)) 38 39(declare-wstring tokenbuffer size maxtokensize) 40 41% All of these Channel WArrays have MaxChannels+1 (32) entries. 42 43(declare-warray readfunction initially 44 ('terminalinputhandler % 0: StdIn!* 45 'writeonlychannel % 1: StdOut!*, StdErr!*, PromptOut!* 46 'writeonlychannel % 2: BldMsg() 47 'compressreadchar % 3: Compress() 48 'writeonlychannel % 4: FlatSize() 49 'writeonlychannel % 5: Unix!-StdErr!* 50 'terminalinputhandler % 6: Unix!-TTY!* 51 'channelnotopen 'channelnotopen 'channelnotopen 52 'channelnotopen 'channelnotopen 'channelnotopen 53 'channelnotopen 'channelnotopen 'channelnotopen 54 'channelnotopen 'channelnotopen 'channelnotopen 55 'channelnotopen 'channelnotopen 'channelnotopen 56 'channelnotopen 'channelnotopen 'channelnotopen 57 'channelnotopen 'channelnotopen 'channelnotopen 58 'channelnotopen 'channelnotopen 'channelnotopen 59 'channelnotopen)) 60 61(declare-warray writefunction initially 62 ('readonlychannel % 0: StdIn!* 63 'independentwritechar % 1: StdOut!*, StdErr!*, PromptOut!* 64 'tostringwritechar % 2: BldMsg() 65 'explodewritechar % 3: Explode() 66 'flatsizewritechar % 4: FlatSize() 67 'independentwritechar % 5: Unix!-StdErr!* 68 'readonlychannel % 6: Unix!-TTY!* 69 'channelnotopen 'channelnotopen 'channelnotopen 70 'channelnotopen 'channelnotopen 'channelnotopen 71 'channelnotopen 'channelnotopen 'channelnotopen 72 'channelnotopen 'channelnotopen 'channelnotopen 73 'channelnotopen 'channelnotopen 'channelnotopen 74 'channelnotopen 'channelnotopen 'channelnotopen 75 'channelnotopen 'channelnotopen 'channelnotopen 76 'channelnotopen 'channelnotopen 'channelnotopen 77 'channelnotopen)) 78 79(declare-warray closefunction initially 80 ('illegalstandardchannelclose % 0: StdIn!* 81 'illegalstandardchannelclose % 1: StdOut!*, StdErr!*, PromptOut!* 82 'illegalstandardchannelclose % 2: BldMsg() 83 'illegalstandardchannelclose % 3: Compress()/Expand() 84 'illegalstandardchannelclose % 4: FlatSize() 85 'illegalstandardchannelclose % 5: Unix!-StdErr!* 86 'illegalstandardchannelclose % 6: Unix!-TTY!* 87 'channelnotopen 'channelnotopen 'channelnotopen 88 'channelnotopen 'channelnotopen 'channelnotopen 89 'channelnotopen 'channelnotopen 'channelnotopen 90 'channelnotopen 'channelnotopen 'channelnotopen 91 'channelnotopen 'channelnotopen 'channelnotopen 92 'channelnotopen 'channelnotopen 'channelnotopen 93 'channelnotopen 'channelnotopen 'channelnotopen 94 'channelnotopen 'channelnotopen 'channelnotopen 95 'channelnotopen)) 96 97(declare-warray unreadbuffer size maxchannels) 98(declare-warray lineposition size maxchannels) 99(declare-warray pageposition size maxchannels) 100(declare-warray maxline initially 101 (0 80 0 0 0 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 102 0 0 0 0 0 0)) 103 % 0: StdIn!* 104 % 1: StdOut!*, StdErr!*, PromptOut!* 105 % 2: BldMsg() 106 % 3: Compress()/Explode() 107 % 4: FlatSize() 108 % 5: Unix!-StdErr!* 109 % 6: Unix!-TTY!* 110 111(declare-warray channelstatus initially 112 (channelopenread % 0: StdIn!* 113 channelopenwrite % 1: StdOut!*, StdErr!*, PromptOut!* 114 channelopenspecial % 2: BldMsg() 115 channelopenspecial % 3: Compress()/Explode() 116 channelopenspecial % 4: FlatSize() 117 channelopenwrite % 5: Unix!-StdErr!* 118 channelopenread % 6: Unix!-TTY!* 119 channelclosed channelclosed channelclosed channelclosed 120 channelclosed channelclosed channelclosed channelclosed 121 channelclosed channelclosed channelclosed channelclosed 122 channelclosed channelclosed channelclosed channelclosed 123 channelclosed channelclosed channelclosed channelclosed 124 channelclosed channelclosed channelclosed channelclosed 125 channelclosed)) 126 127(declare-warray maxbuffer size maxchannels) 128(declare-warray channeltable size maxchannels) 129(declare-warray nextposition size maxchannels) 130(declare-warray bufferlength size maxchannels) 131 132(loadtime 133 (setq $eol$ '! 134)) 135 136%% End of File. 137