Lines Matching refs:entryInfo
125 BOOL GetNextEntry(DarchHandle* handle, FSTEntryInfo* entryInfo) in GetNextEntry() argument
148 entryInfo->next = NULL; in GetNextEntry()
149 entryInfo->entryNum = handle->currEntry; in GetNextEntry()
150 strcpy(entryInfo->pathName, CurrDir->fullPath); in GetNextEntry()
151 entryInfo->nameOffset = strlen(entryInfo->pathName); in GetNextEntry()
152 entryInfo->name = (char*)entryInfo->pathName + entryInfo->nameOffset; in GetNextEntry()
153 strcat(entryInfo->pathName, GetName(handle, fstEntry)); in GetNextEntry()
157 fprintf(stderr, "full path name is %s\n", entryInfo->pathName); in GetNextEntry()
158 fprintf(stderr, "name is %s\n", entryInfo->name); in GetNextEntry()
168 entryInfo->isDir = TRUE; in GetNextEntry()
169 entryInfo->parentEntry = parentDir(fstEntry); in GetNextEntry()
170 entryInfo->nextEntry = nextDir(fstEntry); in GetNextEntry()
171 entryInfo->filePosition = 0; in GetNextEntry()
172 entryInfo->fileLength = 0; in GetNextEntry()
183 strcpy(dirInfo->fullPath, entryInfo->pathName); in GetNextEntry()
185 dirInfo->nextEntry = entryInfo->nextEntry; in GetNextEntry()
192 entryInfo->isDir = FALSE; in GetNextEntry()
193 entryInfo->parentEntry = 0; in GetNextEntry()
194 entryInfo->nextEntry = 0; in GetNextEntry()
195 entryInfo->filePosition = filePosition(fstEntry); in GetNextEntry()
196 entryInfo->fileLength = fileLength(fstEntry); in GetNextEntry()
218 void Diff(int fid, FSTEntryInfo* entryInfo) in Diff() argument
224 if(stat(entryInfo->pathName, &sb)) in Diff()
226 if (entryInfo->isDir) in Diff()
228 fprintf(stdout, "%s: Directory does not exist\n", entryInfo->pathName); in Diff()
232 fprintf(stdout, "%s: File does not exist\n", entryInfo->pathName); in Diff()
237 if (entryInfo->isDir) in Diff()
241 fprintf(stdout, "%s: No longer a directory\n", entryInfo->pathName); in Diff()
247 fileLength = entryInfo->fileLength; in Diff()
251 fprintf(stdout, "%s: Not a regular file\n", entryInfo->pathName); in Diff()
258 fprintf(stdout, "%s: Size differs\n", entryInfo->pathName); in Diff()
262 if( (fidB = open(entryInfo->pathName, O_BINARY | O_RDONLY)) == -1 ) in Diff()
264 fprintf(stderr, "%s: Error opening %s\n", progName, entryInfo->pathName); in Diff()
268 if (DiffUtility(fid, entryInfo->filePosition, fidB, 0, fileLength)) in Diff()
272 fprintf(stdout, "%s: Same\n", entryInfo->pathName); in Diff()
277 fprintf(stdout, "%s: Data differs\n", entryInfo->pathName); in Diff()
287 void Extract(int fid, FSTEntryInfo* entryInfo) in Extract() argument
293 if (entryInfo->isDir) in Extract()
295 CreateDirectory(entryInfo->pathName, NULL); in Extract()
299 filePosition = entryInfo->filePosition; in Extract()
300 fileLength = entryInfo->fileLength; in Extract()
302 … if( (outid = open(entryInfo->pathName, O_BINARY | O_TRUNC | O_CREAT | O_WRONLY, 0666)) == -1 ) in Extract()
304 fprintf(stderr, "Cannot open %s\n", entryInfo->pathName); in Extract()
318 FSTEntryInfo entryInfo; in ListArc() local
328 while(GetNextEntry(handle, &entryInfo)) in ListArc()
332 fprintf(stdout, "%s ", entryInfo.isDir? "d" : "-"); in ListArc()
333 fprintf(stdout, "%7d %7d ", entryInfo.filePosition, in ListArc()
334 entryInfo.fileLength); in ListArc()
337 fprintf(stdout, "%s", entryInfo.pathName); in ListArc()
338 if (entryInfo.isDir) in ListArc()
375 FSTEntryInfo entryInfo; in ExtractArc() local
390 while(GetNextEntry(handle, &entryInfo)) in ExtractArc()
392 fprintf(stdout, "%s ", entryInfo.isDir? "d" : "-"); in ExtractArc()
393 fprintf(stdout, "%7d %7d ", entryInfo.filePosition, in ExtractArc()
394 entryInfo.fileLength); in ExtractArc()
395 fprintf(stdout, "%s", entryInfo.pathName); in ExtractArc()
396 if (entryInfo.isDir) in ExtractArc()
405 Extract(handle->fid, &entryInfo); in ExtractArc()
415 FSTEntryInfo entryInfo; in DiffArc() local
427 while(GetNextEntry(handle, &entryInfo)) in DiffArc()
429 fprintf(stdout, "%s", entryInfo.pathName); in DiffArc()
430 if (entryInfo.isDir) in DiffArc()
439 Diff(handle->fid, &entryInfo); in DiffArc()