DIRECTORY Commander, ComputeClient, ComputeServerClient, FS, IO, PupDefs, PupTypes, Rope ; RTeX: CEDAR PROGRAM IMPORTS Commander, ComputeClient, FS, IO, PupDefs, Rope = BEGIN RTeXCommand: Commander.CommandProc = { success: ComputeServerClient.RemoteSuccess; found: BOOL; cp: FS.ComponentPositions; fullName: Rope.ROPE; command: Rope.ROPE; server: Rope.ROPE; [fullFName: fullName, cp: cp] _ FS.ExpandName[cmd.command]; command _ fullName.Substr[cp.base.start, cp.base.length]; [found: found, success: success, remoteMsg: msg, serverInstance: server] _ ComputeClient.StartService[ service: command, cmdLine: cmd.commandLine, in: cmd.in, out: cmd.out, queueService: TRUE ]; IF success = aborted THEN ERROR ABORTED ELSE IF NOT found OR success # true THEN cmd.out.PutF["%g failed: Not found or bad success returned.\n", IO.rope[command]] ELSE cmd.out.PutF["Remote TeX server was %g(%g)\n", IO.rope[PupDefs.GetHostName[ PupDefs.GetPupAddress[PupTypes.fillInSocketID, server]]], IO.rope[server] ]; }; Commander.Register[ key: "RTeX", proc: RTeXCommand, doc: "Runs a remote version of TeX, a document compiler", interpreted: FALSE]; Commander.Register[ key: "RIniTeX", proc: RTeXCommand, doc: "Runs a remote version of IniTeX, an initialising version of a document compiler", interpreted: FALSE]; Commander.Register[ key: "RInterruptTeX", proc: RTeXCommand, doc: "Interrupts a currently-running remote version of TeX, a document compiler"]; END. "RTeX.mesa Last changed by Pavel on September 30, 1985 12:44:09 pm PDT This is the ``stub'' of the remote TeX server. This runs on the client workstation and simply packages up a request to send to the server. [cmd: Commander.Handle] RETURNS [result: REF ANY _ NIL, msg: ROPE _ NIL] Κξ˜J™ J™;J™J™‹J˜codešΟk ˜ K˜ K˜K˜Kšœ˜Kšœ˜K˜K˜ K˜K˜—K˜K˜šΠblœœ˜Kšœœœ˜9š˜•StartOfExpansionL -- [cmd: Commander.Handle] RETURNS [result: REF ANY _ NIL, msg: ROPE _ NIL]šΟn œ˜&KšΠckH™HK˜+Kšœœ˜ Kšœœ˜Kšœœ˜Kšœœ˜Kšœ œ˜K˜Kšœ;˜;K˜9K˜KšœΞ˜ΞK˜šœ˜Kšœ˜ —š œœœœ˜(Kšœ@œ˜Q—š˜Kšœ™˜™—K˜—K˜K–[]šœ{œ˜‚K˜K–[]šœœœ˜£K˜K–[]šœ˜K˜—Kšœ˜——…—ΈΘ