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