DIRECTORY Booting USING [ RegisterProcs, CheckpointProc ], Intervoice USING [ Handle, Open, Play ], Process USING [ Detach, MsecToTicks, Pause ], Rope USING [ ROPE ], UserProfile USING [ Token ], VoiceUtils USING [ MakeAtom ] ; PlayNoiseImpl: CEDAR PROGRAM IMPORTS Booting, Intervoice, Process, UserProfile, VoiceUtils = { reallyBoot: BOOL_TRUE; didOurBest: BOOL; maxTime: CARDINAL _ 4000; PlayTheRollbackButton: Booting.CheckpointProc = TRUSTED { IF VoiceUtils.MakeAtom[UserProfile.Token["Finch.NoisyBoot", "false"]] # $true THEN RETURN; PlayAButton["Rollback"]; IF ~reallyBoot THEN rejection _ "Just pretending"; }; PlayAButton: PROC[name: Rope.ROPE] = TRUSTED { didOurBest _ FALSE; Process.Detach[FORK ReallyPlayAButton[name]]; FOR i: NAT IN [0..100) DO Process.Pause[Process.MsecToTicks[maxTime/100]]; IF didOurBest THEN EXIT; ENDLOOP; }; ReallyPlayAButton: PROC[name: Rope.ROPE] = { C: PROC[complaint: Rope.ROPE] = {NULL}; -- Don't bother complaining. handle: Intervoice.Handle = Intervoice.Open[Complain: C]; Intervoice.Play[handle: handle, refID: name, refIDType: "SysNoises", wait: TRUE]; didOurBest _ TRUE; }; Booting.RegisterProcs[c: PlayTheRollbackButton, r: NIL, b: PlayTheRollbackButton]; }. RPlayNoiseImpl.mesa Last Edited by: Swinehart, June 21, 1986 7:29:12 pm PDT ʯ˜J™J™7J™šÏk ˜ J˜0Jšœ œ˜(Jšœœ ˜-Jšœœœ˜Jšœ œ ˜Jšœ œ ˜J˜J˜—šœœœ˜Jšœ:˜AJ˜Jšœ œœ˜Jšœ œ˜Jšœ œ˜J˜šÏbœœ˜9šœK˜MJšœœ˜ —J˜Jšœ œ˜2J˜J˜—šÐbn œœ œœ˜.Jšœ œ˜Jšœœ˜-šœœœ ˜J˜0Jšœ œœ˜Jšœ˜—J˜J˜—šÏnœœ œ˜,Jš  œœœœÏc˜DJ˜9JšœKœ˜QJšœ œ˜J˜J˜—Jšœ3œ˜RJ˜—J˜—…—¾¿