home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / lilith / m2get.mod < prev    next >
Text File  |  2020-01-01  |  1KB  |  46 lines

  1. IMPLEMENTATION MODULE KermGet;
  2. (************************************************************************)
  3. (* Get a file from remote server                                        *)
  4. (* written:            14.12.85     Matthias Aebi                       *)
  5. (* last modification:  18.03.86     Matthias Aebi                       *)
  6. (************************************************************************)
  7.  
  8. FROM Terminal    IMPORT WriteString;
  9. FROM KermRecv    IMPORT SwitchRecv;
  10. FROM KermSend    IMPORT SendPacket;
  11. FROM KermMisc    IMPORT DispMsg;
  12. FROM String      IMPORT Length;
  13. FROM TextScreen  IMPORT SetPos;
  14. FROM M2Kermit    IMPORT Param1, Param2;
  15.  
  16. (************************************************************************)
  17.                               PROCEDURE Get;
  18. (************************************************************************)
  19. VAR
  20.     retCd : BOOLEAN;
  21.  
  22. BEGIN
  23.     IF Param1[0] = "?"
  24.     THEN
  25.         WriteString("Specify the file to get from remote server");
  26.     ELSE
  27.         IF Param2[0] = 0C
  28.         THEN
  29.             SendPacket("R",0,Length(Param1), Param1);
  30.             retCd := SwitchRecv("");
  31.         ELSE
  32.             SendPacket("R",0,Length(Param2), Param2);
  33.             retCd := SwitchRecv(Param1);
  34.         END;
  35.  
  36.         IF retCd
  37.         THEN
  38.             DispMsg("Get successful");
  39.         END;
  40.         SetPos(27,0);
  41.     END;
  42.  
  43. END Get;
  44.  
  45. END KermGet.
  46.