comparison srf2fastq/io_lib-1.12.2/io_lib/tar_format.h @ 0:d901c9f41a6a default tip

Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
author dawe
date Tue, 07 Jun 2011 17:48:05 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:d901c9f41a6a
1 #ifndef _TAR_FORMAT_H
2 #define _TAR_FORMAT_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 /*
9 * Our own tar block defines - we cannot rely on UNIX to provide these for us
10 * as the sun tar.h is minimal and Alliant's does not even exist.
11 */
12 #define TBLOCK 512
13 #define NAMSIZ 100
14
15 /* Values used in typeflag field. */
16 #define REGTYPE '0' /* Regular File */
17 #define AREGTYPE '\0' /* Regular File */
18 #define LNKTYPE '1' /* Hard Link */
19 #define SYMTYPE '2' /* Symbolic Link */
20 #define CHRTYPE '3' /* Character Special File */
21 #define BLKTYPE '4' /* Block Special File */
22 #define DIRTYPE '5' /* Directory */
23 #define FIFOTYPE '6' /* FIFO */
24 #define CONTTYPE '7' /* Reserved */
25
26 /*
27 * There will usually be more data than this in a tar header - but we don't
28 * need to concern ourselves with it.
29 */
30 typedef union hblock {
31 char data[TBLOCK];
32 struct header {
33 char name[NAMSIZ];
34 char mode[8];
35 char uid[8];
36 char gid[8];
37 char size[12];
38 char mtime[12];
39 char chksum[8];
40 char typeflag;
41 char linkname[NAMSIZ];
42 char magic[6];
43 char version[2];
44 char uname[32];
45 char gname[32];
46 char devmajor[8];
47 char devminor[8];
48 char prefix[155];
49 } header;
50 } tar_block;
51
52 #ifdef __cplusplus
53 }
54 #endif
55
56 #endif