Artifact 840f5c074c338dbc8dc538f0a9d5d6783ef5d443ff0e8b159b2269cc21aa61b1:
- File
psl-1983/3-1/kernel/rds-wrs.red
— part of check-in
[eb17ceb7f6]
at
2020-04-21 19:40:01
on branch master
— Add Reduce 3.0 to the historical section of the archive, and some more
files relating to version sof PSL from the early 1980s. Thanks are due to
Paul McJones and Nelson Beebe for these, as well as to all the original
authors.git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/historical@5328 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1619) [annotate] [blame] [check-ins using] [more...]
- File
psl-1983/kernel/rds-wrs.red
— part of check-in
[eb17ceb7f6]
at
2020-04-21 19:40:01
on branch master
— Add Reduce 3.0 to the historical section of the archive, and some more
files relating to version sof PSL from the early 1980s. Thanks are due to
Paul McJones and Nelson Beebe for these, as well as to all the original
authors.git-svn-id: https://svn.code.sf.net/p/reduce-algebra/code/historical@5328 2bfe0521-f11c-4a00-b80e-6202646ff360 (user: arthurcnorman@users.sourceforge.net, size: 1619) [annotate] [blame] [check-ins using]
% % RDS-WRS.RED - Switch the current input or output channel % % Author: Eric Benson % Symbolic Computation Group % Computer Science Dept. % University of Utah % Date: 28 August 1981 % Copyright (c) 1981 University of Utah % global '(SpecialRDSAction!* % possibly apply to old and new channel SpecialWRSAction!* % ditto IN!* % Current input channel OUT!*); % Current output channel fluid '(StdIN!* % Standard input - may be rebound StdOUT!*); % Standard output - may be rebound on SysLisp; syslsp procedure RDS Channel; %. Switch input channels, return old begin scalar OldIN, ReadFn; if LispVar SpecialRDSAction!* then Apply(LispVar SpecialRDSAction!*, list(LispVar IN!*, Channel)); OldIN := LispVar IN!*; if null Channel then Channel := LispVar StdIN!*; ReadFn := ReadFunction[IntInf Channel]; if ReadFn eq 'ChannelNotOpen or ReadFn eq 'WriteOnlyChannel then return ChannelError(Channel, "Channel not open for input in RDS"); LispVar IN!* := Channel; return OldIN; end; syslsp procedure WRS Channel; %. Switch output channels, return old begin scalar OldOUT, WriteFn; if LispVar SpecialWRSAction!* then Apply(LispVar SpecialWRSAction!*, list(LispVar OUT!*, Channel)); OldOUT := LispVar OUT!*; if null Channel then Channel := LispVar StdOUT!*; WriteFn := WriteFunction[IntInf Channel]; if WriteFn eq 'ChannelNotOpen or WriteFn eq 'ReadOnlyChannel then return ChannelError(Channel, "Channel not open for output in WRS"); LispVar OUT!* := Channel; return OldOUT; end; off SysLisp; END;