1 /*---------------------------------------------------------------------------- 2 -- 3 -- Module: Standard 4 -- 5 -- Project: Tools 6 -- System: <> 7 -- Subsystem: <> 8 -- Function block: <> 9 -- 10 -- Description: 11 -- Standard type definitions and declarations. 12 -- 13 -- Filename: Standard.h 14 -- 15 -- Authors: Roger Larsson, Ulrika Bornetun 16 -- Creation date: 1991-10-10 17 -- 18 -- 19 -- (C) Copyright Ulrika Bornetun, Roger Larsson (1995) 20 -- All rights reserved 21 -- 22 -- Permission to use, copy, modify, and distribute this software and its 23 -- documentation for any purpose and without fee is hereby granted, 24 -- provided that the above copyright notice appear in all copies. Ulrika 25 -- Bornetun and Roger Larsson make no representations about the usability 26 -- of this software for any purpose. It is provided "as is" without express 27 -- or implied warranty. 28 ----------------------------------------------------------------------------*/ 29 30 /* SCCS module identifier. */ 31 /* SCCSID = @(#) Module: Standard.h, Version: 1.1, Date: 95/02/18 14:32:30 */ 32 33 34 /* Include only once. */ 35 #ifndef Standard_h 36 # define Standard_h 37 38 39 /*---------------------------------------------------------------------------- 40 -- Include files 41 ----------------------------------------------------------------------------*/ 42 43 44 /*---------------------------------------------------------------------------- 45 -- Macro definitions 46 ----------------------------------------------------------------------------*/ 47 48 /* Boolean operations. */ 49 #ifndef True 50 # define True 1 51 #endif 52 53 #ifndef False 54 # define False 0 55 #endif 56 57 #ifndef Boolean 58 # define Boolean char 59 #endif 60 61 62 /* Set, test and clear flags. */ 63 #define flagClear( flags, mask ) ((flags) = ((flags) & (~mask))) 64 #define flagIsClear( flags, mask ) ((((flags) & (mask)) == 0) ? True : False) 65 #define flagIsSet( flags, mask ) ((((flags) & (mask)) != 0) ? True : False) 66 #define flagSet( flags, mask ) ((flags) = ((flags) | (mask))) 67 68 69 /* Short name for Motif default character set. */ 70 #define CS ((XmStringCharSet) XmSTRING_DEFAULT_CHARSET) 71 72 /* Short name for the standard writing direction. */ 73 #define SD XmSTRING_DIRECTION_L_TO_R 74 75 76 /*---------------------------------------------------------------------------- 77 -- Type declarations 78 ----------------------------------------------------------------------------*/ 79 80 /* Declarations of various standard types. */ 81 typedef int INT32; 82 typedef unsigned int UINT32; 83 typedef short int INT16; 84 typedef unsigned short int UINT16; 85 typedef char INT8; 86 typedef unsigned char UINT8; 87 88 89 /*---------------------------------------------------------------------------- 90 -- Global definitions 91 ----------------------------------------------------------------------------*/ 92 93 94 /*---------------------------------------------------------------------------- 95 -- Function prototypes 96 ----------------------------------------------------------------------------*/ 97 98 #endif 99