|
|
Power 6/32 Unix version 1.2b
/* @(#)ty.h 2.7 */
#define ityNil -1
#define cTyMax 2 /* most TY's for any one var */
#ifdef TAHOE
typedef struct TDS { /* type descriptor */
uchar st; /* symbol type */
bits fConstant : 1; /* used in expr.c to indicate a constant */
bits width : 7; /* for bit fields */
bits tq6 : 2; /* type qualifiers */
bits tq5 : 2;
bits tq4 : 2;
bits tq3 : 2;
bits tq2 : 2;
bits tq1 : 2;
bits bt : 4; /* basic type */
} TDR, *pTDR;
#else
#ifdef M68000
typedef struct TDS { /* type descriptor */
uchar st; /* symbol type */
bits fConstant : 1; /* used in expr.c to indicate a constant */
bits width : 7; /* for bit fields */
bits bt : 4; /* basic type */
bits tq6 : 2; /* type qualifiers */
bits tq5 : 2;
bits tq4 : 2;
bits tq3 : 2;
bits tq2 : 2;
bits tq1 : 2;
} TDR, *pTDR;
#else
typedef struct TDS { /* type descriptor */
uchar st; /* symbol type */
bits fConstant : 1; /* used in expr.c to indicate a constant */
bits width : 7; /* for bit fields */
bits bt : 4; /* basic type */
bits tq1 : 2;
bits tq2 : 2;
bits tq3 : 2;
bits tq4 : 2;
bits tq5 : 2;
bits tq6 : 2; /* type qualifiers */
} TDR, *pTDR;
#endif
#endif
#define cbTDR sizeof(TDR)
#define tdNil ((pTDR)0)
/* type qualifiers for TDR.tq1 -> TDR.tq6 */
#define tqNil 0
#define tqPtr 1
#define tqFunc 2
#define tqArray 3
/* basic types as seen in TDR.bt */
#define btNil 0
#define btFArg 1
#define btChar 2
#define btShort 3
#define btInt 4
#define btLong 5
#define btFloat 6
#define btDouble 7
#define btStruct 8
#define btUnion 9
#define btEType 10
#define btEMember 11
#define btUChar 12
#define btUShort 13
#define btUInt 14
#define btULong 15
typedef struct { /* `nlist' structure */
#ifdef SYSIII
char sbVar[cbVarMax];
#endif
#ifdef BSD41
long sbVar; /* it is actually an index into string space */
#endif
TDR td; /* type descriptor */
ulong valTy;
} TYR, *pTYR;
#define cbTYR sizeof(TYR)
#define tyNil ((pTYR)0)
/* this is the extension record that remembers structure affiliation and
* array dimensions. This must be carefully matched to the TYR so that
* the 'st' field lands on the same byte.
*/
typedef struct {
long issRef; /* iss of parent type */
uchar st; /* if st != stExtend, don't use this record */
char unused;
short cb;
short rgDim[2];
} XTYR, *pXTYR;
#define cbXTYR sizeof(XTYR)
#define xtyNil ((pXTYR)0)
#ifdef BSD42
typedef struct { /* alternate form of BSD symbol for getting at dbx info */
long sbVar; /* same as TYR */
uchar st; /* same meaning as TYR */
char other;
short size; /* for dbx, this is the size in bytes */
ulong valTy; /* for variables - same as TYR */
} DBTYR, *pDBTYR;
#define cdDBTYR sizeof(DBTYR)
#define dbtyNil ((pDBTYR)0)
#endif
/* these are defined for each system in sym.h
* these are the Berkeley definitions
* #define N_UNDF 0x0
* #define N_ABS 0x2
* #define N_TEXT 0x4
* #define N_DATA 0x6
* #define N_BSS 0x8
*/
/* values for st.
* be very careful about using 4, 6, or 8 as last number in ST !!!
* they are known to the Berkeley loader as specifying text, data and bss space
*/
#define stPascal 0x30 /* global pascal symbol: name,,0,subtype,line */
#define stGlobal 0x20 /* global symbol: name,,0,type,0 */
#define stFName 0x22 /* procedure name (f77 kludge): name,,0 */
#define stProc 0x24 /* procedure: name,,0,linenumber,address */
#define stStatic 0x26 /* static symbol: name,,0,type,address */
#define stLComm 0x28 /* .lcomm symbol: name,,0,type,address */
#define stReg 0x40 /* register symbol: name,,0,type,register */
#define stLine 0x44 /* source line: 0,,0,linenumber,address */
#define stStruct 0x60 /* struct element: name,,w,type,struct_offset (bytes) */
/* In the preceding, `w' is the width, specified only for bit fields */
/* If w != 0, then offset is in BITS */
#define stSource 0x64 /* source file name: name,,0,0,address */
#define stLocal 0x80 /* local symbol: name,,0,type,offset */
#define stInclude 0x84 /* #include file name: name,,0,0,address */
#define stParam 0xa0 /* parameter: name,,0,type,offset */
#define stEntry 0xa4 /* alternate entry: name,,0,linenumber,address */
#define stLBrac 0xc0 /* left bracket: 0,,0,nesting level, address*/
#define stRBrac 0xe0 /* right bracket: 0,,0,nesting level, address*/
#define stBComm 0xe2 /* begin common: name,, */
#define stEComm 0xe4 /* end common: name,, */
#define stELocal 0xe8 /* end common (local name): ,,address */
#define stExtend 0xf7 /* cdb: this is a second stab. shape is XTYR, not TYR */
#define stSpc 0xfa /* cdb: special variable - lives in cdb, not child */
#define stPure 0xfb /* cdb: this is PURE type info (struct, union, enum) */
/* dbx uses .lcomm instead */
#define stValue 0xfc /* cdb: value field is VALUE, used in expr evaluation */
#define stLeng 0xfe /* second stab entry with length information */
#ifdef BSD41
/* the following are used by the BSD pascal compiler for global symbols.
* they live in the td.bt field of a TYR
*/
#define ptSource 1 /* source file name */
#define ptInclude 2 /* included file name */
#define ptLabel 3 /* global label */
#define ptConstant 4 /* global constant */
#define ptType 5 /* global type */
#define ptVar 6 /* global variable */
#define ptFunc 7 /* global function */
#define ptProc 8 /* global procedure */
#define ptExtFunc 9 /* external function */
#define ptExtProc 10 /* external procedure */
#define ptLibVar 11 /* library variable */
#define ptLibProc 12 /* library routine */
#endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.