Lines Matching refs:sp
28 Sfio_t* rstempwrite(Rs_t* rs, Sfio_t* sp)
30 Sfio_t* rstempwrite(rs, sp)
32 Sfio_t* sp;
35 Sfio_t* op = sp;
37 if (!sp)
46 if (!(sp = sfnew(NiL, NiL, SF_UNBOUND, fd, SF_READ|SF_WRITE)))
49 if (!(sp = sftmp(0)))
54 sfresize(sp, 0);
55 if ((rs->events & RS_TEMP_WRITE) && rsnotify(rs, RS_TEMP_WRITE, sp, (Void_t*)0, rs->disc) < 0)
58 sfclose(sp);
59 sp = 0;
61 return sp;
69 int rstempread(Rs_t* rs, Sfio_t* sp)
71 int rstempread(rs, sp)
73 Sfio_t* sp;
78 if (sfsync(sp))
82 if ((n = rsnotify(rs, RS_TEMP_READ, sp, (Void_t*)0, rs->disc)) < 0)
87 return sfseek(sp, (Sfoff_t)0, SEEK_SET) ? -1 : 0;
95 int rstempclose(Rs_t* rs, Sfio_t* sp)
97 int rstempclose(rs, sp)
99 Sfio_t* sp;
106 if ((n = rsnotify(rs, RS_TEMP_CLOSE, sp, (Void_t*)0, rs->disc)) < 0)
111 return sfclose(sp);