Lines Matching refs:helper
753 static const char *targetEntryPath(MzPathHelper *helper, ZipEntry *pEntry) in targetEntryPath() argument
756 bool firstTime = (helper->buf == NULL); in targetEntryPath()
760 needLen = helper->targetDirLen + 1 + in targetEntryPath()
761 pEntry->fileNameLen - helper->zipDirLen + 1; in targetEntryPath()
762 if (needLen > helper->bufLen) { in targetEntryPath()
766 newBuf = (char *)realloc(helper->buf, needLen); in targetEntryPath()
770 helper->buf = newBuf; in targetEntryPath()
771 helper->bufLen = needLen; in targetEntryPath()
777 char *p = helper->buf; in targetEntryPath()
778 memcpy(p, helper->targetDir, helper->targetDirLen); in targetEntryPath()
779 p += helper->targetDirLen; in targetEntryPath()
780 if (p == helper->buf || p[-1] != '/') { in targetEntryPath()
781 helper->targetDirLen += 1; in targetEntryPath()
789 char *epath = helper->buf + helper->targetDirLen; in targetEntryPath()
790 memcpy(epath, pEntry->fileName + helper->zipDirLen, in targetEntryPath()
791 pEntry->fileNameLen - helper->zipDirLen); in targetEntryPath()
792 epath += pEntry->fileNameLen - helper->zipDirLen; in targetEntryPath()
795 return helper->buf; in targetEntryPath()
860 MzPathHelper helper; in mzExtractRecursive() local
861 helper.targetDir = targetDir; in mzExtractRecursive()
862 helper.targetDirLen = strlen(helper.targetDir); in mzExtractRecursive()
863 helper.zipDir = zpath; in mzExtractRecursive()
864 helper.zipDirLen = strlen(helper.zipDir); in mzExtractRecursive()
865 helper.buf = NULL; in mzExtractRecursive()
866 helper.bufLen = 0; in mzExtractRecursive()
916 const char *targetFile = targetEntryPath(&helper, pEntry); in mzExtractRecursive()
1012 free(helper.buf); in mzExtractRecursive()