DIRECTORY IO USING [PutF, PutSignal], MessageWindow USING [Append, Blink], Rope USING [Cat, Concat, Find, ROPE], UserExec USING [DoIt, ExecHandle, HistoryEvent, CreateUserExecutive, StartListening], UserExecExtras USING [CreateEvent], UserExecPrivate USING [CaptionForExec, ExecPrivateRecord, w], UserProfile USING [Token, GetErrorLog] ; StartUserExec: CEDAR PROGRAM IMPORTS IO, MessageWindow, Rope, UserExecPrivate, UserExec, UserExecExtras, UserProfile EXPORTS UserExec SHARES UserProfile = BEGIN ExecPrivateRecord: PUBLIC TYPE = UserExecPrivate.ExecPrivateRecord; exec: UserExec.ExecHandle = UserExec.CreateUserExecutive[paint: FALSE, startListening: FALSE, iconic: TRUE]; private: REF ExecPrivateRecord = exec.privateStuff; Start: PROC = { event: UserExec.HistoryEvent _ UserExecExtras.CreateEvent[exec, r]; event.dontCorrect _ TRUE; IF r # NIL THEN UserExec.DoIt[input: r, exec: exec, partOf: event ! ANY => { private.out.PutF["*n*e"]; private.out.PutSignal[]; CONTINUE; }; ]; -- start up won't be finished until this is executed. UserExec.StartListening[exec]; }; commandsFrom, errorLog, errorRope, r: Rope.ROPE; UserExecPrivate.w _ private.execDotW; -- to give default value if somebody just runs a program which refers to Exec.w before the first registered command is executed. commandsFrom _ UserProfile.Token["CommandsFrom"]; errorLog _ UserProfile.GetErrorLog[]; IF errorLog # NIL THEN TRUSTED { errorRope _ Rope.Concat["Some problems were encountered in your user profile, see ", errorLog]; MessageWindow.Append[Rope.Concat[errorRope, " ... "]]; MessageWindow.Blink[]; }; IF commandsFrom # NIL THEN { IF Rope.Find[commandsFrom, "\n"] = -1 AND Rope.Find[commandsFrom, " "] = -1 -- commandsFrom is name of file THEN r _ Rope.Cat["@", commandsFrom, "; "] ELSE r _ Rope.Concat[commandsFrom, "\n"]; }; IF r # NIL OR errorRope # NIL THEN r _ Rope.Cat[r, "Herald ", errorRope, "\n"]; [] _ UserExecPrivate.CaptionForExec[exec: exec, paint: TRUE]; -- EndOps.Register[-- Start[]; END. -- of StartUserExec StartUserExec.mesa Last Edited by Teitelman April 19, 1983 12:13 pm Edited on March 1, 1983 11:55 pm, by Teitelman arranged so that commandsFrom not executed until startup complete, and that Ready not posted until commandsFrom finished. changes to: Start, DIRECTORY, IMPORTS, errorLog, EndOp Edited on March 3, 1983 2:02 pm, by Teitelman changes to: Start Edited on March 10, 1983 3:10 am, by Teitelman changes to: DIRECTORY, IMPORTS Edited on April 19, 1983 12:13 pm, by Teitelman changes to: DIRECTORY, IMPORTS, Start ÊƘJ˜JšÐbl œ™Jšœ1™1J˜šÏk ˜ Jšžœžœ˜Jšœžœ˜$Jšœžœžœ˜%Jšœ žœG˜UJšœžœ˜#Jšœžœ(˜=Jšœ žœ˜(J˜—Jš œž œ˜J˜JšžœžœP˜ZJ˜Jšžœ ˜J˜Jšžœ ˜J˜Jšœž˜J˜JšÏnœžœžœ%˜CJ˜JšŸœ<žœžœ žœ˜lJšŸœžœ'˜3šŸœžœ˜J•StartOfExpansionS[input: ROPE, exec: UserExec.ExecHandle, partOf: UserExec.HistoryEvent _ NIL]šœC˜CJšœžœ˜šžœžœžœ5žœ˜LJ˜J˜Jšž ˜ J˜JšœÏc5˜9—Jšœ˜Jšœ˜—Jš Ÿ œŸœŸ œŸœžœ˜1Jšœ( €˜¨J˜2J˜%šžœ žœžœž ˜ J˜_J˜6J˜J˜—šžœžœž˜Jšžœ$žœ$ ˜lJšžœ&˜*Jšžœ' ˜,J˜—Jš žœžœžœ žœžœ,˜OJšœ7žœ˜?Jšœ ˜ J˜Jšžœ ˜J˜™.J™yJšœ Ïr*™6—™-Jšœ ¡™—™.Jšœ ¡™—™/Jšœ ¡™%—J™—…—ö Î