1 /* @include ajdefine **********************************************************
2 **
3 ** AJAX master definitions include file
4 **
5 ** @author Copyright (C) 1998 Peter Rice and Alan Bleasby
6 ** @version $Revision: 1.29 $
7 ** @modified $Date: 2012/04/12 20:35:29 $ by $Author: mks $
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 AJDEFINE_H
27 #define AJDEFINE_H
28 
29 #if defined(__cplusplus)
30 #define AJ_BEGIN_DECLS extern "C" {
31 #define AJ_END_DECLS }
32 #else /* !__cplusplus */
33 #define AJ_BEGIN_DECLS
34 #define AJ_END_DECLS
35 #endif /* !__cplusplus */
36 
37 
38 
39 
40 /* ========================================================================= */
41 /* ============================= include files ============================= */
42 /* ========================================================================= */
43 
44 #ifdef HAVE_CONFIG_H
45 #include <config.h>
46 #endif
47 
48 #include "ajarch.h"
49 
50 AJ_BEGIN_DECLS
51 
52 
53 
54 
55 /* ========================================================================= */
56 /* =============================== constants =============================== */
57 /* ========================================================================= */
58 
59 #ifdef __GNUC__
60 #define __deprecated __attribute__((deprecated))
61 #define __noreturn __attribute__((noreturn))
62 #define __warn_unused_result __attribute__((warn_unused_result))
63 #else /* !__GNUC__ */
64 #define __deprecated
65 #define __noreturn
66 #define __warn_unused_result
67 #endif /* !__GNUC__ */
68 
69 #ifndef WIN32
70 #define SLASH_CHAR   '/'
71 #define SLASH_STRING "/"
72 #define CURRENT_DIR  "./"
73 #define UP_DIR       "../"
74 #define PATH_SEPARATOR ":"
75 #define _BLACKHOLE "/dev/null"
76 #else
77 #define SLASH_CHAR   '\\'
78 #define SLASH_STRING "\\"
79 #define CURRENT_DIR  ".\\"
80 #define UP_DIR       "..\\"
81 #define PATH_SEPARATOR ";"
82 #define _BLACKHOLE "nul:"
83 #endif
84 
85 #define AJAXLONGDOUBLE double
86 
87 #define AJBOOL(b) (b ? "TRUE" : "FALSE")
88 
89 #define AJFALSE 0
90 #define AJTRUE 1
91 
92 #define ajFalse 0
93 #define ajTrue 1
94 
95 #define CASE2(a,b) ((a << 8) + b)
96 #define CASE3(a,b,c) ((a << 16) + (b << 8) + c)
97 #define CASE4(a,b,c,d) ((a << 24) + (b << 16) + (c << 8) + d)
98 
99 #define STRCASE2(a) ((a[0] << 8) + a[1])
100 
101 #define U_FEPS 1.192e-6F          /* 1.0F + E_FEPS != 1.0F */
102 #define U_DEPS 2.22e-15           /* 1.0 +  E_DEPS != 1.0  */
103 
104 #define E_FPEQ(a,b,e) (((b - e) < a) && (a < (b + e)))
105 
106 #define E_FPZERO(a,e) (fabs((double)a) <= (double) e)
107 
108 
109 
110 
111 /* ========================================================================= */
112 /* ============================== public data ============================== */
113 /* ========================================================================= */
114 
115 
116 
117 
118 /* ========================================================================= */
119 /* =========================== public functions ============================ */
120 /* ========================================================================= */
121 
122 
123 
124 
125 /*
126 ** Prototype definitions
127 */
128 
129 /*
130 ** End of prototype definitions
131 */
132 
133 
134 
135 
136 AJ_END_DECLS
137 
138 #endif /* !AJDEFINE_H */
139