TestUserProps.mesa
Carl Hauser, June 27, 1986 10:33:33 am PDT
DIRECTORY
AlpFile,
AlpineEnvironment,
Rope;
TestUserProps: CEDAR PROGRAM
IMPORTS AlpFile
~ BEGIN
GetOneProp: PROC [h: AlpFile.Handle, prop: Rope.ROPE] RETURNS [properties: AlpFile.UserPropertyValuePairs] ~ {
properties ← AlpFile.ReadUserProperties[h, LIST[prop]];
};
GetAllProps: PROC [h: AlpFile.Handle] RETURNS [properties: AlpFile.UserPropertyValuePairs] ~ {
properties ← AlpFile.ReadUserProperties[h, NIL];
};
PutOneRopeProp: PROC [h: AlpFile.Handle, prop: Rope.ROPE, val: Rope.ROPE] ~ {
propVal: AlpineEnvironment.UserPropertyValuePair.rope;
propVal ← [prop, rope[val]];
AlpFile.WriteUserProperties[h, LIST[propVal]];
};
PutOneCardProp: PROC [h: AlpFile.Handle, prop: Rope.ROPE, val: LONG CARDINAL] ~ {
propVal: AlpineEnvironment.UserPropertyValuePair.longCardinal;
propVal ← [prop, longCardinal[val]];
AlpFile.WriteUserProperties[h, LIST[propVal]];
};
END.