TuneStorage.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Doug Terry, August 3, 1987 1:39:39 pm PDT
Computes tune storage.
DIRECTORY
BluejayUtils,
Commander USING [CommandProc, Register],
IO USING [card, PutF];
TuneStorage: CEDAR PROGRAM
IMPORTS BluejayUtils, Commander, IO
~ BEGIN
vfileTotalSpace: CARD ← 0;
maxVFID: CARD ← 1000;
AnalyzeTunes: Commander.CommandProc = {
[cmd: Commander.Handle] RETURNS [result: REF ANYNIL, msg: ROPENIL]
Enumerates the the jukebox and computes total tune length.
exists: BOOL;
size: INT;
num: CARD ← 0;
BluejayUtilsRpcControl.ImportInterface[interfaceName: [type: "BluejayUtils", instance: "Strowger.lark"]];
FOR tid: CARD IN [0..maxVFID] DO
[exists, size] ← BluejayUtils.DescribeTune[tid];
IF exists THEN {
vfileTotalSpace ← vfileTotalSpace + size;
num ← num + 1;
};
ENDLOOP;
IO.PutF[cmd.out, "Total # of tunes = %g\n", IO.card[num]];
IO.PutF[cmd.out, "Total length of tunes (in chirps) = %g\n", IO.card[vfileTotalSpace]];
};
Commander.Register[key: "TuneStorage", proc: AnalyzeTunes, doc: "Computes total tune storage."];
END.