Lines Matching defs:pax
23 * pax slt format for ansi and ibm labeled tapes
107 getlabel(Pax_t* pax, register Archive_t* ap, register File_t* f)
118 if (slt->done || (c = paxread(pax, ap, slt->buf, (off_t)HDR_SIZE, (off_t)LABEL_MAX, 0)) < HDR_SIZE)
124 if (ap->io->blocked || paxread(pax, ap, slt->buf + HDR_SIZE, (off_t)0, (off_t)c, 1) != c)
150 putlabels(Pax_t* pax, register Archive_t* ap, register File_t* f, char* type)
158 paxwrite(pax, ap, slt->buf, 0);
166 paxwrite(pax, ap, slt->buf, HDR_SIZE);
168 paxwrite(pax, ap, slt->buf, HDR_SIZE);
169 paxwrite(pax, ap, slt->buf, 0);
180 slt_getprologue(Pax_t* pax, Format_t* fp, register Archive_t* ap, File_t* f, unsigned char* buf, size_t size)
224 paxget(pax, ap, 0, &x);
228 if (!(lab = getlabel(pax, ap, f)))
249 slt_done(Pax_t* pax, register Archive_t* ap)
260 slt_getheader(Pax_t* pax, register Archive_t* ap, register File_t* f, int wfd)
270 if (!(lab = getlabel(pax, ap, f)))
293 s = f->name = paxstash(pax, &ap->stash.head, NiL, NAME_SIZE + 3);
354 paxunread(pax, ap, slt->buf, lab);
359 } while ((lab = getlabel(pax, ap, f)));
364 slt_getdata(Pax_t* pax, register Archive_t* ap, register File_t* f, int wfd)
390 n = paxread(pax, ap, state.tmp.buffer, (off_t)0, (off_t)state.buffersize, 0);
397 n = paxread(pax, ap, state.tmp.buffer, (off_t)0, m, 1);
400 n = paxread(pax, ap, NiL, (off_t)0, m, 1);
407 while (getlabel(pax, ap, f))
575 slt_getepilogue(Pax_t* pax, Archive_t* ap)
581 slt_backup(Pax_t* pax, Archive_t* ap)
601 slt_putprologue(Pax_t* pax, Archive_t* ap, int append)
609 putlabels(pax, ap, state.record.file, "HDR");
643 paxwrite(pax, ap, slt->buf, HDR_SIZE);
645 paxwrite(pax, ap, slt->buf, HDR_SIZE);
649 paxwrite(pax, ap, slt->buf, HDR_SIZE);
655 slt_putheader(Pax_t* pax, Archive_t* ap, File_t* f)
659 putlabels(pax, ap, f, "HDR");
664 recordout(Pax_t* pax, Archive_t* ap, File_t* f, Sfio_t* fp)
841 paxwrite(pax, ap, blk, p - blk);
852 slt_putdata(Pax_t* pax, Archive_t* ap, File_t* f, int rfd)
894 else if (paxread(pax, f->ap, state.tmp.buffer, (off_t)0, (off_t)m, 1) <= 0)
914 paxwrite(pax, ap, state.tmp.buffer, n);
922 recordout(pax, ap, f, NiL);
930 recordout(pax, ap, f, rfp);
938 slt_puttrailer(Pax_t* pax, Archive_t* ap, File_t* f)
940 putlabels(pax, ap, f, "EOF");
945 slt_putepilogue(Pax_t* pax, Archive_t* ap)
952 putlabels(pax, ap, state.record.file, "EOV");
956 paxwrite(pax, ap, slt->buf, 0);
957 paxwrite(pax, ap, slt->buf, 0);
962 slt_validate(Pax_t* pax, Archive_t* ap, register File_t* f)
1018 ibm_getprologue(Pax_t* pax, Format_t* fp, register Archive_t* ap, File_t* f, unsigned char* buf, size_t size)
1023 if ((n = slt_getprologue(pax, fp, ap, f, buf, size)) > 0 && state.record.charset)