Mercurial > vba-linux
diff src/win32/7zip/7z/CPP/7zip/Archive/Tar/TarHeader.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/win32/7zip/7z/CPP/7zip/Archive/Tar/TarHeader.h Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,108 @@ 1.4 +// Archive/Tar/Header.h 1.5 + 1.6 +#ifndef __ARCHIVE_TAR_HEADER_H 1.7 +#define __ARCHIVE_TAR_HEADER_H 1.8 + 1.9 +#include "Common/Types.h" 1.10 + 1.11 +namespace NArchive { 1.12 +namespace NTar { 1.13 + 1.14 +namespace NFileHeader 1.15 +{ 1.16 + const int kRecordSize = 512; 1.17 + const int kNameSize = 100; 1.18 + const int kUserNameSize = 32; 1.19 + const int kGroupNameSize = 32; 1.20 + const int kPrefixSize = 155; 1.21 + 1.22 + /* 1.23 + struct CHeader 1.24 + { 1.25 + char Name[kNameSize]; 1.26 + char Mode[8]; 1.27 + char UID[8]; 1.28 + char GID[8]; 1.29 + char Size[12]; 1.30 + char ModificationTime[12]; 1.31 + char CheckSum[8]; 1.32 + char LinkFlag; 1.33 + char LinkName[kNameSize]; 1.34 + char Magic[8]; 1.35 + char UserName[kUserNameSize]; 1.36 + char GroupName[kGroupNameSize]; 1.37 + char DeviceMajor[8]; 1.38 + char DeviceMinor[8]; 1.39 + char Prefix[155]; 1.40 + }; 1.41 + union CRecord 1.42 + { 1.43 + CHeader Header; 1.44 + Byte Padding[kRecordSize]; 1.45 + }; 1.46 + */ 1.47 + 1.48 + namespace NMode 1.49 + { 1.50 + const int kSetUID = 04000; // Set UID on execution 1.51 + const int kSetGID = 02000; // Set GID on execution 1.52 + const int kSaveText = 01000; // Save text (sticky bit) 1.53 + } 1.54 + 1.55 + namespace NFilePermissions 1.56 + { 1.57 + const int kUserRead = 00400; // read by owner 1.58 + const int kUserWrite = 00200; // write by owner 1.59 + const int kUserExecute = 00100; // execute/search by owner 1.60 + const int kGroupRead = 00040; // read by group 1.61 + const int kGroupWrite = 00020; // write by group 1.62 + const int kGroupExecute = 00010; // execute/search by group 1.63 + const int kOtherRead = 00004; // read by other 1.64 + const int kOtherWrite = 00002; // write by other 1.65 + const int kOtherExecute = 00001; // execute/search by other 1.66 + } 1.67 + 1.68 + 1.69 + // The linkflag defines the type of file 1.70 + namespace NLinkFlag 1.71 + { 1.72 + const char kOldNormal = '\0'; // Normal disk file, Unix compatible 1.73 + const char kNormal = '0'; // Normal disk file 1.74 + const char kLink = '1'; // Link to previously dumped file 1.75 + const char kSymbolicLink = '2'; // Symbolic link 1.76 + const char kCharacter = '3'; // Character special file 1.77 + const char kBlock = '4'; // Block special file 1.78 + const char kDirectory = '5'; // Directory 1.79 + const char kFIFO = '6'; // FIFO special file 1.80 + const char kContiguous = '7'; // Contiguous file 1.81 + 1.82 + const char kDumpDir = 'D'; /* GNUTYPE_DUMPDIR. 1.83 + data: list of files created by the --incremental (-G) option 1.84 + Each file name is preceded by either 1.85 + - 'Y' (file should be in this archive) 1.86 + - 'N' (file is a directory, or is not stored in the archive.) 1.87 + Each file name is terminated by a null + an additional null after 1.88 + the last file name. */ 1.89 + 1.90 + } 1.91 + // Further link types may be defined later. 1.92 + 1.93 + // The checksum field is filled with this while the checksum is computed. 1.94 + extern const char *kCheckSumBlanks;// = " "; // 8 blanks, no null 1.95 + 1.96 + extern const char *kLongLink; // = "././@LongLink"; 1.97 + extern const char *kLongLink2; // = "@LongLink"; 1.98 + 1.99 + // The magic field is filled with this if uname and gname are valid. 1.100 + namespace NMagic 1.101 + { 1.102 + extern const char *kUsTar; // = "ustar"; // 5 chars 1.103 + extern const char *kGNUTar; // = "GNUtar "; // 7 chars and a null 1.104 + extern const char *kEmpty; // = "GNUtar "; // 7 chars and a null 1.105 + } 1.106 + 1.107 +} 1.108 + 1.109 +}} 1.110 + 1.111 +#endif