-- UpdateMachineMap.mesa
-- Gifford, July 19, 1985 4:44:53 pm PDT
DIRECTORY
Commander,
IO,
FingerOps,
FS,
PupNet,
Rope;
UpdateMachineMap: CEDAR PROGRAM
IMPORTS Commander, FS, FingerOps, PupNet, IO = {
f: IO.STREAM ← NIL;
pn: Commander.CommandProc = {
o: IO.STREAM ← cmd.out;
p: PupNet.P = {
f.PutF["\"%g\"\n$Owner \"%g\"\n$Location \"%g\"\n$Gateway \"%g\"\n$Network \"%g\"\n\n",
IO.rope[name], IO.rope[owner], IO.rope[location], IO.bool[gateway], IO.bool[network]];
};
f ← FS.StreamOpen["///pup-net.text", $create];
f.PutF["$Owner $Location $Gateway $Network\n"];
o.PutF["///pup-net.text "];
PupNet.ReadFile["[indigo]<portola>pup-network.txt", p];
o.PutF["created.\nFinger database "];
f.Close[];
FingerOps.ReadMachineMap["///pup-net.text"];
o.PutF["updated.\n"];
};
Commander.Register["pup-to-finger", pn, "Update Finger Database from Pup-Network.txt"];
}..