(*----------------------------------------------------------------------*)
(*          Scan_Xfer_List --- Search transfer list for file name       *)
(*----------------------------------------------------------------------*)

FUNCTION Scan_Xfer_List( File_Name : AnyStr ) : BOOLEAN;

VAR
   SDone      : BOOLEAN;
   XFer_Line  : STRING[14];

BEGIN (* Scan_Xfer_List *)
                                   (* Assume file not found *)
   Scan_Xfer_List := FALSE;
                                   (* Open xferlist file *)

   ASSIGN( Xfer_List_File , Home_Dir + 'PIBTERM.XFR' );
      (*$I-*)
   RESET( Xfer_List_File );
      (*$I+*)
                                   (* If not there, no files to check *)
   IF IoResult = 0 THEN            (* If there, check the file        *)
      BEGIN

         SDone     := FALSE;
         File_Name := UpperCase( TRIM( File_Name ) );

         REPEAT

            READLN( Xfer_List_File , Xfer_Line );

            IF TRIM( Xfer_Line ) = File_Name THEN
               BEGIN
                  SDone          := TRUE;
                  Scan_Xfer_List := TRUE;
               END;

         UNTIL ( EOF( Xfer_List_File ) OR SDone );

      END;

      (*$I-*)
   CLOSE( Xfer_List_File )
      (*$I+*)

END   (* Scan_Xfer_List *);
