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
/
coff
/
syms.h
< prev
next >
Wrap
Text File
|
1997-11-01
|
3KB
|
155 lines
/* mac06ゥ1997 by HNS/DSITRI hns@computer.org
** syms.h
*/
#ifdef __SC__ /* Symantec C++ for PowerPC 8.0 */
#pragma options align=mac68k
#endif
#define SYMNMLEN 8
struct syment
{
union
{
char _n_name[SYMNMLEN]; /* symbol name or */
struct
{
long _n_zeroes; /* if n_name[0..3] == 0 */
long _n_offset; /* then offset into string table */
} _n_n;
char *_n_nptr[2]; /* offset as pointer */
} _n; /* symbol name */
long n_value; /* the symbol's value */
short n_scnum; /* section number */
unsigned short n_type; /* type and derived type */
char n_sclass; /* storage class */
char n_numaux; /* number of aux entries */
};
#define n_name _n._n_name
#define n_nptr _n._nptr[1]
#define n_zeroes _n._n_n._n_zeroes
#define n_offset _n._n_n._n_offset
enum sym_n_scnum
{
N_DEBUG = -2,
N_ABS = -1,
N_UNDEF = 0,
N_SCNUM = 1
};
enum sym_n_type
{
T_NULL = 0,
T_VOID = 1,
T_CHAR = 2,
T_SHORT = 3,
T_INT = 4,
T_LONG = 5,
T_FLOAT = 6,
T_DOUBLE = 7,
T_STRUCT = 8,
T_UNION = 9,
T_ENUM = 10,
T_MOE = 11,
T_UCHAR = 12,
T_USHORT = 13,
T_UINT = 14,
T_ULONG = 15
};
enum sym_n_type_derived
{
DT_NON = 0,
DT_PTR = 1,
DT_FCN = 2,
DT_ARY = 3
};
#define ISNON(X) (((X)&3) == DT_NON)
#define ISFCN(X) (((X)&3) == DT_FCN)
#define ISPTR(X) (((X)&3) == DT_PTR)
#define ISARY(X) (((X)&3) == DT_ARY)
enum sym_n_class
{
C_NULL = 0,
C_STAT = 1,
C_EXT = 2,
C_AUTO = 3,
C_FILE = 0x67,
C_SECTION,
C_STRTAG,
C_EOS,
C_FCN,
C_EFCN,
C_MOU,
C_UNTAG,
C_TYPDEF,
C_ENTAG,
C_MOE,
C_REGPARAM,
C_FIELD,
C_BLOCK,
C_REG,
C_LABEL,
C_MOS,
C_ARG
};
#define SYMENT struct syment
#define SYMSZ sizeof(SYMENT)
union auxent
{
char bytes[SYMSZ];
char filename[14]; /* .file */
struct
{
long length;
long nreloc;
short nline;
} section; /* .bss, .text, .data */
struct
{
long tagndx; /* tag index */
long size; /* size of struct/union/enum */
} tagdef; /* tagname, .eos, array, .bb, .bf */
struct
{
unsigned short size; /* size of struct/union/enum */
long endndx; /* index to next structore, union ... */
} tagdecl; /* tagname, .eos, array, .bb, .bf */
struct
{
long tagndx; /* tag index */
unsigned short size; /* size of struct/union/enum */
} eos; /* tagname, .eos, array, .bb, .bf */
struct
{
long tagndx;
long fsize;
long lnnoptr;
long endndx;
} function;
struct
{
unsigned short lnno;
long endndx;
} bf;
struct
{
unsigned short lnno;
} ef;
};
#define AUXENT union auxent
#define AUXESZ sizeof(AUXENT) /* should be == SYMSZ */
#ifdef __SC__ /* Symantec C++ for PowerPC 8.0 */
#pragma options align=reset
#endif
/* EOF */