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

SCM Repository

ViewVC logotype

Diff of /trunk/freewrt/tools/paxmirabilis/src/ar_subs.c

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

revision 3815 by tg, Sat Sep 6 16:06:24 2008 UTC revision 3816 by tg, Wed Oct 29 17:58:40 2008 UTC
# Line 2  Line 2 
2  /*      $NetBSD: ar_subs.c,v 1.5 1995/03/21 09:07:06 cgd Exp $  */  /*      $NetBSD: ar_subs.c,v 1.5 1995/03/21 09:07:06 cgd Exp $  */
3    
4  /*-  /*-
5     * Copyright (c) 2008
6     *      Thorsten Glaser <tg@mirbsd.de>
7   * Copyright (c) 1992 Keith Muller.   * Copyright (c) 1992 Keith Muller.
8   * Copyright (c) 1992, 1993   * Copyright (c) 1992, 1993
9   *      The Regents of the University of California.  All rights reserved.   *      The Regents of the University of California.  All rights reserved.
# Line 49  Line 51 
51  #include "options.h"  #include "options.h"
52    
53  __SCCSID("@(#)ar_subs.c 8.2 (Berkeley) 4/18/94");  __SCCSID("@(#)ar_subs.c 8.2 (Berkeley) 4/18/94");
54  __RCSID("$MirOS: src/bin/pax/ar_subs.c,v 1.6 2007/10/23 20:07:41 tg Exp $");  __RCSID("$MirOS: src/bin/pax/ar_subs.c,v 1.7 2008/10/29 17:34:48 tg Exp $");
55    
56  static void wr_archive(ARCHD *, int is_app);  static void wr_archive(ARCHD *, int is_app);
57  static int get_arc(void);  static int get_arc(void);
# Line 310  extract(void) Line 312  extract(void)
312                           * header (as determined by the format).                           * header (as determined by the format).
313                           */                           */
314                          if (!to_stdout) {                          if (!to_stdout) {
315                                  if ((arcn->type == PAX_HLK) || (arcn->type == PAX_HRG))                                  if ((arcn->type == PAX_HLK) || (arcn->type == PAX_HRG)) {
316                                          res = lnk_creat(arcn);                                          res = lnk_creat(arcn, &fd);
317                                  else                                          if (fd != -1)
318                                                    goto extdata;
319                                    } else
320                                          res = node_creat(arcn);                                          res = node_creat(arcn);
321                          }                          }
322    
# Line 341  extract(void) Line 345  extract(void)
345                   * extract the file from the archive and skip over padding and                   * extract the file from the archive and skip over padding and
346                   * any unprocessed data                   * any unprocessed data
347                   */                   */
348     extdata:
349                  res = (*frmt->rd_data)(arcn, fd, &cnt);                  res = (*frmt->rd_data)(arcn, fd, &cnt);
350                  if (fd != STDOUT_FILENO)                  if (fd != STDOUT_FILENO)
351                          file_close(arcn, fd);                          file_close(arcn, fd);
# Line 351  extract(void) Line 356  extract(void)
356                  if (!res)                  if (!res)
357                          (void)rd_skip(cnt + arcn->pad);                          (void)rd_skip(cnt + arcn->pad);
358    
359  popd:   popd:
360                  /*                  /*
361                   * if required, chdir around.                   * if required, chdir around.
362                   */                   */
# Line 927  copy(void) Line 932  copy(void)
932                           * create a link or special file                           * create a link or special file
933                           */                           */
934                          if ((arcn->type == PAX_HLK) || (arcn->type == PAX_HRG))                          if ((arcn->type == PAX_HLK) || (arcn->type == PAX_HRG))
935                                  res = lnk_creat(arcn);                                  res = lnk_creat(arcn, NULL);
936                          else                          else
937                                  res = node_creat(arcn);                                  res = node_creat(arcn);
938                          if (res < 0)                          if (res < 0)

Legend:
Removed from v.3815  
changed lines
  Added in v.3816

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