mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-14 10:11:38 -06:00
4.20
This commit is contained in:
committed by
Kornel Lesiński
parent
8c1b5c7b7e
commit
3c510ba80b
@@ -1,7 +1,5 @@
|
||||
// Archive/cpio/Header.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __ARCHIVE_CPIO_HEADER_H
|
||||
#define __ARCHIVE_CPIO_HEADER_H
|
||||
|
||||
@@ -10,20 +8,19 @@
|
||||
namespace NArchive {
|
||||
namespace NCpio {
|
||||
|
||||
#pragma pack( push, PragmacpioHeaders)
|
||||
#pragma pack( push, 1)
|
||||
|
||||
namespace NFileHeader
|
||||
{
|
||||
namespace NMagic
|
||||
{
|
||||
extern const char *kMagic1;
|
||||
extern const char *kMagic2;
|
||||
extern const char *kMagic3;
|
||||
extern const char *kEndName;
|
||||
extern unsigned short kMagicForRecord2;
|
||||
extern unsigned short kMagicForRecord2BE;
|
||||
extern const Byte kMagicForRecord2[2];
|
||||
}
|
||||
|
||||
const UInt32 kRecord2Size = 26;
|
||||
/*
|
||||
struct CRecord2
|
||||
{
|
||||
unsigned short c_magic;
|
||||
@@ -38,31 +35,35 @@ namespace NFileHeader
|
||||
unsigned short c_namesize;
|
||||
unsigned short c_filesizes[2];
|
||||
};
|
||||
|
||||
*/
|
||||
|
||||
const UInt32 kRecordSize = 110;
|
||||
/*
|
||||
struct CRecord
|
||||
{
|
||||
char Magic[6]; /* "070701" for "new" portable format, "070702" for CRC format */
|
||||
char Magic[6]; // "070701" for "new" portable format, "070702" for CRC format
|
||||
char inode[8];
|
||||
char Mode[8];
|
||||
char UID[8];
|
||||
char GID[8];
|
||||
char nlink[8];
|
||||
char mtime[8];
|
||||
char Size[8]; /* must be 0 for FIFOs and directories */
|
||||
char Size[8]; // must be 0 for FIFOs and directories
|
||||
char DevMajor[8];
|
||||
char DevMinor[8];
|
||||
char RDevMajor[8]; /*only valid for chr and blk special files*/
|
||||
char RDevMinor[8]; /*only valid for chr and blk special files*/
|
||||
char NameSize[8]; /*count includes terminating NUL in pathname*/
|
||||
char ChkSum[8]; /* 0 for "new" portable format; for CRC format the sum of all the bytes in the file */
|
||||
bool CheckMagic()
|
||||
char RDevMajor[8]; //only valid for chr and blk special files
|
||||
char RDevMinor[8]; //only valid for chr and blk special files
|
||||
char NameSize[8]; // count includes terminating NUL in pathname
|
||||
char ChkSum[8]; // 0 for "new" portable format; for CRC format the sum of all the bytes in the file
|
||||
bool CheckMagic() const
|
||||
{ return memcmp(Magic, NMagic::kMagic1, 6) == 0 ||
|
||||
memcmp(Magic, NMagic::kMagic2, 6) == 0; };
|
||||
};
|
||||
}
|
||||
*/
|
||||
|
||||
#pragma pack(pop)
|
||||
#pragma pack(pop, PragmacpioHeaders)
|
||||
const UInt32 kOctRecordSize = 76;
|
||||
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user