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.1 of the GNU Lesser General Public License 00007 as 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 Lesser General Public 00021 License along with this program; if not, write the Free Software 00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 00023 USA. 00024 00025 Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00026 Mountain View, CA 94043, or: 00027 00028 http://www.sgi.com 00029 00030 For further information regarding this notice, see: 00031 00032 http://oss.sgi.com/projects/GenInfo/NoticeExplan 00033 00034 */ 00035 00036 00037 #pragma ident "@(#) libfi/char/f90_scan.c 92.2 07/30/99 10:09:59" 00038 00039 #include <fortran.h> 00040 00041 typedef struct 00042 { 00043 char *ptr; /* character portion */ 00044 unsigned long len; /* its length */ 00045 } fcd_t; 00046 00047 extern _f_int _SCAN( fcd_t str1, 00048 fcd_t str2, 00049 _f_log *back ); 00050 00051 _f_int _F90_SCAN( char *str1, 00052 char *str2, 00053 _f_int *back, 00054 _f_int len1, 00055 _f_int len2 ) 00056 { 00057 fcd_t fcd1, fcd2; 00058 00059 fcd1.ptr = str1; 00060 fcd1.len = len1; 00061 fcd2.ptr = str2; 00062 fcd2.len = len2; 00063 00064 return( _SCAN( fcd1, fcd2, back ) ); 00065 } 00066 00067 00068 #ifdef _F_INT4 00069 extern _f_int4 _SCAN_4( fcd_t str1, 00070 fcd_t str2, 00071 _f_log *back ); 00072 00073 _f_int4 _F90_SCAN_4( char *str1, 00074 char *str2, 00075 _f_int *back, 00076 _f_int len1, 00077 _f_int len2 ) 00078 { 00079 fcd_t fcd1, fcd2; 00080 00081 fcd1.ptr = str1; 00082 fcd1.len = len1; 00083 fcd2.ptr = str2; 00084 fcd2.len = len2; 00085 00086 return( _SCAN_4( fcd1, fcd2, back ) ); 00087 } 00088 00089 #endif 00090 00091 00092 #ifdef _F_INT8 00093 extern _f_int8 _SCAN_8( fcd_t str1, 00094 fcd_t str2, 00095 _f_log *back ); 00096 00097 _f_int8 _F90_SCAN_8( char *str1, 00098 char *str2, 00099 _f_int *back, 00100 _f_int len1, 00101 _f_int len2 ) 00102 { 00103 fcd_t fcd1, fcd2; 00104 00105 fcd1.ptr = str1; 00106 fcd1.len = len1; 00107 fcd2.ptr = str2; 00108 fcd2.len = len2; 00109 00110 return( _SCAN_8( fcd1, fcd2, back ) ); 00111 } 00112 00113 #endif 00114 00115 #ifdef _F_INT2 00116 extern _f_int2 _SCAN_2( fcd_t str1, 00117 fcd_t str2, 00118 _f_log *back ); 00119 00120 _f_int2 _F90_SCAN_2( char *str1, 00121 char *str2, 00122 _f_int *back, 00123 _f_int len1, 00124 _f_int len2 ) 00125 { 00126 fcd_t fcd1, fcd2; 00127 00128 fcd1.ptr = str1; 00129 fcd1.len = len1; 00130 fcd2.ptr = str2; 00131 fcd2.len = len2; 00132 00133 return( _SCAN_2( fcd1, fcd2, back ) ); 00134 } 00135 #endif 00136 00137 #ifdef _F_INT1 00138 extern _f_int1 _SCAN_1( fcd_t str1, 00139 fcd_t str2, 00140 _f_log *back ); 00141 00142 _f_int1 _F90_SCAN_1( char *str1, 00143 char *str2, 00144 _f_int *back, 00145 _f_int len1, 00146 _f_int len2 ) 00147 { 00148 fcd_t fcd1, fcd2; 00149 00150 fcd1.ptr = str1; 00151 fcd1.len = len1; 00152 fcd2.ptr = str2; 00153 fcd2.len = len2; 00154 00155 return( _SCAN_1( fcd1, fcd2, back ) ); 00156 } 00157 #endif 00158 00159 #if defined(__mips) || defined(_LITTLE_ENDIAN) 00160 00161 extern _f_int4 _scan90(char *str1, _f_int4 len1, char *str2, _f_int4 len2, _f_int4 back); 00162 00163 _f_int4 00164 _scan90(char *str1, 00165 _f_int4 len1, 00166 char *str2, 00167 _f_int4 len2, 00168 _f_int4 back) 00169 { 00170 _f_int4 back1 = back; 00171 return (_F90_SCAN(str1, str2, &back1, len1, len2)); 00172 } 00173 00174 #endif /* __mips */