|
|
1.1 ! root 1: /*ident "@(#)ctrans:src/size.h 1.1.9.6" */ ! 2: /************************************************************************* ! 3: ! 4: C++ source for cfront, the C++ compiler front-end ! 5: written in the computer science research center of Bell Labs ! 6: ! 7: Copyright (c) 1984 AT&T, Inc. All rigths Reserved ! 8: THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T, INC. ! 9: ! 10: size.h: ! 11: sizes and alignments used to calculate sizeofs ! 12: ! 13: table and butffer sizes ! 14: ! 15: ***************************************************************************/ ! 16: #ifndef GRAM ! 17: extern BI_IN_WORD; ! 18: extern BI_IN_BYTE; ! 19: /* byte sizes */ ! 20: extern SZ_CHAR; ! 21: extern AL_CHAR; ! 22: ! 23: extern SZ_SHORT; ! 24: extern AL_SHORT; ! 25: ! 26: extern SZ_INT; ! 27: extern AL_INT; ! 28: ! 29: extern SZ_LONG; ! 30: extern AL_LONG; ! 31: ! 32: extern SZ_FLOAT; ! 33: extern AL_FLOAT; ! 34: ! 35: extern SZ_DOUBLE; ! 36: extern AL_DOUBLE; ! 37: ! 38: extern SZ_LDOUBLE; ! 39: extern AL_LDOUBLE; ! 40: ! 41: extern SZ_STRUCT; /* minimum struct size */ ! 42: extern AL_STRUCT; ! 43: ! 44: //extern SZ_FRAME; ! 45: //extern AL_FRAME; ! 46: ! 47: extern SZ_WORD; ! 48: ! 49: extern SZ_WPTR; ! 50: extern AL_WPTR; ! 51: ! 52: extern SZ_BPTR; ! 53: extern AL_BPTR; ! 54: ! 55: //extern SZ_TOP; ! 56: //extern SZ_BOTTOM; ! 57: ! 58: extern char* LARGEST_INT; ! 59: extern int F_SENSITIVE; // is field alignment sensitive to the type of the field? ! 60: extern int F_OPTIMIZED; // can the compiler fit a small int field into a char? ! 61: #endif ! 62: // default sizes: ! 63: // Note: #if doesn't work on all systems ! 64: #ifdef u3b ! 65: #define Abbb ! 66: #endif ! 67: #ifdef u3b2 ! 68: #define Abbb ! 69: #endif ! 70: #ifdef u3b5 ! 71: #define Abbb ! 72: #endif ! 73: #ifdef u3b15 ! 74: #define Abbb ! 75: #endif ! 76: #ifdef pyr ! 77: #define Abbb ! 78: #endif ! 79: ! 80: ! 81: #ifdef alliant ! 82: #define Am68 ! 83: #endif ! 84: #ifdef apollo ! 85: #define Am68 ! 86: #endif ! 87: #if defined(sun2) || defined(mc68010) ! 88: #define Am68 ! 89: #endif ! 90: #if defined(sun3) || defined(mc68020) ! 91: #define Am68 ! 92: #endif ! 93: #if defined(mc68k) || defined(hp9000s200) || defined(hp9000s300) ! 94: #define Am68 ! 95: #endif ! 96: ! 97: #ifdef iAPX286 ! 98: #ifdef LARGE ! 99: #define Ai286l ! 100: #endif ! 101: #endif ! 102: ! 103: #ifdef Abbb ! 104: /* AT&T 3Bs */ ! 105: #define DBI_IN_WORD 32 ! 106: #define DBI_IN_BYTE 8 ! 107: #define DSZ_CHAR 1 ! 108: #define DAL_CHAR 1 ! 109: #define DSZ_SHORT 2 ! 110: #define DAL_SHORT 2 ! 111: #define DSZ_INT 4 ! 112: #define DAL_INT 4 ! 113: #define DSZ_LONG 4 ! 114: #define DAL_LONG 4 ! 115: #define DSZ_FLOAT 4 ! 116: #define DAL_FLOAT 4 ! 117: #define DSZ_DOUBLE 8 ! 118: #define DAL_DOUBLE 4 ! 119: #define DSZ_LDOUBLE 8 ! 120: #define DAL_LDOUBLE 4 ! 121: #define DSZ_STRUCT 4 ! 122: #define DAL_STRUCT 4 ! 123: //#define DSZ_FRAME 4 ! 124: //#define DAL_FRAME 4 ! 125: #define DSZ_WORD 4 ! 126: #define DSZ_WPTR 4 ! 127: #define DAL_WPTR 4 ! 128: #define DSZ_BPTR 4 ! 129: #define DAL_BPTR 4 ! 130: //#define DSZ_TOP 0 ! 131: //#define DSZ_BOTTOM 0 ! 132: #define DLARGEST_INT "2147483647" /* 2**31 - 1 */ ! 133: #define DF_SENSITIVE 0 ! 134: #define DF_OPTIMIZED 1 ! 135: #else ! 136: #ifdef Am68 ! 137: /* most M68K boxes */ ! 138: #if defined(hp9000s200) || defined(hp9000s300) ! 139: #define DBI_IN_WORD 32 ! 140: #else ! 141: #define DBI_IN_WORD 16 ! 142: #endif ! 143: #define DBI_IN_BYTE 8 ! 144: #define DSZ_CHAR 1 ! 145: #define DAL_CHAR 1 ! 146: #define DSZ_SHORT 2 ! 147: #define DAL_SHORT 2 ! 148: #define DSZ_INT 4 ! 149: #define DAL_INT 2 ! 150: #define DSZ_LONG 4 ! 151: #define DAL_LONG 2 ! 152: #define DSZ_FLOAT 4 ! 153: #define DAL_FLOAT 2 ! 154: #define DSZ_DOUBLE 8 ! 155: #define DAL_DOUBLE 2 ! 156: #define DSZ_LDOUBLE 8 ! 157: #define DAL_LDOUBLE 2 ! 158: #define DSZ_STRUCT 2 ! 159: #define DAL_STRUCT 2 ! 160: //#define DSZ_FRAME 4 ! 161: //#define DAL_FRAME 4 ! 162: #define DSZ_WORD 2 ! 163: #define DSZ_WPTR 4 ! 164: #define DAL_WPTR 2 ! 165: #define DSZ_BPTR 4 ! 166: #define DAL_BPTR 2 ! 167: //#define DSZ_TOP 0 ! 168: //#define DSZ_BOTTOM 0 ! 169: #define DLARGEST_INT "2147483647" /* 2**31 - 1 */ ! 170: #define DF_SENSITIVE 0 ! 171: #define DF_OPTIMIZED 1 ! 172: #else ! 173: #ifdef Ai286l ! 174: /* Intel 80286 large model */ ! 175: #define DBI_IN_WORD 16 ! 176: #define DBI_IN_BYTE 8 ! 177: #define DSZ_CHAR 1 ! 178: #define DAL_CHAR 1 ! 179: #define DSZ_SHORT 2 ! 180: #define DAL_SHORT 2 ! 181: #define DSZ_INT 2 ! 182: #define DAL_INT 2 ! 183: #define DSZ_LONG 4 ! 184: #define DAL_LONG 2 ! 185: #define DSZ_FLOAT 4 ! 186: #define DAL_FLOAT 2 ! 187: #define DSZ_DOUBLE 8 ! 188: #define DAL_DOUBLE 2 ! 189: #define DSZ_LDOUBLE 8 ! 190: #define DAL_LDOUBLE 2 ! 191: #define DSZ_STRUCT 2 ! 192: #define DAL_STRUCT 2 ! 193: //#define DSZ_FRAME 4 ! 194: //#define DAL_FRAME 4 ! 195: #define DSZ_WORD 2 ! 196: #define DSZ_WPTR 4 ! 197: #define DAL_WPTR 2 ! 198: #define DSZ_BPTR 4 ! 199: #define DAL_BPTR 2 ! 200: //#define DSZ_TOP 0 ! 201: //#define DSZ_BOTTOM 0 ! 202: #define DLARGEST_INT "32767" /* 2**15 - 1 */ ! 203: #define DF_SENSITIVE 0 ! 204: #define DF_OPTIMIZED 1 ! 205: #else ! 206: #if defined(uts) || defined(hp9000s800) || defined(sun4) || defined(sparc) ! 207: /* Amdahl running UTS, HP RISC */ ! 208: #define DBI_IN_WORD 32 ! 209: #define DBI_IN_BYTE 8 ! 210: #define DSZ_CHAR 1 ! 211: #define DAL_CHAR 1 ! 212: #define DSZ_SHORT 2 ! 213: #define DAL_SHORT 2 ! 214: #define DSZ_INT 4 ! 215: #define DAL_INT 4 ! 216: #define DSZ_LONG 4 ! 217: #define DAL_LONG 4 ! 218: #define DSZ_FLOAT 4 ! 219: #define DAL_FLOAT 4 ! 220: #define DSZ_DOUBLE 8 ! 221: #define DAL_DOUBLE 8 ! 222: #define DSZ_LDOUBLE 8 ! 223: #define DAL_LDOUBLE 8 ! 224: #define DSZ_STRUCT 1 ! 225: #define DAL_STRUCT 1 ! 226: #define DSZ_WORD 4 ! 227: #define DSZ_WPTR 4 ! 228: #define DAL_WPTR 4 ! 229: #define DSZ_BPTR 4 ! 230: #define DAL_BPTR 4 ! 231: #define DLARGEST_INT "2147483647" /* 2**31 - 1 */ ! 232: #define DF_SENSITIVE 0 ! 233: #define DF_OPTIMIZED 1 ! 234: #else ! 235: #ifdef hpux ! 236: /* hp */ ! 237: #define DBI_IN_WORD 32 ! 238: #define DBI_IN_BYTE 8 ! 239: #define DSZ_CHAR 1 ! 240: #define DAL_CHAR 1 ! 241: #define DSZ_SHORT 2 ! 242: #define DAL_SHORT 2 ! 243: #define DSZ_INT 4 ! 244: #define DAL_INT 4 ! 245: #define DSZ_LONG 4 ! 246: #define DAL_LONG 4 ! 247: #define DSZ_FLOAT 4 ! 248: #define DAL_FLOAT 4 ! 249: #define DSZ_DOUBLE 8 ! 250: #define DAL_DOUBLE 8 ! 251: #define DSZ_LDOUBLE 8 ! 252: #define DAL_LDOUBLE 8 ! 253: #define DSZ_STRUCT 1 ! 254: #define DAL_STRUCT 1 ! 255: #define DSZ_WORD 4 ! 256: #define DSZ_WPTR 4 ! 257: #define DAL_WPTR 4 ! 258: #define DSZ_BPTR 4 ! 259: #define DAL_BPTR 4 ! 260: #define DLARGEST_INT "2147483647" /* 2**31 - 1 */ ! 261: #define DF_SENSITIVE 1 ! 262: #define DF_OPTIMIZED 1 ! 263: #else ! 264: #if defined(vax) || defined(ibm032) || defined(i386) ! 265: /* VAX, IBM 32, Intel 386 */ ! 266: #define DBI_IN_WORD 32 ! 267: #define DBI_IN_BYTE 8 ! 268: #define DSZ_CHAR 1 ! 269: #define DAL_CHAR 1 ! 270: #define DSZ_SHORT 2 ! 271: #define DAL_SHORT 2 ! 272: #define DSZ_INT 4 ! 273: #define DAL_INT 4 ! 274: #define DSZ_LONG 4 ! 275: #define DAL_LONG 4 ! 276: #define DSZ_FLOAT 4 ! 277: #define DAL_FLOAT 4 ! 278: #define DSZ_DOUBLE 8 ! 279: #define DAL_DOUBLE 4 ! 280: #define DSZ_LDOUBLE 8 ! 281: #define DAL_LDOUBLE 4 ! 282: #define DSZ_STRUCT 1 ! 283: #define DAL_STRUCT 1 ! 284: //#define DSZ_FRAME 4 ! 285: //#define DAL_FRAME 4 ! 286: #define DSZ_WORD 4 ! 287: #define DSZ_WPTR 4 ! 288: #define DAL_WPTR 4 ! 289: #define DSZ_BPTR 4 ! 290: #define DAL_BPTR 4 ! 291: //#define DSZ_TOP 0 ! 292: //#define DSZ_BOTTOM 0 ! 293: #define DLARGEST_INT "2147483647" /* 2**31 - 1 */ ! 294: #define DF_SENSITIVE 0 ! 295: #define DF_OPTIMIZED 1 ! 296: #else ! 297: #ifdef mc300 ! 298: #define DBI_IN_WORD 32 ! 299: #define DBI_IN_BYTE 8 ! 300: #define DSZ_CHAR 1 ! 301: #define DAL_CHAR 1 ! 302: #define DSZ_SHORT 2 ! 303: #define DAL_SHORT 2 ! 304: #define DSZ_INT 4 ! 305: #define DAL_INT 4 ! 306: #define DSZ_LONG 4 ! 307: #define DAL_LONG 4 ! 308: #define DSZ_FLOAT 4 ! 309: #define DAL_FLOAT 4 ! 310: #define DSZ_DOUBLE 8 ! 311: #define DAL_DOUBLE 4 ! 312: #define DSZ_LDOUBLE 8 ! 313: #define DAL_LDOUBLE 4 ! 314: #define DSZ_STRUCT 2 ! 315: #define DAL_STRUCT 2 ! 316: //#define DSZ_FRAME 4 ! 317: //#define DAL_FRAME 4 ! 318: #define DSZ_WORD 4 ! 319: #define DSZ_WPTR 4 ! 320: #define DAL_WPTR 4 ! 321: #define DSZ_BPTR 4 ! 322: #define DAL_BPTR 4 ! 323: //#define DSZ_TOP 0 ! 324: //#define DSZ_BOTTOM 0 ! 325: #define DLARGEST_INT "2147483647" /* 2**31 - 1 */ ! 326: #define DF_SENSITIVE 0 ! 327: #define DF_OPTIMIZED 1 ! 328: #else ! 329: /* defaults: 0 => error */ ! 330: #define DBI_IN_WORD 0 ! 331: #define DBI_IN_BYTE 0 ! 332: #define DSZ_CHAR 1 ! 333: #define DAL_CHAR 1 ! 334: #define DSZ_SHORT 0 ! 335: #define DAL_SHORT 0 ! 336: #define DSZ_INT 0 ! 337: #define DAL_INT 0 ! 338: #define DSZ_LONG 0 ! 339: #define DAL_LONG 0 ! 340: #define DSZ_FLOAT 0 ! 341: #define DAL_FLOAT 0 ! 342: #define DSZ_DOUBLE 0 ! 343: #define DAL_DOUBLE 0 ! 344: #define DSZ_LDOUBLE 0 ! 345: #define DAL_LDOUBLE 0 ! 346: #define DSZ_STRUCT 0 ! 347: #define DAL_STRUCT 0 ! 348: #define DSZ_WORD 0 ! 349: #define DSZ_WPTR 0 ! 350: #define DAL_WPTR 0 ! 351: #define DSZ_BPTR 0 ! 352: #define DAL_BPTR 0 ! 353: #define DLARGEST_INT "0" ! 354: #define DF_SENSITIVE 0 ! 355: #define DF_OPTIMIZED 0 ! 356: #endif ! 357: #endif ! 358: #endif ! 359: #endif ! 360: #endif ! 361: #endif ! 362: #endif ! 363: ! 364: #define KTBLSIZE 123 /* initial keyword table size */ ! 365: #define GTBLSIZE 257 /* initial global name table size */ ! 366: #define CTBLSIZE 12 /* initial class table size */ ! 367: #define TBLSIZE 20 /* initial block table size */ ! 368: #define BLMAX 50 /* max block nesting */ ! 369: #define MAXFILE 127 /* max include file nesting */ ! 370: #define MAXERR 13 /* maximum number of errors before terminating */ ! 371: ! 372: #ifndef GRAM ! 373: const CHUNK = 8*1024; ! 374: void* chunk(int); ! 375: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.