00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00030 #ifndef __CCP4_BITS
00031 #define __CCP4_BITS
00032
00033 #if defined (_AIX) || defined(___AIX)
00034 # define KNOWN_MACHINE
00035 # define CALL_LIKE_SUN 1
00036 #endif
00037
00038 #if defined (__hpux)
00039 # define KNOWN_MACHINE
00040 # define CALL_LIKE_HPUX 1
00041 #endif
00042
00043 #ifdef __sgi
00044 # ifndef sgi
00045 # define sgi
00046 # endif
00047 #endif
00048
00049 #if defined (sgi)
00050 # define KNOWN_MACHINE
00051 # define CALL_LIKE_SUN 1
00052 #endif
00053
00054 #if defined (sun) || defined (__sun)
00055 # define KNOWN_MACHINE
00056 # define CALL_LIKE_SUN 1
00057 # if !defined(__STDC__) || defined(__GNUC__)
00058 # if !defined(G77)
00059 extern char *sys_errlist [];
00060 # define strerror(i) sys_errlist[i]
00061 # endif
00062 # endif
00063 #endif
00064
00065 #if defined(__OSF1__) || defined(__osf__)
00066 # define KNOWN_MACHINE
00067 # define CALL_LIKE_SUN 1
00068 #endif
00069
00070 #ifndef VMS
00071 # if defined (vms) || defined (__vms) || defined (__VMS)
00072 # define VMS
00073 # endif
00074 #endif
00075 #if defined (VMS)
00076 # define KNOWN_MACHINE
00077 # define CALL_LIKE_VMS 1
00078 #endif
00079
00080 #if defined(_MSC_VER) || defined (WIN32)
00081 # define CALL_LIKE_MVS 1
00082 # define KNOWN_MACHINE
00083 #endif
00084
00085 #if defined (linux) || defined (__CYGWIN__)
00086 # undef CALL_LIKE_SUN
00087 # define KNOWN_MACHINE
00088 # define CALL_LIKE_SUN 1
00089 #endif
00090
00091 #if defined (__FreeBSD__)
00092 # undef CALL_LIKE_SUN
00093 # define KNOWN_MACHINE
00094 # define CALL_LIKE_SUN 1
00095 #endif
00096
00097 #if defined(F2C) || defined(G77)
00098 # undef CALL_LIKE_SUN
00099 # define CALL_LIKE_SUN 1
00100 # define KNOWN_MACHINE
00101 #endif
00102
00103 #if defined(__APPLE__)
00104 # undef CALL_LIKE_SUN
00105 # define CALL_LIKE_SUN 1
00106 # define KNOWN_MACHINE
00107 #endif
00108
00109 #if ! defined (KNOWN_MACHINE)
00110 # error System type is not known -- see the Installation Guide
00111 #else
00112
00113 #ifndef _POSIX_SOURCE
00114 #define _POSIX_SOURCE
00115 #endif
00116
00117
00118 #ifndef _XOPEN_SOURCE
00119 #define _XOPEN_SOURCE
00120 #endif
00121
00122 #include <stdio.h>
00123
00124 #if defined (VMS)
00125 # include <descrip.h>
00126 # define NOUNISTD
00127 #else
00128 # include <sys/types.h>
00129 # include <sys/stat.h>
00130 # if !defined (_WIN32) && !defined (_MSC_VER)
00131 # include <sys/times.h>
00132 # endif
00133 # ifdef _MSC_VER
00134 # define NOUNISTD
00135 # endif
00136 #endif
00137
00138 #include <stddef.h>
00139 #include <string.h>
00140
00141 #ifndef NOUNISTD
00142 # include <unistd.h>
00143 #else
00144 # ifndef VMS
00145 # ifndef _MVS
00146 # include <sys/file.h>
00147 # endif
00148 # endif
00149 #endif
00150 #ifndef NOSTDLIB
00151 # include <stdlib.h>
00152 #endif
00153
00154 #include <errno.h>
00155 #include <ctype.h>
00156
00157 #if defined(_AIX) || defined (__hpux) || defined(F2C) ||\
00158 defined(G77) || defined(_WIN32)
00159 # include <time.h>
00160 #endif
00161
00162 #include <limits.h>
00163 #include <float.h>
00164
00165 #if defined (F2C)
00166 # define Skip_f2c_Undefs
00167 # include "f2c.h"
00168 #endif
00169 #if defined (G77)
00170 # define Skip_f2c_Undefs
00171 # if defined (HAVE_G2C_H)
00172 # include "g2c.h"
00173 # else
00174 # include "f2c.h"
00175 # endif
00176 #endif
00177
00178
00179
00180 # if (defined _WIN32) || (defined _MSC_VER)
00181 double rint(double x);
00182 #endif
00183
00184 #ifdef _MSC_VER
00185 #define M_PI 3.14159265358979323846
00186 #endif
00187
00188 #ifdef _MSC_VER
00189 # define PATH_SEPARATOR '\\'
00190 # define EXT_SEPARATOR '.'
00191 #else
00192 # define PATH_SEPARATOR '/'
00193 # define EXT_SEPARATOR '.'
00194 #endif
00195
00196 #define MAXFLEN 512
00197 #define MAXFILES 16
00198 #define DEFMODE 2
00200 #define IRRELEVANT_OP 0
00201 #define READ_OP 1
00202 #define WRITE_OP 2
00203
00204 #include<fcntl.h>
00205 #ifndef SEEK_SET
00206 # define SEEK_SET 0
00207 # define SEEK_CUR 1
00208 # define SEEK_END 2
00209 #endif
00210 #ifndef O_WRONLY
00211 #define O_RDONLY 0x0000
00212 #define O_WRONLY 0x0001
00213 #define O_RDWR 0x0002
00214 #define O_APPEND 0x0008
00215 #define O_CREAT 0x0200
00216 #define O_TRUNC 0x0400
00217 #endif
00218 #define O_TMP 0x0010
00220 #define BYTE 0
00221 #define INT16 1
00222 #define INT32 6
00223 #define FLOAT32 2
00224 #define COMP32 3
00225 #define COMP64 4
00226
00227 #define DFNTI_MBO 1
00228 #define DFNTI_IBO 4
00230 #define DFNTF_BEIEEE 1
00231 #define DFNTF_VAX 2
00232 #define DFNTF_CONVEXNATIVE 5
00233 #define DFNTF_LEIEEE 4
00235 #if defined (VAX) || defined (vax)
00236 # define NATIVEFT DFNTF_VAX
00237 # define NATIVEIT DFNTI_IBO
00238 #endif
00239
00240 #if defined(MIPSEL) || defined(i386) || defined(i860) || defined(__ia64__) || defined(__amd64__) || defined(__x86_64__)
00241 # define NATIVEIT DFNTI_IBO
00242 # define NATIVEFT DFNTF_LEIEEE
00243 #endif
00244
00245 #if defined (powerpc) || defined (__ppc__)
00246 # define NATIVEIT DFNTI_MBO
00247 # define NATIVEFT DFNTF_BEIEEE
00248 #endif
00249
00250 #ifdef __alpha
00251 # ifdef VMS
00252 # if __IEEE_FLOAT == 1
00253 # define NATIVEFT DFNTF_LEIEEE
00254 # else
00255 # define NATIVEFT DFNTF_VAX
00256 # endif
00257 # else
00258 # define NATIVEFT DFNTF_LEIEEE
00259 # endif
00260 # define NATIVEIT DFNTI_IBO
00261 #endif
00262
00263 #if defined(MIPSEB) || defined(__hpux) || defined(_AIX) || defined(m68k) || defined(mc68000) || defined(sparc) || defined (__sparc__) || defined (__hppa__)
00264 # define NATIVEIT DFNTI_MBO
00265 # define NATIVEFT DFNTF_BEIEEE
00266 #endif
00267
00268 #ifndef NATIVEFT
00269 # error "Can't determine machine number format"
00270 #endif
00271
00272 #define DFNT_UINT 0
00273 #define DFNT_SINT 1
00274 #define DFNT_INT 2
00275 #define DFNT_UCHAR 3
00276 #define DFNT_CHAR 4
00277 #define DFNT_FLOAT 5
00278 #define DFNT_DOUBLE 6
00280 #endif
00281
00282 #endif
00283
00284
00285
00286
00287
00288