GenerateImagerErrorEnumerationCommands.mesa
Copyright Ó 1993 by Xerox Corporation. All rights reserved.
Michael Plass, March 25, 1993 9:34 am PST
DIRECTORY Commander, ImagerError, Rope, IO;
GenerateImagerErrorEnumerationCommands: CEDAR PROGRAM
IMPORTS Commander, ImagerError, IO
~ BEGIN
ROPE: TYPE ~ Rope.ROPE;
docGenerateImagerErrorEnumerationCommand: ROPE ~ "Generates c header file syntax for the defined values of Imager error codes.";
GenerateImagerErrorEnumerationCommand: Commander.CommandProc ~ {
FOR code: ImagerError.ErrorCode IN ImagerError.ErrorCode DO
atom: ATOM ¬ ImagerError.AtomFromErrorCode[code];
IF atom # NIL THEN {
IO.PutF[cmd.out, "CII←RES←%g = %g,\n", [atom[atom]], [cardinal[ORD[code]]]];
};
ENDLOOP;
};
Commander.Register["GenerateImagerErrorEnumeration", GenerateImagerErrorEnumerationCommand, docGenerateImagerErrorEnumerationCommand];
END.