Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
fecif.h
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 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 
00036 
00037 /* USMID:  "\n@(#)5.0_pl/headers/fecif.h        5.1     04/29/99 21:22:31\n" */
00038 
00039 
00040 /******************************************************************************\
00041 |**                                                                          **|
00042 |**                         Static Data Declarations                         **|
00043 |**                                                                          **|
00044 \******************************************************************************/
00045 
00046 /* cif_name is defined to have the length (MAX_FILE_NAME_SIZE + 2) to allow   */
00047 /* for space for the ".T" in the event the source input file name uses all    */
00048 /* character positions (so it kinda violates the policy of limiting file      */
00049 /* names to MAX_FILE_NAME_SIZE characters).  Note that cft90, to be           */
00050 /* compatible with cft77, does not force source input file names to have a    */
00051 /* ".f" extension.                                                            */
00052 /*                                                                            */
00053 /* cft77 uses a much larger value for the max path name size.  If we need to  */
00054 /* use a larger one, we should use the values as explained below.             */
00055 /* PATH_MAX is defined in the Cray sys/param.h file as 1023.                  */
00056 /* PATHSIZE is defined in the Cray sys/param.h file as (PATH_MAX+1).          */
00057 /* MAXPATHLEN is defined in the Sun sys/param.h file as 1024.                 */
00058 /* The path name length allows for an expanded path name of 1023 characters   */
00059 /* plus the null terminator.                                                  */
00060 /*                                                                            */
00061 
00062         char    cif_name[MAX_FILE_NAME_SIZE + 2];
00063 
00064         char    cif_tmp_file_name[MAX_FILE_NAME_SIZE];
00065 
00066 static  int     cif_derived_type_id;
00067 static  int     cif_file_id;
00068 static  int     cif_symbol_or_scope_id;
00069 
00070 
00071  
00072 /******************************************************************************\
00073 |*                              Other CIF data                                *|
00074 \******************************************************************************/
00075 
00076 int              cif_end_unit_column;
00077 int              cif_end_unit_line;
00078 int              cif_number_of_struct_ids;
00079 boolean          cif_pgm_unit_error_recovery;
00080 boolean          get_other_func_rslt_info       = FALSE;
00081 int              last_msg_file_rec;
00082 char            *orig_cmd_line;
00083 boolean          skip_struct_base;
00084 
00085 
00086 /* mapped_stmt_type is used to build the Statement Type record.  cif_stmt_type*/
00087 /* is defined in globals.h because a number of procedures must be able to     */
00088 /* call cif_stmt_type_rec when the exact type of statement has been           */
00089 /* determined.                                                                */
00090 
00091 cif_stmt_type   mapped_stmt_type[] =
00092                        {CIF_Stmt_Type_Error,
00093 
00094                         CIF_Allocatable_Stmt,           /* Allocatable_Stmt   */
00095                         CIF_Automatic_Stmt,             /* Automatic_Stmt     */
00096                         CIF_Common_Stmt,                /* Common_Stmt        */
00097                         CIF_Contains_Stmt,              /* Contains_Stmt      */
00098                         CIF_Stmt_Type_Error,            /* Cpnt_Decl_Stmt     */
00099                         CIF_Data_Stmt,                  /* Data_Stmt          */
00100                         CIF_Type_Stmt,                  /* Derived_Type_Stmt  */
00101                         CIF_Dimension_Stmt,             /* Dimension_Stmt     */
00102                         CIF_Not_Exact,                  /* Directive_Stmt     */
00103                         CIF_Equivalence_Stmt,           /* Equivalence_Stmt   */
00104                         CIF_External_Stmt,              /* External_Stmt      */
00105                         CIF_Format_Stmt,                /* Format_Stmt        */
00106                         CIF_Not_Exact,                  /* Implicit_Stmt      */
00107                         CIF_Not_Exact,                  /* Implicit_None_Stmt */
00108                         CIF_Not_Exact,                  /* Intent_Stmt        */
00109                         CIF_Not_Exact,                  /* Interface_Stmt     */
00110                         CIF_Intrinsic_Stmt,             /* Intrinsic_Stmt     */
00111                         CIF_Not_Exact,                  /* Module_Proc_Stmt   */
00112                         CIF_Namelist_Stmt,              /* Namelist_Stmt      */
00113                         CIF_Optional_Stmt,              /* Optional_Stmt      */
00114                         CIF_Parameter_Stmt,             /* Parameter_Stmt     */
00115                         CIF_Pointer_Stmt,               /* Pointer_Stmt       */
00116                         CIF_Private_Stmt,               /* Private_Stmt       */
00117                         CIF_Public_Stmt,                /* Public_Stmt        */
00118                         CIF_Save_Stmt,                  /* Save_Stmt          */
00119                         CIF_Sequence_Stmt,              /* Sequence_Stmt      */
00120                         CIF_Statement_Function_Stmt,    /* Stmt_Func_Stmt     */
00121                         CIF_Target_Stmt,                /* Target_Stmt        */
00122                         CIF_Task_Common_Stmt,           /* Task_Common_Stmt   */
00123                         CIF_Not_Exact,                  /* Type_Decl_Stmt     */
00124                         CIF_Use_Stmt,                   /* Use_Stmt           */
00125 
00126                         CIF_Block_Data_Stmt,            /* Blockdata_Stmt     */
00127                         CIF_Elemental_Stmt,             /* Elemental_Stmt     */
00128                         CIF_Function_Stmt,              /* Function_Stmt      */
00129                         CIF_Not_Exact,                  /* Module_Stmt        */
00130                         CIF_Program_Stmt,               /* Program_Stmt       */
00131                         CIF_Pure_Stmt,                  /* Pure_Stmt          */
00132                         CIF_Not_Exact,                  /* Recursive_Stmt     */
00133                         CIF_Subroutine_Stmt,            /* Subroutine_Stmt    */
00134 
00135                         CIF_End_Block_Data_Stmt,        /* End_Blockdata_Stmt */
00136                         CIF_End_Do_Stmt,                /* End_Do_Stmt        */
00137                         CIF_End_Function_Stmt,          /* End_Function_Stmt  */
00138                         CIF_End_If_Stmt,                /* End_If_Stmt        */
00139                         CIF_End_Interface_Stmt,         /* End_Interface_Stmt */
00140                         CIF_End_Module_Stmt,            /* End_Module_Stmt    */
00141                         CIF_End_Program_Stmt,           /* End_Program_Stmt   */
00142                         CIF_End_Select_Stmt,            /* End_Select_Stmt    */
00143                         CIF_Not_Exact,                  /* End_Stmt           */
00144                         CIF_End_Subroutine_Stmt,        /* End_Subroutine_Stmt*/
00145                         CIF_End_Type_Stmt,              /* End_Type_Stmt      */
00146                         CIF_End_Where_Stmt,             /* End_Where_Stmt     */
00147 
00148                         CIF_Allocate_Stmt,              /* Allocate_Stmt      */
00149                         CIF_If_Arithmetic_Stmt,         /* Arith_If_Stmt      */
00150                         CIF_Assign_Stmt,                /* Assign_Stmt        */
00151                         CIF_Not_Exact,                  /* Assignment_Stmt    */
00152                         CIF_Backspace_Stmt,             /* Backspace_Stmt     */
00153                         CIF_Not_Exact,                  /* Buffer_Stmt        */
00154                         CIF_Call_Stmt,                  /* Call_Stmt          */
00155                         CIF_Not_Exact,                  /* Case_Stmt          */
00156                         CIF_Close_Stmt,                 /* Close_Stmt         */
00157                         CIF_Continue_Stmt,              /* Continue_Stmt      */
00158                         CIF_Cycle_Stmt,                 /* Cycle_Stmt         */
00159                         CIF_Deallocate_Stmt,            /* Deallocate_Stmt    */
00160                         CIF_Decode_Stmt,                /* Decode_Stmt        */
00161                         CIF_Not_Exact,                  /* Do_Iterative_Stmt  */
00162                         CIF_Not_Exact,                  /* Do_While_Stmt      */
00163                         CIF_Not_Exact,                  /* Do_Infinite_Stmt   */
00164                         CIF_Not_Exact,                  /* Else_Stmt          */
00165                         CIF_Else_If_Stmt,               /* Else_If_Stmt       */
00166                         CIF_Not_Exact,                  /* Else_Where_Stmt    */
00167                         CIF_Encode_Stmt,                /* Encode_Stmt        */
00168                         CIF_Endfile_Stmt,               /* Endfile_Stmt       */
00169                         CIF_Entry_Stmt,                 /* Entry_Stmt         */
00170                         CIF_Exit_Stmt,                  /* Exit_Stmt          */
00171                         CIF_Not_Exact,                  /* Goto_Stmt          */
00172                         CIF_Not_Exact,                  /* If_Cstrct_Stmt     */
00173                         CIF_Not_Exact,                  /* If_Stmt            */
00174                         CIF_Inquire_Stmt,               /* Inquire_Stmt       */
00175                         CIF_Nullify_Stmt,               /* Nullify_Stmt       */
00176                         CIF_Open_Stmt,                  /* Open_Stmt          */
00177                         CIF_Not_Exact,                  /* Outmoded_If_Stmt   */
00178                         CIF_Pause_Stmt,                 /* Pause_Stmt         */
00179                         CIF_Print_Stmt,                 /* Print_Stmt         */
00180                         CIF_Read_Stmt,                  /* Read_Stmt          */
00181                         CIF_Return_Stmt,                /* Return_Stmt        */
00182                         CIF_Rewind_Stmt,                /* Rewind_Stmt        */
00183                         CIF_Select_Case_Stmt,           /* Select_Stmt        */
00184                         CIF_Stop_Stmt,                  /* Stop_Stmt          */
00185                         CIF_Stmt_Type_Error,            /* Then_Stmt          */
00186                         CIF_Not_Exact,                  /* Where_Cstrct_Stmt  */
00187                         CIF_Not_Exact,                  /* Where_Stmt         */
00188                         CIF_Write_Stmt,                 /* Write_Stmt         */
00189                         CIF_Stmt_Type_Error,            /* Type_Init_Stmt     */
00190 
00191                         CIF_Stmt_Type_Error,            /* Label_Def          */
00192                         CIF_Stmt_Type_Error,            /* Construct_Def      */
00193 
00194                         CIF_Stmt_Type_Error,      /* Automatic_Base_Calc_Stmt */
00195                         CIF_Stmt_Type_Error,      /* Automatic_Base_Size_Stmt */
00196 
00197                         CIF_Not_Exact,            /* End_Parallel_Stmt        */
00198                         CIF_Not_Exact,            /* End_Do_Parallel_Stmt     */
00199                         CIF_Not_Exact,            /* End_Parallel_Case_Stmt   */
00200                         CIF_Not_Exact,            /* Parallel_Case_Stmt       */
00201                         CIF_Not_Exact,            /* End_Guard_Stmt           */
00202                         CIF_Not_Exact,            /* Statement_Num_Stmt       */
00203                         CIF_Not_Exact,            /* SGI_Section_Stmt         */
00204                         CIF_Not_Exact,            /* SGI_End_Psection_Stmt    */
00205                         CIF_Not_Exact,            /* SGI_End_Pdo_Stmt         */
00206                         CIF_Not_Exact,            /* SGI_End_Parallel_Stmt    */
00207                         CIF_Not_Exact,       /* SGI_End_Critical_Section_Stmt */
00208                         CIF_Not_Exact,       /* SGI_End_Single_Process_Stmt   */
00209                         CIF_Not_Exact,            /* SGI_Region_End_Stmt      */
00210                         CIF_Not_Exact,       /* Open_MP_Section_Stmt */
00211                         CIF_Not_Exact,       /* Open_MP_End_Parallel_Stmt */
00212                         CIF_Not_Exact,       /* Open_MP_End_Do_Stmt */
00213                         CIF_Not_Exact,  /* Open_MP_End_Parallel_Sections_Stmt */
00214                         CIF_Not_Exact,       /* Open_MP_End_Sections_Stmt */
00215                         CIF_Not_Exact,       /* Open_MP_End_Section_Stmt */
00216                         CIF_Not_Exact,       /* Open_MP_End_Single_Stmt */
00217                         CIF_Not_Exact,       /* Open_MP_End_Parallel_Do_Stmt */
00218                         CIF_Not_Exact,       /* Open_MP_End_Master_Stmt */
00219                         CIF_Not_Exact,       /* Open_MP_End_Critical_Stmt */
00220                         CIF_Not_Exact,       /* Open_MP_End_Ordered_Stmt */
00221 
00222                         CIF_Forall_Stmt,      /* Forall_Stmt */
00223                         CIF_Forall_Construct, /* Forall_Construct_Stmt */
00224                         CIF_End_Forall_Stmt,  /* End_Forall_Stmt    */
00225                         CIF_Not_Exact           /* Else_Where_Mask_Stmt    */
00226                        };
00227 
00228 
00229 /******************************************************************************\
00230 |*                      Globally accessible objects.                          *|
00231 \******************************************************************************/
00232 
00233 /* Get ahold of group_code and msg_sys from messages.h.  Don't make them      */
00234 /* completely global (by putting them in globals.h because only messages.c    */
00235 /* and cif.c need to know about them and msg_sys needs a system include file  */
00236 /* that we don't need to drag in everywhere).                                 */
00237 
00238 extern  char            group_code[];
00239 extern  nl_catd         msg_sys;
00240 
00241 
00242 /* tmp_msg_file_error is in messages.c.                                       */
00243 
00244 extern void     tmp_msg_file_error (void);
00245 
00246 
00247 /* Directive string is declared in main.h */
00248 
00249 extern  char    *directive_str[];
00250 extern  char    *dir_mic_str[];
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines