Checkin of new directory structure.
[pspp-builds.git] / pref.h.orig
index 1577094721e50bdb68a18a413cdba0cb92bd916a..e67f4cf859279e26359fb51db97aca6b8b8b9c88 100644 (file)
@@ -1,4 +1,4 @@
-/* Let's tell EMACS what language this is: -*- C -*- */
+/* -*- C -*- */
 
 /* Used by separable libraries to enable PSPP-specific features. */
 #define PSPP 1
 #define GLOBAL_DEBUGGING 1
 #endif
 
+#if !HAVE_LIBPLOT
+#define NO_CHARTS 1
+#endif
+
 /* Define these if DEBUGGING is off and you want to make certain
    additional optimizations. */
 #if !DEBUGGING
-/* #define PRODUCTION 1 */             /* disable extra function calls */
 /* #define NDEBUG 1 */                 /* disable assert() sanity checks */
 #endif
 \f
 /* Compilers. */
 
-/* Fix Windows lossage. */
-#ifdef __WIN32__
-#undef __WIN32__
-#define __WIN32__ 1
-#undef __MSDOS__
-#define __MSDOS__ 1
-#endif
-
-/* Fix DJGPP lossage. */
-#if __DJGPP__
-#undef unix
-#undef __unix__
-#endif
-
-/* Fix Cygnus Windows lossage. */
-#if defined (__CYGWIN32__)
-#define unix 1
-#endif
-
-/* Ensure that unix and __unix__ are equivalent. */
-#if defined (unix) || defined (__unix__) || defined (__unix)
-#undef unix
-#define unix 1
-
-#undef __unix__
-#define __unix__ 1
-
-#undef __unix
-#define __unix 1
-#endif
-
-/* Make sure to use the proper keywords. */
+/* Use proper keywords. */
 #if __GNUC__ > 1 && !defined (inline)
 #define inline __inline__
 #endif
    printf-like arguments, never return, etc.  Conditionalize these
    declarations on whether gcc is in use. */
 #if __GNUC__ > 1
-#define __attribute__(X) __attribute__ (X)
-#else
-#define __attribute__(X)
-#endif
+#define ATTRIBUTE(X) __attribute__ (X)
 
-/* GNU C allows unused variables and parameters to be declared as
-   such. */
-#if __GNUC__ >= 2
-#define unused __attribute__ ((__unused__))
-#else
-#define unused
-#endif
-\f
-/* CPUs. */
-
-/* Check that the floating-point representation is one that we
-   understand. */
-#if FPREP==FPREP_IEEE754
-     
-#if SIZEOF_DOUBLE == 8
-#define second_lowest_flt64 second_lowest_value
+/* Only necessary because of a wart in gnulib's xalloc.h. */
+#define __attribute__(X) __attribute__ (X)
 #else
-#error Must define second_lowest_flt64 for your architecture.
+#define ATTRIBUTE(X)
 #endif
 
-/* This trick borrowed from gcc-lib/.../include/float.h. */
-#if __GNUC__ && (ENDIAN==BIG || ENDIAN==LITTLE)
-#ifndef __DBL_UNION__
-#define __DBL_UNION__
-union blp_convert_double {
-  unsigned char convert_double_i[8];
-  double convert_double_d;
-};
-#endif /* !defined __DBL_UNION__ */
-#if ENDIAN==LITTLE
-#define SECOND_LOWEST_VALUE                                            \
-       (__extension__ ((union blp_convert_double)                      \
-                       {{0xfe,0xff,0xff,0xff, 0xff,0xff,0xef,0xff}})   \
-        .convert_double_d)
-#elif ENDIAN==BIG
-#define SECOND_LOWEST_VALUE                                            \
-       (__extension__ ((union blp_convert_double)                      \
-                       {{0xff,0xef,0xff,0xff, 0xff,0xff,0xff,0xfe}})   \
-        .convert_double_d)
-#endif /* endianness */
-#endif /* __GNUC__ and known endianness */
+#define UNUSED ATTRIBUTE ((unused))
+#define NO_RETURN ATTRIBUTE ((noreturn))
+#define PRINTF_FORMAT(FMT, FIRST) ATTRIBUTE ((format (printf, FMT, FIRST)))
+#define SCANF_FORMAT(FMT, FIRST) ATTRIBUTE ((format (scanf, FMT, FIRST)))
 
-#else /* FPREP != FPREP_IEEE754 */
-#error Floating point representation must be known at compile time.
-#endif /* fprep */
-
-/* Figure out which integer type on this system is a signed 32-bit
-   integer. */
-#if SIZEOF_SHORT==4
-  #define int32 short
-#elif SIZEOF_INT==4
-  #define int32 int
-#elif SIZEOF_LONG==4
-  #define int32 long
-#else
-  #error Which one of your basic types is 32-bit signed integer?
-#endif
-
-#if SIZEOF_FLOAT==8
-  #define flt64 float
-  #define FLT64_MAX FLT_MAX
-#elif SIZEOF_DOUBLE==8
-  #define flt64 double
-  #define FLT64_MAX DBL_MAX
-#elif SIZEOF_LONG_DOUBLE==8
-  #define flt64 long double
-  #define FLT64_MAX LDBL_MAX
+/* This attribute was added late in the GCC 2.x cycle. */
+#if __GNUC__ > 2
+#define MALLOC_LIKE ATTRIBUTE ((malloc))
 #else
