# sinit - send a initial packet for the first connection # - stating what my parameters are # integer function sinit(x) include ratdef include kerdef include kercom # integer num,len,status,rpack,x,tnum,temp integer xy character alin(MAXLINE) integer aone,bone string morefile "MOREFILE" # if(numtry>MAXTRY){ sinit=BIGA return } else numtry=numtry+1 # aone=1 bone=1 call spar(packet) tnum=n call spack(BIGS,tnum,6,packet) status=rpack(len,num,recpkt) if(status==BIGN){ if(n!=(num-1)){ sinit=state return } } else if(status==BIGY){ if(n!=num){ sinit=state return } call rpar(recpkt) if(eol==0)eol=NEWLINE if(quote==0)quote=SHARP numtry=0 n=mod((n+1),64) morefd=aopen(morefile,READ) temp=YES while(temp==YES){ xy=getlin(alin,morefd) if(xy==EOF){ sinit=BIGA call close(morefd) return } else { call scopy(alin,aone,filnam,bone) fd=aopen(filnam,READ) if(fd^=ERR)temp=NO } } sinit=BIGF return } else if(status==FALSE){ sinit=state return } else sinit=BIGA return end