Lines Matching refs:buf

145 ZFILE_read(ZFILE zfd, char *buf, jint nbytes, jlong offset) {
147 return (int) IO_Read(zfd, buf, nbytes);
157 return pread(zfd, buf, nbytes, offset);
186 * Reads len bytes of data from the specified offset into buf.
190 readFullyAt(ZFILE zfd, void *buf, jlong len, jlong offset) {
191 char *bp = (char *) buf;
278 char buf[4];
281 readFullyAt(zip->zfd, buf, sizeof(buf), cenpos) != -1 &&
282 GETSIG(buf) == CENSIG &&
283 readFullyAt(zip->zfd, buf, sizeof(buf), locpos) != -1 &&
284 GETSIG(buf) == LOCSIG);
296 char buf[READBLOCKSZ];
301 const jlong minPos = minHDR - (sizeof(buf)-ENDHDR);
304 for (pos = len - sizeof(buf); pos >= minPos; pos -= (sizeof(buf)-ENDHDR)) {
311 memset(buf, '\0', (size_t)off);
314 if (readFullyAt(zfd, buf + off, sizeof(buf) - off,
320 for (i = sizeof(buf) - ENDHDR; i >= 0; i--) {
321 if (buf[i+0] == 'P' &&
322 buf[i+1] == 'K' &&
323 buf[i+2] == '\005' &&
324 buf[i+3] == '\006' &&
325 ((pos + i + ENDHDR + ENDCOM(buf + i) == len)
326 || verifyEND(zip, pos + i, buf + i))) {
328 memcpy(endbuf, buf + i, ENDHDR);
794 char buf[PATH_MAX];
812 strcpy(buf, name);
813 JVM_NativePath(buf);
814 name = buf;
1321 ZIP_Read(jzfile *zip, jzentry *entry, jlong pos, void *buf, jint len)
1352 if (readFullyAt(zip->zfd, buf, len, start) == -1) {
1374 InflateFully(jzfile *zip, jzentry *entry, void *buf, char **msg)
1394 strm.next_out = buf;
1455 ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entryname)
1472 n = ZIP_Read(zip, entry, pos, buf, count);
1480 buf += n;
1485 int ok = InflateFully(zip, entry, buf, &msg);