Lines Matching refs:cur
28 #define NOTIFY(rs,r,rsrv,endrsrv,cur,out,n) \
34 { out.data = cur; \
35 out.datalen = n = endrsrv - cur; \
44 RESERVE(rs,f,rsrv,endrsrv,cur,out.datalen); \
46 cur += out.datalen; \
54 #define RESERVE(rs,f,rsrv,endrsrv,cur,w) \
56 if((endrsrv-cur) < w) \
57 { if(rsrv && sfwrite(f,rsrv,cur-rsrv) != cur-rsrv) return -1; \
63 endrsrv = (cur = rsrv) + rw; \
82 reg uchar *d, *cur, *endrsrv, *rsrv;
100 { rsrv = rs->rsrv; endrsrv = rs->endrsrv; cur = rs->cur;
104 { rsrv = cur = endrsrv = NIL(uchar*);
140 RESERVE(rs,f,rsrv,endrsrv,cur,w);
142 NOTIFY(rs,r,rsrv,endrsrv,cur,out,n);
144 WRITE(rs,cur,r->data,w,d);
151 RESERVE(rs,f,rsrv,endrsrv,cur,w);
153 NOTIFY(rs,r,rsrv,endrsrv,cur,out,n);
155 WRITE(rs,cur,r->data,w,d);
161 { RESERVE(rs,f,rsrv,endrsrv,cur,w);
163 NOTIFY(rs,r,rsrv,endrsrv,cur,out,n);
165 WRITE(rs,cur,r->data,w,d);
173 RESERVE(rs,f,rsrv,endrsrv,cur,w);
175 NOTIFY(rs,r,rsrv,endrsrv,cur,out,n);
177 WRITE(rs,cur,r->data,w,d);
180 RESERVE(rs,f,rsrv,endrsrv,cur,w);
182 NOTIFY(rs,e,rsrv,endrsrv,cur,out,n);
184 WRITE(rs,cur,e->data,w,d);
191 { RESERVE(rs,f,rsrv,endrsrv,cur,w);
193 NOTIFY(rs,r,rsrv,endrsrv,cur,out,n);
195 WRITE(rs,cur,r->data,w,d);
197 { RESERVE(rs,f,rsrv,endrsrv,cur,w);
199 NOTIFY(rs,e,rsrv,endrsrv,cur,out,n);
201 WRITE(rs,cur,e->data,w,d);
220 { RESERVE(rs,f,rsrv,endrsrv,cur,sizeof(ssize_t));
221 WRITE(rs,cur,(uchar*)(&n),sizeof(ssize_t),d);
242 RESERVE(rs,f,rsrv,endrsrv,cur,w);
244 WRITE(rs,cur,(uchar*)(&n),sizeof(ssize_t),d);
245 WRITE(rs,cur,r->data,n,d);
251 RESERVE(rs,f,rsrv,endrsrv,cur,w);
253 WRITE(rs,cur,(uchar*)(&n),sizeof(ssize_t),d);
254 WRITE(rs,cur,r->data,n,d);
260 { RESERVE(rs,f,rsrv,endrsrv,cur,w);
261 WRITE(rs,cur,r->data,w,d);
279 RESERVE(rs,f,rsrv,endrsrv,cur,w);
280 WRITE(rs,cur,(uchar*)(&n),sizeof(ssize_t),d);
282 WRITE(rs,cur,(uchar*)(&r->datalen),sizeof(ssize_t),d);
283 WRITE(rs,cur,r->data,r->datalen,d);
294 RESERVE(rs,f,rsrv,endrsrv,cur,w);
296 WRITE(rs,cur,(uchar*)(&n),sizeof(ssize_t),d);
297 WRITE(rs,cur,o->data,n,d);
303 { RESERVE(rs,f,rsrv,endrsrv,cur,w);
304 WRITE(rs,cur,o->data,w,d);
311 { rs->rsrv = rsrv; rs->endrsrv = endrsrv; rs->cur = cur;
315 sfwrite(f,rsrv,cur-rsrv);