{
{   This routine is used when writting the image file to add on another
{ image block on to the image file. The image file is expanded and
{ a new block header is added at the current eoi.  The previous block
{ header is used to point to the new block header.  The new block header
{ is initialized and the eoi of the image file is changed.

  PROCEDURE [INLINE] dfp$get_next_image_block
    (VAR image_file_id: dft$image_file_id;
     VAR status: ost$status);

    VAR
      p_previous_block: ^dft$image_block_header;

    dfp$expand_image_file (image_file_id, status);
    IF NOT status.normal THEN
      RETURN;
    IFEND;
    p_previous_block := image_file_id.p_current_block_header;
    i#build_adaptable_seq_pointer (#RING (image_file_id.p_current_eoi),
          #SEGMENT (image_file_id.p_current_eoi),
          #OFFSET (image_file_id.p_current_eoi), { Size } osv$page_size,
          { next } 0, image_file_id.p_current_block_seq);
    NEXT image_file_id.p_current_block_header IN
          image_file_id.p_current_block_seq;
    image_file_id.p_current_eoi := #ADDRESS (#RING (image_file_id.
          p_current_block_seq), #SEGMENT (image_file_id.p_current_block_seq),
          #OFFSET (image_file_id.p_current_eoi) + osv$page_size);
    dfp$initialize_block_header (image_file_id.operation,
          image_file_id.p_current_block_header^);
    p_previous_block^.next_block_header_offset :=
          #OFFSET (image_file_id.p_current_block_header);
    image_file_id.p_image_header^.current_eoi :=
          #OFFSET (image_file_id.p_current_eoi);

  PROCEND dfp$get_next_image_block;
?? PUSH (LISTEXT := ON) ??
*copyc dfp$expand_image_file
*copyc dfp$initialize_block_header
*copyc dft$image_file_id
*copyc i#build_adaptable_seq_pointer
*copyc ost$status
*copyc osv$page_size
?? POP ??
