diff options
Diffstat (limited to 'src/tarhdr.h')
-rw-r--r-- | src/tarhdr.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/tarhdr.h b/src/tarhdr.h new file mode 100644 index 0000000..8b1211d --- /dev/null +++ b/src/tarhdr.h | |||
@@ -0,0 +1,62 @@ | |||
1 | /* Extended tar header from POSIX.1. | ||
2 | Copyright (C) 1992 Free Software Foundation, Inc. | ||
3 | |||
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 | the Free Software Foundation; either version 2, or (at your option) | ||
7 | 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 | You should have received a copy of the GNU General Public License along | ||
15 | with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | ||
17 | |||
18 | #ifndef _TARHDR_H | ||
19 | |||
20 | #define _TARHDR_H 1 | ||
21 | |||
22 | #include <tar.h> | ||
23 | |||
24 | /* Size of `name' field. */ | ||
25 | #define TARNAMESIZE 100 | ||
26 | |||
27 | /* Size of `linkname' field. */ | ||
28 | #define TARLINKNAMESIZE 100 | ||
29 | |||
30 | /* Size of `prefix' field. */ | ||
31 | #define TARPREFIXSIZE 155 | ||
32 | |||
33 | /* Size of entire tar header. */ | ||
34 | #define TARRECORDSIZE 512 | ||
35 | |||
36 | struct tar_header | ||
37 | { | ||
38 | char name[TARNAMESIZE]; | ||
39 | char mode[8]; | ||
40 | char uid[8]; | ||
41 | char gid[8]; | ||
42 | char size[12]; | ||
43 | char mtime[12]; | ||
44 | char chksum[8]; | ||
45 | char typeflag; | ||
46 | char linkname[TARLINKNAMESIZE]; | ||
47 | char magic[6]; | ||
48 | char version[2]; | ||
49 | char uname[32]; | ||
50 | char gname[32]; | ||
51 | char devmajor[8]; | ||
52 | char devminor[8]; | ||
53 | char prefix[TARPREFIXSIZE]; | ||
54 | }; | ||
55 | |||
56 | union tar_record | ||
57 | { | ||
58 | struct tar_header header; | ||
59 | char buffer[TARRECORDSIZE]; | ||
60 | }; | ||
61 | |||
62 | #endif /* tarhdr.h */ | ||