|
|
int show_mode = 0; /* show file protection */ | int show_mode = 0; /* show file protection */ |
#endif | #endif |
int first_dir = 1; /* if first direntry -- to adjust dat_ofs */ | int first_dir = 1; /* if first direntry -- to adjust dat_ofs */ |
|
unsigned long zoo_pointer = 0; /* Track our position in the file */ |
while (*option) { | while (*option) { |
switch (*option) { | switch (*option) { |
case 'a': show_name++; break; | case 'a': show_name++; break; |
|
|
show_acmt (&zoo_header, zoo_file, 0); /* show archive comment */ | show_acmt (&zoo_header, zoo_file, 0); /* show archive comment */ |
} | } |
| |
|
/* Begin tracking our position in the file */ |
|
zoo_pointer = zoo_header.zoo_start; |
|
|
/* Seek to the beginning of the first directory entry */ | /* Seek to the beginning of the first directory entry */ |
if (zooseek (zoo_file, zoo_header.zoo_start, 0) != 0) { | if (zooseek (zoo_file, zoo_header.zoo_start, 0) != 0) { |
ercount++; | ercount++; |
|
|
if (verb_list && !fast) | if (verb_list && !fast) |
show_comment (&direntry, zoo_file, 0, (char *) NULL); | show_comment (&direntry, zoo_file, 0, (char *) NULL); |
} /* end if (lots of conditions) */ | } /* end if (lots of conditions) */ |
|
|
|
/* Make sure we are not seeking to already processed data */ |
|
if (direntry.next <= zoo_pointer) |
|
prterror ('f', "ZOO chain structure is corrupted\n"); |
|
zoo_pointer = direntry.next; |
| |
/* ..seek to next dir entry */ | /* ..seek to next dir entry */ |
zooseek (zoo_file, direntry.next, 0); | zooseek (zoo_file, direntry.next, 0); |