1 /* Let's tell EMACS what language this is: -*- C -*- */
3 /* Used by separable libraries to enable PSPP-specific features. */
12 /* Define to get lots of info printed by procedures. */
13 /*#define DEBUGGING 1*/
16 #define GLOBAL_DEBUGGING 1
19 /* Define these if DEBUGGING is off and you want to make certain
20 additional optimizations. */
22 /* #define PRODUCTION 1 */ /* disable extra function calls */
23 /* #define NDEBUG 1 */ /* disable assert() sanity checks */
28 /* Fix Windows lossage. */
36 /* Fix DJGPP lossage. */
42 /* Fix Cygnus Windows lossage. */
43 #if defined (__CYGWIN32__)
47 /* Ensure that unix and __unix__ are equivalent. */
48 #if defined (unix) || defined (__unix__) || defined (__unix)
59 /* Make sure to use the proper keywords. */
60 #if __GNUC__ > 1 && !defined (inline)
61 #define inline __inline__
64 /* GNU C allows the programmer to declare that certain functions take
65 printf-like arguments, never return, etc. Conditionalize these
66 declarations on whether gcc is in use. */
68 #define __attribute__(X) __attribute__ (X)
70 #define __attribute__(X)
73 /* GNU C allows unused variables and parameters to be declared as
76 #define unused __attribute__ ((__unused__))
83 /* Check that the floating-point representation is one that we
85 #if FPREP==FPREP_IEEE754
87 #if SIZEOF_DOUBLE == 8
88 #define second_lowest_flt64 second_lowest_value
90 #error Must define second_lowest_flt64 for your architecture.
93 /* This trick borrowed from gcc-lib/.../include/float.h. */
94 #if __GNUC__ && (ENDIAN==BIG || ENDIAN==LITTLE)
97 union blp_convert_double {
98 unsigned char convert_double_i[8];
99 double convert_double_d;
101 #endif /* !defined __DBL_UNION__ */
103 #define SECOND_LOWEST_VALUE \
104 (__extension__ ((union blp_convert_double) \
105 {{0xfe,0xff,0xff,0xff, 0xff,0xff,0xef,0xff}}) \
108 #define SECOND_LOWEST_VALUE \
109 (__extension__ ((union blp_convert_double) \
110 {{0xff,0xef,0xff,0xff, 0xff,0xff,0xff,0xfe}}) \
112 #endif /* endianness */
113 #endif /* __GNUC__ and known endianness */
115 #else /* FPREP != FPREP_IEEE754 */
116 #error Floating point representation must be known at compile time.
119 /* Figure out which integer type on this system is a signed 32-bit
128 #error Which one of your basic types is 32-bit signed integer?
133 #define FLT64_MAX FLT_MAX
134 #elif SIZEOF_DOUBLE==8
136 #define FLT64_MAX DBL_MAX
137 #elif SIZEOF_LONG_DOUBLE==8
138 #define flt64 long double
139 #define FLT64_MAX LDBL_MAX
141 #error Which one of your basic types is 64-bit floating point?
143 #define FLT64_MAX DBL_MAX
148 /* Internationalization. */
152 /* If we don't do this then gettext() still monkeys with the string,
153 which causes gcc not to do its checking on printf() format
156 #define gettext(STRING) \
166 /* Even C emulation of alloca counts as an alloca implementation. */
168 #define HAVE_ALLOCA 1
171 /* Define PAGED_STACK if alloca() is supported and the stack can
172 expand arbitrarily. (Under some broken OSes like DOS and
173 Windows the stack is small and fixed in size.) This will prevent
174 big alloca() requests (like 1MB). */
175 #if HAVE_ALLOCA && unix
176 #define PAGED_STACK 1
179 /* Saves on #if's. */
180 #if HAVE_ALLOCA && !__CHECKER__
181 #define local_alloc(X) \
184 #define local_free(P) \
190 #define local_alloc(X) \
193 #define local_free(P) \
195 #else /* __CHECKER__ */
196 /* Why define these this way? Because if you do it this way then if
197 you try to free a block returned by local_alloc() with the free()
198 function, you get an error message. */
199 #define local_alloc(X) \
200 ((void *) (((char *) (xmalloc (X+16))) + 16))
202 #define local_free(P) \
203 free (((char *) P) - 16)
204 #endif /* __CHECKER__ */
208 /* Directory separator character for this OS, if applicable. */
210 #define DIR_SEPARATOR '/'
212 #define DIR_SEPARATOR '\\'
215 /* Path delimiter character. */
217 #define PATH_DELIMITER ':'
219 #define PATH_DELIMITER ';'
222 /* MSDOS mkdir() takes only one argument. */
223 #if __MSDOS__ && !__DJGPP__
224 #define mkdir(path, mode) \
230 /* Approximate amount of memory, in bytes, to allocate before paging
232 #define MAX_WORKSPACE (4*1024*1024) /* 4 MBytes */
234 /* (libhistory) The location for the history file that records
235 commands entered interactively. Tilde expansion is performed. */
236 #define HISTORY_FILE "~/.pspp_history"
238 /* (libhistory) Maximum number of commands to record in history
240 #define MAX_HISTORY 500
242 /* Output drivers. */
244 /* Define to exclude the HTML output driver. */
245 /* #define NO_HTML 1 */
247 /* Define to exclude the PostScript and Encapsulated PostScript
249 /* #define NO_POSTSCRIPT 1 */
251 /* Procedure-specific options. */
253 /* CROSSTABS: Maximum number of tables to process in one pass. */
254 #define MAX_CROSSTAB_TABLES 32
256 /* FREQUENCIES: Define to allow bars greater than 1/2" wide. */
257 /* #define ALLOW_HUGE_BARS 1 */
259 /* FREQUENCIES: Minimum, maximum number of bars in a histogram. The
260 number is based on the number of unique values of the variable,
261 unless overridden. */
262 #define MIN_HIST_BARS 3
263 #define MAX_HIST_BARS 20
265 /* FREQUENCIES: Density of polyline used to approximate the normal
266 curve. The value is the number of samples taken per chart. Higher
267 values give smoother curves. */
268 #define POLYLINE_DENSITY (MAX_HIST_BARS*4)