mirror of
https://github.com/vivier/EMILE.git
synced 2025-01-18 06:31:23 +00:00
move ParamBlockRec from tools/emile-first.h to second/glue.h
This commit is contained in:
parent
3edd6f5707
commit
d795ed1334
@ -18,6 +18,38 @@ struct MachineLocation
|
||||
};
|
||||
typedef struct MachineLocation MachineLocation;
|
||||
|
||||
/* ParamBlockRec Structure: "Inside Macintosh: Files", p. 2-87 */
|
||||
|
||||
enum {
|
||||
fsAtMark = 0,
|
||||
fsFromStart = 1,
|
||||
fsFromLEOF = 2,
|
||||
fsFromMark = 3
|
||||
};
|
||||
|
||||
typedef struct ParamBlockRec ParamBlockRec_t;
|
||||
|
||||
struct ParamBlockRec {
|
||||
unsigned long qLink; /* next queue entry */
|
||||
unsigned short qType; /* queue type */
|
||||
unsigned short ioTrap; /* routine trap */
|
||||
unsigned long ioCmdAddr; /* routine address */
|
||||
unsigned long ioCompletion; /* pointer to completion routine */
|
||||
unsigned short ioResult; /* result code */
|
||||
unsigned long ioNamePtr; /* pointer to pathname */
|
||||
signed short ioVRefNum; /* volume specification */
|
||||
signed short ioRefNum; /* file reference number */
|
||||
signed char ioVersNum; /* version number */
|
||||
signed char ioPermssn; /* read/write permission */
|
||||
unsigned long ioMisc; /* miscellaneaous */
|
||||
unsigned long ioBuffer; /* data buffer */
|
||||
unsigned long ioReqCount; /* requested number of bytes */
|
||||
unsigned long ioActCount; /* actual number of bytes */
|
||||
unsigned short ioPosMode; /* positioning mode and newline char */
|
||||
signed long ioPosOffset; /* positionning offset */
|
||||
} __attribute__((packed));
|
||||
|
||||
#define ASSERT_PBR(a) if ( sizeof(ParamBlockRec_t) != 50 ) { a }
|
||||
|
||||
extern void glue_display_properties(unsigned long *base,
|
||||
unsigned long *row_bytes,
|
||||
@ -27,3 +59,4 @@ extern int Gestalt(unsigned long selector, long * response);
|
||||
extern void ReadLocation(MachineLocation * loc);
|
||||
extern void* NewPtr(unsigned long byteCount);
|
||||
extern void DisposePtr(void* ptr);
|
||||
extern int PBReadSync(ParamBlockRec_t* paramBlock);
|
||||
|
@ -9,6 +9,8 @@
|
||||
* i386 is little-endian
|
||||
*/
|
||||
|
||||
#include "../second/glue.h"
|
||||
|
||||
/* first level structure */
|
||||
|
||||
/* BootBlkHdr Structure: "Inside Macintosh: Files", p. 2-57 */
|
||||
@ -36,32 +38,6 @@ struct BootBlkHdr {
|
||||
|
||||
#define ASSERT_BBH(a) if ( sizeof(BootBlkHdr_t) != 138 ) { a }
|
||||
|
||||
/* ParamBlockRec Structure: "Inside Macintosh: Files", p. 2-87 */
|
||||
|
||||
typedef struct ParamBlockRec ParamBlockRec_t;
|
||||
|
||||
struct ParamBlockRec {
|
||||
unsigned long qLink; /* next queue entry */
|
||||
unsigned short qType; /* queue type */
|
||||
unsigned short ioTrap; /* routine trap */
|
||||
unsigned long ioCmdAddr; /* routine address */
|
||||
unsigned long ioCompletion; /* pointer to completion routine */
|
||||
unsigned short ioResult; /* result code */
|
||||
unsigned long ioNamePtr; /* pointer to pathname */
|
||||
signed short ioVRefNum; /* volume specification */
|
||||
signed short ioRefNum; /* file reference number */
|
||||
signed char ioVersNum; /* version number */
|
||||
signed char ioPermssn; /* read/write permission */
|
||||
unsigned long ioMisc; /* miscellaneaous */
|
||||
unsigned long ioBuffer; /* data buffer */
|
||||
unsigned long ioReqCount; /* requested number of bytes */
|
||||
unsigned long ioActCount; /* actual number of bytes */
|
||||
unsigned short ioPosMode; /* positioning mode and newline char */
|
||||
signed long ioPosOffset; /* positionning offset */
|
||||
} __attribute__((packed));
|
||||
|
||||
#define ASSERT_PBR(a) if ( sizeof(ParamBlockRec_t) != 50 ) { a }
|
||||
|
||||
/* EMILE Boot block structure */
|
||||
|
||||
typedef struct eBootBlock eBootBlock_t;
|
||||
|
Loading…
x
Reference in New Issue
Block a user