; 17 jly 85 esj converted ;;;;;;;;;;;;; RECSW ;;;;;;;;;;;;;;;;;;;;;;; E'F A:S(NWLS) E'O RECSW.(X) ; receive a file or a group of file from the other KERMIT /INCLUDE BYU.PROG.KERMIT.SYM.EQU.KERCOM /INCLUDE BYU.PROG.KERMIT.SYM.EQU.KERDEF G'L XNEW,XCOUNT I'R X,STATUS I'R TV1,TV2,TV3,TV4 STATUS=YES STATE=BIGR XNEW=YES XCOUNT=1 N=0 NUMTRY=0 W'E (STATUS.EQ.YES) # E'E TYPOUT.(2,'A000'.LOR.STATE) # E'E TYPEMSG.($ is current state!$) W'R (STATE.EQ.BIGD) ;read a DATA packet STATE=RDATA.(X) O'R(STATE.EQ.BIGR) ;read a SINIT packet STATE=RINIT.(X) O'R(STATE.EQ.BIGF) ;read a file header STATE=RFILE.(X) O'R(STATE.EQ.BIGC) ;file transfer compl LCLSTATE=YES F'N LCLSTATE O'R(STATE.EQ.BIGA) ;we got an error LCLSTATE=NO TV1=BIGE TV2=N TV3=0 TV4=0 E'E SPACK.(TV1,TV2,TV3,TV4) ;send an ERROR packe F'N LCLSTATE ;file channel E'L E'W F'N LCLSTATE E'N