-  #error Which one of your basic types is 64-bit floating point?
-  #define flt64 double
-  #define FLT64_MAX DBL_MAX
+#define MALLOC_LIKE
 #endif
 \f
-/* Environments. */
-
-/* Internationalization. */
-#include <libintl.h>
-
-#if !ENABLE_NLS
-/* If we don't do this then gettext() still monkeys with the string,
-   which causes gcc not to do its checking on printf() format
-   types. */
-#undef gettext
-#define gettext(STRING)                        \
-       STRING
-#endif
-
-#define _(STRING)                              \
-       gettext(STRING)
-     
-#define N_(STRING)                             \
-       STRING
-
-/* Even C emulation of alloca counts as an alloca implementation. */
-#if C_ALLOCA
-#define HAVE_ALLOCA 1
-#endif
-
-/* Define PAGED_STACK if alloca() is supported and the stack can
-   expand arbitrarily.  (Under some broken OSes like DOS and
-   Windows the stack is small and fixed in size.)  This will prevent
-   big alloca() requests (like 1MB). */
-#if HAVE_ALLOCA && unix
-#define PAGED_STACK 1
-#endif
-
-/* Saves on #if's. */
-#if HAVE_ALLOCA && !__CHECKER__
-#define local_alloc(X)                         \
-       alloca(X)
-
-#define local_free(P)                          \
-       do                                      \
-         {                                     \
-         }                                     \
-       while (0)
-#elif !__CHECKER__
-#define local_alloc(X)                         \
-       xmalloc (X)
-     
-#define local_free(P)                          \
-       free (P)
-#else /* __CHECKER__ */
-/* Why define these this way?  Because if you do it this way then if
-   you try to free a block returned by local_alloc() with the free()
-   function, you get an error message. */
-#define local_alloc(X)                                 \
-       ((void *) (((char *) (xmalloc (X+16))) + 16))
-
-#define local_free(P)                          \
-       free (((char *) P) - 16)
-#endif /* __CHECKER__ */
-\f
 /* Filesystems. */
 
-/* Directory separator character for this OS, if applicable. */
-#if !__MSDOS__
-#define DIR_SEPARATOR '/'
-#elif
-#define DIR_SEPARATOR '\\'
-#endif
-
-/* Path delimiter character. */
-#if !__MSDOS__
-#define PATH_DELIMITER ':'
-#else
-#define PATH_DELIMITER ';'
-#endif
-
-/* MSDOS mkdir() takes only one argument. */
-#if __MSDOS__ && !__DJGPP__
-#define mkdir(path, mode)                      \
-       mkdir (path)
-#endif
-\f
 /* Options. */
 
 /* Approximate amount of memory, in bytes, to allocate before paging
    to disk.  */
 #define MAX_WORKSPACE (4*1024*1024)    /* 4 MBytes */
 
-/* (libhistory) The location for the history file that records
-   commands entered interactively.  Tilde expansion is performed. */
-#define HISTORY_FILE "~/.pspp_history"
-
-/* (libhistory) Maximum number of commands to record in history
-   file. */
-#define MAX_HISTORY 500
-\f
-/* Output drivers. */
-
-/* Define to exclude the HTML output driver. */
-/* #define NO_HTML 1 */
-
-/* Define to exclude the PostScript and Encapsulated PostScript
-   driver. */
-/* #define NO_POSTSCRIPT 1 */
 \f
-/* Procedure-specific options. */
-
-/* CROSSTABS: Maximum number of tables to process in one pass. */
-#define MAX_CROSSTAB_TABLES 32
-
-/* FREQUENCIES: Define to allow bars greater than 1/2" wide. */
-/* #define ALLOW_HUGE_BARS 1 */
-
-/* FREQUENCIES: Minimum, maximum number of bars in a histogram.  The
-   number is based on the number of unique values of the variable,
-   unless overridden.  */
-#define MIN_HIST_BARS 3
-#define MAX_HIST_BARS 20
+/* Non ansi compilers may set this */
+#ifndef P_tmpdir
+#define P_tmpdir "/tmp"
+#endif
 
-/* FREQUENCIES: Density of polyline used to approximate the normal
-   curve.  The value is the number of samples taken per chart.  Higher
-   values give smoother curves.  */
-#define POLYLINE_DENSITY (MAX_HIST_BARS*4)
+#define SHORT_NAME_LEN 8
+#define LONG_NAME_LEN 64