Lines Matching +full:offset +full:- +full:y
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright 2003-2005 Colin Percival
53 static int dirfd = -1;
59 if (dirfd != -1 && newfile != NULL)
76 off_t y;
78 y = buf[7] & 0x7F;
79 y = y * 256; y += buf[6];
80 y = y * 256; y += buf[5];
81 y = y * 256; y += buf[4];
82 y = y * 256; y += buf[3];
83 y = y * 256; y += buf[2];
84 y = y * 256; y += buf[1];
85 y = y * 256; y += buf[0];
88 y = -y;
90 return (y);
114 off_t i, lenread, offset;
174 16 8 Y
177 32+X Y bzip2(diff block)
178 32+X+Y ??? bzip2(extra block)
179 with control block a set of triples (x,y,z) meaning "add x bytes
180 from oldfile to x bytes from the diff block; copy y bytes from the
199 if (bzctrllen < 0 || bzctrllen > OFF_MAX - HEADER_SIZE ||
200 bzdatalen < 0 || bzctrllen + HEADER_SIZE > OFF_MAX - bzdatalen ||
204 /* Close patch file and re-open it via libbzip2 at the right places */
207 offset = HEADER_SIZE;
208 if (fseeko(cpf, offset, SEEK_SET))
209 err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset);
212 offset = add_off_t(offset, bzctrllen);
213 if (fseeko(dpf, offset, SEEK_SET))
214 err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset);
217 offset = add_off_t(offset, bzdatalen);
218 if (fseeko(epf, offset, SEEK_SET))
219 err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset);
223 if ((oldsize = lseek(oldfd, 0, SEEK_END)) == -1 ||
246 /* Sanity-check */
251 /* Sanity-check */
270 /* Sanity-check */
293 if (write(newfd, new, newsize) != newsize || close(newfd) == -1)