Lines Matching refs:helper
864 static const char *targetEntryPath(MzPathHelper *helper, ZipEntry *pEntry) in targetEntryPath() argument
867 bool firstTime = (helper->buf == NULL); in targetEntryPath()
871 needLen = helper->targetDirLen + 1 + in targetEntryPath()
872 pEntry->fileNameLen - helper->zipDirLen + 1; in targetEntryPath()
873 if (needLen > helper->bufLen) { in targetEntryPath()
877 newBuf = (char *)realloc(helper->buf, needLen); in targetEntryPath()
881 helper->buf = newBuf; in targetEntryPath()
882 helper->bufLen = needLen; in targetEntryPath()
888 char *p = helper->buf; in targetEntryPath()
889 memcpy(p, helper->targetDir, helper->targetDirLen); in targetEntryPath()
890 p += helper->targetDirLen; in targetEntryPath()
891 if (p == helper->buf || p[-1] != '/') { in targetEntryPath()
892 helper->targetDirLen += 1; in targetEntryPath()
900 char *epath = helper->buf + helper->targetDirLen; in targetEntryPath()
901 memcpy(epath, pEntry->fileName + helper->zipDirLen, in targetEntryPath()
902 pEntry->fileNameLen - helper->zipDirLen); in targetEntryPath()
903 epath += pEntry->fileNameLen - helper->zipDirLen; in targetEntryPath()
906 return helper->buf; in targetEntryPath()
970 MzPathHelper helper; in mzExtractRecursive() local
971 helper.targetDir = targetDir; in mzExtractRecursive()
972 helper.targetDirLen = strlen(helper.targetDir); in mzExtractRecursive()
973 helper.zipDir = zpath; in mzExtractRecursive()
974 helper.zipDirLen = strlen(helper.zipDir); in mzExtractRecursive()
975 helper.buf = NULL; in mzExtractRecursive()
976 helper.bufLen = 0; in mzExtractRecursive()
1025 const char *targetFile = targetEntryPath(&helper, pEntry); in mzExtractRecursive()
1144 free(helper.buf); in mzExtractRecursive()