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 __linux__ && ( defined __PPC || defined __PPC__ )
00092 # undef CALL_LIKE_SUN
00093 # define KNOWN_MACHINE
00094 # define CALL_LIKE_SUN 1
00095 #endif
00096
00097 #if defined (__FreeBSD__)
00098 # undef CALL_LIKE_SUN
00099 # define KNOWN_MACHINE
00100 # define CALL_LIKE_SUN 1
00101 #endif
00102
00103 #if defined(F2C) || defined(G77)
00104 # undef CALL_LIKE_SUN
00105 # define CALL_LIKE_SUN 1
00106 # define KNOWN_MACHINE
00107 #endif
00108
00109 #if defined(__APPLE__)
00110 # undef CALL_LIKE_SUN
00111 # define CALL_LIKE_SUN 1
00112 # define KNOWN_MACHINE
00113 #endif
00114
00115 #if ! defined (KNOWN_MACHINE)
00116 # error System type is not known -- see the Installation Guide
00117 #else
00118
00119 #ifndef _POSIX_SOURCE
00120 #define _POSIX_SOURCE
00121 #endif
00122
00123
00124 #ifndef _XOPEN_SOURCE
00125 #define _XOPEN_SOURCE
00126 #endif
00127
00128 #include <stdio.h>
00129
00130 #if defined (VMS)
00131 # include <descrip.h>
00132 # define NOUNISTD
00133 #else
00134 # include <sys/types.h>
00135 # include <sys/stat.h>
00136 # if !defined (_WIN32) && !defined (_MSC_VER)
00137 # include <sys/times.h>
00138 # endif
00139 # ifdef _MSC_VER
00140 # define NOUNISTD
00141 # endif
00142 #endif
00143
00144 #include <stddef.h>
00145 #include <string.h>
00146
00147 #ifndef NOUNISTD
00148 # include <unistd.h>
00149 #else
00150 # ifndef VMS
00151 # ifndef _MVS
00152 # include <sys/file.h>
00153 # endif
00154 # endif
00155 #endif
00156 #ifndef NOSTDLIB
00157 # include <stdlib.h>
00158 #endif
00159
00160 #include <errno.h>
00161 #include <ctype.h>
00162
00163 #if defined(_AIX) || defined (__hpux) || defined(F2C) ||\
00164 defined(G77) || defined(_WIN32)
00165 # include <time.h>
00166 #endif
00167
00168 #include <limits.h>
00169 #include <float.h>
00170
00171 #if defined (F2C)
00172 # define Skip_f2c_Undefs
00173 # include "f2c.h"
00174 #endif
00175 #if defined (G77)
00176 # define Skip_f2c_Undefs
00177 # if defined (HAVE_G2C_H)
00178 # include "g2c.h"
00179 # else
00180 # include "f2c.h"
00181 # endif
00182 #endif
00183
00184
00185
00186 # if (defined _WIN32) || (defined _MSC_VER)
00187 double rint(double x);
00188 #endif
00189
00190 #ifdef _MSC_VER
00191 #define M_PI 3.14159265358979323846
00192 #endif
00193
00194 #ifdef _MSC_VER
00195 # define PATH_SEPARATOR '\\'
00196 # define EXT_SEPARATOR '.'
00197 #else
00198 # define PATH_SEPARATOR '/'
00199 # define EXT_SEPARATOR '.'
00200 #endif
00201
00202 #define MAXFLEN 512
00203 #define MAXFILES 16
00204 #define DEFMODE 2
00206 #define IRRELEVANT_OP 0
00207 #define READ_OP 1
00208 #define WRITE_OP 2
00209
00210 #include<fcntl.h>
00211 #ifndef SEEK_SET
00212 # define SEEK_SET 0
00213 # define SEEK_CUR 1
00214 # define SEEK_END 2
00215 #endif
00216 #ifndef O_WRONLY
00217 #define O_RDONLY 0x0000
00218 #define O_WRONLY 0x0001
00219 #define O_RDWR 0x0002
00220 #define O_APPEND 0x0008
00221 #define O_CREAT 0x0200
00222 #define O_TRUNC 0x0400
00223 #endif
00224 #define O_TMP 0x0010
00226 #define BYTE 0
00227 #define INT16 1
00228 #define INT32 6
00229 #define FLOAT32 2
00230 #define COMP32 3
00231 #define COMP64 4
00232
00233 #define DFNTI_MBO 1
00234 #define DFNTI_IBO 4
00236 #define DFNTF_BEIEEE 1
00237 #define DFNTF_VAX 2
00238 #define DFNTF_CONVEXNATIVE 5
00239 #define DFNTF_LEIEEE 4
00241 #if defined (VAX) || defined (vax)
00242 # define NATIVEFT DFNTF_VAX
00243 # define NATIVEIT DFNTI_IBO
00244 #endif
00245
00246 #if defined(MIPSEL) || defined(i386) || defined(i860) || defined(__ia64__) || defined(__amd64__) || defined(__x86_64__)
00247 # define NATIVEIT DFNTI_IBO
00248 # define NATIVEFT DFNTF_LEIEEE
00249 #endif
00250
00251 #if defined (powerpc) || defined (__powerpc__) || defined (__ppc__) || defined __PPC
00252 # define NATIVEIT DFNTI_MBO
00253 # define NATIVEFT DFNTF_BEIEEE
00254 #endif
00255
00256 #ifdef __alpha
00257 # ifdef VMS
00258 # if __IEEE_FLOAT == 1
00259 # define NATIVEFT DFNTF_LEIEEE
00260 # else
00261 # define NATIVEFT DFNTF_VAX
00262 # endif
00263 # else
00264 # define NATIVEFT DFNTF_LEIEEE
00265 # endif
00266 # define NATIVEIT DFNTI_IBO
00267 #endif
00268
00269 #if defined(MIPSEB) || defined(__hpux) || defined(_AIX) || defined(m68k) || defined(mc68000) || defined(sparc) || defined (__sparc__)
00270 # define NATIVEIT DFNTI_MBO
00271 # define NATIVEFT DFNTF_BEIEEE
00272 #endif
00273
00274 #ifndef NATIVEFT
00275 # error "Can't determine machine number format"
00276 #endif
00277
00278 #define DFNT_UINT 0
00279 #define DFNT_SINT 1
00280 #define DFNT_INT 2
00281 #define DFNT_UCHAR 3
00282 #define DFNT_CHAR 4
00283 #define DFNT_FLOAT 5
00284 #define DFNT_DOUBLE 6
00286 #endif
00287
00288 #endif
00289
00290
00291
00292
00293
00294