Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
s_io.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/s_io.h 5.1     04/29/99 21:22:31\n" */
00038 
00039 
00040 /****************************\
00041 |* END, ERR, EOR list idxs. *|
00042 \****************************/
00043 
00044 static int              end_list_idx;
00045 static int              err_list_idx;
00046 static int              eor_list_idx;
00047 
00048 static boolean          have_iostat;
00049 
00050 /***********************************************\
00051 |* flag for io stmt loop expansion.            *|
00052 \***********************************************/
00053 
00054 static  int             alt_return_branch_idx;
00055 static  boolean         io_stmt_must_be_split;
00056 static  boolean         three_call_model = FALSE;
00057 
00058 /****************************\
00059 |* global flag for s_io.c   *|
00060 \****************************/
00061 
00062 static boolean          list_directed;
00063 
00064 /****************************************************************\
00065 |* Interface table for IO stmt control list arguments.          *|
00066 \****************************************************************/
00067 
00068 extern  char            io_stmt_str[11][16];
00069 extern  int             arg_idx_tbl[8][26];
00070 extern  ciitem_tbl_type ciitem_tbl[NUM_IO_STMT_TYPES];
00071 
00072 /**************************************************************************\
00073 |* extern to expr_semantics flags.                                        *|
00074 \**************************************************************************/
00075 
00076 extern boolean  namelist_illegal;
00077 
00078 /**************************************************************************\
00079 |* Variables global to s_io.c and p_io.c.                                 *|
00080 \**************************************************************************/
00081 
00082 extern boolean  is_namelist;
00083 extern int      imp_do_var_list;
00084 static int      namelist_descriptor_attr;
00085 
00086 /***************************************************************************\
00087 |* These tables give offsets for solaris open, close, buffer inquire tbls. *|
00088 |* Actually, they are for any platform that uses two word fcd's.           *|
00089 \***************************************************************************/
00090 
00091 enum io_descript_entry  {       Buffer_Desc,
00092                                 Close_Desc,
00093                                 Inquire_Desc,
00094                                 Open_Desc};
00095 
00096 typedef enum io_descript_entry  io_descriptor_type;
00097 
00098 static int descriptor_size_tbl[4] = {8, 6, 42, 23};
00099 
00100 static int offset_tbl[4][26] = {
00101         /* Buffer_Desc */
00102                 {1,     /* int             version;     */
00103                  1,     /* _f_int          *unit;       */
00104                  1,     /* _f_int          *recmode;    */
00105                  2,     /* gfptr_t         bloc;        */
00106                  2,     /* gfptr_t         eloc;        */
00107                  1      /* f90_type_t      *tiptr;      */
00108                 },
00109 
00110         /* Close_Desc */
00111                 {1,     /* int     version;     */
00112                  1,     /* _f_int  *unit;       */
00113                  1,     /* _f_int  *iostat;     */
00114                  1,     /* int     err;         */
00115                  2,     /* _fcd    status;      */
00116                 },
00117 
00118 
00119         /* Inquire_Desc */
00120                 {1,     /* int     version;     */
00121                  1,     /* _f_int  *unit;       */
00122                  2,     /* _fcd    file;        */
00123                  1,     /* _f_int  *iostat;     */
00124                  1,     /* int     err;         */
00125                  1,     /* _f_log  *exist;      */
00126                  1,     /* _f_log  *opened;     */
00127                  1,     /* _f_int  *number;     */
00128                  1,     /* _f_log  *named;      */
00129                  2,     /* _fcd    name;        */
00130                  2,     /* _fcd    access;      */
00131                  2,     /* _fcd    sequential;  */
00132                  2,     /* _fcd    direct;      */
00133                  2,     /* _fcd    form;        */
00134                  2,     /* _fcd    formatted;   */
00135                  2,     /* _fcd    unformatted; */
00136                  1,     /* _f_int  *recl;       */
00137                  1,     /* _f_int  *nextrec;    */
00138                  2,     /* _fcd    blank;       */
00139                  2,     /* _fcd    position;    */
00140                  2,     /* _fcd    action;      */
00141                  2,     /* _fcd    read;        */
00142                  2,     /* _fcd    write;       */
00143                  2,     /* _fcd    readwrite;   */
00144                  2,     /* _fcd    delim;       */
00145                  2      /* _fcd    pad;         */
00146                 },
00147 
00148         /* Open_Desc */
00149                 {1,     /* int     version;     */
00150                  1,     /* _f_int  *unit;       */
00151                  1,     /* _f_int  *iostat;     */
00152                  1,     /* int     err;         */
00153                  2,     /* _fcd    file;        */
00154                  2,     /* _fcd    status;      */
00155                  2,     /* _fcd    access;      */
00156                  2,     /* _fcd    form;        */
00157                  1,     /* _f_int  *recl;       */
00158                  2,     /* _fcd    blank;       */
00159                  2,     /* _fcd    position;    */
00160                  2,     /* _fcd    action;      */
00161                  2,     /* _fcd    delim;       */
00162                  2      /* _fcd    pad;         */
00163                 }};
00164 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines