# recsw - receive a file or a group of file from the remote system # integer function recsw(x) include ratdef include kerdef include kercom # integer x integer rdata,rfile,rinit,status status=YES state=BIGR n=0 numtry=0 eol=CR call ttyraw # if no mutli-tasking then take out the next line if(host==FALSE)task unhung, id=2, pri=255 while(status==YES){ if(state==BIGD)state=rdata(x) else if(state==BIGF)state=rfile(x) else if(state==BIGR)state=rinit(x) else if(state==BIGC){ recsw=TRUE # if no multi-tasking then take out the whole compound IF statement if(host==FALSE){ call tidk(2,ier) call wait(1,2,ier) } call ttycook return } else if(state==BIGA){ recsw=FALSE # if no multi-tasking then take out the next compound IF statement if(host==FALSE){ call tidk(2,ier) call wait(1,2,ier) } call ttycook return } } call ttycook return end