Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
00001 /* 00002 00003 Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it 00006 under the terms of version 2 of the GNU General Public License as 00007 published by the Free Software Foundation. 00008 00009 This program is distributed in the hope that it would be useful, but 00010 WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00012 00013 Further, this software is distributed without any warranty that it is 00014 free of the rightful claim of any third person regarding infringement 00015 or the like. Any license provided herein, whether implied or 00016 otherwise, applies only to this software file. Patent licenses, if 00017 any, provided herein do not apply to combinations of this program with 00018 other software, or any other product whatsoever. 00019 00020 You should have received a copy of the GNU General Public License along 00021 with this program; if not, write the Free Software Foundation, Inc., 59 00022 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00023 00024 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00025 Mountain View, CA 94043, or: 00026 00027 http://www.sgi.com 00028 00029 For further information regarding this notice, see: 00030 00031 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00032 00033 */ 00034 00035 /* USMID @(#) clibinc/cray/fortio.h 92.0 10/08/98 14:28:05 */ 00036 #ifndef _CRAY_FORTIO_H 00037 #define _CRAY_FORTIO_H 00038 00039 /* 00040 * fortio.h - contains global definitions which pertain 00041 * to Fortran I/O. These definitions are used 00042 * by libf and by the procstat and procview 00043 * commands. 00044 */ 00045 00046 /************************************************************************/ 00047 /* */ 00048 /* Constants */ 00049 /* */ 00050 /************************************************************************/ 00051 00052 /* 00053 * Fortran I/O types. 00054 * 00055 * Modification of this list also requires changes to macro FIO_METHOD. 00056 */ 00057 00058 #define FIO_SF 1 /* sequential formatted */ 00059 #define FIO_SU 2 /* sequential unformatted */ 00060 #define FIO_DF 3 /* direct formatted */ 00061 #define FIO_DU 4 /* direct unformatted */ 00062 00063 /* 00064 * File structure constant defintions. 00065 */ 00066 00067 #define FS_DEFAULT 0 /* file structure not yet determined */ 00068 00069 #define STD 1 /* stdio compatible unblocked or text */ 00070 #define FS_PURE 2 /* pure data (CRAY-2 only) */ 00071 #define FS_COS 3 /* COS blocked */ 00072 #define FS_U 4 /* unblocked -s u */ 00073 #define FS_BIN 5 /* unblocked -s bin (YMP only) */ 00074 #define FS_TAPE 6 /* interchange tape */ 00075 #define FS_FDC 7 /* FFIO file */ 00076 #define FS_TAPE50 8 /* interchange tape (special rls 5.0) */ 00077 #define FS_TEXT 9 /* newline terminated records */ 00078 #define FS_UNBLOCKED 10 /* no record blocking */ 00079 #define FS_AUX 11 /* an auxiliary type of i/o (e.g. aqio) */ 00080 #define FS_F77 12 /* unformatted structure on workstations*/ 00081 00082 /* 00083 * Other constants. 00084 */ 00085 00086 #define MXUNITSZ 32 /* Max. size of file name: sizeof("fort.nnn") */ 00087 00088 /************************************************************************/ 00089 /* */ 00090 /* Macros */ 00091 /* */ 00092 /************************************************************************/ 00093 00094 /* 00095 * FIO_METHOD - macro which returns a string describing the I/O type 00096 * corresponding to an I/O type code, or NULL if it 00097 * is an invalid code. 00098 * 00099 * This macro is used by the procstat command and by _fcontext. 00100 */ 00101 #define FIO_METHOD(_C) \ 00102 ( ((_C) == FIO_SF)? \ 00103 "sequential formatted" \ 00104 :( ((_C) == FIO_SU)? \ 00105 "sequential unformatted" \ 00106 :( ((_C) == FIO_DF)? \ 00107 "direct formatted" \ 00108 :( ((_C) == FIO_DU)? \ 00109 "direct unformatted" \ 00110 : \ 00111 NULL \ 00112 )))) 00113 00114 /* 00115 * FIO_STRUCT - macro which returns a string describing the Fortran file 00116 * file structure corresponding to an integer structure code. 00117 * 00118 * This macro is used by the procstat command and by _fcontext. 00119 */ 00120 00121 #define FIO_STRUCT(_C) \ 00122 ( ((_C) == FS_TEXT)? \ 00123 "text" \ 00124 :( ((_C) == FS_COS)? \ 00125 "COS blocked" \ 00126 :( ((_C) == FS_UNBLOCKED)? \ 00127 "unblocked" \ 00128 :( ((_C) == FS_PURE)? \ 00129 "pure data" \ 00130 :( ((_C) == FS_U)? \ 00131 "unblocked" \ 00132 :( ((_C) == FS_BIN)? \ 00133 "unblocked" \ 00134 :( ((_C) == FS_TAPE)? \ 00135 "tape" \ 00136 :( ((_C) == FS_TAPE50)? \ 00137 "tape" \ 00138 :( ((_C) == STD)? \ 00139 "unblocked or text" \ 00140 :( ((_C) == FS_F77)? \ 00141 "UNIX blocked" \ 00142 :( ((_C) == FS_FDC)? \ 00143 "FFIO" \ 00144 : \ 00145 NULL \ 00146 ))))))))))) 00147 00148 /************************************************************************/ 00149 /* */ 00150 /* Typedefs */ 00151 /* */ 00152 /************************************************************************/ 00153 00154 /* 00155 * Define data types to hold unit and record numbers. These data 00156 * types transcend the Fortran run-time library, and so are defined 00157 * here. Note some of the impacts: 00158 * 00159 * 1) All the places where a unit/record number is passed into 00160 * the run-time library (and there are many), and 00161 * 00162 * 2) All the places where a unit/record number is printed out 00163 * or formatted for printed (e.g., "%lld"). 00164 * 00165 */ 00166 00167 #ifdef _CRAY /* KLUDGE for older C/C++ compilers */ 00168 typedef long unum_t; /* Fortran unit number */ 00169 typedef long recn_t; /* Fortran record number */ 00170 #else 00171 typedef long long unum_t; /* Fortran unit number */ 00172 typedef long long recn_t; /* Fortran record number */ 00173 #endif 00174 00175 #endif /* !_CRAY_FORTIO_H */