Lines Matching refs:fd
29 int n, fd;
46 if((fd = creat(tstfile("sf", 0),0666)) < 0)
49 if(write(fd,buf,sizeof(buf)) != sizeof(buf))
51 if(lseek(fd, (off_t)0, 0) < 0)
54 if(!(f = sfnew((Sfio_t*)0,buf,sizeof(buf),fd,SF_WRITE)))
62 if((fd+NEXTFD) < (sizeof(fdv)/sizeof(fdv[0])) )
65 for(i = 0; i < fd+NEXTFD; ++i)
68 if((n = sfsetfd(f,fd+NEXTFD)) != fd+NEXTFD)
69 terror("Try to set file descriptor to %d but get %d",fd+NEXTFD,n);
70 if((fd+NEXTFD) < (sizeof(fdv)/sizeof(fdv[0])) )
73 for(i = 0; i < fd+NEXTFD; ++i)
74 if(i != fd && fdv[i] != fstat(i,&st))
76 i, fd, fd+NEXTFD);