|
|
1.1 ! root 1: ! 2: Index: append.c ! 3: *** /tmp/,RCSt1a17023 Sun Feb 12 14:05:27 1989 ! 4: --- append.c Sun Feb 12 14:01:57 1989 ! 5: *************** ! 6: *** 1,6 ! 7: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 8: * ! 9: ! * $Revision: 1.1 $ ! 10: * ! 11: * append.c - append to a tape archive. ! 12: * ! 13: ! 14: --- 1,6 ----- ! 15: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 16: * ! 17: ! * $Revision: 1.1 $ ! 18: * ! 19: * append.c - append to a tape archive. ! 20: * ! 21: *************** ! 22: *** 27,33 ! 23: * ! 24: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 25: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 26: ! * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 27: * ! 28: * $Log: patch1,v $ ! 29: # Revision 1.1 92/08/28 08:02:28 bin ! 30: # Initial revision ! 31: # ! 32: * Revision 1.1 88/12/23 18:02:00 mark ! 33: ! 34: --- 27,33 ----- ! 35: * ! 36: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 37: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 38: ! * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 39: * ! 40: * $Log: patch1,v $ ! 41: # Revision 1.1 92/08/28 08:02:28 bin ! 42: # Initial revision ! 43: # ! 44: * Revision 1.2 89/02/12 10:03:58 mark ! 45: *************** ! 46: *** 30,35 ! 47: * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 48: * ! 49: * $Log: patch1,v $ ! 50: # Revision 1.1 92/08/28 08:02:28 bin ! 51: # Initial revision ! 52: # ! 53: * Revision 1.1 88/12/23 18:02:00 mark ! 54: * Initial revision ! 55: * ! 56: ! 57: --- 30,38 ----- ! 58: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 59: * ! 60: * $Log: patch1,v $ ! 61: # Revision 1.1 92/08/28 08:02:28 bin ! 62: # Initial revision ! 63: # ! 64: + * Revision 1.2 89/02/12 10:03:58 mark ! 65: + * 1.2 release fixes ! 66: + * ! 67: * Revision 1.1 88/12/23 18:02:00 mark ! 68: * Initial revision ! 69: * ! 70: *************** ! 71: *** 36,42 ! 72: */ ! 73: ! 74: #ifndef lint ! 75: ! static char *ident = "$Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $"; ! 76: static char *copyright = "Copyright (c) 1989 Mark H. Colburn.\nAll rights reserved.\n"; ! 77: #endif /* ! lint */ ! 78: ! 79: ! 80: --- 39,45 ----- ! 81: */ ! 82: ! 83: #ifndef lint ! 84: ! static char *ident = "$Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $"; ! 85: static char *copyright = "Copyright (c) 1989 Mark H. Colburn.\nAll rights reserved.\n"; ! 86: #endif /* ! lint */ ! 87: ! 88: Index: buffer.c ! 89: *** /tmp/,RCSt1a17028 Sun Feb 12 14:05:34 1989 ! 90: --- buffer.c Sun Feb 12 14:02:00 1989 ! 91: *************** ! 92: *** 1,6 ! 93: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 94: * ! 95: ! * $Revision: 1.1 $ ! 96: * ! 97: * buffer.c - Buffer management functions ! 98: * ! 99: ! 100: --- 1,6 ----- ! 101: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 102: * ! 103: ! * $Revision: 1.1 $ ! 104: * ! 105: * buffer.c - Buffer management functions ! 106: * ! 107: *************** ! 108: *** 30,36 ! 109: * ! 110: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 111: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 112: ! * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 113: * ! 114: * $Log: patch1,v $ ! 115: # Revision 1.1 92/08/28 08:02:28 bin ! 116: # Initial revision ! 117: # ! 118: * Revision 1.1 88/12/23 18:02:01 mark ! 119: ! 120: --- 30,36 ----- ! 121: * ! 122: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 123: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 124: ! * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 125: * ! 126: * $Log: patch1,v $ ! 127: # Revision 1.1 92/08/28 08:02:28 bin ! 128: # Initial revision ! 129: # ! 130: * Revision 1.2 89/02/12 10:04:02 mark ! 131: *************** ! 132: *** 33,38 ! 133: * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 134: * ! 135: * $Log: patch1,v $ ! 136: # Revision 1.1 92/08/28 08:02:28 bin ! 137: # Initial revision ! 138: # ! 139: * Revision 1.1 88/12/23 18:02:01 mark ! 140: * Initial revision ! 141: * ! 142: ! 143: --- 33,41 ----- ! 144: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 145: * ! 146: * $Log: patch1,v $ ! 147: # Revision 1.1 92/08/28 08:02:28 bin ! 148: # Initial revision ! 149: # ! 150: + * Revision 1.2 89/02/12 10:04:02 mark ! 151: + * 1.2 release fixes ! 152: + * ! 153: * Revision 1.1 88/12/23 18:02:01 mark ! 154: * Initial revision ! 155: * ! 156: *************** ! 157: *** 39,45 ! 158: */ ! 159: ! 160: #ifndef lint ! 161: ! static char *ident = "$Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $"; ! 162: static char *copyright = "Copyright (c) 1989 Mark H. Colburn.\nAll rights reserved.\n"; ! 163: #endif /* ! lint */ ! 164: ! 165: ! 166: --- 42,48 ----- ! 167: */ ! 168: ! 169: #ifndef lint ! 170: ! static char *ident = "$Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $"; ! 171: static char *copyright = "Copyright (c) 1989 Mark H. Colburn.\nAll rights reserved.\n"; ! 172: #endif /* ! lint */ ! 173: ! 174: *************** ! 175: *** 114,121 ! 176: int ofd; ! 177: time_t tstamp[2]; ! 178: ! 179: ! if ((ofd = openo(name, asb, linkp = linkfrom(name, asb), 0)) > 0) { ! 180: ! if (asb->sb_size || linkp == NULL || linkp->l_size == 0) { ! 181: close(indata(ofd, asb->sb_size, name)); ! 182: } else if ((ifd = open(linkp->l_path->p_name, O_RDONLY)) < 0) { ! 183: warn(linkp->l_path->p_name, syserr()); ! 184: ! 185: --- 117,124 ----- ! 186: int ofd; ! 187: time_t tstamp[2]; ! 188: ! 189: ! if ((ofd = openout(name, asb, linkp = linkfrom(name, asb), 0)) > 0) { ! 190: ! if (asb->sb_size || linkp == (Link *)NULL || linkp->l_size == 0) { ! 191: close(indata(ofd, asb->sb_size, name)); ! 192: } else if ((ifd = open(linkp->l_path->p_name, O_RDONLY)) < 0) { ! 193: warn(linkp->l_path->p_name, strerror()); ! 194: *************** ! 195: *** 118,124 ! 196: if (asb->sb_size || linkp == NULL || linkp->l_size == 0) { ! 197: close(indata(ofd, asb->sb_size, name)); ! 198: } else if ((ifd = open(linkp->l_path->p_name, O_RDONLY)) < 0) { ! 199: ! warn(linkp->l_path->p_name, syserr()); ! 200: } else { ! 201: passdata(linkp->l_path->p_name, ifd, name, ofd); ! 202: close(ifd); ! 203: ! 204: --- 121,127 ----- ! 205: if (asb->sb_size || linkp == (Link *)NULL || linkp->l_size == 0) { ! 206: close(indata(ofd, asb->sb_size, name)); ! 207: } else if ((ifd = open(linkp->l_path->p_name, O_RDONLY)) < 0) { ! 208: ! warn(linkp->l_path->p_name, strerror()); ! 209: } else { ! 210: passdata(linkp->l_path->p_name, ifd, name, ofd); ! 211: close(ifd); ! 212: *************** ! 213: *** 128,134 ! 214: return(buf_skip((OFFSET) asb->sb_size) >= 0); ! 215: } ! 216: tstamp[0] = (!f_pass && f_access_time) ? asb->sb_atime : time((time_t *) 0); ! 217: ! tstamp[1] = f_modification_time ? asb->sb_mtime : time((time_t *) 0); ! 218: utime(name, tstamp); ! 219: return (0); ! 220: } ! 221: ! 222: --- 131,137 ----- ! 223: return(buf_skip((OFFSET) asb->sb_size) >= 0); ! 224: } ! 225: tstamp[0] = (!f_pass && f_access_time) ? asb->sb_atime : time((time_t *) 0); ! 226: ! tstamp[1] = f_mtime ? asb->sb_mtime : time((time_t *) 0); ! 227: utime(name, tstamp); ! 228: return (0); ! 229: } ! 230: *************** ! 231: *** 181,187 ! 232: size -= (chunk = size < avail ? (uint) size : avail); ! 233: if (oops == 0 && (got = read(fd, buf, (unsigned int) chunk)) < 0) { ! 234: oops = -1; ! 235: ! warn(name, syserr()); ! 236: got = 0; ! 237: } ! 238: if (got < chunk) { ! 239: ! 240: --- 184,190 ----- ! 241: size -= (chunk = size < avail ? (uint) size : avail); ! 242: if (oops == 0 && (got = read(fd, buf, (unsigned int) chunk)) < 0) { ! 243: oops = -1; ! 244: ! warn(name, strerror()); ! 245: got = 0; ! 246: } ! 247: if (got < chunk) { ! 248: *************** ! 249: *** 185,191 ! 250: got = 0; ! 251: } ! 252: if (got < chunk) { ! 253: ! if (oops == NULL) { ! 254: oops = -1; ! 255: } ! 256: warn(name, "Early EOF"); ! 257: ! 258: --- 188,194 ----- ! 259: got = 0; ! 260: } ! 261: if (got < chunk) { ! 262: ! if (oops == 0) { ! 263: oops = -1; ! 264: } ! 265: warn(name, "Early EOF"); ! 266: *************** ! 267: *** 296,302 ! 268: * DESCRIPTION ! 269: * ! 270: * Copies a file from one place to another. Doesn't believe in input ! 271: ! * file descriptor zero (see description of kludge in openi() comments). ! 272: * Closes the provided output file descriptor. ! 273: * ! 274: * PARAMETERS ! 275: ! 276: --- 299,305 ----- ! 277: * DESCRIPTION ! 278: * ! 279: * Copies a file from one place to another. Doesn't believe in input ! 280: ! * file descriptor zero (see description of kludge in openin() comments). ! 281: * Closes the provided output file descriptor. ! 282: * ! 283: * PARAMETERS ! 284: *************** ! 285: *** 333,339 ! 286: total += got; ! 287: } ! 288: if (got) { ! 289: ! warn(got < 0 ? from : to, syserr()); ! 290: } else if (sparse > 0 ! 291: && (lseek(ofd, (OFFSET)(-sparse), 1) < 0 ! 292: || write(ofd, block, (uint) sparse) != sparse)) { ! 293: ! 294: --- 336,342 ----- ! 295: total += got; ! 296: } ! 297: if (got) { ! 298: ! warn(got < 0 ? from : to, strerror()); ! 299: } else if (sparse > 0 ! 300: && (lseek(ofd, (OFFSET)(-sparse), 1) < 0 ! 301: || write(ofd, block, (uint) sparse) != sparse)) { ! 302: *************** ! 303: *** 337,343 ! 304: } else if (sparse > 0 ! 305: && (lseek(ofd, (OFFSET)(-sparse), 1) < 0 ! 306: || write(ofd, block, (uint) sparse) != sparse)) { ! 307: ! warn(to, syserr()); ! 308: } ! 309: } ! 310: close(ofd); ! 311: ! 312: --- 340,346 ----- ! 313: } else if (sparse > 0 ! 314: && (lseek(ofd, (OFFSET)(-sparse), 1) < 0 ! 315: || write(ofd, block, (uint) sparse) != sparse)) { ! 316: ! warn(to, strerror()); ! 317: } ! 318: } ! 319: close(ofd); ! 320: *************** ! 321: *** 377,384 ! 322: ! 323: #endif ! 324: { ! 325: - extern char *malloc(); ! 326: - ! 327: if (size <= 0) { ! 328: fatal("invalid value for blocksize"); ! 329: } ! 330: ! 331: --- 380,385 ----- ! 332: ! 333: #endif ! 334: { ! 335: if (size <= 0) { ! 336: fatal("invalid value for blocksize"); ! 337: } ! 338: *************** ! 339: *** 382,388 ! 340: if (size <= 0) { ! 341: fatal("invalid value for blocksize"); ! 342: } ! 343: ! if ((bufstart = malloc((unsigned) size)) == NULL) { ! 344: fatal("Cannot allocate I/O buffer"); ! 345: } ! 346: bufend = bufidx = bufstart; ! 347: ! 348: --- 383,389 ----- ! 349: if (size <= 0) { ! 350: fatal("invalid value for blocksize"); ! 351: } ! 352: ! if ((bufstart = malloc((unsigned) size)) == (char *)NULL) { ! 353: fatal("Cannot allocate I/O buffer"); ! 354: } ! 355: bufend = bufidx = bufstart; ! 356: *************** ! 357: *** 534,540 ! 358: uint avail; ! 359: ! 360: corrupt = sparse = 0; ! 361: ! oops = NULL; ! 362: while (size) { ! 363: corrupt |= buf_in_avail(&buf, &avail); ! 364: size -= (chunk = size < avail ? (uint) size : avail); ! 365: ! 366: --- 535,541 ----- ! 367: uint avail; ! 368: ! 369: corrupt = sparse = 0; ! 370: ! oops = (char *)NULL; ! 371: while (size) { ! 372: corrupt |= buf_in_avail(&buf, &avail); ! 373: size -= (chunk = size < avail ? (uint) size : avail); ! 374: *************** ! 375: *** 538,545 ! 376: while (size) { ! 377: corrupt |= buf_in_avail(&buf, &avail); ! 378: size -= (chunk = size < avail ? (uint) size : avail); ! 379: ! if (oops == NULL && (sparse = ar_write(fd, buf, chunk)) < 0) { ! 380: ! oops = syserr(); ! 381: } ! 382: buf_use(chunk); ! 383: } ! 384: ! 385: --- 539,546 ----- ! 386: while (size) { ! 387: corrupt |= buf_in_avail(&buf, &avail); ! 388: size -= (chunk = size < avail ? (uint) size : avail); ! 389: ! if (oops == (char *)NULL && (sparse = ar_write(fd, buf, chunk)) < 0) { ! 390: ! oops = strerror(); ! 391: } ! 392: buf_use(chunk); ! 393: } ! 394: *************** ! 395: *** 550,556 ! 396: warn(name, oops); ! 397: } else if (sparse > 0 && (lseek(fd, (OFFSET) - 1, 1) < 0 ! 398: || write(fd, "", 1) != 1)) { ! 399: ! warn(name, syserr()); ! 400: } ! 401: return (fd); ! 402: } ! 403: ! 404: --- 551,557 ----- ! 405: warn(name, oops); ! 406: } else if (sparse > 0 && (lseek(fd, (OFFSET) - 1, 1) < 0 ! 407: || write(fd, "", 1) != 1)) { ! 408: ! warn(name, strerror()); ! 409: } ! 410: return (fd); ! 411: } ! 412: *************** ! 413: *** 630,636 ! 414: bufend += got; ! 415: } else if (got < 0) { ! 416: failed = -1; ! 417: ! warnarch(syserr(), (OFFSET) 0 - (bufend - bufidx)); ! 418: } else { ! 419: ++areof; ! 420: } ! 421: ! 422: --- 631,637 ----- ! 423: bufend += got; ! 424: } else if (got < 0) { ! 425: failed = -1; ! 426: ! warnarch(strerror(), (OFFSET) 0 - (bufend - bufidx)); ! 427: } else { ! 428: ++areof; ! 429: } ! 430: Index: config.h ! 431: *** /tmp/,RCSt1a17033 Sun Feb 12 14:05:47 1989 ! 432: --- config.h Sun Feb 12 14:02:01 1989 ! 433: *************** ! 434: *** 1,6 ! 435: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 436: * ! 437: ! * $Revision: 1.1 $ ! 438: * ! 439: * config.h - configuration options for PAX ! 440: * ! 441: ! 442: --- 1,6 ----- ! 443: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 444: * ! 445: ! * $Revision: 1.1 $ ! 446: * ! 447: * config.h - configuration options for PAX ! 448: * ! 449: *************** ! 450: *** 28,34 ! 451: * ! 452: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 453: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 454: ! * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 455: */ ! 456: ! 457: #ifndef _PAX_CONFIG_H ! 458: ! 459: --- 28,34 ----- ! 460: * ! 461: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 462: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 463: ! * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 464: */ ! 465: ! 466: #ifndef _PAX_CONFIG_H ! 467: *************** ! 468: *** 36,41 ! 469: ! 470: /* Defines */ ! 471: ! 472: /* ! 473: * USG - USG (Unix System V) specific modifications ! 474: * ! 475: ! 476: --- 36,52 ----- ! 477: ! 478: /* Defines */ ! 479: ! 480: + /* XENIX_286 (SCO ugh, Xenix system V(?) 286, USG with changes... ! 481: + * You will get a warning about DIRSIZ being redefined, ignore it, ! 482: + * complain to SCO about include files that are messed up or send ! 483: + * mail to [email protected], who can provide some patches to fix ! 484: + * your include files. ! 485: + * ! 486: + * Defining XENIX_286 will automatically define USG. ! 487: + * ! 488: + */ ! 489: + #define XENIX_286 /* Running on a XENIX 286 system */ ! 490: + ! 491: /* ! 492: * USG - USG (Unix System V) specific modifications ! 493: * ! 494: *************** ! 495: *** 130,135 ! 496: /* #define STRCSPN /* implementation does not have strcspn() */ ! 497: ! 498: /* ! 499: * END OF CONFIGURATION SECTION ! 500: * ! 501: * Nothing beyond this point should need to be changed ! 502: ! 503: --- 141,157 ----- ! 504: /* #define STRCSPN /* implementation does not have strcspn() */ ! 505: ! 506: /* ! 507: + * STRERROR - use the strerror function included with pax ! 508: + * ! 509: + * Non-Ansi systems do not have the strerror() function in their C libraries. ! 510: + * For those system define STRERROR and the one provided in misc.c will ! 511: + * be used instead. ! 512: + */ ! 513: + #define STRERROR /* implementation does not have strerror() */ ! 514: + ! 515: + /* ! 516: + ! 517: + /* ! 518: * END OF CONFIGURATION SECTION ! 519: * ! 520: * Nothing beyond this point should need to be changed ! 521: *************** ! 522: *** 148,152 ! 523: # define DIRENT ! 524: # endif ! 525: #endif ! 526: ! 527: #endif /* _PAX_CONFIG_H */ ! 528: ! 529: --- 170,178 ----- ! 530: # define DIRENT ! 531: # endif ! 532: #endif ! 533: + ! 534: + #ifdef XENIX_286 ! 535: + # define USG ! 536: + #endif /* XENIX_286 */ ! 537: ! 538: #endif /* _PAX_CONFIG_H */ ! 539: Index: cpio.1 ! 540: *** /tmp/,RCSt1a17038 Sun Feb 12 14:05:54 1989 ! 541: --- cpio.1 Sun Feb 12 14:02:02 1989 ! 542: *************** ! 543: *** 1,4 ! 544: ! .\" $Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $ ! 545: .TH CPIO 1 "USENIX Association" "" ! 546: .SH NAME ! 547: cpio \- copy file archives in and out ! 548: ! 549: --- 1,4 ----- ! 550: ! .\" $Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $ ! 551: .TH CPIO 1 "USENIX Association" "" ! 552: .SH NAME ! 553: cpio \- copy file archives in and out ! 554: *************** ! 555: *** 254,260 ! 556: .PP ! 557: THE SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 558: IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 559: ! WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 560: .SH AUTHOR ! 561: Mark H. Colburn ! 562: .br ! 563: ! 564: --- 254,260 ----- ! 565: .PP ! 566: THE SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 567: IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 568: ! WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 569: .SH AUTHOR ! 570: Mark H. Colburn ! 571: .br ! 572: Index: cpio.c ! 573: *** /tmp/,RCSt1a17043 Sun Feb 12 14:06:01 1989 ! 574: --- cpio.c Sun Feb 12 14:02:03 1989 ! 575: *************** ! 576: *** 1,6 ! 577: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 578: * ! 579: ! * $Revision: 1.1 $ ! 580: * ! 581: * cpio.c - Cpio specific functions for archive handling ! 582: * ! 583: ! 584: --- 1,6 ----- ! 585: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 586: * ! 587: ! * $Revision: 1.1 $ ! 588: * ! 589: * cpio.c - Cpio specific functions for archive handling ! 590: * ! 591: *************** ! 592: *** 27,33 ! 593: * ! 594: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 595: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 596: ! * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 597: * ! 598: * $Log: patch1,v $ ! 599: # Revision 1.1 92/08/28 08:02:28 bin ! 600: # Initial revision ! 601: # ! 602: * Revision 1.1 88/12/23 18:02:05 mark ! 603: ! 604: --- 27,33 ----- ! 605: * ! 606: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 607: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 608: ! * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 609: * ! 610: * $Log: patch1,v $ ! 611: # Revision 1.1 92/08/28 08:02:28 bin ! 612: # Initial revision ! 613: # ! 614: * Revision 1.2 89/02/12 10:04:13 mark ! 615: *************** ! 616: *** 30,35 ! 617: * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 618: * ! 619: * $Log: patch1,v $ ! 620: # Revision 1.1 92/08/28 08:02:28 bin ! 621: # Initial revision ! 622: # ! 623: * Revision 1.1 88/12/23 18:02:05 mark ! 624: * Initial revision ! 625: * ! 626: ! 627: --- 30,38 ----- ! 628: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 629: * ! 630: * $Log: patch1,v $ ! 631: # Revision 1.1 92/08/28 08:02:28 bin ! 632: # Initial revision ! 633: # ! 634: + * Revision 1.2 89/02/12 10:04:13 mark ! 635: + * 1.2 release fixes ! 636: + * ! 637: * Revision 1.1 88/12/23 18:02:05 mark ! 638: * Initial revision ! 639: * ! 640: *************** ! 641: *** 36,42 ! 642: */ ! 643: ! 644: #ifndef lint ! 645: ! static char *ident = "$Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $"; ! 646: static char *copyright = "Copyright (c) 1989 Mark H. Colburn.\nAll rights reserved.\n"; ! 647: #endif /* ! lint */ ! 648: ! 649: ! 650: --- 39,45 ----- ! 651: */ ! 652: ! 653: #ifndef lint ! 654: ! static char *ident = "$Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $"; ! 655: static char *copyright = "Copyright (c) 1989 Mark H. Colburn.\nAll rights reserved.\n"; ! 656: #endif /* ! lint */ ! 657: ! 658: *************** ! 659: *** 113,119 ! 660: ! 661: /* check to make sure that the argument is a directory */ ! 662: if (LSTAT(dirname, &st) < 0) { ! 663: ! fatal(syserr()); ! 664: } ! 665: if ((st.sb_mode & S_IFMT) != S_IFDIR) { ! 666: fatal("Not a directory"); ! 667: ! 668: --- 116,122 ----- ! 669: ! 670: /* check to make sure that the argument is a directory */ ! 671: if (LSTAT(dirname, &st) < 0) { ! 672: ! fatal(strerror()); ! 673: } ! 674: if ((st.sb_mode & S_IFMT) != S_IFDIR) { ! 675: fatal("Not a directory"); ! 676: *************** ! 677: *** 131,137 ! 678: ar_file = optarg; ! 679: break; ! 680: case 'd': ! 681: ! f_create_dirs = 1; ! 682: break; ! 683: case 'f': ! 684: f_reverse_match = 1; ! 685: ! 686: --- 134,140 ----- ! 687: ar_file = optarg; ! 688: break; ! 689: case 'd': ! 690: ! f_dir_create = 1; ! 691: break; ! 692: case 'f': ! 693: f_reverse_match = 1; ! 694: *************** ! 695: *** 140,146 ! 696: f_link = 1; ! 697: break; ! 698: case 'm': ! 699: ! f_modification_time = 1; ! 700: break; ! 701: case 'r': ! 702: f_interactive = 1; ! 703: ! 704: --- 143,149 ----- ! 705: f_link = 1; ! 706: break; ! 707: case 'm': ! 708: ! f_mtime = 1; ! 709: break; ! 710: case 'r': ! 711: f_interactive = 1; ! 712: *************** ! 713: *** 176,182 ! 714: } ! 715: ! 716: /* print out the total block count transfered */ ! 717: ! fprintf(stderr, "%d Blocks\n", ROUNDUP(total, BLOCKSIZE) / BLOCKSIZE); ! 718: ! 719: exit(0); ! 720: /* NOTREACHED */ ! 721: ! 722: --- 179,185 ----- ! 723: } ! 724: ! 725: /* print out the total block count transfered */ ! 726: ! fprintf(stderr, "%ld Blocks\n", ROUNDUP(total, BLOCKSIZE) / BLOCKSIZE); ! 727: ! 728: exit(0); ! 729: /* NOTREACHED */ ! 730: *************** ! 731: *** 207,217 ! 732: ! 733: #endif ! 734: { ! 735: ! fprintf(stderr, "\ ! 736: ! Usage: %s -o[Bacv]\n", myname); ! 737: ! fprintf(stderr, "\ ! 738: ! %s -i[Bcdmrtuvf] [pattern...]\n", myname); ! 739: ! fprintf(stderr, "\ ! 740: ! %s -p[adlmruv] directory\n", myname); ! 741: exit(1); ! 742: } ! 743: ! 744: --- 210,217 ----- ! 745: ! 746: #endif ! 747: { ! 748: ! fprintf(stderr, "Usage: %s -o[Bacv]\n", myname); ! 749: ! fprintf(stderr, " %s -i[Bcdmrtuvf] [pattern...]\n", myname); ! 750: ! fprintf(stderr, " %s -p[adlmruv] directory\n", myname); ! 751: exit(1); ! 752: } ! 753: Index: create.c ! 754: *** /tmp/,RCSt1a17048 Sun Feb 12 14:06:10 1989 ! 755: --- create.c Sun Feb 12 14:02:05 1989 ! 756: *************** ! 757: *** 1,6 ! 758: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 759: * ! 760: ! * $Revision: 1.1 $ ! 761: * ! 762: * create.c - Create a tape archive. ! 763: * ! 764: ! 765: --- 1,6 ----- ! 766: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 767: * ! 768: ! * $Revision: 1.1 $ ! 769: * ! 770: * create.c - Create a tape archive. ! 771: * ! 772: *************** ! 773: *** 27,33 ! 774: * ! 775: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 776: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 777: ! * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 778: * ! 779: * $Log: patch1,v $ ! 780: # Revision 1.1 92/08/28 08:02:28 bin ! 781: # Initial revision ! 782: # ! 783: * Revision 1.1 88/12/23 18:02:06 mark ! 784: ! 785: --- 27,33 ----- ! 786: * ! 787: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 788: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 789: ! * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 790: * ! 791: * $Log: patch1,v $ ! 792: # Revision 1.1 92/08/28 08:02:28 bin ! 793: # Initial revision ! 794: # ! 795: * Revision 1.3 89/02/12 10:29:37 mark ! 796: *************** ! 797: *** 30,35 ! 798: * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 799: * ! 800: * $Log: patch1,v $ ! 801: # Revision 1.1 92/08/28 08:02:28 bin ! 802: # Initial revision ! 803: # ! 804: * Revision 1.1 88/12/23 18:02:06 mark ! 805: * Initial revision ! 806: * ! 807: ! 808: --- 30,41 ----- ! 809: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 810: * ! 811: * $Log: patch1,v $ ! 812: # Revision 1.1 92/08/28 08:02:28 bin ! 813: # Initial revision ! 814: # ! 815: + * Revision 1.3 89/02/12 10:29:37 mark ! 816: + * Fixed misspelling of Replstr ! 817: + * ! 818: + * Revision 1.2 89/02/12 10:04:17 mark ! 819: + * 1.2 release fixes ! 820: + * ! 821: * Revision 1.1 88/12/23 18:02:06 mark ! 822: * Initial revision ! 823: * ! 824: *************** ! 825: *** 36,42 ! 826: */ ! 827: ! 828: #ifndef lint ! 829: ! static char *ident = "$Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $"; ! 830: static char *copyright = "Copyright (c) 1989 Mark H. Colburn.\nAll rights reserved.\n"; ! 831: #endif /* ! lint */ ! 832: ! 833: ! 834: --- 42,48 ----- ! 835: */ ! 836: ! 837: #ifndef lint ! 838: ! static char *ident = "$Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $"; ! 839: static char *copyright = "Copyright (c) 1989 Mark H. Colburn.\nAll rights reserved.\n"; ! 840: #endif /* ! lint */ ! 841: ! 842: *************** ! 843: *** 93,99 ! 844: int fd; ! 845: ! 846: while (name_next(name, &sb) != -1) { ! 847: ! if ((fd = openi(name, &sb)) < 0) { ! 848: /* FIXME: pax wants to exit here??? */ ! 849: continue; ! 850: } ! 851: ! 852: --- 99,105 ----- ! 853: int fd; ! 854: ! 855: while (name_next(name, &sb) != -1) { ! 856: ! if ((fd = openin(name, &sb)) < 0) { ! 857: /* FIXME: pax wants to exit here??? */ ! 858: continue; ! 859: } ! 860: *************** ! 861: *** 98,104 ! 862: continue; ! 863: } ! 864: ! 865: ! if (rplhead != NULL) { ! 866: rpl_name(name); ! 867: if (strlen(name) == 0) { ! 868: continue; ! 869: ! 870: --- 104,110 ----- ! 871: continue; ! 872: } ! 873: ! 874: ! if (rplhead != (Replstr *)NULL) { ! 875: rpl_name(name); ! 876: if (strlen(name) == 0) { ! 877: continue; ! 878: *************** ! 879: *** 185,191 ! 880: #endif ! 881: { ! 882: char *p; ! 883: ! char *prefix = NULL; ! 884: int i; ! 885: int sum; ! 886: char hdr[BLOCKSIZE]; ! 887: ! 888: --- 191,197 ----- ! 889: #endif ! 890: { ! 891: char *p; ! 892: ! char *prefix = (char *)NULL; ! 893: int i; ! 894: int sum; ! 895: char hdr[BLOCKSIZE]; ! 896: *************** ! 897: *** 230,236 ! 898: sprintf(&hdr[136], "%011lo ", (long) asb->sb_mtime); ! 899: strncpy(&hdr[148], " ", 8); ! 900: hdr[156] = tartype(asb->sb_mode); ! 901: ! if (asb->sb_nlink > 1 && (from = linkfrom(name, asb)) != NULL) { ! 902: strcpy(&hdr[157], from->l_name); ! 903: hdr[156] = LNKTYPE; ! 904: } ! 905: ! 906: --- 236,242 ----- ! 907: sprintf(&hdr[136], "%011lo ", (long) asb->sb_mtime); ! 908: strncpy(&hdr[148], " ", 8); ! 909: hdr[156] = tartype(asb->sb_mode); ! 910: ! if (asb->sb_nlink > 1 && (from = linkfrom(name, asb)) != (Link *)NULL) { ! 911: strcpy(&hdr[157], from->l_name); ! 912: hdr[156] = LNKTYPE; ! 913: } ! 914: *************** ! 915: *** 240,246 ! 916: strcpy(&hdr[297], findgname((int) asb->sb_gid)); ! 917: sprintf(&hdr[329], "%06o \0", major(asb->sb_rdev)); ! 918: sprintf(&hdr[337], "%06o \0", minor(asb->sb_rdev)); ! 919: ! if (prefix != NULL) { ! 920: strncpy(&hdr[345], prefix, 155); ! 921: } ! 922: ! 923: ! 924: --- 246,252 ----- ! 925: strcpy(&hdr[297], findgname((int) asb->sb_gid)); ! 926: sprintf(&hdr[329], "%06o \0", major(asb->sb_rdev)); ! 927: sprintf(&hdr[337], "%06o \0", minor(asb->sb_rdev)); ! 928: ! if (prefix != (char *)NULL) { ! 929: strncpy(&hdr[345], prefix, 155); ! 930: } ! 931: ! 932: *************** ! 933: *** 358,364 ! 934: USH(asb->sb_uid), USH(asb->sb_gid)); ! 935: sprintf(header + M_STRLEN + 30, "%06o%06o%011lo%06o%011lo", ! 936: USH(asb->sb_nlink), USH(asb->sb_rdev), ! 937: ! f_modification_time ? asb->sb_mtime : time((time_t *) 0), ! 938: namelen, asb->sb_size); ! 939: outwrite(header, M_STRLEN + H_STRLEN); ! 940: outwrite(name, namelen); ! 941: ! 942: --- 364,370 ----- ! 943: USH(asb->sb_uid), USH(asb->sb_gid)); ! 944: sprintf(header + M_STRLEN + 30, "%06o%06o%011lo%06o%011lo", ! 945: USH(asb->sb_nlink), USH(asb->sb_rdev), ! 946: ! f_mtime ? asb->sb_mtime : time((time_t *) 0), ! 947: namelen, asb->sb_size); ! 948: outwrite(header, M_STRLEN + H_STRLEN); ! 949: outwrite(name, namelen); ! 950: Index: extract.c ! 951: *** /tmp/,RCSt1a17053 Sun Feb 12 14:06:20 1989 ! 952: --- extract.c Sun Feb 12 14:02:07 1989 ! 953: *************** ! 954: *** 1,6 ! 955: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 956: * ! 957: ! * $Revision: 1.1 $ ! 958: * ! 959: * extract.c - Extract files from a tar archive. ! 960: * ! 961: ! 962: --- 1,6 ----- ! 963: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 964: * ! 965: ! * $Revision: 1.1 $ ! 966: * ! 967: * extract.c - Extract files from a tar archive. ! 968: * ! 969: *************** ! 970: *** 24,30 ! 971: * ! 972: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 973: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 974: ! * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 975: * ! 976: * $Log: patch1,v $ ! 977: # Revision 1.1 92/08/28 08:02:28 bin ! 978: # Initial revision ! 979: # ! 980: * Revision 1.1 88/12/23 18:02:07 mark ! 981: ! 982: --- 24,30 ----- ! 983: * ! 984: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 985: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 986: ! * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 987: * ! 988: * $Log: patch1,v $ ! 989: # Revision 1.1 92/08/28 08:02:28 bin ! 990: # Initial revision ! 991: # ! 992: * Revision 1.3 89/02/12 10:29:43 mark ! 993: *************** ! 994: *** 27,32 ! 995: * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 996: * ! 997: * $Log: patch1,v $ ! 998: # Revision 1.1 92/08/28 08:02:28 bin ! 999: # Initial revision ! 1000: # ! 1001: * Revision 1.1 88/12/23 18:02:07 mark ! 1002: * Initial revision ! 1003: * ! 1004: ! 1005: --- 27,38 ----- ! 1006: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 1007: * ! 1008: * $Log: patch1,v $ ! 1009: # Revision 1.1 92/08/28 08:02:28 bin ! 1010: # Initial revision ! 1011: # ! 1012: + * Revision 1.3 89/02/12 10:29:43 mark ! 1013: + * Fixed misspelling of Replstr ! 1014: + * ! 1015: + * Revision 1.2 89/02/12 10:04:24 mark ! 1016: + * 1.2 release fixes ! 1017: + * ! 1018: * Revision 1.1 88/12/23 18:02:07 mark ! 1019: * Initial revision ! 1020: * ! 1021: *************** ! 1022: *** 33,39 ! 1023: */ ! 1024: ! 1025: #ifndef lint ! 1026: ! static char *ident = "$Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $"; ! 1027: static char *copyright = "Copyright (c) 1989 Mark H. Colburn.\nAll rights reserved.\n"; ! 1028: #endif /* ! lint */ ! 1029: ! 1030: ! 1031: --- 39,45 ----- ! 1032: */ ! 1033: ! 1034: #ifndef lint ! 1035: ! static char *ident = "$Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $"; ! 1036: static char *copyright = "Copyright (c) 1989 Mark H. Colburn.\nAll rights reserved.\n"; ! 1037: #endif /* ! lint */ ! 1038: ! 1039: *************** ! 1040: *** 113,119 ! 1041: warn(name, "File data is corrupt"); ! 1042: } ! 1043: } else if (match) { ! 1044: ! if (rplhead != NULL) { ! 1045: rpl_name(name); ! 1046: if (strlen(name) == 0) { ! 1047: continue; ! 1048: ! 1049: --- 119,125 ----- ! 1050: warn(name, "File data is corrupt"); ! 1051: } ! 1052: } else if (match) { ! 1053: ! if (rplhead != (Replstr *)NULL) { ! 1054: rpl_name(name); ! 1055: if (strlen(name) == 0) { ! 1056: continue; ! 1057: Index: fileio.c ! 1058: *** /tmp/,RCSt1a17058 Sun Feb 12 14:06:30 1989 ! 1059: --- fileio.c Sun Feb 12 14:02:08 1989 ! 1060: *************** ! 1061: *** 1,6 ! 1062: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 1063: * ! 1064: ! * $Revision: 1.1 $ ! 1065: * ! 1066: * fileio.c - file I/O functions for all archive interfaces ! 1067: * ! 1068: ! 1069: --- 1,6 ----- ! 1070: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 1071: * ! 1072: ! * $Revision: 1.1 $ ! 1073: * ! 1074: * fileio.c - file I/O functions for all archive interfaces ! 1075: * ! 1076: *************** ! 1077: *** 27,33 ! 1078: * ! 1079: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 1080: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 1081: ! * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 1082: * ! 1083: * $Log: patch1,v $ ! 1084: # Revision 1.1 92/08/28 08:02:28 bin ! 1085: # Initial revision ! 1086: # ! 1087: * Revision 1.1 88/12/23 18:02:09 mark ! 1088: ! 1089: --- 27,33 ----- ! 1090: * ! 1091: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 1092: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 1093: ! * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 1094: * ! 1095: * $Log: patch1,v $ ! 1096: # Revision 1.1 92/08/28 08:02:28 bin ! 1097: # Initial revision ! 1098: # ! 1099: * Revision 1.2 89/02/12 10:04:31 mark ! 1100: *************** ! 1101: *** 30,35 ! 1102: * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 1103: * ! 1104: * $Log: patch1,v $ ! 1105: # Revision 1.1 92/08/28 08:02:28 bin ! 1106: # Initial revision ! 1107: # ! 1108: * Revision 1.1 88/12/23 18:02:09 mark ! 1109: * Initial revision ! 1110: * ! 1111: ! 1112: --- 30,38 ----- ! 1113: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 1114: * ! 1115: * $Log: patch1,v $ ! 1116: # Revision 1.1 92/08/28 08:02:28 bin ! 1117: # Initial revision ! 1118: # ! 1119: + * Revision 1.2 89/02/12 10:04:31 mark ! 1120: + * 1.2 release fixes ! 1121: + * ! 1122: * Revision 1.1 88/12/23 18:02:09 mark ! 1123: * Initial revision ! 1124: * ! 1125: *************** ! 1126: *** 36,42 ! 1127: */ ! 1128: ! 1129: #ifndef lint ! 1130: ! static char *ident = "$Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $"; ! 1131: static char *copyright = "Copyright (c) 1989 Mark H. Colburn.\nAll rights reserved.\n"; ! 1132: #endif /* ! lint */ ! 1133: ! 1134: ! 1135: --- 39,45 ----- ! 1136: */ ! 1137: ! 1138: #ifndef lint ! 1139: ! static char *ident = "$Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $"; ! 1140: static char *copyright = "Copyright (c) 1989 Mark H. Colburn.\nAll rights reserved.\n"; ! 1141: #endif /* ! lint */ ! 1142: ! 1143: *************** ! 1144: *** 94,100 ! 1145: } ! 1146: ! 1147: if (archivefd < 0) { ! 1148: ! warnarch(syserr(), (OFFSET) 0); ! 1149: return (-1); ! 1150: } ! 1151: ++arvolume; ! 1152: ! 1153: --- 97,103 ----- ! 1154: } ! 1155: ! 1156: if (archivefd < 0) { ! 1157: ! warnarch(strerror(), (OFFSET) 0); ! 1158: return (-1); ! 1159: } ! 1160: ++arvolume; ! 1161: *************** ! 1162: *** 127,133 ! 1163: } ! 1164: ! 1165: ! 1166: ! /* openo - open an output file ! 1167: * ! 1168: * DESCRIPTION ! 1169: * ! 1170: ! 1171: --- 130,136 ----- ! 1172: } ! 1173: ! 1174: ! 1175: ! /* openout - open an output file ! 1176: * ! 1177: * DESCRIPTION ! 1178: * ! 1179: *************** ! 1180: *** 153,159 ! 1181: ! 1182: #ifdef __STDC__ ! 1183: ! 1184: ! int openo(char *name, Stat *asb, Link *linkp, int ispass) ! 1185: ! 1186: #else ! 1187: ! 1188: ! 1189: --- 156,162 ----- ! 1190: ! 1191: #ifdef __STDC__ ! 1192: ! 1193: ! int openout(char *name, Stat *asb, Link *linkp, int ispass) ! 1194: ! 1195: #else ! 1196: ! 1197: *************** ! 1198: *** 157,163 ! 1199: ! 1200: #else ! 1201: ! 1202: ! int openo(name, asb, linkp, ispass) ! 1203: char *name; ! 1204: Stat *asb; ! 1205: Link *linkp; ! 1206: ! 1207: --- 160,166 ----- ! 1208: ! 1209: #else ! 1210: ! 1211: ! int openout(name, asb, linkp, ispass) ! 1212: char *name; ! 1213: Stat *asb; ! 1214: Link *linkp; ! 1215: *************** ! 1216: *** 182,188 ! 1217: } else if ((osb.sb_mode & S_IFMT) == (asb->sb_mode & S_IFMT)) { ! 1218: operm = osb.sb_mode & S_IPERM; ! 1219: } else if (REMOVE(name, &osb) < 0) { ! 1220: ! warn(name, syserr()); ! 1221: return (-1); ! 1222: } else { ! 1223: exists = 0; ! 1224: ! 1225: --- 185,191 ----- ! 1226: } else if ((osb.sb_mode & S_IFMT) == (asb->sb_mode & S_IFMT)) { ! 1227: operm = osb.sb_mode & S_IPERM; ! 1228: } else if (REMOVE(name, &osb) < 0) { ! 1229: ! warn(name, strerror()); ! 1230: return (-1); ! 1231: } else { ! 1232: exists = 0; ! 1233: *************** ! 1234: *** 193,199 ! 1235: if (asb->sb_ino == osb.sb_ino && asb->sb_dev == osb.sb_dev) { ! 1236: return (0); ! 1237: } else if (unlink(name) < 0) { ! 1238: ! warn(name, syserr()); ! 1239: return (-1); ! 1240: } else { ! 1241: exists = 0; ! 1242: ! 1243: --- 196,202 ----- ! 1244: if (asb->sb_ino == osb.sb_ino && asb->sb_dev == osb.sb_dev) { ! 1245: return (0); ! 1246: } else if (unlink(name) < 0) { ! 1247: ! warn(name, strerror()); ! 1248: return (-1); ! 1249: } else { ! 1250: exists = 0; ! 1251: *************** ! 1252: *** 201,207 ! 1253: } ! 1254: if (link(linkp->l_name, name) != 0) { ! 1255: if (errno == ENOENT) { ! 1256: ! if (f_create_dirs) { ! 1257: if (dirneed(name) != 0 || ! 1258: link(linkp->l_name, name) != 0) { ! 1259: warn(name, syserr()); ! 1260: ! 1261: --- 204,210 ----- ! 1262: } ! 1263: if (link(linkp->l_name, name) != 0) { ! 1264: if (errno == ENOENT) { ! 1265: ! if (f_dir_create) { ! 1266: if (dirneed(name) != 0 || ! 1267: link(linkp->l_name, name) != 0) { ! 1268: warn(name, strerror()); ! 1269: *************** ! 1270: *** 204,210 ! 1271: if (f_create_dirs) { ! 1272: if (dirneed(name) != 0 || ! 1273: link(linkp->l_name, name) != 0) { ! 1274: ! warn(name, syserr()); ! 1275: return (-1); ! 1276: } ! 1277: } else { ! 1278: ! 1279: --- 207,213 ----- ! 1280: if (f_dir_create) { ! 1281: if (dirneed(name) != 0 || ! 1282: link(linkp->l_name, name) != 0) { ! 1283: ! warn(name, strerror()); ! 1284: return (-1); ! 1285: } ! 1286: } else { ! 1287: *************** ! 1288: *** 213,219 ! 1289: } ! 1290: return(0); ! 1291: } else if (errno != EXDEV) { ! 1292: ! warn(name, syserr()); ! 1293: return (-1); ! 1294: } ! 1295: } else { ! 1296: ! 1297: --- 216,222 ----- ! 1298: } ! 1299: return(0); ! 1300: } else if (errno != EXDEV) { ! 1301: ! warn(name, strerror()); ! 1302: return (-1); ! 1303: } ! 1304: } else { ! 1305: *************** ! 1306: *** 228,234 ! 1307: if (exists) { ! 1308: if (asb->sb_rdev == osb.sb_rdev) { ! 1309: if (perm != operm && chmod(name, (int) perm) < 0) { ! 1310: ! warn(name, syserr()); ! 1311: return (-1); ! 1312: } else { ! 1313: break; ! 1314: ! 1315: --- 231,237 ----- ! 1316: if (exists) { ! 1317: if (asb->sb_rdev == osb.sb_rdev) { ! 1318: if (perm != operm && chmod(name, (int) perm) < 0) { ! 1319: ! warn(name, strerror()); ! 1320: return (-1); ! 1321: } else { ! 1322: break; ! 1323: *************** ! 1324: *** 234,240 ! 1325: break; ! 1326: } ! 1327: } else if (REMOVE(name, &osb) < 0) { ! 1328: ! warn(name, syserr()); ! 1329: return (-1); ! 1330: } else { ! 1331: exists = 0; ! 1332: ! 1333: --- 237,243 ----- ! 1334: break; ! 1335: } ! 1336: } else if (REMOVE(name, &osb) < 0) { ! 1337: ! warn(name, strerror()); ! 1338: return (-1); ! 1339: } else { ! 1340: exists = 0; ! 1341: *************** ! 1342: *** 242,248 ! 1343: } ! 1344: if (mknod(name, (int) asb->sb_mode, (int) asb->sb_rdev) < 0) { ! 1345: if (errno == ENOENT) { ! 1346: ! if (f_create_dirs) { ! 1347: if (dirneed(name) < 0 || mknod(name, (int) asb->sb_mode, ! 1348: (int) asb->sb_rdev) < 0) { ! 1349: warn(name, syserr()); ! 1350: ! 1351: --- 245,251 ----- ! 1352: } ! 1353: if (mknod(name, (int) asb->sb_mode, (int) asb->sb_rdev) < 0) { ! 1354: if (errno == ENOENT) { ! 1355: ! if (f_dir_create) { ! 1356: if (dirneed(name) < 0 || mknod(name, (int) asb->sb_mode, ! 1357: (int) asb->sb_rdev) < 0) { ! 1358: warn(name, strerror()); ! 1359: *************** ! 1360: *** 245,251 ! 1361: if (f_create_dirs) { ! 1362: if (dirneed(name) < 0 || mknod(name, (int) asb->sb_mode, ! 1363: (int) asb->sb_rdev) < 0) { ! 1364: ! warn(name, syserr()); ! 1365: return (-1); ! 1366: } ! 1367: } else { ! 1368: ! 1369: --- 248,254 ----- ! 1370: if (f_dir_create) { ! 1371: if (dirneed(name) < 0 || mknod(name, (int) asb->sb_mode, ! 1372: (int) asb->sb_rdev) < 0) { ! 1373: ! warn(name, strerror()); ! 1374: return (-1); ! 1375: } ! 1376: } else { ! 1377: *************** ! 1378: *** 252,258 ! 1379: warn(name, "Directories are not being created (-d option)"); ! 1380: } ! 1381: } else { ! 1382: ! warn(name, syserr()); ! 1383: return (-1); ! 1384: } ! 1385: } ! 1386: ! 1387: --- 255,261 ----- ! 1388: warn(name, "Directories are not being created (-d option)"); ! 1389: } ! 1390: } else { ! 1391: ! warn(name, strerror()); ! 1392: return (-1); ! 1393: } ! 1394: } ! 1395: *************** ! 1396: *** 261,267 ! 1397: case S_IFDIR: ! 1398: if (exists) { ! 1399: if (perm != operm && chmod(name, (int) perm) < 0) { ! 1400: ! warn(name, syserr()); ! 1401: return (-1); ! 1402: } ! 1403: } else if (f_create_dirs) { ! 1404: ! 1405: --- 264,270 ----- ! 1406: case S_IFDIR: ! 1407: if (exists) { ! 1408: if (perm != operm && chmod(name, (int) perm) < 0) { ! 1409: ! warn(name, strerror()); ! 1410: return (-1); ! 1411: } ! 1412: } else if (f_dir_create) { ! 1413: *************** ! 1414: *** 264,270 ! 1415: warn(name, syserr()); ! 1416: return (-1); ! 1417: } ! 1418: ! } else if (f_create_dirs) { ! 1419: if (dirmake(name, asb) < 0 || dirneed(name) < 0) { ! 1420: warn(name, syserr()); ! 1421: return (-1); ! 1422: ! 1423: --- 267,273 ----- ! 1424: warn(name, strerror()); ! 1425: return (-1); ! 1426: } ! 1427: ! } else if (f_dir_create) { ! 1428: if (dirmake(name, asb) < 0 || dirneed(name) < 0) { ! 1429: warn(name, strerror()); ! 1430: return (-1); ! 1431: *************** ! 1432: *** 266,272 ! 1433: } ! 1434: } else if (f_create_dirs) { ! 1435: if (dirmake(name, asb) < 0 || dirneed(name) < 0) { ! 1436: ! warn(name, syserr()); ! 1437: return (-1); ! 1438: } ! 1439: } else { ! 1440: ! 1441: --- 269,275 ----- ! 1442: } ! 1443: } else if (f_dir_create) { ! 1444: if (dirmake(name, asb) < 0 || dirneed(name) < 0) { ! 1445: ! warn(name, strerror()); ! 1446: return (-1); ! 1447: } ! 1448: } else { ! 1449: *************** ! 1450: *** 278,284 ! 1451: fd = 0; ! 1452: if (exists) { ! 1453: if (perm != operm && chmod(name, (int) perm) < 0) { ! 1454: ! warn(name, syserr()); ! 1455: return (-1); ! 1456: } ! 1457: } else if (mknod(name, (int) asb->sb_mode, 0) < 0) { ! 1458: ! 1459: --- 281,287 ----- ! 1460: fd = 0; ! 1461: if (exists) { ! 1462: if (perm != operm && chmod(name, (int) perm) < 0) { ! 1463: ! warn(name, strerror()); ! 1464: return (-1); ! 1465: } ! 1466: } else if (mknod(name, (int) asb->sb_mode, 0) < 0) { ! 1467: *************** ! 1468: *** 283,289 ! 1469: } ! 1470: } else if (mknod(name, (int) asb->sb_mode, 0) < 0) { ! 1471: if (errno == ENOENT) { ! 1472: ! if (f_create_dirs) { ! 1473: if (dirneed(name) < 0 ! 1474: || mknod(name, (int) asb->sb_mode, 0) < 0) { ! 1475: warn(name, syserr()); ! 1476: ! 1477: --- 286,292 ----- ! 1478: } ! 1479: } else if (mknod(name, (int) asb->sb_mode, 0) < 0) { ! 1480: if (errno == ENOENT) { ! 1481: ! if (f_dir_create) { ! 1482: if (dirneed(name) < 0 ! 1483: || mknod(name, (int) asb->sb_mode, 0) < 0) { ! 1484: warn(name, strerror()); ! 1485: *************** ! 1486: *** 286,292 ! 1487: if (f_create_dirs) { ! 1488: if (dirneed(name) < 0 ! 1489: || mknod(name, (int) asb->sb_mode, 0) < 0) { ! 1490: ! warn(name, syserr()); ! 1491: return (-1); ! 1492: } ! 1493: } else { ! 1494: ! 1495: --- 289,295 ----- ! 1496: if (f_dir_create) { ! 1497: if (dirneed(name) < 0 ! 1498: || mknod(name, (int) asb->sb_mode, 0) < 0) { ! 1499: ! warn(name, strerror()); ! 1500: return (-1); ! 1501: } ! 1502: } else { ! 1503: *************** ! 1504: *** 293,299 ! 1505: warn(name, "Directories are not being created (-d option)"); ! 1506: } ! 1507: } else { ! 1508: ! warn(name, syserr()); ! 1509: return (-1); ! 1510: } ! 1511: } ! 1512: ! 1513: --- 296,302 ----- ! 1514: warn(name, "Directories are not being created (-d option)"); ! 1515: } ! 1516: } else { ! 1517: ! warn(name, strerror()); ! 1518: return (-1); ! 1519: } ! 1520: } ! 1521: *************** ! 1522: *** 304,310 ! 1523: case S_IFLNK: ! 1524: if (exists) { ! 1525: if ((ssize = readlink(name, sname, sizeof(sname))) < 0) { ! 1526: ! warn(name, syserr()); ! 1527: return (-1); ! 1528: } else if (strncmp(sname, asb->sb_link, ssize) == 0) { ! 1529: return (0); ! 1530: ! 1531: --- 307,313 ----- ! 1532: case S_IFLNK: ! 1533: if (exists) { ! 1534: if ((ssize = readlink(name, sname, sizeof(sname))) < 0) { ! 1535: ! warn(name, strerror()); ! 1536: return (-1); ! 1537: } else if (strncmp(sname, asb->sb_link, ssize) == 0) { ! 1538: return (0); ! 1539: *************** ! 1540: *** 309,315 ! 1541: } else if (strncmp(sname, asb->sb_link, ssize) == 0) { ! 1542: return (0); ! 1543: } else if (REMOVE(name, &osb) < 0) { ! 1544: ! warn(name, syserr()); ! 1545: return (-1); ! 1546: } else { ! 1547: exists = 0; ! 1548: ! 1549: --- 312,318 ----- ! 1550: } else if (strncmp(sname, asb->sb_link, ssize) == 0) { ! 1551: return (0); ! 1552: } else if (REMOVE(name, &osb) < 0) { ! 1553: ! warn(name, strerror()); ! 1554: return (-1); ! 1555: } else { ! 1556: exists = 0; ! 1557: *************** ! 1558: *** 317,323 ! 1559: } ! 1560: if (symlink(asb->sb_link, name) < 0) { ! 1561: if (errno == ENOENT) { ! 1562: ! if (f_create_dirs) { ! 1563: if (dirneed(name) < 0 || symlink(asb->sb_link, name) < 0) { ! 1564: warn(name, syserr()); ! 1565: return (-1); ! 1566: ! 1567: --- 320,326 ----- ! 1568: } ! 1569: if (symlink(asb->sb_link, name) < 0) { ! 1570: if (errno == ENOENT) { ! 1571: ! if (f_dir_create) { ! 1572: if (dirneed(name) < 0 || symlink(asb->sb_link, name) < 0) { ! 1573: warn(name, strerror()); ! 1574: return (-1); ! 1575: *************** ! 1576: *** 319,325 ! 1577: if (errno == ENOENT) { ! 1578: if (f_create_dirs) { ! 1579: if (dirneed(name) < 0 || symlink(asb->sb_link, name) < 0) { ! 1580: ! warn(name, syserr()); ! 1581: return (-1); ! 1582: } ! 1583: } else { ! 1584: ! 1585: --- 322,328 ----- ! 1586: if (errno == ENOENT) { ! 1587: if (f_dir_create) { ! 1588: if (dirneed(name) < 0 || symlink(asb->sb_link, name) < 0) { ! 1589: ! warn(name, strerror()); ! 1590: return (-1); ! 1591: } ! 1592: } else { ! 1593: *************** ! 1594: *** 326,332 ! 1595: warn(name, "Directories are not being created (-d option)"); ! 1596: } ! 1597: } else { ! 1598: ! warn(name, syserr()); ! 1599: return (-1); ! 1600: } ! 1601: } ! 1602: ! 1603: --- 329,335 ----- ! 1604: warn(name, "Directories are not being created (-d option)"); ! 1605: } ! 1606: } else { ! 1607: ! warn(name, strerror()); ! 1608: return (-1); ! 1609: } ! 1610: } ! 1611: *************** ! 1612: *** 338,344 ! 1613: warn(name, "Newer file exists"); ! 1614: return (-1); ! 1615: } else if (unlink(name) < 0) { ! 1616: ! warn(name, syserr()); ! 1617: return (-1); ! 1618: } else { ! 1619: exists = 0; ! 1620: ! 1621: --- 341,347 ----- ! 1622: warn(name, "Newer file exists"); ! 1623: return (-1); ! 1624: } else if (unlink(name) < 0) { ! 1625: ! warn(name, strerror()); ! 1626: return (-1); ! 1627: } else { ! 1628: exists = 0; ! 1629: *************** ! 1630: *** 346,352 ! 1631: } ! 1632: if ((fd = creat(name, (int) perm)) < 0) { ! 1633: if (errno == ENOENT) { ! 1634: ! if (f_create_dirs) { ! 1635: if (dirneed(name) < 0 || ! 1636: (fd = creat(name, (int) perm)) < 0) { ! 1637: warn(name, syserr()); ! 1638: ! 1639: --- 349,355 ----- ! 1640: } ! 1641: if ((fd = creat(name, (int) perm)) < 0) { ! 1642: if (errno == ENOENT) { ! 1643: ! if (f_dir_create) { ! 1644: if (dirneed(name) < 0 || ! 1645: (fd = creat(name, (int) perm)) < 0) { ! 1646: warn(name, strerror()); ! 1647: *************** ! 1648: *** 349,355 ! 1649: if (f_create_dirs) { ! 1650: if (dirneed(name) < 0 || ! 1651: (fd = creat(name, (int) perm)) < 0) { ! 1652: ! warn(name, syserr()); ! 1653: return (-1); ! 1654: } ! 1655: } else { ! 1656: ! 1657: --- 352,358 ----- ! 1658: if (f_dir_create) { ! 1659: if (dirneed(name) < 0 || ! 1660: (fd = creat(name, (int) perm)) < 0) { ! 1661: ! warn(name, strerror()); ! 1662: return (-1); ! 1663: } ! 1664: } else { ! 1665: *************** ! 1666: *** 362,368 ! 1667: return(0); ! 1668: } ! 1669: } else { ! 1670: ! warn(name, syserr()); ! 1671: return (-1); ! 1672: } ! 1673: } ! 1674: ! 1675: --- 365,371 ----- ! 1676: return(0); ! 1677: } ! 1678: } else { ! 1679: ! warn(name, strerror()); ! 1680: return (-1); ! 1681: } ! 1682: } ! 1683: *************** ! 1684: *** 380,386 ! 1685: } ! 1686: ! 1687: ! 1688: ! /* openi - open the next input file ! 1689: * ! 1690: * DESCRIPTION ! 1691: * ! 1692: ! 1693: --- 383,389 ----- ! 1694: } ! 1695: ! 1696: ! 1697: ! /* openin - open the next input file ! 1698: * ! 1699: * DESCRIPTION ! 1700: * ! 1701: *************** ! 1702: *** 407,413 ! 1703: ! 1704: #ifdef __STDC__ ! 1705: ! 1706: ! int openi(char *name, Stat *asb) ! 1707: ! 1708: #else ! 1709: ! 1710: ! 1711: --- 410,416 ----- ! 1712: ! 1713: #ifdef __STDC__ ! 1714: ! 1715: ! int openin(char *name, Stat *asb) ! 1716: ! 1717: #else ! 1718: ! 1719: *************** ! 1720: *** 411,417 ! 1721: ! 1722: #else ! 1723: ! 1724: ! int openi(name, asb) ! 1725: char *name; /* name of file to open */ ! 1726: Stat *asb; /* pointer to stat structure for file */ ! 1727: ! 1728: ! 1729: --- 414,420 ----- ! 1730: ! 1731: #else ! 1732: ! 1733: ! int openin(name, asb) ! 1734: char *name; /* name of file to open */ ! 1735: Stat *asb; /* pointer to stat structure for file */ ! 1736: ! 1737: *************** ! 1738: *** 428,434 ! 1739: case S_IFLNK: ! 1740: if ((asb->sb_size = readlink(name, ! 1741: asb->sb_link, sizeof(asb->sb_link) - 1)) < 0) { ! 1742: ! warn(name, syserr()); ! 1743: return(0); ! 1744: } ! 1745: asb->sb_link[asb->sb_size] = '\0'; ! 1746: ! 1747: --- 431,437 ----- ! 1748: case S_IFLNK: ! 1749: if ((asb->sb_size = readlink(name, ! 1750: asb->sb_link, sizeof(asb->sb_link) - 1)) < 0) { ! 1751: ! warn(name, strerror()); ! 1752: return(0); ! 1753: } ! 1754: asb->sb_link[asb->sb_size] = '\0'; ! 1755: *************** ! 1756: *** 439,445 ! 1757: return (0); ! 1758: } ! 1759: if ((fd = open(name, O_RDONLY | O_BINARY)) < 0) { ! 1760: ! warn(name, syserr()); ! 1761: } ! 1762: return (fd); ! 1763: default: ! 1764: ! 1765: --- 442,448 ----- ! 1766: return (0); ! 1767: } ! 1768: if ((fd = open(name, O_RDONLY | O_BINARY)) < 0) { ! 1769: ! warn(name, strerror()); ! 1770: } ! 1771: return (fd); ! 1772: default: ! 1773: Index: func.h ! 1774: *** /tmp/,RCSt1a17063 Sun Feb 12 14:06:40 1989 ! 1775: --- func.h Sun Feb 12 14:02:09 1989 ! 1776: *************** ! 1777: *** 1,6 ! 1778: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 1779: * ! 1780: ! * $Revision: 1.1 $ ! 1781: * ! 1782: * func.h - function type and argument declarations ! 1783: * ! 1784: ! 1785: --- 1,6 ----- ! 1786: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 1787: * ! 1788: ! * $Revision: 1.1 $ ! 1789: * ! 1790: * func.h - function type and argument declarations ! 1791: * ! 1792: *************** ! 1793: *** 27,33 ! 1794: * ! 1795: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 1796: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 1797: ! * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 1798: */ ! 1799: ! 1800: #ifndef _PAX_FUNC_H ! 1801: ! 1802: --- 27,33 ----- ! 1803: * ! 1804: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 1805: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 1806: ! * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 1807: */ ! 1808: ! 1809: #ifndef _PAX_FUNC_H ! 1810: *************** ! 1811: *** 41,47 ! 1812: extern Link *linkto(char *, Stat *); ! 1813: extern char *mem_get(uint); ! 1814: extern char *mem_str(char *); ! 1815: ! extern char *syserr(void); ! 1816: extern int ar_read(void); ! 1817: extern int buf_read(char *, uint); ! 1818: extern int buf_skip(OFFSET); ! 1819: ! 1820: --- 41,47 ----- ! 1821: extern Link *linkto(char *, Stat *); ! 1822: extern char *mem_get(uint); ! 1823: extern char *mem_str(char *); ! 1824: ! extern char *strerror(void); ! 1825: extern int ar_read(void); ! 1826: extern int buf_read(char *, uint); ! 1827: extern int buf_skip(OFFSET); ! 1828: *************** ! 1829: *** 55,62 ! 1830: extern int nameopt(char *); ! 1831: extern int open_archive(int); ! 1832: extern int open_tty(void); ! 1833: ! extern int openi(char *, Stat *); ! 1834: ! extern int openo(char *, Stat *, Link *, int); ! 1835: extern int pass(char *); ! 1836: extern int passitem(char *, Stat *, int, char *); ! 1837: extern int read_header(char *, Stat *); ! 1838: ! 1839: --- 55,62 ----- ! 1840: extern int nameopt(char *); ! 1841: extern int open_archive(int); ! 1842: extern int open_tty(void); ! 1843: ! extern int openin(char *, Stat *); ! 1844: ! extern int openout(char *, Stat *, Link *, int); ! 1845: extern int pass(char *); ! 1846: extern int passitem(char *, Stat *, int, char *); ! 1847: extern int read_header(char *, Stat *); ! 1848: *************** ! 1849: *** 86,91 ! 1850: extern char *finduname(int); ! 1851: extern char *findgname(int); ! 1852: extern int findgid(char *gname); ! 1853: ! 1854: #else /* !__STDC__ */ ! 1855: ! 1856: ! 1857: --- 86,92 ----- ! 1858: extern char *finduname(int); ! 1859: extern char *findgname(int); ! 1860: extern int findgid(char *gname); ! 1861: + extern char *malloc(); ! 1862: ! 1863: #else /* !__STDC__ */ ! 1864: ! 1865: *************** ! 1866: *** 93,99 ! 1867: extern Link *linkto(); ! 1868: extern char *mem_get(); ! 1869: extern char *mem_str(); ! 1870: ! extern char *syserr(); ! 1871: extern int ar_read(); ! 1872: extern int buf_read(); ! 1873: extern int buf_skip(); ! 1874: ! 1875: --- 94,100 ----- ! 1876: extern Link *linkto(); ! 1877: extern char *mem_get(); ! 1878: extern char *mem_str(); ! 1879: ! extern char *strerror(); ! 1880: extern int ar_read(); ! 1881: extern int buf_read(); ! 1882: extern int buf_skip(); ! 1883: *************** ! 1884: *** 107,114 ! 1885: extern int nameopt(); ! 1886: extern int open_archive(); ! 1887: extern int open_tty(); ! 1888: ! extern int openi(); ! 1889: ! extern int openo(); ! 1890: extern int pass(); ! 1891: extern int passitem(); ! 1892: extern int read_header(); ! 1893: ! 1894: --- 108,115 ----- ! 1895: extern int nameopt(); ! 1896: extern int open_archive(); ! 1897: extern int open_tty(); ! 1898: ! extern int openin(); ! 1899: ! extern int openout(); ! 1900: extern int pass(); ! 1901: extern int passitem(); ! 1902: extern int read_header(); ! 1903: Index: limits.h ! 1904: *** /tmp/,RCSt1a17068 Sun Feb 12 14:06:46 1989 ! 1905: --- limits.h Sun Feb 12 14:02:10 1989 ! 1906: *************** ! 1907: *** 1,6 ! 1908: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 1909: * ! 1910: ! * $Revision: 1.1 $ ! 1911: * ! 1912: * limits.h - POSIX compatible defnitions for some of <limits.h> ! 1913: * ! 1914: ! 1915: --- 1,6 ----- ! 1916: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 1917: * ! 1918: ! * $Revision: 1.1 $ ! 1919: * ! 1920: * limits.h - POSIX compatible defnitions for some of <limits.h> ! 1921: * ! 1922: *************** ! 1923: *** 37,43 ! 1924: * ! 1925: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 1926: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 1927: ! * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 1928: */ ! 1929: ! 1930: #ifndef _PAX_LIMITS_H ! 1931: ! 1932: --- 37,43 ----- ! 1933: * ! 1934: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 1935: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 1936: ! * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 1937: */ ! 1938: ! 1939: #ifndef _PAX_LIMITS_H ! 1940: Index: link.c ! 1941: *** /tmp/,RCSt1a17073 Sun Feb 12 14:06:52 1989 ! 1942: --- link.c Sun Feb 12 14:02:11 1989 ! 1943: *************** ! 1944: *** 1,6 ! 1945: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 1946: * ! 1947: ! * $Revision: 1.1 $ ! 1948: * ! 1949: * link.c - functions for handling multiple file links ! 1950: * ! 1951: ! 1952: --- 1,6 ----- ! 1953: /* $Source: /src386/usr/bin/pax/patch1,v $ ! 1954: * ! 1955: ! * $Revision: 1.1 $ ! 1956: * ! 1957: * link.c - functions for handling multiple file links ! 1958: * ! 1959: *************** ! 1960: *** 27,33 ! 1961: * ! 1962: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 1963: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 1964: ! * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 1965: * ! 1966: * $Log: patch1,v $ ! 1967: # Revision 1.1 92/08/28 08:02:28 bin ! 1968: # Initial revision ! 1969: # ! 1970: * Revision 1.1 88/12/23 18:02:12 mark ! 1971: ! 1972: --- 27,33 ----- ! 1973: * ! 1974: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 1975: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 1976: ! * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 1977: * ! 1978: * $Log: patch1,v $ ! 1979: # Revision 1.1 92/08/28 08:02:28 bin ! 1980: # Initial revision ! 1981: # ! 1982: * Revision 1.2 89/02/12 10:04:38 mark ! 1983: *************** ! 1984: *** 30,35 ! 1985: * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 1986: * ! 1987: * $Log: patch1,v $ ! 1988: # Revision 1.1 92/08/28 08:02:28 bin ! 1989: # Initial revision ! 1990: # ! 1991: * Revision 1.1 88/12/23 18:02:12 mark ! 1992: * Initial revision ! 1993: * ! 1994: ! 1995: --- 30,38 ----- ! 1996: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 1997: * ! 1998: * $Log: patch1,v $ ! 1999: # Revision 1.1 92/08/28 08:02:28 bin ! 2000: # Initial revision ! 2001: # ! 2002: + * Revision 1.2 89/02/12 10:04:38 mark ! 2003: + * 1.2 release fixes ! 2004: + * ! 2005: * Revision 1.1 88/12/23 18:02:12 mark ! 2006: * Initial revision ! 2007: * ! 2008: *************** ! 2009: *** 36,42 ! 2010: */ ! 2011: ! 2012: #ifndef lint ! 2013: ! static char *ident = "$Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $"; ! 2014: static char *copyright = "Copyright (c) 1989 Mark H. Colburn.\nAll rights reserved.\n"; ! 2015: #endif /* ! lint */ ! 2016: ! 2017: ! 2018: --- 39,45 ----- ! 2019: */ ! 2020: ! 2021: #ifndef lint ! 2022: ! static char *ident = "$Id: patch1,v 1.1 92/08/28 08:02:28 bin Exp Locker: bin $"; ! 2023: static char *copyright = "Copyright (c) 1989 Mark H. Colburn.\nAll rights reserved.\n"; ! 2024: #endif /* ! lint */ ! 2025: ! 2026: *************** ! 2027: *** 116,122 ! 2028: linkp->l_back->l_forw = linkp->l_forw; ! 2029: } ! 2030: free((char *) linkp); ! 2031: ! *abase = (Link *) NULL; ! 2032: } else if (linkp->l_ino == asb->sb_ino && linkp->l_dev == asb->sb_dev) { ! 2033: /* ! 2034: * check to see if a file with the name "name" exists in the ! 2035: ! 2036: --- 119,125 ----- ! 2037: linkp->l_back->l_forw = linkp->l_forw; ! 2038: } ! 2039: free((char *) linkp); ! 2040: ! *abase = (Link *)NULL; ! 2041: } else if (linkp->l_ino == asb->sb_ino && linkp->l_dev == asb->sb_dev) { ! 2042: /* ! 2043: * check to see if a file with the name "name" exists in the ! 2044: *************** ! 2045: *** 191,197 ! 2046: for (linkp = *(LINKHASH(asb->sb_ino)); linkp; linkp = linknext) { ! 2047: if (linkp->l_ino == asb->sb_ino && linkp->l_dev == asb->sb_dev) { ! 2048: if (strcmp(name, linkp->l_name) == 0) { ! 2049: ! return ((Link *) NULL); ! 2050: } ! 2051: return (linkp); ! 2052: } else { ! 2053: ! 2054: --- 194,200 ----- ! 2055: for (linkp = *(LINKHASH(asb->sb_ino)); linkp; linkp = linknext) { ! 2056: if (linkp->l_ino == asb->sb_ino && linkp->l_dev == asb->sb_dev) { ! 2057: if (strcmp(name, linkp->l_name) == 0) { ! 2058: ! return ((Link *)NULL); ! 2059: } ! 2060: return (linkp); ! 2061: } else { ! 2062: *************** ! 2063: *** 243,251 ! 2064: ! 2065: for (linkp = *(LINKHASH(asb->sb_ino)); linkp; linkp = linknext) { ! 2066: if (linkp->l_ino == asb->sb_ino && linkp->l_dev == asb->sb_dev) { ! 2067: ! if ((path = (Path *) mem_get(sizeof(Path))) == (Path *) NULL || ! 2068: ! (path->p_name = mem_str(name)) == (char *) NULL) { ! 2069: ! return((Link *) NULL); ! 2070: } ! 2071: if (path->p_forw = linkp->l_path) { ! 2072: if (linkp->l_path->p_forw) { ! 2073: ! 2074: --- 246,254 ----- ! 2075: ! 2076: for (linkp = *(LINKHASH(asb->sb_ino)); linkp; linkp = linknext) { ! 2077: if (linkp->l_ino == asb->sb_ino && linkp->l_dev == asb->sb_dev) { ! 2078: ! if ((path = (Path *) mem_get(sizeof(Path))) == (Path *)NULL || ! 2079: ! (path->p_name = mem_str(name)) == (char *)NULL) { ! 2080: ! return((Link *)NULL); ! 2081: } ! 2082: if (path->p_forw = linkp->l_path) { ! 2083: if (linkp->l_path->p_forw) { ! 2084: *************** ! 2085: *** 254,260 ! 2086: } else { ! 2087: linkp->l_path = path; ! 2088: } ! 2089: ! path->p_back = (Path *) NULL; ! 2090: return(linkp); ! 2091: } else { ! 2092: linknext = linkp->l_forw; ! 2093: ! 2094: --- 257,263 ----- ! 2095: } else { ! 2096: linkp->l_path = path; ! 2097: } ! 2098: ! path->p_back = (Path *)NULL; ! 2099: return(linkp); ! 2100: } else { ! 2101: linknext = linkp->l_forw; ! 2102: *************** ! 2103: *** 265,273 ! 2104: */ ! 2105: ! 2106: if ((asb->sb_mode & S_IFMT) == S_IFDIR ! 2107: ! || (linkp = (Link *) mem_get(sizeof(Link))) == NULL ! 2108: ! || (linkp->l_name = mem_str(name)) == NULL) { ! 2109: ! return ((Link *) NULL); ! 2110: } ! 2111: linkp->l_dev = asb->sb_dev; ! 2112: linkp->l_ino = asb->sb_ino; ! 2113: ! 2114: --- 268,276 ----- ! 2115: */ ! 2116: ! 2117: if ((asb->sb_mode & S_IFMT) == S_IFDIR ! 2118: ! || (linkp = (Link *) mem_get(sizeof(Link))) == (Link *)NULL ! 2119: ! || (linkp->l_name = mem_str(name)) == (char *)NULL) { ! 2120: ! return ((Link *)NULL); ! 2121: } ! 2122: linkp->l_dev = asb->sb_dev; ! 2123: linkp->l_ino = asb->sb_ino; ! 2124: *************** ! 2125: *** 273,279 ! 2126: linkp->l_ino = asb->sb_ino; ! 2127: linkp->l_nlink = asb->sb_nlink - 1; ! 2128: linkp->l_size = asb->sb_size; ! 2129: ! linkp->l_path = (Path *) NULL; ! 2130: if (linkp->l_forw = *(abase = LINKHASH(asb->sb_ino))) { ! 2131: linkp->l_forw->l_back = linkp; ! 2132: } else { ! 2133: ! 2134: --- 276,282 ----- ! 2135: linkp->l_ino = asb->sb_ino; ! 2136: linkp->l_nlink = asb->sb_nlink - 1; ! 2137: linkp->l_size = asb->sb_size; ! 2138: ! linkp->l_path = (Path *)NULL; ! 2139: if (linkp->l_forw = *(abase = LINKHASH(asb->sb_ino))) { ! 2140: linkp->l_forw->l_back = linkp; ! 2141: } else { ! 2142: *************** ! 2143: *** 279,285 ! 2144: } else { ! 2145: *abase = linkp; ! 2146: } ! 2147: ! linkp->l_back = NULL; ! 2148: return (linkp); ! 2149: } ! 2150: ! 2151: ! 2152: --- 282,288 ----- ! 2153: } else { ! 2154: *abase = linkp; ! 2155: } ! 2156: ! linkp->l_back = (Link *)NULL; ! 2157: return (linkp); ! 2158: } ! 2159:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.