1 /* @include ajarch ************************************************************
2 **
3 ** AJAX master architecture-specific include file
4 **
5 ** @author Copyright (C) 1998 Peter Rice and Alan Bleasby
6 ** @version $Revision: 1.26 $
7 ** @modified $Date: 2011/10/18 14:23:40 $ by $Author: rice $
8 ** @@
9 **
10 ** This library is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU Lesser General Public
12 ** License as published by the Free Software Foundation; either
13 ** version 2.1 of the License, or (at your option) any later version.
14 **
15 ** This library is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 ** Lesser General Public License for more details.
19 **
20 ** You should have received a copy of the GNU Lesser General Public
21 ** License along with this library; if not, write to the Free Software
22 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
23 **
24 ******************************************************************************/
25 
26 #ifndef AJARCH_H
27 #define AJARCH_H
28 
29 /* ========================================================================= */
30 /* ============================= include files ============================= */
31 /* ========================================================================= */
32 
33 #include <sys/types.h>
34 #include <stdio.h>
35 
36 
37 
38 
39 
40 /* ========================================================================= */
41 /* =============================== constants =============================== */
42 /* ========================================================================= */
43 
44 #if defined(AJ_Linux64) || defined(AJ_Solaris64) || defined(AJ_IRIX64)  \
45     || defined(AJ_OSF164) || defined(AJ_FreeBSD64)
46 #define HAVE64
47 #endif
48 
49 
50 
51 
52 /* ========================================================================= */
53 /* ============================== public data ============================== */
54 /* ========================================================================= */
55 
56 #if !defined(AJ_LinuxLF) && !defined(AJ_SolarisLF) && !defined(AJ_IRIXLF) \
57     && !defined(AJ_AIXLF) && !defined(AJ_HPUXLF) && !defined(AJ_MACOSXLF) \
58     && !defined(AJ_FreeBSDLF) && !defined(__CYGWIN__) && !defined(WIN32)
59 
60 
61 
62 
63 /* @datatype ajint ************************************************************
64 **
65 ** AJAX Signed Integer
66 **
67 ** @attr typedef [int] Value
68 ** @@
69 ******************************************************************************/
70 typedef int ajint;
71 
72 
73 
74 
75 /* @datatype ajlong ***********************************************************
76 **
77 ** AJAX Long Signed Integer
78 **
79 ** @attr typedef [long] Value
80 ** @@
81 ******************************************************************************/
82 typedef long ajlong;
83 
84 
85 
86 
87 /* @datatype ajuint ***********************************************************
88 **
89 ** AJAX Unsigned Integer
90 **
91 ** @attr typedef [unsigned int] Value
92 ** @@
93 ******************************************************************************/
94 typedef unsigned int ajuint;
95 
96 
97 
98 
99 /* @datatype ajshort **********************************************************
100 **
101 ** AJAX Short Signed Integer
102 **
103 ** @attr typedef [short] Value
104 ** @@
105 ******************************************************************************/
106 typedef short ajshort;
107 
108 
109 
110 
111 /* @datatype ajushort *********************************************************
112 **
113 ** AJAX Short Unsigned Integer
114 **
115 ** @attr typedef [unsigned short] Value
116 ** @@
117 ******************************************************************************/
118 typedef unsigned short ajushort;
119 
120 
121 
122 
123 /* @datatype ajulong **********************************************************
124 **
125 ** AJAX Long Unsigned Integer
126 **
127 ** @attr typedef [unsigned long] Value
128 ** @@
129 ******************************************************************************/
130 typedef unsigned long ajulong;
131 #endif
132 
133 #ifdef AJ_LinuxLF
134 #define HAVE64
135 typedef int ajint;
136 typedef long long ajlong;
137 typedef unsigned int ajuint;
138 typedef short ajshort;
139 typedef unsigned short ajushort;
140 typedef unsigned long long ajulong;
141 #define ftell(a) ftello(a)
142 #define fseek(a,b,c) fseeko(a,b,c)
143 #endif /* AJ_LinuxLF */
144 
145 #ifdef AJ_FreeBSDLF
146 #define HAVE64
147 typedef int ajint;
148 typedef long long ajlong;
149 typedef unsigned int ajuint;
150 typedef short ajshort;
151 typedef unsigned short ajushort;
152 typedef unsigned long long ajulong;
153 #define ftell(a) ftello(a)
154 #define fseek(a,b,c) fseeko(a,b,c)
155 #endif /* AJ_FreeBSDLF */
156 
157 #ifdef AJ_SolarisLF
158 #define HAVE64
159 typedef int ajint;
160 typedef long long ajlong;
161 typedef unsigned int ajuint;
162 typedef short ajshort;
163 typedef unsigned short ajushort;
164 typedef unsigned long long ajulong;
165 #define ftell(a) ftello(a)
166 #define fseek(a,b,c) fseeko(a,b,c)
167 #endif /* AJ_SolarisLF */
168 
169 #ifdef AJ_HPUXLF
170 #define HAVE64
171 typedef int ajint;
172 typedef long long ajlong;
173 typedef unsigned int ajuint;
174 typedef short ajshort;
175 typedef unsigned short ajushort;
176 typedef unsigned long long ajulong;
177 #define ftell(a) ftello(a)
178 #define fseek(a,b,c) fseeko(a,b,c)
179 #if !defined(HPUX64PTRS)
180 #define fopen(a,b) (FILE*)fopen64(a,b)
181 #endif /* !HPUX64PTRS */
182 #endif /* AJ_HPUXLF */
183 
184 #ifdef AJ_IRIXLF
185 #define HAVE64
186 typedef int ajint;
187 typedef off64_t ajlong;
188 typedef unsigned int ajuint;
189 typedef short ajshort;
190 typedef unsigned short ajushort;
191 typedef unsigned long ajulong;
192 #define ftell(a) ftell64(a)
193 #define fseek(a,b,c) fseek64(a,b,c)
194 #endif /* AJ_IRIXLF */
195 
196 #ifdef AJ_AIXLF
197 #define HAVE64
198 typedef int ajint;
199 typedef long long ajlong;
200 typedef unsigned int ajuint;
201 typedef short ajshort;
202 typedef unsigned short ajushort;
203 typedef unsigned long long ajulong;
204 #define ftell(a) ftello(a)
205 #define fseek(a,b,c) fseeko(a,b,c)
206 #endif /* AJ_AIXLF */
207 
208 #ifdef AJ_MACOSXLF
209 #define HAVE64
210 typedef int ajint;
211 typedef long long ajlong;
212 typedef unsigned int ajuint;
213 typedef short ajshort;
214 typedef unsigned short ajushort;
215 typedef unsigned long long ajulong;
216 #define ftell(a) ftello(a)
217 #define fseek(a,b,c) fseeko(a,b,c)
218 #endif /* AJ_MACOSXLF */
219 
220 #ifdef __CYGWIN__
221 #define __int64 long long
222 typedef int ajint;
223 typedef long long ajlong;
224 typedef unsigned int ajuint;
225 typedef short ajshort;
226 typedef unsigned short ajushort;
227 typedef unsigned long long ajulong;
228 #define fseek(a,b,c) fseeko(a,b,c)
229 #endif /* __CYGWIN__ */
230 
231 #ifdef WIN32
232 typedef int ajint;
233 typedef long long ajlong;
234 typedef unsigned int ajuint;
235 typedef short ajshort;
236 typedef unsigned short ajushort;
237 typedef unsigned long long ajulong;
238 #define fseek(a,b,c) _fseeki64(a,b,c)
239 #endif /* WIN32 */
240 
241 
242 
243 
244 /* @datatype AjBool ***********************************************************
245 **
246 ** Boolean data type
247 **
248 ** Used to store true (ajTrue) and false (ajFalse) values.
249 **
250 ** ajFalse is defined as zero, and the data type is equivalent to "ajint".
251 **
252 ** For definitions, macros AJTRUE and AJFALSE are also defined.
253 **
254 ** On output, conversion code "%b" writes "Y" or "N"
255 ** while conversion code "%B" writes "Yes" or "No".
256 **
257 ** @attr typedef [ajint] Value
258 ** @@
259 ******************************************************************************/
260 
261 typedef ajint AjBool;
262 
263 
264 
265 
266 /* @datatype AjStatus *********************************************************
267 **
268 ** Status code returned with bit fields.
269 **
270 ** Intended as a general return code for functions, but currently unused
271 ** because AjBool is enough. Indicates OK, info,
272 ** warning, error and fatal returns
273 **
274 ** @attr typedef [ajint] Value
275 ** @@
276 ******************************************************************************/
277 
278 typedef ajint AjStatus;
279 
280 
281 
282 
283 /* @datatype AjEnum ***********************************************************
284 **
285 ** Undocumented
286 **
287 ** @attr typedef [ajint] Value
288 ** @@
289 ******************************************************************************/
290 
291 typedef ajint AjEnum;
292 
293 
294 
295 
296 /* @datatype AjMask ***********************************************************
297 **
298 ** Undocumented
299 **
300 ** @attr typedef [ajint] Value
301 ** @@
302 ******************************************************************************/
303 
304 typedef ajint AjMask;
305 
306 
307 
308 
309 /* @datatype AjInt4 ***********************************************************
310 **
311 ** 4 bytes integer
312 **
313 ** @attr typedef [ajint] Value
314 ** @@
315 ******************************************************************************/
316 
317 typedef ajint AjInt4;
318 
319 
320 
321 
322 /* @datatype AjIntArray *******************************************************
323 **
324 ** Array of integers
325 **
326 ** @attr typedef [ajint*] Value
327 ** @@
328 ******************************************************************************/
329 
330 typedef ajint* AjIntArray;
331 
332 
333 
334 
335 /* @datatype AjFloatArray *****************************************************
336 **
337 ** Array of floats
338 **
339 ** @attr typedef [float*] Value
340 ** @@
341 ******************************************************************************/
342 
343 typedef float* AjFloatArray;
344 
345 
346 
347 
348 /* ========================================================================= */
349 /* =========================== public functions ============================ */
350 /* ========================================================================= */
351 
352 /*
353 ** Prototype definitions
354 */
355 
356 /*
357 ** End of prototype definitions
358 */
359 
360 
361 
362 
363 
364 #endif /* !AJARCH_H */
365