{ Deck:  DFT$IMAGE_FILE
{ This deck describes the file and types used to describe the
{ image file that is used to contain all server pages on the client
{ mainframe.
{ This image file resides on a disk file on the client mainframe
{ and is written:
{   - as a result of a continuation deadstart
{      All pages in the mainframe memory image that belong to the server are copied
{      from the mainframe memory image to the server image file.
{   - as a result of a timeout
{      All pages in the real memory that belong to the server are copied
{      and removed from real memory and written to the server image file.
{
{ The general format of this file is:
{    image header  (in the first page of the file)
{    Repeated until all pages saved
{      one page block sequence consisting of
{        block header
{        repeated for each file
{          file header
{          page headers for all pages of the file
{      Actual pages described in the page headers for this block
{
{ Current_eoi represents the length of the image file that has been written.
{   Because the file is preallocated this eoi is different (smaller) than the
{   eoi maintained by device manager.
{

  TYPE
    dft$image_header = record
      file_update_flag: string (5),
      version: ost$name,
      server_mainframe_id: pmt$binary_mainframe_id,
      server_mainframe_name: pmt$mainframe_id,
      client_mainframe_name: pmt$mainframe_id,
      current_eoi: ost$segment_offset,
      requested_preallocation_size: ost$segment_offset,
      page_size: ost$page_size,
    recend,

    dft$image_block_header = record
      block_header_string: string (5),
      file_count: gft$file_descriptor_index,
      page_count: 0 .. osc$max_page_frames,
      page_source: dft$image_source,
      next_block_header_offset: ost$segment_offset,
    recend,


    dft$image_file_operation = (dfc$read_image_file, dfc$reset_image_file,
          dfc$image_source_timeout, dfc$image_source_deadstart),

    dft$image_file_operations = set of dft$image_file_operation,

    dft$image_source = dfc$image_source_timeout .. dfc$image_source_deadstart,


   { The global_file_name is the uncomplemented global file name.
    dft$image_file_header = record
      file_completed: boolean,
      global_file_name: dmt$global_file_name,
      eoi_byte_address: amt$file_byte_address,
      highest_file_offset: ost$segment_offset,
      page_count: 0 .. osc$max_page_frames,
    recend,

    dft$image_page_header = record
      image_offset: ost$segment_offset,
      file_offset: ost$segment_offset,
    recend;

  CONST
    dfc$current_image_file_version = 'SERVER_IMAGE_FILE_VERSION_001  ',
    dfc$block_header_string = 'BLOCK',
    dfc$image_file_valid = 'VALID',
    dfc$image_file_damaged = 'DAMAG',
    dfc$image_file_writing = 'WRITN';

?? PUSH (LISTEXT := ON) ??
*copyc amt$file_byte_address
*copyc dmt$global_file_name
*copyc gft$system_file_identifier
*copyc osd$virtual_address
*copyc ost$name
*copyc ost$page_size
*copyc ost$page_table
*copyc pmt$binary_mainframe_id
*copyc pmt$mainframe_id
?? POP ??
