home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume17 / pax / patch01 / text0000.txt < prev   
Encoding:
Text File  |  1989-02-14  |  53.9 KB  |  2,151 lines

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