/* System 5 for S4 Version */ /*##########################################################################*/ /* */ /* This material is confidential and is furnished under a written */ /* license agreement. It may not be used, copied or disclosed to */ /* others except in accordance with the terms of that agreement. */ /* */ /* Copyright (c) 1983, 1984 Graphic Software Systems, Inc. */ /* All rights reserved. */ /* types.h 1.2 fetched 85/07/31 last changed 85/05/29 19:26:02 */ /*##########################################################################*/ /* UINT{7,15,31} declarations state that variables either are not used arithmetically or, when they are, that they are never going to contain other than small positive integers. Ranges: UINT7 0..127 arithmetic 8 bit non-arithmetic UINT15 0..32767 arithmetic 16 bit non-arithmetic UINT31 0..(2**31-1) arithmetic 32 bit non-arithmetic SINT{8,16,32} declarations state that variables will contain both positive and negative integers. Ranges: SINT8 -128..127 arithmetic 8 bit non-arithmetic SINT16 -32768..32767 arithmetic 16 bit non-arithmetic SINT32 -(2**31)..(2**31-1) arithmetic 32 bit non-arithmetic UINT{8,16,32} declarations state that variables will contain the full possible positive range of numbers in the given size. Ranges: UINT8 0..255 arithmetic 8 bit non-arithmetic UINT16 0..65535 arithmetic 16 bit non-arithmetic UINT32 0..(2**32-1) arithmetic 32 bit non-arithmetic UINT{7,15,31} should be the most used declarations. They may be implemented as either signed or unsigned types in different environments. SINT{8,16,32} and UINT{8,16,32} should only be used when the range beyond that of UINT{7,15,31} is required. In some environments some of SINT{8,16,32} and UINT{8,16,32} may not be available. In early C implementations "unsigned" is a type, not a modifier to a type, so only UINT16 ("unsigned int") is available. UINT32 and SINT8 (on Lattice) or UINT8 (on v7 Unix) are not available at all. On the following systems (at least) "unsigned" is a modifier: IBM Instruments System 9000 Xenix 2.3D IBM Personal Computer Xenix 286 v1.00 (3.14) Convergent Technologies Megaframe CTIX 2.1 Convergent Technologies Miniframe CTIX 3.05 Honeywell Scorpion System III 3.3 Berkeley Standard Distribution 4.2 Set -D_STRICT_ in your lint or cc to exclude typedefs unavailable on your machine. */ #define UNIX typedef long UINT31; typedef long SINT32; typedef unsigned long UINT32; typedef SINT32 INT32; typedef short UINT15; typedef short SINT16; typedef unsigned short UINT16; typedef SINT16 INT16; typedef char UINT7; typedef char SINT8; typedef unsigned char UINT8; typedef SINT8 INT8; #define VOID INT16 typedef int INT; typedef UINT16 BOOLEAN; typedef float REAL; typedef double DOUBLE; /* Define type specifier modifiers. The comment after each is where the modifier should appear. */ #define REG register /* inside function */ #define LOCAL auto /* inside function */ #define STATIC static /* inside function */ #define FILE_LOCAL static /* variable local to file outside function */ #define PUBLIC /* global definition outside function */ #define EXTERNAL extern /* reference to an external variable */ #define EXTERN extern /* reference to an external variable */ #define FORMAL /* formal parameter declaration */ #define TRUE 1 /* BOOLEAN true */ #define FALSE 0 /* BOOLEAN false */