DIRECTORY AMBridge, AMTypes, PrincOps, PrincOpsUtils, RoseRun, RoseTypes; RoseStops: CEDAR PROGRAM IMPORTS AMBridge, AMTypes, PrincOpsUtils, RoseTypes EXPORTS RoseRun = BEGIN Proc: TYPE = UNSAFE PROCEDURE ANY RETURNS ANY; TV: TYPE = AMTypes.TV; ROPE: TYPE = RoseTypes.ROPE; DisabledList: TYPE = LIST OF Location; Location: TYPE = RECORD [proc: Proc, pc: PrincOps.BytePC]; disableds: DisabledList _ NIL; fudge: BOOL _ FALSE; DisableableStop: PUBLIC PROC [proc: Proc, msg: ROPE, data: REF ANY _ NIL] = { start, local, procTV: TV; disProc: Proc _ NIL; disPC: PrincOps.BytePC; TRUSTED {start _ AMBridge.TVForFrame[PrincOpsUtils.MyLocalFrame[]]}; IF fudge THEN TRUSTED {proc _ AMBridge.TVToProc[AMBridge.TVForProc[proc]]}; FOR local _ start, AMTypes.DynamicParent[local] DO IF local = NIL THEN ERROR; procTV _ NIL; procTV _ AMTypes.Procedure[local !AMTypes.Error => CONTINUE]; IF procTV # NIL THEN { procProc: Proc; TRUSTED {procProc _ AMBridge.TVToProc[procTV]}; IF procProc = proc THEN EXIT; }; ENDLOOP; local _ AMTypes.DynamicParent[local]; procTV _ AMTypes.Procedure[local]; TRUSTED { disProc _ AMBridge.TVToProc[procTV]; disPC _ AMBridge.ContextPC[local]}; FOR dl: DisabledList _ disableds, dl.rest WHILE dl # NIL DO IF dl.first = [disProc, disPC] THEN RETURN; ENDLOOP; SIGNAL RoseTypes.Stop[msg: msg, data: data]; }; DisableThisStop: PUBLIC PROC [fh: PrincOps.FrameHandle] RETURNS [ok: BOOL] = BEGIN start, local, procTV: TV; subGoal, disProc: Proc _ NIL; disPC: PrincOps.BytePC; TRUSTED {start _ AMBridge.TVForFrame[fh]}; FOR local _ start, AMTypes.DynamicParent[local] DO procProc: Proc; procTV _ NIL; IF local = NIL THEN RETURN [FALSE]; procTV _ AMTypes.Procedure[local !AMTypes.Error => CONTINUE]; IF procTV # NIL THEN { TRUSTED {procProc _ AMBridge.TVToProc[procTV]}; IF procProc = subGoal THEN EXIT; IF procProc = DisableableStop THEN { IF subGoal # NIL THEN ERROR; procTV _ AMTypes.Argument[local, 1]; TRUSTED {subGoal _ AMBridge.TVToProc[procTV]}; }; }; ENDLOOP; local _ AMTypes.DynamicParent[local]; procTV _ AMTypes.Procedure[local]; TRUSTED { disProc _ AMBridge.TVToProc[procTV]; disPC _ AMBridge.ContextPC[local]}; disableds _ CONS[[disProc, disPC], disableds]; ok _ TRUE; END; END. XRosemary>RoseStops.Mesa Last Edited by: Spreitzer, March 29, 1984 6:41:18 pm PST Κƒ– "cedar" style˜Icode™J™8K˜KšΟk œ@˜IK˜šΠbx œœ˜Kšœ,˜3Kšœ ˜—K˜Kš˜K˜KšΟnœœœ œœœœ˜.K˜Kšœœ œ˜Kšœœ œ˜K˜Kšœœœœ ˜&K˜Kšœ œœ#˜:K˜Kšœœ˜K˜Kšœœœ˜K˜šŸœœœœœœœ˜MKšœœ˜Kšœœ˜Kšœ˜Kšœ=˜Dšœ˜Kšœœ6˜B—šœ-˜2Kšœ œœœ˜Kšœ œ˜ Kšœ3œ˜=šœ œœ˜K˜Kšœ(˜/Kšœœœ˜K˜—Kšœ˜—Kšœ%˜%Kšœ"˜"šœ˜ Kšœ$˜$Kšœ#˜#—šœ'œœ˜;Kšœœœ˜+Kšœ˜—Kšœ&˜,Kšœ˜—K˜š Ÿœœœœœ˜LKš˜Kšœœ˜Kšœœ˜Kšœ˜Kšœ#˜*šœ-˜2K˜Kšœ œ˜ Kš œ œœœœ˜#Kšœ3œ˜=šœ œœ˜Kšœ(˜/Kšœœœ˜ šœœ˜$Kšœ œœœ˜Kšœ$˜$Kšœ'˜.K˜—K˜—Kšœ˜—Kšœ%˜%Kšœ"˜"šœ˜ Kšœ$˜$Kšœ#˜#—Kšœ œ˜.Kšœœ˜ Kšœ˜—K˜Kšœ˜—…—’ }