home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1999 February
/
MACPOWER-1999-02.ISO.7z
/
MACPOWER-1999-02.ISO
/
9902⁄AMUG
/
UTILITY
/
mac06-0.95.sit
/
mac06-0.95
/
usr
/
include
/
tar.h
< prev
next >
Wrap
Text File
|
1998-10-18
|
2KB
|
67 lines
/* mac06ゥ1997,1998 by HNS/DSITRI hns@computer.org
** tar.h
** Tape ARchive record format
*/
#pragma once
#define BLKLEN 512
#define TMAGIC "ustar "
#define TMAGICV "ustar¥000" /* with version */
#define TMAGLEN 8
#define NAMELEN 100
typedef union tarblk
{
struct header
{
char name[NAMELEN]; /* entry name */
char mode[8]; /* octal string */
char uid[8]; /* octal string */
char gid[8]; /* octal string */
char size[12]; /* octal string */
char mtime[12]; /* octal string */
char cksum[8]; /* octal string */
char type; /* file type */
char linkname[NAMELEN]; /* linked to ... */
char magic[TMAGLEN]; /* magic string */
char uname[32]; /* full user name */
char gname[32]; /* full group name */
char devmajor[8]; /* octal string */
char devminor[8]; /* octal string */
} h;
unsigned char data[BLKLEN];
} TARBLK;
#define TARHSZ sizeof(TARBLK)
/* file types */
#define REGTYPE 0 /* regular file */
#define AREGTYPE '0' /* regular file */
#define LNKTYPE '1' /* link */
#define SYMTYPE '2' /* symbolic link */
#define CHRTYPE '3' /* character device */
#define BLKTYPE '4' /* block device */
#define DIRTYPE '5' /* directory */
#define FIFOTYPE '6' /* FIFO file */
#define CONTTYPE '7' /* contiguous */
/* file mode definitions */
#define TSETUID 04000
#define TSETGID 02000
#define TSTICKY 01000
#define TUREAD 00400
#define TUWRITE 00200
#define TUEXEC 00100
#define TGREAD 00040
#define TGWRITE 00020
#define TGEXEC 00010
#define TOREAD 00004
#define TOWRITE 00002
#define TOEXEC 00001
/* EOF */