English Language flag
// Log In
// CVSweb
Project: FreeWRT
// Summary // Activity // Search // Tracker // Lists // News // SCM // Wiki

SCM Repository

ViewVC logotype

Diff of /branches/freewrt_1_0/tools/paxmirabilis/src/pax.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2714 by wbx, Thu Sep 28 10:42:55 2006 UTC revision 2715 by tg, Tue Jun 5 14:52:44 2007 UTC
# Line 1  Line 1 
1  /**     $MirOS: src/bin/pax/pax.c,v 1.5 2006/07/16 18:00:33 tg Exp $ */  /**     $MirOS: src/bin/pax/pax.c,v 1.7 2007/02/17 04:52:41 tg Exp $ */
2  /*      $OpenBSD: pax.c,v 1.28 2005/08/04 10:02:44 mpf Exp $    */  /*      $OpenBSD: pax.c,v 1.28 2005/08/04 10:02:44 mpf Exp $    */
3  /*      $NetBSD: pax.c,v 1.5 1996/03/26 23:54:20 mrg Exp $      */  /*      $NetBSD: pax.c,v 1.5 1996/03/26 23:54:20 mrg Exp $      */
4    
# Line 35  Line 35 
35   * SUCH DAMAGE.   * SUCH DAMAGE.
36   */   */
37    
 #ifndef lint  
 static const char copyright[] =  
 "@(#) Copyright (c) 1992, 1993\n\  
         The Regents of the University of California.  All rights reserved.\n";  
 #endif /* not lint */  
   
38  #include <sys/param.h>  #include <sys/param.h>
39  #include <sys/stat.h>  #include <sys/stat.h>
40  #include <sys/time.h>  #include <sys/time.h>
# Line 57  static const char copyright[] = Line 51  static const char copyright[] =
51  #include "pax.h"  #include "pax.h"
52  #include "extern.h"  #include "extern.h"
53    
54    __COPYRIGHT("@(#) Copyright (c) 1992, 1993\n\
55            The Regents of the University of California.  All rights reserved.\n");
56  __SCCSID("@(#)pax.c     8.2 (Berkeley) 4/18/94");  __SCCSID("@(#)pax.c     8.2 (Berkeley) 4/18/94");
57  __RCSID("$MirOS: src/bin/pax/pax.c,v 1.5 2006/07/16 18:00:33 tg Exp $");  __RCSID("$MirOS: src/bin/pax/pax.c,v 1.7 2007/02/17 04:52:41 tg Exp $");
58    
59  static int gen_init(void);  static int gen_init(void);
60    static void sig_cleanup(int) __attribute__((noreturn));
61    
62  /*  /*
63   * PAX main routines, general globals and some simple start up routines   * PAX main routines, general globals and some simple start up routines
# Line 69  static int gen_init(void); Line 66  static int gen_init(void);
66  /*  /*
67   * Variables that can be accessed by any routine within pax   * Variables that can be accessed by any routine within pax
68   */   */
69  int     act = DEFOP;            /* read/write/append/copy */  int     act = ERROR;            /* read/write/append/copy */
70  FSUB    *frmt = NULL;           /* archive format type */  FSUB    *frmt = NULL;           /* archive format type */
71  int     cflag;                  /* match all EXCEPT pattern/file */  int     cflag;                  /* match all EXCEPT pattern/file */
72  int     cwdfd;                  /* starting cwd */  int     cwdfd;                  /* starting cwd */
# Line 99  int    exit_val;               /* exit value */ Line 96  int    exit_val;               /* exit value */
96  int     docrc;                  /* check/create file crc */  int     docrc;                  /* check/create file crc */
97  char    *dirptr;                /* destination dir in a copy */  char    *dirptr;                /* destination dir in a copy */
98  char    *ltmfrmt;               /* -v locale time format (if any) */  char    *ltmfrmt;               /* -v locale time format (if any) */
99  char    *argv0;                 /* root of argv[0] */  const char *argv0;              /* root of argv[0] */
100  sigset_t s_mask;                /* signal mask for cleanup critical sect */  sigset_t s_mask;                /* signal mask for cleanup critical sect */
101  FILE    *listf;                 /* fp to print file list to (default stderr) */  FILE    *listf;                 /* fp to print file list to (default stderr) */
102  char    *tempfile;              /* tempfile to use for mkstemp(3) */  char    *tempfile;              /* tempfile to use for mkstemp(3) */
# Line 228  char   *tempbase;              /* basename of tempfile Line 225  char   *tempbase;              /* basename of tempfile
225  int  int
226  main(int argc, char **argv)  main(int argc, char **argv)
227  {  {
228          char *tmpdir;          const char *tmpdir;
229          size_t tdlen;          size_t tdlen;
230    
231          /*          /*
# Line 286  main(int argc, char **argv) Line 283  main(int argc, char **argv)
283                  copy();                  copy();
284                  break;                  break;
285          default:          default:
286                    act = LIST;     /* for ar_io.c &c. */
287          case LIST:          case LIST:
288                  list();                  list();
289                  break;                  break;
# Line 302  main(int argc, char **argv) Line 300  main(int argc, char **argv)
300   *      never....   *      never....
301   */   */
302    
303  void  static void
304  sig_cleanup(int which_sig)  sig_cleanup(int which_sig)
305  {  {
306          /* XXX signal races */          /* XXX signal races */

Legend:
Removed from v.2714  
changed lines
  Added in v.2715

root@freewrt.org:443
ViewVC Help
Powered by ViewVC 1.1.20