aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-13 12:12:52 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-13 12:12:52 +0000
commit19f3aa14a3d2e6ca70ff9388c53adfd95645b3c7 (patch)
tree3b05a1e5ae6093228c6197aca28e330f13887711 /paxinc.h
parentdefine and use our own copy of PATH_MAX (diff)
downloadpax-utils-19f3aa14a3d2e6ca70ff9388c53adfd95645b3c7.tar.gz
pax-utils-19f3aa14a3d2e6ca70ff9388c53adfd95645b3c7.tar.bz2
pax-utils-19f3aa14a3d2e6ca70ff9388c53adfd95645b3c7.zip
initial support for reading archive files (*.a)
Diffstat (limited to 'paxinc.h')
-rw-r--r--paxinc.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/paxinc.h b/paxinc.h
index 91fa859..a88864e 100644
--- a/paxinc.h
+++ b/paxinc.h
@@ -1,7 +1,7 @@
/*
* Copyright 2005-2006 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxinc.h,v 1.4 2006/01/10 01:40:15 vapier Exp $
+ * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxinc.h,v 1.5 2006/01/13 12:12:52 vapier Exp $
*
* Copyright 2005-2006 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2006 Mike Frysinger - <vapier@gentoo.org>
@@ -28,6 +28,39 @@
extern char do_reverse_endian;
+#ifdef IN_paxinc
+typedef struct {
+ int fd;
+ const char *filename;
+} archive_handle;
+#else
+typedef void archive_handle;
+#endif
+typedef struct {
+ char name[__PAX_UTILS_PATH_MAX];
+ time_t date;
+ uid_t uid;
+ gid_t gid;
+ mode_t mode;
+ off_t size;
+#ifdef IN_paxinc
+ union {
+ char raw[60];
+ struct {
+ char name[16];
+ char date[12];
+ char uid[6];
+ char gid[6];
+ char mode[8];
+ char size[10];
+ char magic[2];
+ } formated;
+ } buf;
+#endif
+} archive_member;
+archive_handle *ar_open(const char *filename);
+archive_member *ar_next(archive_handle *);
+
/* Get a value 'X', compensating for endianness. */
#define EGET(X) \
(__extension__ ({ \