
<<WindowProcImpl.mesa>>
<<Copyright (c) Xerox Corporation, 1981, 1982.  All rights reserved.>>
<<Last Modified On  20-Nov-81 15:40:56 jHM>>
<<Schmidt August 22, 1982 1:51 pm>>
<<last edited by Satterthwaite, April 18, 1986 4:54:38 pm PST>>

<<used to be WindowProcProg.Mesa>>

DIRECTORY
IO: TYPE USING [Close, STREAM],
Process: TYPE USING [Detach],
Rope: TYPE USING [ROPE],
ViewerIO: TYPE USING [CreateViewerStreams],
WindowProcInt: TYPE USING [];

WindowProcImpl: CEDAR PROGRAM 
IMPORTS Process, IO, ViewerIO 
EXPORTS WindowProcInt = BEGIN
<<>>
i, o: IO.STREAM;

F: PROC[proc: PROC[in, out, error: IO.STREAM]] = {
proc[i,o, o];
i.Close[];
o.Close[]};

StartWindowProc: PUBLIC PROC[wname: Rope.ROPE, 
proc: PROC[in, out, error: IO.STREAM]] = {
[i,o]  _ ViewerIO.CreateViewerStreams[wname];
TRUSTED {Process.Detach[FORK F[proc]];}
};

END.

