/ [cpio] / cpio / src / defer.c
To checkout: cvs -d:pserver:anonymous@cvs.gnu.org.ua:/cvsmirror/cpio co cpio/src/defer.c
Puszcza

Annotation of /cpio/src/defer.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations)
Wed Jun 27 13:59:59 2007 UTC (14 years, 7 months ago) by gray
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +2 -2 lines
File MIME type: text/plain
Relicense under GPLv3

1 gray 1.1 /* defer.c - handle "defered" links in newc and crc archives
2 gray 1.6 Copyright (C) 1993, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
3 gray 1.1
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6 gray 1.6 the Free Software Foundation; either version 3, or (at your option)
7 gray 1.1 any later version.
8    
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12     GNU General Public License for more details.
13    
14 gray 1.3 You should have received a copy of the GNU General Public
15     License along with this program; if not, write to the Free
16     Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17     Boston, MA 02110-1301 USA. */
18 gray 1.1
19 gray 1.2 #include <system.h>
20    
21 gray 1.1 #include <stdio.h>
22     #include <sys/types.h>
23     #include "cpiohdr.h"
24     #include "extern.h"
25     #include "defer.h"
26    
27     struct deferment *
28 gray 1.4 create_deferment (struct cpio_file_stat *file_hdr)
29 gray 1.1 {
30     struct deferment *d;
31     d = (struct deferment *) xmalloc (sizeof (struct deferment) );
32     d->header = *file_hdr;
33     d->header.c_name = (char *) xmalloc (strlen (file_hdr->c_name) + 1);
34     strcpy (d->header.c_name, file_hdr->c_name);
35     return d;
36     }
37    
38     void
39 gray 1.2 free_deferment (struct deferment *d)
40 gray 1.1 {
41     free (d->header.c_name);
42     free (d);
43     }

Send suggestions and bug reports to Sergey Poznyakoff
ViewVC Help
Powered by ViewVC 1.1.20