DIRECTORY Commander, ComputeClient, ComputeServerClient, FS, IO, Pup, PupName, Rope ; RTeX: CEDAR PROGRAM IMPORTS Commander, ComputeClient, FS, IO, PupName, 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[PupName.HisName[PupName.NameLookup[server, Pup.nullSocket]]], 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 Bob Hagmann May 16, 1986 3:10: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] Bob Hagmann May 16, 1986 3:06:49 pm PDT changes to: DIRECTORY, RTeX, RTeXCommand Κ ˜J™ ™;Icode™'—J™J™‹J˜šΟ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šœ˜—™'Kšœ Οr™(—K™—…—  G