Lines Matching defs:ss
75 getsaveset(Pax_t* pax, register Archive_t* ap, register File_t* f, register Saveset_t* ss, int header)
85 ss->bp += ss->lastsize;
86 while (ss->bp >= ss->block + state.blocksize)
88 ss->bp = ss->block;
89 ss->lastsize = 0;
90 if (paxread(pax, ap, ss->bp, (off_t)0, (off_t)state.blocksize, 0) <= 0)
97 if (swapget(1, ss->bp + BLKHDR_hdrsiz, 2) != BLKHDR_SIZE)
99 if (!(n = swapget(3, ss->bp + BLKHDR_blksiz, 4)))
100 ss->bp += state.blocksize;
103 ss->bp += BLKHDR_SIZE;
105 ss->lastsize = swapget(1, ss->bp + RECHDR_size, 2);
106 i = swapget(1, ss->bp + RECHDR_type, 2);
107 ss->bp += RECHDR_SIZE;
108 message((-2, "record: type=%d size=%d", i, ss->lastsize));
113 p = ss->bp;
118 if (p + FILHDR_data + i > ss->block + state.blocksize)
146 if ((p += FILHDR_SIZE + (long)swapget(1, s, 2)) > ss->block + state.blocksize)
149 ss->recatt = *(p + FILHDR_data + FILATT_recfmt);
150 ss->recfmt = *(p + FILHDR_data + FILATT_recfmt);
151 ss->reclen = swapget(1, p + FILHDR_data + FILATT_reclen, 2);
152 ss->recvfc = swapget(1, p + FILHDR_data + FILATT_recvfc, 2);
157 if ((p += FILHDR_SIZE + (long)swapget(1, s, 2)) > ss->block + state.blocksize)
173 ss->bp -= RECHDR_SIZE;
174 ss->lastsize = 0;
196 register Saveset_t* ss = (Saveset_t*)ap->data;
213 while (getsaveset(pax, ap, f, ss, 0))
220 if (wfp) while ((c + i) < f->st->st_size && i < ss->lastsize) switch (ss->recfmt)
223 if (j <= 0) j = ss->reclen;
224 sfputc(wfp, ss->bp[i]);
232 j = k = swapget(1, &ss->bp[i], 2);
234 if (ss->recfmt == 3)
236 i += ss->recvfc;
237 j -= ss->recvfc;
242 if (j == k && ss->recatt == 1)
244 if (ss->bp[i] == '0') ss->bp[i] = '\n';
245 else if (ss->bp[i] == '1') ss->bp[i] = '\f';
247 sfputc(wfp, ss->bp[i]);
260 if (ss->bp[i] == '\n') j = 0;
262 sfputc(wfp, ss->bp[i]);
266 if (ss->bp[i] == '\r') ss->bp[i] = '\n';
267 sfputc(wfp, ss->bp[i]);
271 error(state.keepgoing ? 1 : 3, "%s: invalid %s format data record format=%d", f->name, ap->format->name, ss->recfmt);
294 register Saveset_t* ss = (Saveset_t*)ap->data;
309 if (strlen(s) > sizeof(ss->id) - 1)
314 f->id = strupper(strcpy(ss->id, s));