Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
oconvtab.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 
00038 #pragma ident "@(#) libf/fio/oconvtab.c 92.2    06/23/99 10:34:31"
00039 #include <cray/dopevec.h>
00040 #include <cray/fmtconv.h>
00041 #include <cray/format.h>
00042 #include <cray/mtlock.h>        /* For SHARED_CC_BUG_WORKAROUND */
00043 
00044 /* Local Output Conversion Routines */
00045 
00046 extern oc_func  _S2UB;
00047 extern oc_func  _S2UL;
00048 extern oc_func  _S2UO;
00049 extern oc_func  _S2UZ;
00050 
00051 /*
00052  *      _oconvtab[]     Table containing pointers to the output
00053  *                      conversion functions for each data edit-
00054  *                      descriptor, indexed by edit-descriptor.
00055  */
00056 
00057 oc_func * const
00058 _oconvtab[LAST_DATA_ED + 1] = {
00059          NULL,          /* none */
00060          NULL,          /* A_ED */
00061         _S2UB,          /* B_ED */
00062         _sd2udee,       /* D_ED */
00063         _sd2udee,       /* E_ED */
00064         _sd2uene,       /* EN_ED*/
00065         _sd2uese,       /* ES_ED*/
00066         _sd2uf,         /* F_ED */
00067         _sd2uge,        /* G_ED */
00068         _s2ui,          /* I_ED */
00069         _S2UL,          /* L_ED */
00070         _S2UO,          /* O_ED */
00071          NULL,          /* R_ED */      /* CRI extension */
00072         _S2UZ,          /* Z_ED */
00073          NULL           /* Q_ED */      /* MIPSpro extension */
00074 };
00075 
00076 /*
00077  *      _oldotab        Table containing numeric conversion functions,
00078  *                      indexed by data type.  For use with list-directed
00079  *                      output.
00080  */
00081 
00082 oc_func * const
00083 _oldotab[DVTYPE_NTYPES] = {
00084         NULL,           /* DVTYPE_UNUSED        Unused          */
00085         _s2uo,          /* DVTYPE_TYPELESS      Typeless        */
00086         _s2ui,          /* DVTYPE_INTEGER       Integer         */
00087         _sd2uge,        /* DVTYPE_REAL          Real            */
00088         _sd2uge,        /* DVTYPE_COMPLEX       Complex         */
00089         NULL,           /* DVTYPE_LOGICAL       Logical         */
00090         NULL,           /* DVTYPE_ASCII         Character       */
00091         NULL,           /* DVTYPE_DERIVEDBYTE   Unused          */
00092         NULL            /* DVTYPE_DERIVEDWORD   Unused          */
00093 };
00094 
00095 /*
00096  *      _odedtab        Table containing data edit-descriptors for each
00097  *                      data type, indexed by data type.  For use with
00098  *                      the G edit-descriptor.
00099  */
00100 
00101 short const
00102 _odedtab [DVTYPE_NTYPES] = {
00103         -1,     /* DVTYPE_UNUSED        Unused          */
00104         O_ED,   /* DVTYPE_TYPELESS      Typeless        */
00105         I_ED,   /* DVTYPE_INTEGER       Integer         */
00106         G_ED,   /* DVTYPE_REAL          Real            */
00107         G_ED,   /* DVTYPE_COMPLEX       Complex         */
00108         L_ED,   /* DVTYPE_LOGICAL       Logical         */
00109         A_ED,   /* DVTYPE_ASCII         Character       */
00110         -1,     /* DVTYPE_DERIVEDBYTE   Unused          */
00111         -1      /* DVTYPE_DERIVEDWORD   Unused          */
00112 };
00113 
00114 /*
00115  *      _o_sup_flg_tab  Table containing flags indicating whether or not
00116  *                      variables of that type (default KIND) are eligible
00117  *                      to be suppressed in edit-directed formatted output
00118  *                      (i.e., the FSUP or ISUP routines).
00119  */
00120 
00121 short
00122 _o_sup_flg_tab [DVTYPE_NTYPES] = {
00123         0,      /* DVTYPE_UNUSED        Unused          */
00124         0,      /* DVTYPE_TYPELESS      Typeless        */
00125         0,      /* DVTYPE_INTEGER       Integer         */
00126         0,      /* DVTYPE_REAL          Real            */
00127         0,      /* DVTYPE_COMPLEX       Complex         */
00128         0,      /* DVTYPE_LOGICAL       Logical         */
00129         0,      /* DVTYPE_ASCII         Character       */
00130         0,      /* DVTYPE_DERIVEDBYTE   Unused          */
00131         0       /* DVTYPE_DERIVEDWORD   Unused          */
00132 };
00133 
00134 /*
00135  *      _o_sup_val_tab  Table containing values of each type (default KIND)
00136  *                      which are to be suppressed in edit-directed formatted
00137  *                      output.
00138  */
00139 
00140 long
00141 _o_sup_val_tab [DVTYPE_NTYPES] = {
00142         0,      /* DVTYPE_UNUSED        Unused          */
00143         0,      /* DVTYPE_TYPELESS      Typeless        */
00144         0,      /* DVTYPE_INTEGER       Integer         */
00145         0,      /* DVTYPE_REAL          Real            */
00146         0,      /* DVTYPE_COMPLEX       Complex         */
00147         0,      /* DVTYPE_LOGICAL       Logical         */
00148         0,      /* DVTYPE_ASCII         Character       */
00149         0,      /* DVTYPE_DERIVEDBYTE   Unused          */
00150         0       /* DVTYPE_DERIVEDWORD   Unused          */
00151 };
00152 
00153 SHARED_CC_BUG_WORKAROUND(_oconvtab_kludge_func)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines