get "BRAVO1.DF"; get "CHAR.DF"; get "SELECT.DF"; get "rn1.df" get "com.DF"; get "display.DF"; get "doc.df" // Incoming Procedures external [ gets; resetts; getchar; SetRegionSys; confirm; updatedisplay; tsflush; stnum; SetRegionW; deleted; inserta; augmentomseq; inserttx; deactivateomseq; getint; setsel; InsertBuf; ClearBuf; underline; updateunderline; innum; invalidatesel; errhlta; ult; bravochar; ]; // Incoming Statics external [ tsread; tsmacro; tscorrect; tsstop; tsquick; rgmaccp; vcp; fnts; ccommand; vrlwsys; tsbreak; selaux; mpWwWwd; ] // Outgoing Procedures external [ GetCharReplay; SetSelReplay; ComReplay; ]; let GetCharReplay() = valof [ let tchar = nil; tchar = gets(fnts); if tchar eq chat then [ tchar = gets(fnts); if tchar eq $E then [ tsread = false; tsmacro = false; resetts(); resultis bravochar(); ] ] if (tchar eq chesc) & tscorrect & not tsmacro then [ tsread = false; resultis bravochar(); ] resultis tchar; ] and ComReplay() be [ let tchar = nil; let sbcomnum = vec 8; test tsstop ifso [ tsstop = false; tchar = chsp; ] ifnot tchar = getchar(); sbcomnum ! 0 = 0; SetRegionSys(risyscom,85) //REPLAY: [ if (tchar ge $A) & (tchar le $Z) then tchar = tchar+#40; switchon tchar into [ case $q: tsquick = true; SetRegionSys(risysstate,86); endcase; case $s: tsquick = false; SetRegionSys(risysstate,87); endcase; case $t: tsread = false; tscorrect = true; test confirm("TERMINATE REPLAY") ifso [ SetRegionSys(risyscom,nriready) SetRegionSys(risysstate,nrisel) SetRegionSys(risyspast,rinil) updatedisplay() tsflush(); tscorrect = false; return; ] ifnot [ tsread = true; tscorrect = false; endcase; ] case chsp: test tsstop ifso return ifnot [ tsstop = true; stnum(sbcomnum,ccommand); SetRegionW(vrlwsys,0,sbcomnum); let trid = 0 trid<> SEL.doc = doctx1; selaux >> SEL.ww = 0; selaux >> SEL.type = schar; setsel(selaux,0,rgmaccp ! doctx1-1); InsertBuf(1,selaux>>SEL.doc, selaux>>SEL.cpfirst,selaux>>SEL.cplast-selaux>>SEL.cpfirst+1) ] ifso ClearBuf(1); default: SetRegionSys(risysstate,91); tsstop = true; endcase; ] updatedisplay() // unless vfhpsp do // [ blinkscreen(); // Core storage running low-Suggest termination of replay // SetRegionSys(risysstate,49,92); // vfhpsp = true; // ] // updatedisplay(); unless tsstop do return; tchar = getchar(); ] repeat ] and SetSelReplay(sel1) be [ underline(uloff,sel1); let tchar = gets(fnts); if tchar eq $' then [ sel1 >> SEL.type = snone; return; ] if tchar eq $** then return; test tchar eq chat ifso [ tchar = gets(fnts); unless tchar eq $E do errhlta(104); resetts(); tsread = false; tscorrect = false; underline(sel1 >> SEL.ulmode,sel1); updateunderline( ); ] ifnot [ unless tchar eq ${ do errhlta(106); sel1 >> SEL.type = innum(fnts,8); sel1 >> SEL.ww = innum(fnts,8); sel1 >> SEL.cpfirst = innum(fnts,8); sel1 >> SEL.cplast = innum(fnts,8); invalidatesel(sel1); sel1 >> SEL.doc = (mpWwWwd ! (sel1 >> SEL.ww))>>WWD.doc; let maccp = rgmaccp ! (sel1 >> SEL.doc); unless ult(sel1 >> SEL.cpfirst,maccp) & ult(sel1 >> SEL.cplast,maccp) do errhlta(105); // if carg eq 4 then // unless FProc(sel1, fmCaller) do // errhlta(107) underline(sel1 >> SEL.ulmode,sel1); updateunderline( ); ] ]