DIRECTORY Exec: TYPE USING [AddCommand, commandLine, w], ExecOps: TYPE USING [Command], Feedback: TYPE USING [ BeginItemProc, CreateProc, FinishItemProc, Handle, NoteProgressProc, Procs], Heap: TYPE USING [MakeNode, FreeNode], TemporarySpecialExecOps: TYPE USING [BindUsingFeedback], TTY: TYPE USING [Handle, PutChar]; TestBinderImpl: PROGRAM IMPORTS Exec, Heap, TemporarySpecialExecOps, TTY = { PutLine: PROC [s: LONG STRING] ~ { IF s # NIL THEN FOR i: CARDINAL IN [0..s.length) DO (Exec.w).PutChar[s[i]] ENDLOOP}; Main: PROC ~ { nChars: CARDINAL ~ (Exec.commandLine.s.length - Exec.commandLine.i) + 1; command: ExecOps.Command _ Heap.MakeNode[n~(nChars+1)/2]; PrintHerald: Feedback.CreateProc ~ {PutLine[herald]; (Exec.w).PutChar['\n]; RETURN [NIL]}; PrintItem: Feedback.BeginItemProc ~ {PutLine[item]}; PrintDot: Feedback.NoteProgressProc ~ {(Exec.w).PutChar['.]}; PrintSummary: Feedback.FinishItemProc ~ {PutLine[trailer]; (Exec.w).PutChar['\n]}; fProcs: Feedback.Procs _ [ create~PrintHerald, beginItem~PrintItem, noteProgress~PrintDot, finishItem~PrintSummary]; j: CARDINAL _ 0; FOR i: CARDINAL IN [Exec.commandLine.i..Exec.commandLine.s.length) DO command[j] _ Exec.commandLine.s[i]; j _ j+1; ENDLOOP; command[j] _ '\n; [] _ TemporarySpecialExecOps.BindUsingFeedback[command, @fProcs]; Heap.FreeNode[p~command]}; Init: PROC ~ {Exec.AddCommand["TestBinder.~"L, Main]}; Init[]; }. Xfile TestBinderImpl.Mesa last edited by Satterthwaite, October 27, 1982 12:19 pm ʘJšœ™Jšœ7™7J˜šÏk ˜ Jšœœœ˜.Jšœ œœ ˜šœ œœ˜J˜L—Jšœœœ˜&Jšœœœ˜8Jšœœœ˜"J˜—Jšœœœ&œ˜L˜šÏnœœœœ˜"šœœ˜Jš œœœœœ˜DJ˜——šžœœ˜Jšœœ8˜HJ˜9J˜JšœLœœ˜ZJ˜4J˜=J˜RJ˜˜J˜Y—Jšœœ˜šœœœ1˜EJ˜-Jšœ˜—J˜J˜AJ˜J˜—Jšžœœ,˜6J˜J˜J˜J˜——…—vO