Lines Matching refs:di
46 static ssize_t diordwr(Sfio_t* f, Void_t* buf, size_t n, Direct_t* di, int type)
48 static ssize_t diordwr(f, buf, n, di, type)
52 Direct_t* di;
63 if((P2I(buf)%di->dio.d_mem) == 0 &&
64 (f->here%di->dio.d_miniosz) == 0 && n >= di->dio.d_miniosz )
66 if(!(di->cntl & FDIRECT) )
67 { di->cntl |= FDIRECT;
68 (void)fcntl(f->file, F_SETFL, di->cntl);
71 for(rw = (n/di->dio.d_miniosz)*di->dio.d_miniosz;; )
74 if((io = rw) > di->dio.d_maxiosz )
75 io = di->dio.d_maxiosz;
85 if(rv < io || rw < di->dio.d_miniosz)
90 if(done < n && (di->cntl & FDIRECT) )
92 di->cntl &= ~FDIRECT;
93 (void)fcntl(f->file, F_SETFL, di->cntl);
140 Direct_t* di = (Direct_t*)disc;
145 if(di->cntl&FDIRECT)
146 { di->cntl &= ~FDIRECT;
147 (void)fcntl(f->file,F_SETFL,di->cntl);
170 Direct_t* di;
194 if(!(di = (Direct_t*)malloc(sizeof(Direct_t))) )
198 { free(di);
207 free(di);
211 di->disc.readf = dioread;
212 di->disc.writef = diowrite;
213 di->disc.seekf = NIL(Sfseek_f);
214 di->disc.exceptf = dioexcept;
215 di->cntl = cntl;
216 di->dio = dio;
218 if(sfdisc(f,(Sfdisc_t*)di) != (Sfdisc_t*)di)
219 { free(di);