Lines Matching refs:mZipFp
66 assert(mZipFp == NULL); // no reopen
99 mZipFp = fopen(zipFileName, openflags);
100 if (mZipFp == NULL) {
215 fseek(mZipFp, 0, SEEK_END);
216 fileLength = ftell(mZipFp);
217 rewind(mZipFp);
241 if (fseek(mZipFp, seekStart, SEEK_SET) != 0) {
248 if (fread(buf, 1, readAmount, mZipFp) != (size_t) readAmount) {
299 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) {
314 result = pEntry->initFromCDE(mZipFp);
330 if (fread(checkBuf, 1, 4, mZipFp) != 4) {
378 assert(mZipFp != NULL);
391 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) {
409 lfhPosn = ftell(mZipFp);
410 pEntry->mLFH.write(mZipFp);
411 startPosn = ftell(mZipFp);
418 result = compressFpToFp(mZipFp, inputFp, data, size, &crc);
429 long dst = ftell(mZipFp) - startPosn;
440 fseek(mZipFp, startPosn, SEEK_SET);
447 result = copyFpToFp(mZipFp, inputFp, &crc);
449 result = copyDataToFp(mZipFp, data, size, &crc);
467 endPosn = ftell(mZipFp); // seeked to end of compressed data
474 modWhen = getModTime(inputFp ? fileno(inputFp) : fileno(mZipFp));
485 if (fseek(mZipFp, lfhPosn, SEEK_SET) != 0) {
489 pEntry->mLFH.write(mZipFp);
524 assert(mZipFp != NULL);
527 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) {
556 lfhPosn = ftell(mZipFp);
557 pEntry->mLFH.write(mZipFp);
566 mZipFp, pSourceEntry->getFileOffset(), SEEK_SET) != 0)
577 if (copyPartialFpToFp(mZipFp, pSourceZip->mZipFp, copyLen, NULL)
588 endPosn = ftell(mZipFp);
631 assert(mZipFp != NULL);
634 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0) {
659 lfhPosn = ftell(mZipFp);
660 pEntry->mLFH.write(mZipFp);
661 startPosn = ftell(mZipFp);
670 if (fseek(pSourceZip->mZipFp, pSourceEntry->getFileOffset(), SEEK_SET) != 0)
684 long startPosn = ftell(mZipFp);
686 if (compressFpToFp(mZipFp, NULL, buf, uncompressedLen, &crc) != NO_ERROR) {
692 long endPosn = ftell(mZipFp);
702 if (copyPartialFpToFp(mZipFp, pSourceZip->mZipFp, copyLen, NULL)
714 endPosn = ftell(mZipFp);
728 if (fseek(mZipFp, lfhPosn, SEEK_SET) != 0) {
732 pEntry->mLFH.write(mZipFp);
959 assert(mZipFp != NULL);
965 if (fseek(mZipFp, mEOCD.mCentralDirOffset, SEEK_SET) != 0)
971 pEntry->mCDE.write(mZipFp);
974 eocdPosn = ftell(mZipFp);
977 mEOCD.write(mZipFp);
984 if (ftruncate(fileno(mZipFp), ftell(mZipFp)) != 0) {
985 ALOGW("ftruncate failed %ld: %s\n", ftell(mZipFp), strerror(errno));
1069 result = filemove(mZipFp, pEntry->getLFHOffset() - adjust,
1178 assert(mZipFp != NULL);
1181 fd = dup(fileno(mZipFp));
1212 fseek(mZipFp, 0, SEEK_SET);
1215 if (fseek(mZipFp, offset, SEEK_SET) != 0) {
1222 ssize_t amt = fread(buf, 1, unlen, mZipFp);
1243 if (!ZipUtils::inflateToBuffer(mZipFp, buf, unlen, clen)) {