/* Extract a file identifed by filename from the archive associated to status. */ static int extractDependencyFromArchive(ARCHIVE_STATUS *status, const char *filename) { TOC * ptoc = status->tocbuff; VS("Extracting dependencies from archive\n"); while (ptoc < status->tocend) { if (strcmp(ptoc->name, filename) == 0) if (extract2fs(status, ptoc)) return -1; ptoc = incrementTocPtr(status, ptoc); } return 0; }
/* * extract all binaries (type 'b') and all data files (type 'x') to the filesystem */ int extractBinaries(char **workpath) { TOC * ptoc = f_tocbuff; workpath[0] = '\0'; VS("Extracting binaries\n"); while (ptoc < f_tocend) { if (ptoc->typcd == 'b' || ptoc->typcd == 'x' || ptoc->typcd == 'Z') if (extract2fs(ptoc)) return -1; ptoc = incrementTocPtr(ptoc); } *workpath = f_workpath; return 0; }
/* * extract all binaries (type 'b') and all data files (type 'x') to the filesystem * and checks for dependencies (type 'd'). If dependencies are found, extract them. */ int extractBinaries(ARCHIVE_STATUS *status_list[]) { TOC * ptoc = status_list[SELF]->tocbuff; VS("Extracting binaries\n"); while (ptoc < status_list[SELF]->tocend) { if (ptoc->typcd == 'b' || ptoc->typcd == 'x' || ptoc->typcd == 'Z') if (extract2fs(status_list[SELF], ptoc)) return -1; if (ptoc->typcd == 'd') { if (extractDependency(status_list, ptoc->name) == -1) return -1; } ptoc = incrementTocPtr(status_list[SELF], ptoc); } return 0; }
/* * extract all binaries (type 'b') and all data files (type 'x') to the filesystem * and checks for dependencies (type 'd'). If dependencies are found, extract them. */ int extractBinaries(ARCHIVE_STATUS *status_list[]) { TOC * ptoc = status_list[SELF]->tocbuff; VS("Extracting binaries\n"); while (ptoc < status_list[SELF]->tocend) { if (ptoc->typcd == ARCHIVE_ITEM_BINARY || ptoc->typcd == ARCHIVE_ITEM_DATA || ptoc->typcd == ARCHIVE_ITEM_ZIPFILE) if (extract2fs(status_list[SELF], ptoc)) return -1; if (ptoc->typcd == ARCHIVE_ITEM_DEPENDENCY) { if (extractDependency(status_list, ptoc->name) == -1) return -1; } ptoc = incrementTocPtr(status_list[SELF], ptoc); } return 0; }