dtinfo: remove register keyword
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / src / config.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /*      Copyright (c) 1994,1995 FUJITSU LIMITED         */
24 /*      All Rights Reserved                             */
25
26 /* -*-c++-*-
27  * $XConsortium: config.h /main/7 1996/09/27 19:03:04 drk $
28  *
29  * Copyright (c) 1991 HaL Computer Systems, Inc.  All rights reserved.
30  * UNPUBLISHED -- rights reserved under the Copyright Laws of the United
31  * States.  Use of a copyright notice is precautionary only and does not
32  * imply publication or disclosure.
33  * 
34  * This software contains confidential information and trade secrets of HaL
35  * Computer Systems, Inc.  Use, disclosure, or reproduction is prohibited
36  * without the prior express written permission of HaL Computer Systems, Inc.
37  * 
38  *                         RESTRICTED RIGHTS LEGEND
39  * Use, duplication, or disclosure by the Government is subject to
40  * restrictions as set forth in subparagraph (c)(l)(ii) of the Rights in
41  * Technical Data and Computer Software clause at DFARS 252.227-7013.
42  *                        HaL Computer Systems, Inc.
43  *                  1315 Dell Avenue, Campbell, CA  95008
44  * 
45  */
46
47 #include <Exceptions.hh>
48
49 /*
50   Folio Configuration File
51 */
52
53 #define CLASS_NAME      "Dtinfo"
54
55 #define MOTIF
56 //#define UseFJMTF
57
58 #ifdef MOTIF
59 #define LOOK_AND_FEEL "Motif"
60 #define X_WINDOWS
61 #endif
62
63 #ifdef X_WINDOWS
64 #define WINDOW_SYSTEM_NAME "X"
65 #endif
66
67 #ifndef Internationalize
68 inline
69 char *gettext(char *text)
70 {
71   return text ;
72 }
73 #endif
74
75
76 // NOTE: Things below probably belong in a types.h file
77
78 // typedef void *UIHandle ;
79
80 // the following can't be enum because they are
81 // definitely defined in other include files
82 #define TRUE 1
83 #define FALSE 0
84 //typedef unsigned char bool;
85
86 typedef char  int8;
87 typedef short int16;
88 typedef int   int32;
89 typedef unsigned char  u_int8;
90 typedef unsigned short u_int16;
91 typedef unsigned int   u_int32;
92 typedef unsigned int   u_int;
93 typedef unsigned char  u_char;
94
95 // NOTE: let's find a good home for this 
96 // NOTE: ( arbitrary? value ) - jbm
97
98 // allow downscaling by 4 point sizes
99 #define MIN_DOWNSCALE 4
100
101 // NOTE: VERY, VERY, VERY temporary!!
102
103   
104 #define STR_TO_OID(STRING) \
105   ObjectId (oid_t ((u_int32) Atomizer (STRING)))
106
107 #define WAutoManage 1
108 #define WPopup 1
109 #define self    *this
110
111 #ifndef STRINGIFY
112 #if defined(__STDC__) || defined(hpux)
113 #define STRINGIFY(S) #S
114 #else
115 #define STRINGIFY(S) "S"
116 #endif
117 #endif
118
119 #ifndef CONCAT
120 #if defined(__STDC__) || defined(hpux)
121 #define CONCAT(A,B) A##B
122 #define CONCAT3(A,B,C) A##B##C
123 #else
124 #define CONCAT(A,B) A/**/B
125 #define CONCAT3(A,B,C) A/**/B/**/C
126 #endif
127 #endif
128
129 #ifdef DEBUG
130 #define ON_DEBUG(stmt)  stmt
131 #else
132 #define ON_DEBUG(stmt)
133 #endif
134
135 #include <stddef.h>
136 #include <stdlib.h>
137
138 // for assertion checking
139
140 #ifndef DEBUG
141 # ifndef NDEBUG
142 #  define NDEBUG
143 # endif
144 #endif
145
146 // for debugging statements if desired
147 #ifdef DEBUG
148 #include <iostream>
149 using namespace std;
150 #include <stdio.h>
151 #endif
152
153 #ifdef _lucid_
154 extern "C" {
155 void exit(const int);
156 }
157 #endif
158 #include <assert.h>
159
160 #ifdef USES_OLIAS_FONT
161 #include "olias_font.h"
162 #endif
163
164 // these should be moved to a "debug.h" type file
165
166 // The BOGUS preprocessor is substituting OBJ in the string.
167 // NOTE: how to #ifdef this?
168
169 #ifdef __STDC__
170 #define PRINT_OBJECT(OBJ) \
171 cout << #OBJ << "= (0x" << hex(this) << ")" << endl
172
173 #define PRINT_POINTER(PTR) \
174 cout << "  " << #PTR << " = 0x" << hex(PTR) << endl
175
176 #define PRINT_INT(INT) \
177 cout << "  " << #INT << " = " << INT << endl
178
179 #define PRINT_BITS(BITS) \
180   { long bits = BITS; cout  << "  " << #BITS << " = "; \
181     for (int i = 0; i < sizeof(BITS) * 8; i++, bits <<= 1) \
182       (bits & (1L << sizeof(BITS) * 8)) ? cout << '1' : cout << '0'; \
183     cout << endl; } 
184 #else
185 #define PRINT_OBJECT(OBJ) \
186   printf ("OBJ (0x%p) = \n", this)
187 #define PRINT_POINTER(PTR) \
188   printf ("  PTR = 0x%p\n", PTR)
189 #define PRINT_INT(INT) \
190   printf ("  INT = %d\n", INT)
191 #define PRINT_BITS(BITS) \
192   { long bits = BITS; printf ("  BITS = "); \
193     for (int i = 0; i < sizeof(BITS) * 8; i++, bits <<= 1) \
194       (bits & (1L << sizeof(BITS) * 8)) ? putchar('1') : putchar('0'); \
195     putchar ('\n'); } 
196 #endif