DIRECTORY CD, Commander USING [CommandProc, Handle, Register], IO USING [PutF, int], SweepCollectableStorage USING [InfoProc, EnumerateCollectableStorage]; CDCount: CEDAR PROGRAM IMPORTS Commander, IO, SweepCollectableStorage = BEGIN Count: Commander.CommandProc = BEGIN EachObject: SweepCollectableStorage.InfoProc = BEGIN IF type=CODE[CD.Application] THEN app _ app+1 ELSE IF type=CODE[CD.ObjectDefinition] THEN ob _ ob+1 ELSE IF type=CODE[CD.CellRecord] THEN cell _ cell+1 ELSE IF type=CODE[CD.ObjectProcs] THEN obProcs _ obProcs+1 ELSE IF type=CODE[CD.DesignRec] THEN design _ design+1 ELSE others _ others+1; RETURN [TRUE]; END; others: INT _ 0; app: INT _ 0; ob: INT _ 0; cell: INT _ 0; obProcs: INT _ 0; design: INT _ 0; TRUSTED { SweepCollectableStorage.EnumerateCollectableStorage[EachObject] }; cmd.out.PutF["Applications = %g\n", IO.int[app]]; cmd.out.PutF["Objects = %g\n", IO.int[ob]]; cmd.out.PutF["Cells = %g\n", IO.int[cell]]; cmd.out.PutF["Object classes = %g\n", IO.int[obProcs]]; cmd.out.PutF["designs = %g\n", IO.int[design]]; cmd.out.PutF["others = %g\n", IO.int[others]]; END; Commander.Register[key: "CDCount", proc: Count, doc: "Count features of ChipNDale"]; END. *-- CDCount.mesa -- by: Ch. Jacobi, February 20, 1985 10:24:24 am PST -- last edited by: Ch. Jacobi, February 20, 1985 10:24:24 am PST -- PROC [cmd: Commander.Handle] RETURNS [result: REF ANY_NIL, msg: ROPE_NIL] PROC [type: SafeStorage.Type, size: INT, object: ..] RETURNS [continue: BOOL] ÊɘJ™J™4J™@J˜šÏk ˜ Jšœ˜Jšœ œ!˜0Jšœœ ˜Jšœœ)˜F—J˜šÏbœœ˜Jšœ œ˜0—Jš˜J•StartOfExpansionP -- [cmd: Commander.Handle] RETURNS [result: REF ANY _ NIL, msg: ROPE _ NIL] -- ˜šžœ˜JšœL™LJš˜J˜šž œ%˜/JšœO™OJš˜Jšœœœœ ˜-Jš œœœœœ ˜5Jš œœœœ œ˜3Jš œœœœœ˜:Jš œœœœ œ˜6Jšœ˜Jšœœ˜Jšœ˜—J˜Jšœœ˜Jšœœ˜ Jšœœ˜ Jšœœ˜Jšœ œ˜Jšœœ˜J˜JšœE˜LJ˜Jšœ$œ ˜1Jšœœ ˜+Jšœœ ˜+Jšœ&œ˜7Jšœœ˜/Jšœœ˜.Jšœ˜—J˜J–^ -- [type: SafeStorage.Type, size: INT, object: LONG CARDINAL] RETURNS [continue: BOOLEAN] -- ˜JšœT˜TJšœ˜—…—²¥