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 /* USMID @(#) libf/include/fmt.h 92.1 11/10/99 13:40:53 */ 00038 00039 #include <cray/dopevec.h> 00040 #include <cray/format.h> 00041 00042 /* 00043 * Mode bits for calling NICV routine (used by rnly.c and wnly.c) 00044 */ 00045 00046 #define MDPART 040000 /* D part of D/E/F/Gw.d is present */ 00047 #define MCFT 020000 /* not called in compiler scan mode */ 00048 #define MPLS 010000 /* force output of the '+' in front of positive #'s */ 00049 #define MEXPS 04000 /* E part of D/E/F/Gw.dEe is present */ 00050 #define MSEXP 02000 /* signed exponent requested */ 00051 #define MMAN 01000 /* a double precision number is passed */ 00052 #define MD 0400 /* D format */ 00053 #define MG 0200 /* G format */ 00054 #define ME 0100 /* E format */ 00055 #define MF 040 /* F format */ 00056 #define MI 020 /* I format */ 00057 #define MX 010 /* X format */ 00058 #define MO 04 /* O format */ 00059 #define MBZ 02 /* blanks treated as zeroes */ 00060 #define MBN 01 /* blanks treated as nulls (ignored) */ 00061 00062 /* 00063 * Constants 00064 */ 00065 00066 /* 00067 * INVALID_INTLEN is the mask value which indicates that an internal 00068 * length is not supported for some edit descriptor. 00069 */ 00070 00071 #define INVALID_INTLEN ((signed char) -1) 00072 00073 /* 00074 * MAX_SUP_INTLEN is the largest supported internal length (measured in 00075 * bytes). 00076 */ 00077 00078 #define MAX_SUP_INTLEN 16 /* best if this is a power of 2 */ 00079 00080 /* 00081 * For historical reasons, use the '$' names on CRI systems. 00082 */ 00083 #ifdef _CRAY 00084 00085 #define _RCHK $RCHK 00086 #define _RNOCHK $RNOCHK 00087 #define _WCHK $WCHK 00088 #define _WNOCHK $WNOCHK 00089 00090 #endif 00091 00092 /* 00093 * Macros 00094 */ 00095 00096 /* 00097 * These macros check an edit-descriptor against a data type. 00098 */ 00099 00100 #define INVALID_WTYPE(op, type) (*(long *)(&_WCHK[type-1]) & (1L << (op-1))) 00101 #define INVALID_RTYPE(op, type) (*(long *)(&_RCHK[type-1]) & (1L << (op-1))) 00102 00103 /* 00104 * Structures 00105 */ 00106 00107 typedef struct fmtchk { 00108 00109 #ifndef _WORD32 00110 unsigned long :32; /* skip 32-bit half word */ 00111 #endif 00112 unsigned long :18; /* right justify */ 00113 00114 unsigned long q :1; 00115 unsigned long z :1; 00116 unsigned long r :1; 00117 unsigned long o :1; 00118 unsigned long l :1; 00119 unsigned long i :1; 00120 unsigned long g :1; 00121 unsigned long f :1; 00122 unsigned long es :1; 00123 unsigned long en :1; 00124 unsigned long e :1; 00125 unsigned long d :1; 00126 unsigned long b :1; 00127 unsigned long a :1; 00128 } fmtchk_t; 00129 00130 /* 00131 * Externals 00132 */ 00133 00134 extern signed char _wr_ilchk[LAST_DATA_ED][MAX_SUP_INTLEN]; 00135 extern signed char _rd_ilchk[LAST_DATA_ED][MAX_SUP_INTLEN]; 00136 extern signed char _rw_mxdgt[LAST_DATA_ED][MAX_SUP_INTLEN]; 00137 extern fmtchk_t _RCHK[DVTYPE_ASCII]; 00138 extern fmtchk_t _RNOCHK[DVTYPE_ASCII]; 00139 extern fmtchk_t _RCHK77[DVTYPE_ASCII]; 00140 extern fmtchk_t _RCHK90[DVTYPE_ASCII]; 00141 extern fmtchk_t _WCHK[DVTYPE_ASCII]; 00142 extern fmtchk_t _WNOCHK[DVTYPE_ASCII]; 00143 extern fmtchk_t _WCHK77[DVTYPE_ASCII]; 00144 extern fmtchk_t _WCHK90[DVTYPE_ASCII];