home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 December
/
VPR9712A.ISO
/
OLS
/
OS2
/
LHA2P205
/
LHA2P205.LZH
/
lha2-2.05pre
/
source.lzh
/
src
/
header.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-02-25
|
2KB
|
123 lines
/*
* header.h
* Copyright (C) 1988-1994, Haruyasu YOSHIZAKI
* Copyright (C) 1991-1996, Satoshi HIRAMATSU
*
* $Log$
*/
#ifndef __INCLUDED_HEADER_H__
#define __INCLUDED_HEADER_H__
typedef struct head
{
word headersize;
char method[6];
word packed;
word skip;
word original;
STAMP dostime;
time_t mtime;
uint attr;
uint level;
hword filecrc;
hword headercrc;
char *pathname;
char *filename;
int creator;
int pathlen;
int namelen;
int info;
off_t currentpos;
bool crcpos;
bool needfname;
word mode;
off_t offset;
byte dummy;
#ifdef __SUPPORT_CTIME_ATIME__
time_t ctime;
time_t atime;
#endif
#ifdef __SUPPORT_UID_GID__
uid_t uid;
gid_t gid;
#endif
#ifdef __SUPPORT_EA__
uint eatype;
#ifdef __OS2__
FEA2LIST *ea;
#endif
#endif
#ifdef __SUPPORT_KAPSEL__
word kapselheadersize;
word filesize;
#endif
} HEADER;
typedef struct __headerlink
{
byte *header;
ulong size;
struct __headerlink *next;
} HEADERLINK;
/* MS-DOS, Windows(LongNameFAT support) */
#define CREATOR_MSDOS 'M'
/* OS/2 */
#define CREATOR_OS2 '2'
#define EA_CREATOR_OS2 "OS/2"
/* Windows/NT(NTFS and HPFS and VFAAT support) */
#define CREATOR_WINDOWS_NT 'W'
#define CREATOR_WINDOWS_95 'w'
/* UNIX oprating system */
#define CREATOR_UNIX 'U'
/* MacOS */
#define CREATOR_MAC 'm'
/* HUMAN */
#define CREATOR_HUMAN 'H'
/* OS-9 */
#define CREATOR_OS9 '9'
/* EA type (OS dependent) */
#define __TYPE_EA__ 0x00 /* 拡張属性 */
#define __TYPE_EA_COMPRESS__ 0x01 /* 拡張属性(圧縮) */
/* compression method */
#define LH0 0
#define LH1 1
#define LH2 2
#define LH3 3
#define LH4 4
#define LH5 5
#define LZS 6
#define LZ5 7
#define LZ4 8
#define LHD 9
#define SENTINEL 10
extern char methods[11][5];
HEADERLINK *makehdr(HEADER *);
bool inithdr(FILE *);
char *gethdr(FILE *, HEADER *);
bool writehdr(FILE *, HEADERLINK *, HEADER *);
bool adjusthdr(FILE *, HEADERLINK *, HEADER *);
bool copyhdr(FILE *, FILE *, HEADER *);
/* from append.c */
void copylzh(HEADER *);
#define READ_MAX ((uint)-1)
#endif