home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / os9 / os9get.c < prev    next >
C/C++ Source or Header  |  2020-01-01  |  741b  |  35 lines

  1. /*
  2.  * os9get.c
  3.  */
  4.  
  5. #include "os9inc.h"
  6.  
  7. /*
  8.  *    Kermit Get File from server function
  9.  *
  10.  *    Implemented by W.G. Seaton, NASA SC-LPS-32   KSC,Fl
  11.  *     File: kermget.c
  12.  *     12/11/84
  13.  */
  14.  
  15. getsw()
  16. {
  17.         int     len, num, retries;
  18.         char    rstate, sfile();
  19.  
  20.         do {
  21.                 state = 'R';    /* Issue receive from host server */
  22.                 fp = NULL;
  23.                 for     (retries = 0;
  24.                         (rstate = sfile()) == FALSE && retries < MAXTRY;
  25.                          retries++)
  26.                         ;
  27.                 if (rstate == FALSE)
  28.                         return(FALSE);
  29.                 state = recsw();
  30.         } while (gnxtfl());
  31.  
  32.         return(state);  /* task  completed  */
  33.  
  34. }
  35.