Lines Matching refs:part
3 * This software is part of the ast package *
146 * archive part sfio discipline
152 register Part_t* part = (Part_t*)disc;
155 if (part->n <= 0)
156 return part->n;
157 if (n > part->n)
158 n = part->n;
159 if ((r = paxread(part->pax, part->ap, buf, n, 0, 0)) > 0)
160 part->n -= r;
167 register Part_t* part = (Part_t*)disc;
170 if ((r = paxwrite(part->pax, part->ap, buf, n)) > 0)
171 part->n += r;
178 register Part_t* part;
182 if (!(part = ap->partio))
184 if (!(part = newof(0, Part_t, 1, 0)) || !(part->sp = sfstropen()))
189 part->sp->_flags &= ~(SF_READ|SF_WRITE|SF_STRING);
191 part->sp->_flags |= SF_READ;
193 part->sp->_flags |= SF_WRITE;
196 part->sp->_file = fd;
197 part->disc.readf = part_read;
198 part->disc.writef = part_write;
199 if (sfdisc(part->sp, &part->disc) != &part->disc)
201 sfclose(part->sp);
202 free(part);
205 part->pax = pax;
206 part->ap = ap;
207 ap->partio = part;
209 part->n = n;
210 return part->sp;