File: BuildFile.mesa
Copyright © 1984 by Xerox Corporation. All rights reserved.
Created by: August 16, 1984 6:33:19 pm PDT
Last Edited by: Mayo, August 17, 1984 6:01:57 pm PDT
-- Produce a Tioga file from a template file, substituting fields of the form key.
-- Still being coded, do not use!!!!
DIRECTORY
TiogaOpsDefs USING [Ref],
Rope USING [ROPE];
BuildFile: CEDAR DEFINITIONS = BEGIN
Handle: TYPE = RECORD [
valid: BOOLFALSE,
rootRef: PRIVATE TiogaOpsDefs.Ref
];
-- Prepare a template from a Tioga file with key fields.
OpenTemplate: PROC[fileName: Rope.ROPE] RETURNS[Handle];
-- valid = TRUE if successful
-- Substitute all occurences of key with value
Substitute: PROC[hand: Handle, key: Rope.ROPE, value: Rope.ROPE];
-- Write the resulting file, invalidating the handle.
WriteAndClose: PROC[hand: Handle, fileName: Rope.ROPE];
END.