function xyf_data_write ( output_unit, point_num, face_num, face_data_num, ...
  face_pointer, face_data )

%*****************************************************************************80
%
%% XYF_DATA_WRITE writes the data of an XYF file.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 January 2009
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer OUTPUT_UNIT, the output file unit number.
%
%    integer POINT_NUM, the number of points.
%
%    integer FACE_NUM, the number of faces.
%
%    integer FACE_DATA_NUM, the number of face items.
%
%    integer FACE_POINTER(FACE_NUM+1), pointers to the
%    first face item for each face.
%
%    integer FACE_DATA(FACE_DATA_NUM), indices
%    of points that form faces.
%
  for face = 1 : face_num
    for i = face_pointer(face) : face_pointer(face+1) - 1
      fprintf ( output_unit, '  %d', face_data(i) );
    end
    fprintf ( output_unit, '\n' );
  end

  return
end
