%from IMP %include MCODE, FORMATS, Depio, HANDCALL %externalstring(255)%fnspec Xtos %alias "3L_IMP_X_TO_S"(%integer n,p) %own %integer TTY List = 0 ! ! >> Flush TTY List << ! %external %routine Flush TTY %alias "3L___flush_tty" %integer This = TTY List, A %record(SCB Fm) %name S %while This # 0 %cycle S == Record(This) S_Next = S_Pseudo Next Call 1(S_Complete Handler, Addr(S)) This = S_User3 %repeat %end ! ! >> Add TTY To List << ! %external %routine Add TTY %alias "3L___add_tty"(%record(SCB Fm) %name S) S_User3 = TTY List TTY List = Addr(S) %end ! ! >> Delete TTY From List << ! %external %routine Delete TTY %alias "3L___delete_tty"(%record(SCB Fm) %name S) %record(SCB Fm) %name This %integer %name Prev == TTY List %while Prev # 0 %cycle This == Record(Prev) %if This == S %start {found it, unlink from TTY chain} Prev = This_User3 %exit %else {this is not it, go down the list} Prev == This_User3 %finish %repeat %end