{   This procedure is called to close a tape file.
{
{   If the last operation was a write, the volume will be
{ terminated by writing two tape marks.
{
{   To ensure that all user data is written to tape and that the
{ tape is correctly positioned the caller of this procedure
{ must first complete a call to BAP$TAPE_BM_ALIGN_POSITION.
{
{   Note that for labeled tapes the caller must ensure that all file
{ labels have been written before calling this procedure.
{
{   Recommended algorithm for normal closing of a tape file:
{
{ /close_tape_file/
{   BEGIN
{   /flush_data_to_tape/
{     BEGIN
{       REPEAT
{         bap$tape_bm_align_position(file_id,failure_modes,
{               internal_status);
{         IF NOT internal_status.normal THEN
{           CASE internal_status.condition OF
{             = bae$vol_end_operation_inhibited =
{               <write volume end labels>
{               bap$tape_bm_advance_volume(file_id,internal_status);
{               IF NOT internal_status.normal THEN
{                 EXIT flush_data_to_tape;
{               IFEND;
{               <write volume begin labels>
{             = bae$vol_end_operation_complete =
{               <write volume end labels>
{           ELSE
{           CASEND;
{         IFEND;
{       UNTIL internal_status.normal OR internal_status.condition <>
{            bae$vol_end_operation_inhibited;
{     END flush_data_to_tape;
{     bap$tape_bm_close(file_id,status);
{     IF status.normal THEN
{       status := internal_status;
{     IFEND;
{   END close_tape_file;
{
{   This sequence ensures that all user data gets flushed to tape,
{ even if additional volumes are required.
{
{   To close a tape file after a fatal error the flush process should be
{ omitted.  The close will consist of a simple call to bap$tape_bm_close.
{
{     BAP$TAPE_BM_CLOSE(FILE_IDENTIFIER, FAILURE_MODES, STATUS)
{
{  FILE_IDENTIFIER: (Input) The file_identifier for the instance of
{      open to be closed.
{
{  FAILURE_MODES:  (Output) Detailed information on any tape I/O error.
{
{  STATUS: (output) Request status.
