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/fmtconv.h 92.2 06/18/99 10:01:22 */ 00036 00037 00038 #ifndef _CRAY_FMTCONV_H 00039 #define _CRAY_FMTCONV_H 00040 00041 #ifndef NULL 00042 # define NULL 0 00043 #endif 00044 00045 /* Repeatable edit-descriptor types */ 00046 00047 #define TYNN 0 /* Nonnumeric type edit descriptor */ 00048 #define TYIN 1 /* Integer type edit descriptor */ 00049 #define TYUI 2 /* Unsigned integer type edit descriptor*/ 00050 #define TYFP 3 /* Floating-point type edit descriptor */ 00051 00052 /* Input and Output Conversion Mode Bits */ 00053 00054 #define MODEDP 004 /* Double-precision flag */ 00055 #define MODEHP 020 /* Half-precision (32-bit) flag */ 00056 #if defined(__mips) || defined(_LITTLE_ENDIAN) 00057 #define MODEWP 040 /* 2-byte-precision (16-bit) flag */ 00058 #define MODEBP 0100 /* 1-byte-precision (8-bit) flag */ 00059 #endif 00060 00061 /* Input Conversion Mode Bits */ 00062 00063 #define MODEBN 001 /* Blanks treated as nulls (ignored) */ 00064 #define MODEBZ 002 /* Blanks treated as zeroes */ 00065 00066 /* Output Conversion Mode Bits */ 00067 00068 #define MODESN 001 /* Numeric sign required flag */ 00069 #define MODEUN 002 /* Unsigned datum flag */ 00070 #define MODE77 010 /* Fortran 77 conformance flag */ 00071 #define MODEMSN 0200 /* Minus sign written for -0.0 */ 00072 00073 /* Input conversion exit values */ 00074 00075 #if defined(__mips) || defined(_LITTLE_ENDIAN) 00076 #define EX_INT8 7 /* Signed 1-byte integer */ 00077 #define EX_INT16 6 /* Signed 2-byte integer */ 00078 #endif 00079 #define EX_REAL32 5 /* 32-bit real */ 00080 #define EX_REAL128 4 /* 128-bit real */ 00081 #define EX_REAL64 3 /* 64-bit real */ 00082 #define EX_INTL 2 /* Signed large integer (S-reg) */ 00083 #define EX_INTS 1 /* Signed small integer (A-reg) */ 00084 #define EX_ILLCHAR -1 /* invalid character */ 00085 #define EX_FIXOFLO -2 /* fixed-point overflow */ 00086 #define EX_EXPUFLO -3 /* floating-point underflow */ 00087 #define EX_EXPOFLO -4 /* floating-point overflow */ 00088 #define EX_NULLFLD -5 /* null field (no digits) */ 00089 #define EX_INVLOGI -10 /* reserved for libf (logical) */ 00090 00091 00092 /* 00093 * Define typedefs for generic declarations of the input and output 00094 * conversion routines. 00095 */ 00096 00097 typedef int ic_func ( const long *_Fca, const long *_Width, long **_Lcap1, 00098 const long *_Mode, void *_Result, long *_Statval, 00099 const long *_Digits, const long *_Scale); 00100 00101 typedef long *oc_func ( const void *_Value, long *_Fca, 00102 const long *_Mode, const long *_Width, 00103 const long *_Digits, const long *_Exp, 00104 const long *_Scale); 00105 00106 /* Input conversion routines */ 00107 00108 extern ic_func _bu2s; /* Binary Unpacked to Single word */ 00109 extern ic_func _defgu2sd; /* Floating-point (D,E,F,G) Unpacked to 00110 Single or Double word */ 00111 extern ic_func _iu2s; /* Integer Unpacked to Single word */ 00112 extern ic_func _ou2s; /* Octal Unpacked to Single word */ 00113 extern ic_func _zu2s; /* Hexadecimal Unpacked to Single word */ 00114 00115 /* Output conversion routines */ 00116 00117 extern oc_func _s2ub; /* Single word to Unpacked Binary */ 00118 extern oc_func _s2ui; /* Single word to Unpacked Integer */ 00119 extern oc_func _s2uo; /* Single word to Unpacked Octal */ 00120 extern oc_func _s2uz; /* Single word to Unpacked Hexadecimal */ 00121 extern oc_func _sd2udee; /* Single/Double word to Unpacked D/E */ 00122 extern oc_func _sd2uene; /* Single/Double word to Unpacked EN */ 00123 extern oc_func _sd2uese; /* Single/Double word to Unpacked ES */ 00124 extern oc_func _sd2uf; /* Single/Double word to Unpacked F */ 00125 extern oc_func _sd2uge; /* Single/Double word to Unpacked G */ 00126 00127 #endif /* !_CRAY_FMTCONV_H */