home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / pibterm / pibt41s4.arc / RECEIVEY.MOD < prev    next >
Text File  |  1987-11-29  |  3KB  |  63 lines

  1. (*----------------------------------------------------------------------*)
  2. (*          Receive_Ymodem_File --- Download files with Ymodem/SeaLink  *)
  3. (*----------------------------------------------------------------------*)
  4.  
  5. PROCEDURE Receive_Ymodem_File;
  6.  
  7. (*----------------------------------------------------------------------*)
  8. (*                                                                      *)
  9. (*     Procedure:  Receive_Ymodem_File                                  *)
  10. (*                                                                      *)
  11. (*     Purpose:    Downloads file to PC using Ymodem batch or SeaLink   *)
  12. (*                                                                      *)
  13. (*     Calling Sequence:                                                *)
  14. (*                                                                      *)
  15. (*        Receive_Ymodem_File;                                          *)
  16. (*                                                                      *)
  17. (*     Calls:   Receive_Xmodem_File                                     *)
  18. (*                                                                      *)
  19. (*----------------------------------------------------------------------*)
  20.  
  21. BEGIN (* Receive_Ymodem_File *)
  22.                                    (* Open display window for transfers  *)
  23.    Display_Batch_Window;
  24.                                    (* Flags if keyboard halt or    *)
  25.                                    (* null file name encountered   *)
  26.    Stop_Receive   := FALSE;
  27.    Null_File_Name := FALSE;
  28.                                    (* Loop until null file name    *)
  29.  
  30.    WHILE ( ( NOT Stop_Receive ) AND ( NOT Null_File_Name ) ) DO
  31.       BEGIN
  32.          FileName := '';
  33.          Receive_Xmodem_File( TRUE );
  34.          TextColor     ( Menu_Text_Color );
  35.          TextBackGround( BLACK );
  36.          IF ( ( NOT Null_File_Name ) AND ( NOT Stop_Receive ) ) THEN
  37.             BEGIN
  38.                IF Display_Status THEN
  39.                   WRITELN  ('  Received file: ' + FileName );
  40.                Write_Log('Received file: ' + FileName , FALSE, FALSE );
  41.             END;
  42.       END;
  43.                                    (* Restore batch window if needed *)
  44.    TextColor     ( Menu_Text_Color );
  45.    TextBackGround( BLACK );
  46.  
  47.    IF ( NOT Display_Status ) THEN
  48.       Display_Batch_Window;
  49.                                    (* Acknowledge null file name *)
  50.                                    (* if received                *)
  51.    IF Null_File_Name THEN
  52.       BEGIN
  53.          TextColor     ( Menu_Text_Color );
  54.          TextBackGround( BLACK );
  55.          Write_Log('Received null file name from host.', FALSE, FALSE);
  56.          WRITELN( ' ' );
  57.          WRITELN( '  Received null file name from host.' );
  58.       END;
  59.  
  60.    End_Batch_Transfer;
  61.  
  62. END   (* Receive_Ymodem_File *);
  63.