Lines Matching defs:pax

23  * pax arj format
38 Pax_t* pax;
50 arj_done(Pax_t* pax, register Paxarchive_t* ap)
64 arj_getprologue(Pax_t* pax, Paxformat_t* fp, register Paxarchive_t* ap, Paxfile_t* f, unsigned char* buf, size_t size)
76 return paxnospace(pax);
77 ar->pax = pax;
80 codexinit(&ar->codexdisc, pax->errorf);
95 if (paxseek(pax, ap, n + 8, SEEK_SET, 0) < 0)
97 while ((s = paxget(pax, ap, 2, NiL)) && (n = swapget(3, s, 2)))
98 if (paxseek(pax, ap, n + 2, SEEK_CUR, 0) < 0)
102 arj_done(pax, ap);
107 arj_getheader(Pax_t* pax, register Paxarchive_t* ap, register Paxfile_t* f)
121 if (!(buf = (unsigned char*)paxget(pax, ap, -4, NiL)) || !(n = swapget(3, buf+2, 2)))
123 if (n < 32 || n > 2600 || swapget(3, buf, 2) != MAGIC || !(buf = (unsigned char*)paxget(pax, ap, n + 4, NiL)))
153 f->name = paxstash(pax, &ap->stash.head, NiL, strlen(s) + 1);
155 while ((s = paxget(pax, ap, 2, NiL)) && (n = swapget(3, s, 2)))
156 if (paxseek(pax, ap, n + 4, SEEK_CUR, 0) < 0)
174 f->st->st_mode = mode & pax->modemask;
175 f->st->st_uid = pax->uid;
176 f->st->st_gid = pax->gid;
190 return paxcorrupt(pax, ap, f, NiL);
194 arj_getdata(Pax_t* pax, register Paxarchive_t* ap, register Paxfile_t* f, int fd)
206 pos = paxseek(pax, ap, 0, SEEK_CUR, 0) + f->st->st_size;
210 else if (sp = paxpart(pax, ap, f->st->st_size))
213 (*pax->errorf)(NiL, pax, 2, "%s: %s: cannot decode method %d", ap->name, f->name, ar->index);
218 if ((n = sfread(sp, pax->buf, sizeof(pax->buf))) < 0)
220 (*pax->errorf)(NiL, pax, 2, "%s: %s: unexpected EOF", ap->name, f->name);
226 (*pax->errorf)(NiL, pax, 2, "%s: %s: checksum discipline error", ap->name, f->name);
227 else if (!paxchecksum(pax, ap, f, ar->checksum, sum.num))
231 if (paxdata(pax, ap, f, fd, pax->buf, n))
237 if (paxseek(pax, ap, pos, SEEK_SET, 0) != pos)
239 (*pax->errorf)(NiL, pax, 2, "%s: %s: cannot seek past %s format data", ap->name, f->name, ap->format->name);