rpm
5.2.1
|
00001 #ifndef H_TAR 00002 #define H_TAR 00003 00011 typedef struct tarHeader_s * tarHeader; 00012 00013 /* Tar file constants */ 00014 # define TAR_MAGIC "ustar" /* ustar and a null */ 00015 # define TAR_VERSION " " /* Be compatable with GNU tar format */ 00016 00017 #define TAR_BLOCK_SIZE 512 00018 #define TAR_MAGIC_LEN 6 00019 #define TAR_VERSION_LEN 2 00020 00021 /* POSIX tar Header Block, from POSIX 1003.1-1990 */ 00022 #define TAR_NAME_SIZE 100 00023 00027 struct tarHeader_s { /* byte offset */ 00028 char name[TAR_NAME_SIZE]; /* 0-99 */ 00029 char mode[8]; /* 100-107 */ /* mode */ 00030 char uid[8]; /* 108-115 */ /* uid */ 00031 char gid[8]; /* 116-123 */ /* gid */ 00032 char filesize[12]; /* 124-135 */ /* ilesize */ 00033 char mtime[12]; /* 136-147 */ /* mtime */ 00034 char checksum[8]; /* 148-155 */ /* checksum */ 00035 char typeflag; /* 156-156 */ 00036 char linkname[TAR_NAME_SIZE]; /* 157-256 */ 00037 char magic[6]; /* 257-262 */ /* magic */ 00038 char version[2]; /* 263-264 */ 00039 char uname[32]; /* 265-296 */ 00040 char gname[32]; /* 297-328 */ 00041 char devMajor[8]; /* 329-336 */ /* devMajor */ 00042 char devMinor[8]; /* 337-344 */ /* devMinor */ 00043 char prefix[155]; /* 345-499 */ 00044 char padding[12]; /* 500-512 (pad to exactly TAR_BLOCK_SIZE) */ 00045 }; 00046 00047 /*@unchecked@*/ 00048 extern int _tar_debug; 00049 00050 #ifdef __cplusplus 00051 extern "C" { 00052 #endif 00053 00060 int tarHeaderRead(void * _iosm, struct stat * st) 00061 /*@globals fileSystem, internalState @*/ 00062 /*@modifies _iosm, *st, fileSystem, internalState @*/; 00063 00070 int tarHeaderWrite(void * _iosm, struct stat * st) 00071 /*@globals fileSystem, internalState @*/ 00072 /*@modifies _iosm, fileSystem, internalState @*/; 00073 00079 int tarTrailerWrite(void * _iosm) 00080 /*@globals fileSystem, internalState @*/ 00081 /*@modifies _iosm, fileSystem, internalState @*/; 00082 00083 #ifdef __cplusplus 00084 } 00085 #endif 00086 00087 #endif /* H_TAR */