-- Copyright (C) 1983  by Xerox Corporation. All rights reserved. 
-- BootFileNumberConversion.mesa, HGM, 24-Sep-83 16:25:11

DIRECTORY
  Format USING [HostNumber],
  String USING [AppendString],
  Unformat USING [HostNumber],
  BootServer USING [],
  BootServerBasics USING [BootFileNumber];

BootFileNumberConversion: PROGRAM
  IMPORTS Format, String, Unformat EXPORTS BootServer =
  BEGIN

  BootFileNumber: TYPE = BootServerBasics.BootFileNumber;

  StringToBFN: PUBLIC PROCEDURE [s: LONG STRING] RETURNS [BootFileNumber] =
    BEGIN RETURN[LOOPHOLE[Unformat.HostNumber[s]]]; END;

  AppendBFN: PUBLIC PROCEDURE [string: LONG STRING, bfn: BootFileNumber] =
    BEGIN
    Append: PROCEDURE [s: LONG STRING, clientData: LONG POINTER] =
      BEGIN String.AppendString[string, s]; END;
    Format.HostNumber[Append, LOOPHOLE[bfn], octal];
    END;

  END.