io-data.red 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. %
  2. % IO-DATA.RED - Data structures used by input and output
  3. %
  4. % Author: Eric Benson
  5. % Computer Science Dept.
  6. % University of Utah
  7. % Date: 21 September 1981
  8. % Copyright (c) 1981 Eric Benson
  9. %
  10. on SysLisp;
  11. WConst ChannelClosed = 0,
  12. ChannelOpenRead = 1,
  13. ChannelOpenWrite = 2,
  14. ChannelOpenSpecial = 3;
  15. internal WConst MaxTokenSize = 5000;
  16. exported WString TokenBuffer[MaxTokenSize];
  17. exported WConst MaxChannels = 31;
  18. exported WArray ReadFunction = ['TerminalInputHandler,
  19. 'WriteOnlyChannel,
  20. 'WriteOnlyChannel,
  21. 'CompressReadChar,
  22. 'WriteOnlyChannel,
  23. 'WriteOnlyChannel,
  24. 'WriteOnlyChannel,
  25. 'ChannelNotOpen,
  26. 'ChannelNotOpen,
  27. 'ChannelNotOpen,
  28. 'ChannelNotOpen,
  29. 'ChannelNotOpen,
  30. 'ChannelNotOpen,
  31. 'ChannelNotOpen,
  32. 'ChannelNotOpen,
  33. 'ChannelNotOpen,
  34. 'ChannelNotOpen,
  35. 'ChannelNotOpen,
  36. 'ChannelNotOpen,
  37. 'ChannelNotOpen,
  38. 'ChannelNotOpen,
  39. 'ChannelNotOpen,
  40. 'ChannelNotOpen,
  41. 'ChannelNotOpen,
  42. 'ChannelNotOpen,
  43. 'ChannelNotOpen,
  44. 'ChannelNotOpen,
  45. 'ChannelNotOpen,
  46. 'ChannelNotOpen,
  47. 'ChannelNotOpen,
  48. 'ChannelNotOpen,
  49. 'ChannelNotOpen],
  50. WriteFunction = ['ReadOnlyChannel,
  51. 'IndependentWriteChar,
  52. 'ToStringWriteChar,
  53. 'ExplodeWriteChar,
  54. 'FlatSizeWriteChar,
  55. 'IndependentWriteChar,
  56. 'IndependentWriteChar,
  57. 'ChannelNotOpen,
  58. 'ChannelNotOpen,
  59. 'ChannelNotOpen,
  60. 'ChannelNotOpen,
  61. 'ChannelNotOpen,
  62. 'ChannelNotOpen,
  63. 'ChannelNotOpen,
  64. 'ChannelNotOpen,
  65. 'ChannelNotOpen,
  66. 'ChannelNotOpen,
  67. 'ChannelNotOpen,
  68. 'ChannelNotOpen,
  69. 'ChannelNotOpen,
  70. 'ChannelNotOpen,
  71. 'ChannelNotOpen,
  72. 'ChannelNotOpen,
  73. 'ChannelNotOpen,
  74. 'ChannelNotOpen,
  75. 'ChannelNotOpen,
  76. 'ChannelNotOpen,
  77. 'ChannelNotOpen,
  78. 'ChannelNotOpen,
  79. 'ChannelNotOpen,
  80. 'ChannelNotOpen,
  81. 'ChannelNotOpen],
  82. CloseFunction = ['IllegalStandardChannelClose,
  83. 'IllegalStandardChannelClose,
  84. 'IllegalStandardChannelClose,
  85. 'IllegalStandardChannelClose,
  86. 'IllegalStandardChannelClose,
  87. 'ChannelNotOpen,
  88. 'ChannelNotOpen,
  89. 'ChannelNotOpen,
  90. 'ChannelNotOpen,
  91. 'ChannelNotOpen,
  92. 'ChannelNotOpen,
  93. 'ChannelNotOpen,
  94. 'ChannelNotOpen,
  95. 'ChannelNotOpen,
  96. 'ChannelNotOpen,
  97. 'ChannelNotOpen,
  98. 'ChannelNotOpen,
  99. 'ChannelNotOpen,
  100. 'ChannelNotOpen,
  101. 'ChannelNotOpen,
  102. 'ChannelNotOpen,
  103. 'ChannelNotOpen,
  104. 'ChannelNotOpen,
  105. 'ChannelNotOpen,
  106. 'ChannelNotOpen,
  107. 'ChannelNotOpen,
  108. 'ChannelNotOpen,
  109. 'ChannelNotOpen,
  110. 'ChannelNotOpen,
  111. 'ChannelNotOpen,
  112. 'ChannelNotOpen,
  113. 'ChannelNotOpen],
  114. UnReadBuffer[MaxChannels],
  115. LinePosition[MaxChannels],
  116. MaxLine = [0, 80,80, 10000, 10000,
  117. 80, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  118. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  119. ChannelStatus = [ChannelOpenRead,
  120. ChannelOpenWrite,
  121. ChannelOpenSpecial,
  122. ChannelOpenSpecial,
  123. ChannelOpenSpecial,
  124. ChannelClosed,
  125. ChannelClosed,
  126. ChannelClosed,
  127. ChannelClosed,
  128. ChannelClosed,
  129. ChannelClosed,
  130. ChannelClosed,
  131. ChannelClosed,
  132. ChannelClosed,
  133. ChannelClosed,
  134. ChannelClosed,
  135. ChannelClosed,
  136. ChannelClosed,
  137. ChannelClosed,
  138. ChannelClosed,
  139. ChannelClosed,
  140. ChannelClosed,
  141. ChannelClosed,
  142. ChannelClosed,
  143. ChannelClosed,
  144. ChannelClosed,
  145. ChannelClosed,
  146. ChannelClosed,
  147. ChannelClosed,
  148. ChannelClosed,
  149. ChannelClosed,
  150. ChannelClosed],
  151. MaxBuffer [MaxChannels],
  152. ChannelTable [MaxChannels],
  153. NextPosition [MaxChannels],
  154. BufferLength [MaxChannels];
  155. off SysLisp;
  156. global '(!$EOL!$);
  157. LoadTime(!$EOL!$ := '!
  158. );
  159. END;