home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 4
/
DATAFILE_PDCD4.iso
/
unix
/
unixtools
/
util
/
h
/
chunkfile
< prev
next >
Wrap
Text File
|
1992-07-21
|
2KB
|
61 lines
/* H.ChunkFile - Definitions for Arm Chunk files */
#ifndef __sys_chunkfile
#define __sys_chunkfile
/* Format of a chunk file header - first few bytes of a chunk file */
struct chunk_file_header
{
unsigned ChunkField;
unsigned maxChunks;
unsigned numChunks;
struct chunk_file_header_entry
{
unsigned ChunkIDPrefix;
unsigned ChunkIDType;
unsigned FileOffset;
unsigned Size;
}
entry[1];
};
#define ChunkFileID (0xC3CBC6C5)
#define ChunkID_LIB (0x5F42494C) /* (unsigned)('LIB_') */
#define ChunkID_OFL (0x5F4C464F) /* (unsigned)('OFL_') */
#define ChunkID_OBJ (0x5F4A424F) /* (unsigned)('OBJ_') */
#define ChunkID_LIB_DIRY (0x59524944) /* (unsigned)('DIRY') */
#define ChunkID_LIB_TIME (0x454D4954) /* (unsigned)('TIME') */
#define ChunkID_LIB_VRSN (0x4E535256) /* (unsigned)('VRSN') */
#define ChunkID_LIB_DATA (0x41544144) /* (unsigned)('DATA') */
#define ChunkID_OFL_SYMT (0x544D5953) /* (unsigned)('SYMT') */
#define ChunkID_OFL_TIME (0x454D4954) /* (unsigned)('TIME') */
#define ChunkID_OBJ_HEAD (0x44414548) /* (unsigned)('HEAD') */
#define ChunkID_OBJ_AREA (0x41455241) /* (unsigned)('AREA') */
#define ChunkID_OBJ_IDFN (0x4E464449) /* (unsigned)('IDFN') */
#define ChunkID_OBJ_SYMT (0x544D5953) /* (unsigned)('SYMT') */
#define ChunkID_OBJ_STRT (0x54525453) /* (unsigned)('STRT') */
#define ChunkFile_HdrSize(hdr_ptr) \
(sizeof (struct chunk_file_header) + \
((hdr_ptr)->maxChunks - 1) * sizeof (struct chunk_file_header_entry))
struct lib_directory_entry
{
unsigned ChunkIndex;
unsigned EntryLength;
unsigned DataLength;
char LibData[1];
};
#define Lib_DataName(ptr) (char *)((ptr)->LibData)
#define Lib_DataTime(ptr) ((struct lib_TimeStamp *)((ptr)->LibData + \
( (strlen((ptr)->LibData)+4) & ~0x03 ) ) )
struct lib_TimeStamp
{
char t[8];
};
#endif