
  PROCEDURE [INLINE] bai$check_tapemark
    (    file_identifier: amt$file_identifier;
     VAR volume_position: amt$volume_position;
     VAR status: ost$status);

?? PUSH (LISTEXT := ON) ??
{ The purpose of this procedure is to determine whether the volume position is
{ currently at either an embedded tapemark, or at the end of the current
{ volume. Any other volume position will be regarded as an error.
{ This request will only return valid results if issued when positioned
{ at a tapemark.

    VAR
      next_block_is_a_tapemark: boolean;

{ Check for double tapemark, which indicates the end of volume.

    bap$tape_bm_tapemark_check (file_identifier, next_block_is_a_tapemark,
          status);
    IF NOT status.normal THEN
      RETURN; {----->
    IFEND;

    IF next_block_is_a_tapemark THEN { For unlabelled tape => end of volume.
      volume_position := amc$eov;
    ELSE
      volume_position := amc$after_tapemark;
    IFEND;

  PROCEND bai$check_tapemark;

*copyc bap$tape_bm_tapemark_check
*copyc bap$tape_bm_advance_volume
?? POP ??
