Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
namelist.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.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/namelist.h   92.1    06/18/99 10:01:44 */
00038 #ifndef _NAMELIST_H                      /* prevent multiple inclusions */
00039 #define _NAMELIST_H
00040 
00041 /*
00042  * Header file describing the Fortran 90 Namelist structure
00043  */
00044 
00045 #include <fortran.h>
00046 #include <cray/dopevec.h>
00047 #include "f90io.h"
00048 
00049 #ifndef NMLIST_VERSION
00050 #define NMLIST_VERSION  1               /* cilist version number */
00051 #endif
00052 
00053 /*
00054  *      A nmlist_scalar describes a scalar namelist group_object_list item.
00055  *      A dopevector is used for an array namelist group_object_list item.
00056  *
00057  *      On some architectures, the fcd is two words.  Therefore, there is
00058  *      a padding word when there is a noncharacter item.
00059  */
00060 
00061 typedef struct nmlist_scalar {
00062     f90_type_t          tinfo;          /* type information for variable */
00063     union {
00064         void            *ptr;           /* pointer to noncharacter item */
00065        _fcd             charptr;        /* Fortran character descriptor */
00066     } scal_addr;
00067 } nmlist_scalar_t;
00068 
00069 /*
00070  *      One nmlist_goli describes one namelist group_object_list_item.
00071  */
00072 typedef struct nmlist_goli {
00073     entrycode_t         valtype :8;     /* type of namelist entry */
00074 #if defined(_UNICOS) || defined(__mips) || defined(_LITTLE_ENDIAN)
00075     unsigned int                :24;    /* pad for first 32 bits        */
00076     unsigned int                :32;    /* pad for second 32-bits       */
00077 #else
00078     unsigned int                :24;    /* unused */
00079 #endif
00080     _fcd                goli_name;      /* Fortran character descriptor for */
00081                                         /* group_object_list_item name. */
00082     union {
00083         struct nmlist_scalar    *ptr;   /* ptr to nmlist_scalar struct */
00084         struct DopeVector       *dv;    /* ptr to dope vector */
00085         struct nmlist_struclist *sptr;  /* ptr to structure namelist table */
00086     } goli_addr;
00087 } nmlist_goli_t;
00088 
00089 /*
00090  *      nmlist_group is the structure of a namelist.   One namelist group
00091  *      is passed with the single call to a compiler-library interface
00092  *      routine.
00093  */
00094 
00095 typedef struct {
00096     unsigned int        version :3;     /* contains NAMELIST_VERSION */
00097 #if defined(_UNICOS) || defined(__mips) || defined(_LITTLE_ENDIAN)
00098     unsigned int                :29;    /* unused */
00099     unsigned int                :16;    /* unused */
00100 #else
00101     unsigned int                :13;    /* unused */
00102 #endif
00103     unsigned int        icount  :16;    /* Number of group_object_list_items */
00104                                         /* in the namelist. */
00105     _fcd                group_name;     /* Fortran character descriptor */
00106                                         /* for namelist group name */
00107     struct nmlist_goli  goli[1];        /* at least one or more */
00108                                         /* group_object_list_items */
00109 } nmlist_group;
00110 
00111 /*
00112  *      A nmlist_struclist describes a structure namelist group_object_list.
00113  *      If the structure is a scalar, then a null pointer is the second
00114  *      word in the structure table.  If the structure is an array, then
00115  *      the address of the dope vector is in the second word.
00116  */
00117 
00118 typedef struct nmlist_struclist {
00119 
00120 #if defined(_UNICOS) || defined(__mips) || defined(_LITTLE_ENDIAN)
00121     unsigned int                  :32;  /* unused */
00122     unsigned int                  :16;  /* unused */
00123 #else
00124     unsigned int                  :16;  /* unused */
00125 #endif
00126     unsigned int        structlen :16;  /* number of entries in structure. */
00127     union {
00128         struct DopeVector   *dv;        /* ptr to dope vector */
00129         void                *v;         /* ptr to byte address */
00130         _f_int              *wa;        /* ptr to word address */
00131     } struc_addr;
00132     struct nmlist_goli  goli[1];        /* group_object_list_items */
00133 } nmlist_struclist_t;
00134 
00135 /*
00136  *      MIN
00137  *              Prevent compiler warnings by removing definitions of MIN
00138  *              previously added by other header files.
00139  */
00140 #undef MIN
00141 #define MIN(a,b)        ((a) < (b) ? (a) : (b))
00142 
00143 
00144 extern int _FRN(ControlListType *cilist, nmlist_group *nmlist, void *stck);
00145 extern int _FWN(ControlListType *cilist, nmlist_group *nmlist, void *stck);
00146 
00147 #endif /* !_NAMELIST_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines