-- File: PupBooterSlow.mesa, Last Edit: HGM October 7, 1980 12:44 AM DIRECTORY String USING [AppendChar, AppendString], Time USING [AppendCurrent], Put USING [Line], Runtime USING [IsBound], Window USING [Handle], Slosh USING [SendFile], BootServerDefs USING [BootFile, WhatHappened, msg, UpdatePicture], PupDefs USING [AppendHostName], PupTypes USING [PupAddress]; PupBooterSlow: PROGRAM IMPORTS String, Time, Put, Runtime, Slosh, BootServerDefs, PupDefs EXPORTS BootServerDefs = BEGIN OPEN BootServerDefs; verbose: BOOLEAN = TRUE; slowBooteeHost: PUBLIC STRING _ [30]; slowBootFileName: PUBLIC STRING _ NIL; SlowBooter: PUBLIC PROCEDURE [ bf: BootServerDefs.BootFile, him: PupTypes.PupAddress] RETURNS [what: WhatHappened] = BEGIN slowBooteeHost.length _ 0; PupDefs.AppendHostName[slowBooteeHost, him]; slowBootFileName _ bf.fileName; FixupPicture[]; IF verbose THEN BEGIN text: STRING = [100]; Time.AppendCurrent[text]; String.AppendString[text, " Booting "L]; String.AppendString[text, bf.fileName]; String.AppendString[text, " to "L]; PupDefs.AppendHostName[text, him]; String.AppendChar[text, '.]; LogString[msg, text]; END; what _ SELECT Slosh.SendFile[msg, bf.fileName, bf.file, him] FROM ok => slow, neverStarted => neverStarted, troubles => troubles, ENDCASE => troubles; slowBooteeHost.length _ 0; slowBootFileName _ NIL; FixupPicture[]; END; FixupPicture: PROCEDURE = BEGIN IF msg # NIL AND Runtime.IsBound[UpdatePicture] THEN UpdatePicture[]; END; LogString: PROCEDURE [msg: Window.Handle, text: STRING] = BEGIN IF msg # NIL THEN Put.Line[msg, text]; Put.Line[NIL, text]; END; END.