|
Lines 242-247
Link Here
|
| 242 |
INT open_archive(INT print_err) // opens archive (or volume) |
242 |
INT open_archive(INT print_err) // opens archive (or volume) |
| 243 |
{ |
243 |
{ |
| 244 |
CHAR av_str[80]; |
244 |
CHAR av_str[80]; |
|
|
245 |
unsigned int copylen; |
| 245 |
|
246 |
|
| 246 |
archan = open(aname, O_RDONLY | O_BINARY); // open file |
247 |
archan = open(aname, O_RDONLY | O_BINARY); // open file |
| 247 |
|
248 |
|
|
Lines 265-272
Link Here
|
| 265 |
sprintf(av_str, "\ncreated on %d.%d.%d by ", |
266 |
sprintf(av_str, "\ncreated on %d.%d.%d by ", |
| 266 |
ts_day(adat.time_cr), ts_month(adat.time_cr), ts_year(adat.time_cr)); |
267 |
ts_day(adat.time_cr), ts_month(adat.time_cr), ts_year(adat.time_cr)); |
| 267 |
printf(av_str); |
268 |
printf(av_str); |
| 268 |
strncpy(av_str, mhead.AV, mhead.AV_SIZE); |
269 |
copylen = mhead.AV_SIZE; |
| 269 |
av_str[mhead.AV_SIZE] = 0; |
270 |
if (copylen > 79) |
|
|
271 |
copylen = 79; |
| 272 |
strncpy(av_str, mhead.AV, copylen); |
| 273 |
av_str[copylen] = 0; |
| 270 |
printf("%s\n\n", av_str); |
274 |
printf("%s\n\n", av_str); |
| 271 |
} |
275 |
} |
| 272 |
comment_out("Main comment:"); // print main comment |
276 |
comment_out("Main comment:"); // print main comment |
|
Lines 302-308
Link Here
|
| 302 |
INT proc_vol(void) // opens volume |
306 |
INT proc_vol(void) // opens volume |
| 303 |
{ |
307 |
{ |
| 304 |
INT i; |
308 |
INT i; |
| 305 |
CHAR s[80]; |
309 |
CHAR s[PATH_MAX + 80]; |
| 306 |
|
310 |
|
| 307 |
// if f_allvol_pr is 2 we have -y and should never ask |
311 |
// if f_allvol_pr is 2 we have -y and should never ask |
| 308 |
if ((!fileexists_insense(aname) && f_allvol_pr != 2) || !f_allvol_pr) |
312 |
if ((!fileexists_insense(aname) && f_allvol_pr != 2) || !f_allvol_pr) |
|
Lines 430-436
Link Here
|
| 430 |
if (head.HEAD_TYPE == FILE_BLK) |
434 |
if (head.HEAD_TYPE == FILE_BLK) |
| 431 |
{ |
435 |
{ |
| 432 |
comment_out("File comment:"); // show file comment |
436 |
comment_out("File comment:"); // show file comment |
| 433 |
ace_fname(file, &head, nopath); // get file name |
437 |
ace_fname(file, &head, nopath, sizeof(file)); // get file name |
| 434 |
printf("\n%s", file); |
438 |
printf("\n%s", file); |
| 435 |
flush; |
439 |
flush; |
| 436 |
dcpr_init_file(); // initialize decompression of file |
440 |
dcpr_init_file(); // initialize decompression of file |
|
Lines 498-504
Link Here
|
| 498 |
if (head.HEAD_TYPE == FILE_BLK) |
502 |
if (head.HEAD_TYPE == FILE_BLK) |
| 499 |
{ |
503 |
{ |
| 500 |
ULONG ti=fhead.FTIME; |
504 |
ULONG ti=fhead.FTIME; |
| 501 |
ace_fname(file, &head, verbose ? 0 : 1); // get file name |
505 |
ace_fname(file, &head, verbose ? 0 : 1, sizeof(file)); // get file name |
| 502 |
|
506 |
|
| 503 |
size += fhead.SIZE; |
507 |
size += fhead.SIZE; |
| 504 |
psize += |
508 |
psize += |
|
Lines 590-596
Link Here
|
| 590 |
|
594 |
|
| 591 |
init_unace(); // initialize unace |
595 |
init_unace(); // initialize unace |
| 592 |
|
596 |
|
| 593 |
strcpy(aname, argv[arg_cnt]); // get archive name |
597 |
strncpy(aname, argv[arg_cnt], sizeof(aname) - 4); // get archive name |
|
|
598 |
aname[sizeof(aname) - 5] = '\0'; |
| 594 |
if (!(s = (CHAR *) strrchr(aname, DIRSEP))) |
599 |
if (!(s = (CHAR *) strrchr(aname, DIRSEP))) |
| 595 |
s = aname; |
600 |
s = aname; |
| 596 |
if (!strrchr(s, '.')) |
601 |
if (!strrchr(s, '.')) |