Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
f90_verify.c
Go to the documentation of this file.
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_verify.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 _VERIFY( fcd_t  str1,
00048                        fcd_t  str2,
00049                        _f_log *back );
00050 
00051 _f_int _F90_VERIFY( 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( _VERIFY( fcd1, fcd2, back ) );
00065 }
00066 
00067 
00068 #ifdef  _F_INT4
00069 extern _f_int4 _VERIFY_4( fcd_t  str1,
00070                           fcd_t  str2,
00071                           _f_log *back );
00072 
00073 _f_int4 _F90_VERIFY_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( _VERIFY_4( fcd1, fcd2, back ) );
00087 }
00088 #endif
00089 
00090 
00091 #ifdef  _F_INT8
00092 extern _f_int8 _VERIFY_8( fcd_t  str1,
00093                           fcd_t  str2,
00094                           _f_log *back );
00095 
00096 _f_int8 _F90_VERIFY_8( char    *str1,
00097                        char    *str2,
00098                        _f_int  *back,
00099                        _f_int  len1,
00100                        _f_int  len2 )
00101 {
00102     fcd_t  fcd1, fcd2;
00103 
00104     fcd1.ptr = str1;
00105     fcd1.len = len1;
00106     fcd2.ptr = str2;
00107     fcd2.len = len2;
00108     
00109     return( _VERIFY_8( fcd1, fcd2, back ) );
00110 }
00111 #endif
00112 
00113 #ifdef  _F_INT2
00114 extern _f_int2 _VERIFY_2( fcd_t  str1,
00115                           fcd_t  str2,
00116                           _f_log *back );
00117 
00118 _f_int2 _F90_VERIFY_2( char    *str1,
00119                        char    *str2,
00120                        _f_int  *back,
00121                        _f_int  len1,
00122                        _f_int  len2 )
00123 {
00124     fcd_t  fcd1, fcd2;
00125 
00126     fcd1.ptr = str1;
00127     fcd1.len = len1;
00128     fcd2.ptr = str2;
00129     fcd2.len = len2;
00130     
00131     return( _VERIFY_2( fcd1, fcd2, back ) );
00132 }
00133 #endif
00134 
00135 #ifdef  _F_INT1
00136 extern _f_int1 _VERIFY_1( fcd_t  str1,
00137                           fcd_t  str2,
00138                           _f_log *back );
00139 
00140 _f_int1 _F90_VERIFY_1( char    *str1,
00141                        char    *str2,
00142                        _f_int  *back,
00143                        _f_int  len1,
00144                        _f_int  len2 )
00145 {
00146     fcd_t  fcd1, fcd2;
00147 
00148     fcd1.ptr = str1;
00149     fcd1.len = len1;
00150     fcd2.ptr = str2;
00151     fcd2.len = len2;
00152     
00153     return( _VERIFY_1( fcd1, fcd2, back ) );
00154 }
00155 #endif
00156 
00157 #if     defined(__mips) || defined(_LITTLE_ENDIAN)
00158 
00159 extern _f_int4 _verify90(char *str1, _f_int4 len1, char *str2, _f_int4 len2, _f_int4 back);
00160 
00161 _f_int4
00162 _verify90(char *str1,
00163         _f_int4 len1,
00164         char *str2,
00165         _f_int4 len2,
00166         _f_int4 back)
00167 {
00168         _f_int4 back1 = back;
00169         return (_F90_VERIFY(str1, str2, &back1, len1, len2));
00170 }
00171 
00172 #endif  /* __mips */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines