Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
cif.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 @(#) libcif/cif.h      30.22   08/17/98 09:32:40 */
00038 
00039 
00040 /*
00041  *      Compiler Information File structure declarations, symbolic constants,
00042  *      and prototype definitions.
00043  */
00044 
00045 
00046 /*
00047  * cif version 1 is released with UNICOS 7.0. It supports cif's
00048  * generated from cft77 5.0 and scc 3.0.
00049  * cif version 2 is released with the asynchronous CrayTools 1.0.
00050  * It supports all v1 records and also, new, version 2 records
00051  * generated by cft77 6.0, scc 4.0 and cft90 1.0.
00052  * cif version 3 is released with CrayTools 2.0, supporting F90 2.0
00053  * and CC 2.0
00054  *
00055  * Comments below that talk about v1 and v2 can be extended to include v3
00056  *
00057  *
00058  * Tools using the library my be considered v1 or v2. This is
00059  * identified by setting the constant CIF_VERSION before all
00060  * inclusions of this (cif.h) file. No definition implies a
00061  * version of 1. Tools that request version 2 will only ever
00062  * see version 2 records, the library mapping v1 records to
00063  * the new formats as needed. This is also true for v1 tools,
00064  * they will never see a v2 record.
00065  *
00066  * A number of the records have conditional parts depending on
00067  * the cif version. Use only the version of the records that
00068  * your tool will need. All new tools should adopt the latest
00069  * version, even if they do not need some of the new record fields.
00070  */
00071 
00072 /*
00073  * Note. Fortran refers to both F77 and F90, unless either is
00074  * specifically mentioned
00075  */
00076 
00077 #ifndef _CIF_H
00078 #define _CIF_H
00079 
00080 /* If the user hasn't specified the user version level, set it to 1 */
00081 #ifndef CIF_VERSION
00082 #       define CIF_VERSION 1
00083 #endif
00084 
00085 /* The latest version of CIF information that libcif can handle */
00086 #define _CIF_INT_VERSION 3
00087 
00088 /*
00089  * The sub version number so that a v2 cif application has to link
00090  * with the correct libcif.a that this cif.h matches. See cifopen
00091  * for details.
00092  *
00093  * This number will get increased for every significant change for
00094  * which library and cif.h have to be in sync.
00095  */
00096 #define CIF_SUB_VERSION_2 3
00097 #define CIF_SUB_VERSION_3 1
00098 
00099 /* 1->2 : change of f90_object record to increase atype from 2 to 3 bits
00100  *        at the expense of a previously unused bit. atype has to hold
00101  *        upto the value 4, which it couldn't do before
00102  */
00103 
00104 #if defined(__STDC__) && CIF_VERSION > _CIF_INT_VERSION || CIF_VERSION < 1
00105 #error "Please define CIF_VERSION correctly. If in doubt, use CIF_VERSION 1"
00106 #endif
00107 
00108 
00109 
00110 /* --- interface routine declarations --- */
00111 
00112 #if defined(__STDC__) || defined(__cplusplus)
00113 #       define __(_A) _A
00114 #else
00115 #       define __(_A) ()
00116 #endif
00117 
00118 #if defined(__cplusplus)
00119 #       define CIF_BEGIN_DECLS   extern "C" {
00120 #       define CIF_END_DECLS  };
00121 #else
00122 #       define CIF_BEGIN_DECLS
00123 #       define CIF_END_DECLS
00124 #endif
00125 
00126 extern int Cif_Open __((char *, char *, int *, int));
00127 
00128 /*
00129  * Map Cif_Open call for version 1 cif applications so that we can
00130  * check if a version one compiled application is trying to read
00131  * version 2 cif. An application can only use a cif >= the cif library
00132  * version that it was compiled with
00133  */
00134 
00135 #if CIF_VERSION == 1
00136 #       define Cif_Open Cif_Open_V1
00137 #endif
00138 
00139 /*
00140  * Special open for version 2 applications, allows us to check if they are
00141  * trying to open a cif less than the library thay they were compiled
00142  * with; ie app = v1, trying to open a v2 cif
00143  */
00144 
00145 /*
00146  * V2.1 of cif_open adds an extra argument to the call which is the
00147  * sub-version of this cif.h, that is it allows a check that even though
00148  * cif.h and libcif.a have the same version number, they are actually
00149  * identical. CIF_SUB_VERSION will be bumped when something major
00150  * happens in the cif forcing a re-compile of any tools using it.
00151  * This is a development/install check only...userse should not see it
00152  * if libcif.a and the cif.h used to compile a tool are in sync
00153  *
00154  * cif_open_v2 needs to remain as some alreday compiled codes that use
00155  * cif_open (and are mapped to cif_open_v2 have to stay working
00156  */
00157 
00158 #if CIF_VERSION == 2
00159 #       define Cif_Open(A,B,C,D) \
00160                 Cif_Open_V2_1((A), (B), (C), (D), CIF_SUB_VERSION_2)
00161 #       define Cif_Lines(A,B,C,D, E) \
00162                 Cif_Lines_V2_1((A), (B), (C), (D), (E), CIF_SUB_VERSION_2)
00163 #       define Cif_Cifconv(A,B,C,D, E) \
00164                 Cif_Cifconv_V2_1((A), (B), (C), (D), (E), CIF_SUB_VERSION_2)
00165 #endif
00166 
00167 #if CIF_VERSION == 3
00168 #       define Cif_Open(A,B,C,D) \
00169                 Cif_Open_V3_1((A), (B), (C), (D), CIF_SUB_VERSION_3)
00170 #       define Cif_Lines(A,B,C,D, E) \
00171                 Cif_Lines_V3_1((A), (B), (C), (D), (E), CIF_SUB_VERSION_3)
00172 #       define Cif_Cifconv(A,B,C,D, E) \
00173                 Cif_Cifconv_V3_1((A), (B), (C), (D), (E), CIF_SUB_VERSION_3)
00174 #endif
00175 
00176 
00177 #ifndef FIELD
00178 /* The IBM RS6000 insists on unsigned ints */
00179 #ifdef AIXV3
00180 #define FIELD   unsigned int
00181 #else
00182 #define FIELD   unsigned int
00183 #endif
00184 #endif /* ndef FIELD */
00185 
00186 /* --- record types -- */
00187 #define CIF_CALLSITE            1       /* Call site */
00188 #define CIF_CIFHDR              2       /* CIF header */
00189 #define CIF_COMBLK              3       /* Common block info */
00190 #define CIF_CONST               4       /* Fortran 77 constant info */
00191 
00192 #if CIF_VERSION != 1
00193 #define CIF_CDIR                5       /* simple CDIR$ */
00194 #endif /* CIF_VERSION != 1 */
00195 
00196 #define CIF_ENTRY               6       /* Fortran 77 entry info */
00197 #define CIF_FILE                7       /* File name */
00198 #define CIF_LOOP                8       /* Loop Information */
00199 #define CIF_INCLUDE             9       /* Include structure */
00200 #define CIF_LABEL               10      /* Label info */
00201 #define CIF_MESSAGE             11      /* Fortran message */
00202 #define CIF_NAMELIST            12      /* Namelist */
00203 #define CIF_OBJECT              13      /* Fortran 77 object info */
00204 #define CIF_SRCFILE             14      /* Base level source file info */
00205 #define CIF_SUMMARY             15      /* Summary */
00206 
00207 #if CIF_VERSION != 1
00208 #define CIF_CDIR_DOSHARED       16      /* CDIR$ DOSHARED */
00209 #endif /* CIF_VERSION != 1 */
00210 
00211 #define CIF_UNIT                17      /* Beginning of module */
00212 #define CIF_ENDUNIT             18      /* End of module */
00213 #define CIF_USAGE               19      /* Object usage */
00214 #define CIF_ND_MSG              20      /* Non-default message */
00215 #define CIF_EDOPTS              21      /* Enable/disable compiler options */
00216 #define CIF_MACH_CHAR           22      /* Machine characteristics */
00217 #define CIF_MISC_OPTS           23      /* Miscellaneous compiler options */
00218 #define CIF_OPT_OPTS            24      /* Optimation compiler options */
00219 #define CIF_STMT_TYPE           25      /* Statement type */
00220 
00221 #if CIF_VERSION != 1
00222 #define CIF_GEOMETRY            26      /* geometry info */
00223 #define CIF_CONTINUATION        27      /* continuation line */
00224 #endif /* CIF_VERSION != 1 */
00225 
00226 #if CIF_VERSION != 1                    /* Additions for F90 */
00227 #define CIF_F90_CALLSITE        28      /* F90 Call site */
00228 #define CIF_F90_COMBLK          29      /* F90 Common block info */
00229 #define CIF_F90_CONST           30      /* F90 Constant info */
00230 #define CIF_F90_ENTRY           31      /* F90 Entry info */
00231 #define CIF_F90_LOOP            32      /* F90 Loop info */
00232 #define CIF_F90_DERIVED_TYPE    33      /* F90 derived type */
00233 #define CIF_F90_LABEL           34      /* F90 Label info */
00234 #define CIF_F90_NAMELIST        35      /* F90 Namelist */
00235 #define CIF_F90_OBJECT          36      /* F90 Object info */
00236 #define CIF_F90_MISC_OPTS       37      /* F90 Miscellaneous compiler options */
00237 #define CIF_F90_OPT_OPTS        38      /* F90 Optimation compiler options */
00238 #define CIF_F90_BEGIN_SCOPE     39      /* F90 Begin scope */
00239 #define CIF_F90_END_SCOPE       40      /* F90 End Scope */
00240 #define CIF_F90_SCOPE_INFO      41      /* F90 Scope info */
00241 #define CIF_F90_USE_MODULE      42      /* F90 Use module */
00242 #define CIF_F90_RENAME          43      /* F90 Rename */
00243 #define CIF_F90_INT_BLOCK       44      /* F90 Interface block */
00244 #define CIF_F90_VECTORIZATION   45      /* F90 Vectorization info */
00245 
00246 #define CIF_BE_NODE             46      /* MPP Backend node */
00247 
00248 #if CIF_VERSION >= 2
00249 #define CIF_BE_FID              50      /* MPP Backend fid for V2 */
00250 #endif
00251 
00252 #define CIF_TRANSFORM           47      /* Transformation record */
00253 
00254 #endif /* CIF_VERSION != 1 */
00255 
00256 #define CIF_FILEDIR             48      /* File directory */
00257 #define CIF_UNITDIR             49      /* Unit directory */
00258 #define CIF_C_TAG               51      /* C Tag information */
00259 #define CIF_C_OPTS              52      /* C compiler options */
00260 #define CIF_C_MESSAGE           53      /* C messages */
00261 #define CIF_C_CONST             54      /* C constants */
00262 #define CIF_C_ENTRY             55      /* C entry sites */
00263 #define CIF_C_OBJECT            56      /* C objects */
00264 #if CIF_VERSION == 1
00265 #define CIF_MAXRECORD           57      /* record type array size */
00266 #else
00267 #define CIF_C_LINT_DIRECTIVE    57      /* C lint directive */
00268 #define CIF_C_MACRO_DEF         58      /* C MACRO info */
00269 #define CIF_C_MACRO_UNDEF       59      /* C MACRO UNDEF */
00270 #define CIF_C_MACRO_USAGE       60      /* C MACRO usage */
00271 #define CIF_C_ENTRY_END         61      /* C entry end */
00272 
00273 #if CIF_VERSION == 3
00274 
00275 #define CIF_ORIG_CMD            70      /* Original command line */
00276 
00277 #define CIF_CC_TYPE             80      /* CC type */
00278 #define CIF_CC_ENTRY            81      /* CC entry point */
00279 #define CIF_CC_OBJ              82      /* CC object info */
00280 #define CIF_CC_SUBTYPE          83      /* CC subtype */
00281 #define CIF_CC_ENUM             84      /* CC enum */
00282 #define CIF_CC_EXPR             85      /* CC expression */
00283 
00284 #define CIF_SRC_POS             86      /* Source position */
00285 
00286 #define CIF_MAXRECORD           100     /* record type array size */
00287 #define CIF_MAXRECORD_1         57      /* record type array size for version 1 */
00288 #define CIF_MAXRECORD_2         62      /* record type array size for version 1 */
00289 
00290 #else
00291 
00292 #define CIF_MAXRECORD           62      /* record type array size */
00293 #define CIF_MAXRECORD_1         57      /* record type array size for version 1 */
00294 
00295 #endif /* CIF_VERSION == 3 */
00296 
00297 #endif /* CIF_VERSION == 1 */
00298 
00299 /* --- C basic type --- */
00300 #define CIF_BTC_TYPELESS        0x00    /* typeless */
00301 #define CIF_BTC_SBITFLD         0x01    /* signed bitfield */
00302 #define CIF_BTC_UBITFLD         0x02    /* unsigned bitfield */
00303 #define CIF_BTC_SCHAR           0x03    /* signed char */
00304 #define CIF_BTC_UCHAR           0x04    /* unsigned char */
00305 #define CIF_BTC_SSHORT          0x05    /* signed short */
00306 #define CIF_BTC_USHORT          0x06    /* unsigned short */
00307 #define CIF_BTC_SINT            0x07    /* signed int */
00308 #define CIF_BTC_UINT            0x08    /* unsigned int */
00309 #define CIF_BTC_SLONG           0x09    /* signed long */
00310 #define CIF_BTC_ULONG           0x0a    /* unsigned long */
00311 #define CIF_BTC_FLOAT           0x0b    /* float */
00312 #define CIF_BTC_DOUBLE          0x0c    /* double */
00313 #define CIF_BTC_LDOUBLE         0x0d    /* long double */
00314 #define CIF_BTC_FCOMPLX         0x0e    /* float complex */
00315 #define CIF_BTC_DCOMPLX         0x0f    /* double complex */
00316 #define CIF_BTC_LDCOMPLX        0x10    /* long double complex */
00317 #define CIF_BTC_VOID            0x11    /* void */
00318 #define CIF_BTC_STRUCT          0x12    /* struct */
00319 #define CIF_BTC_UNION           0x13    /* union */
00320 #define CIF_BTC_ENUM            0x14    /* enum */
00321 #define CIF_BTC_UNKNOWN         0xff    /* unknown */
00322 #define CIF_BTC_MAX             32      /* basic type array size */
00323 
00324 /* --- C++ basic types --- */
00325 #define CIF_CCT_INT              1      /* int */
00326 #define CIF_CCT_FLOAT            2      /* float */
00327 #define CIF_CCT_COMPLEX          3      /* complex */
00328 #define CIF_CCT_VOID             4      /* void */
00329 #define CIF_CCT_CLASS            5      /* class */
00330 #define CIF_CCT_STRUCT           6      /* struct */
00331 #define CIF_CCT_UNION            7      /* union */
00332 #define CIF_CCT_TYPEDEF          8      /* typedef */
00333 #define CIF_CCT_QUALIFIED        9      /* qualified */
00334 #define CIF_CCT_ENUM            10      /* enum */
00335 #define CIF_CCT_FUNCTION        11      /* function */
00336 #define CIF_CCT_POINTER         12      /* pointer */
00337 #define CIF_CCT_ARRAY           13      /* array */
00338 #define CIF_CCT_PTRMEM          14      /* pointer to member */
00339 #define CIF_CCT_TEMPAR          15      /* template parameter */
00340 
00341 
00342 /* --- Fortran common block storage types --- */
00343 #define CIF_CB_REG              0       /* regular memory */
00344 #define CIF_CB_TASK             1       /* task common memory */
00345 #define CIF_CB_LOCAL            2       /* Cray-2 local memory */
00346 #define CIF_CB_AUX              3       /* auxiliary memory */
00347 #define CIF_CB_THREAD_PRIVATE   4       /* cb storage type array size */
00348 #define CIF_CB_MAX              5       /* cb storage type array size */
00349 
00350 /* --- Fortran dimension type values --- */
00351 #define CIF_DM_CONSTANT         0       /* constant value */
00352 #define CIF_DM_EXPR             1       /* expression or argument */
00353 #define CIF_DM_ASSUMED          2       /* assumed size */
00354 #define CIF_DM_MAX              3       /* dimension value array size */
00355 
00356 /* --- Fortran 77 data types --- */
00357 #define CIF_DT_UNKNOWN          0       /* unknown type */
00358 #define CIF_DT_TYPELESS         1       /* typeless */
00359 #define CIF_DT_INT32            2       /* integer - 32 bits */
00360 #define CIF_DT_INT46            3       /* integer - 46 bits */
00361 #define CIF_DT_INT64            4       /* integer - 64 bits */
00362 #define CIF_DT_REAL             5       /* normal precision floating point */
00363 #define CIF_DT_DOUBLE           6       /* double precision floatin point */
00364 #define CIF_DT_FCHAR            7       /* Fortran 77 character */
00365 #define CIF_DT_COMPLEX          8       /* complex floating point */
00366 #define CIF_DT_DBLE_CMPLX       9       /* double precision complex f.p. */
00367 #define CIF_DT_FPTR             10      /* Fortran 77 pointer */
00368 #define CIF_DT_LOGICAL          11      /* logical */
00369 #define CIF_DT_FCPTR            12      /* Fortran 77 character pointer */
00370 #define CIF_DT_DERIVED          13      /* Fortran 77 derived type */
00371 #define CIF_DT_MAX              14      /* data type array size */
00372 
00373 
00374 #if CIF_VERSION != 1
00375 
00376 /* --- F90 data types --- */
00377 
00378 /*
00379  * F90 data types can not easily be mapped onto F77 data types
00380  * as most of the basic f77 types have multiple counterparts
00381  * in F90. There is no direct correlation, ie it is machine
00382  * specific, as to whether, eg, REAL_8 or REAL_4 (or REAL_16)
00383  * would represent the same type as F77's REAL. Therefore with
00384  * the following three exceptions, f90 data types have unique
00385  * numbers.
00386  */
00387 
00388 #define CIF_F90_DT_UNKNOWN              0       /* unknown type */
00389 #define CIF_F90_DT_FPTR                 10      /* Cray pointer */
00390 #define CIF_F90_DT_FCPTR                12      /* Cray character pointer */
00391 
00392 #if CIF_VERSION == 2
00393 #define CIF_F90_DT_SHORT_CHAR_CONST     21      /* short character constant */
00394 #define CIF_F90_DT_SHORT_TYPELESS       22      /* short typeless */
00395 #define CIF_F90_DT_LONG_TYPELESS        23      /* long typeless */
00396 #endif
00397 
00398 #define CIF_F90_DT_TYPELESS             22      /* typeless */
00399 
00400 #define CIF_F90_DT_INTEGER_1            24      /* integer kind type parameter 1 */
00401 #define CIF_F90_DT_INTEGER_2            25      /* integer kind type parameter 2 */
00402 #define CIF_F90_DT_INTEGER_4            26      /* integer kind type parameter 4 */
00403 #define CIF_F90_DT_INTEGER_6            27      /* integer kind type parameter 6 */
00404 #define CIF_F90_DT_INTEGER_8            28      /* integer kind type parameter 8 */
00405 #define CIF_F90_DT_REAL_4               29      /* real kind type parameter 4 */
00406 #define CIF_F90_DT_REAL_8               30      /* real kind type parameter 8 */
00407 #define CIF_F90_DT_REAL_16              31      /* real kind type parameter 16 */
00408 #define CIF_F90_DT_COMPLEX_4            32      /* complex kind type parameter 4 */
00409 #define CIF_F90_DT_COMPLEX_8            33      /* complex kind type parameter 8 */
00410 #define CIF_F90_DT_COMPLEX_16           34      /* complex kind type parameter 16 */
00411 #define CIF_F90_DT_LOGICAL_1            36      /* logical kind type 1 */
00412 #define CIF_F90_DT_LOGICAL_2            37      /* logical kind type 2 */
00413 #define CIF_F90_DT_LOGICAL_4            38      /* logical kind type 4 */
00414 #define CIF_F90_DT_LOGICAL_8            39      /* logical kind type 8 */
00415 #define CIF_F90_DT_CHARACTER_1          40      /* character kind type 1 */
00416 #define CIF_F90_DT_CHARACTER_2          41      /* character kind type 2 */
00417 #define CIF_F90_DT_CHARACTER_4          42      /* character kind type 4 */
00418 #define CIF_F90_DT_MAX                  43      /* f90 data type array size */
00419 
00420 #endif /* CIF_VERSION != 1 */
00421 
00422 
00423 
00424 /* --- Fortran 77 enable/disable option masks --- */
00425 #define CIF_EDF_OPTa            0x00000001
00426 #define CIF_EDF_OPTc            0x00000002
00427 #define CIF_EDF_OPTd            0x00000004
00428 #define CIF_EDF_OPTf            0x00000008
00429 #define CIF_EDF_OPTg            0x00000010
00430 #define CIF_EDF_OPTh            0x00000020
00431 #define CIF_EDF_OPTi            0x00000040
00432 #define CIF_EDF_OPTj            0x00000080
00433 #define CIF_EDF_OPTm            0x00000100
00434 #define CIF_EDF_OPTn            0x00000200
00435 #define CIF_EDF_OPTo            0x00000400
00436 #define CIF_EDF_OPTp            0x00000800
00437 #define CIF_EDF_OPTq            0x00001000
00438 #define CIF_EDF_OPTr            0x00002000
00439 #define CIF_EDF_OPTs            0x00004000
00440 #define CIF_EDF_OPTu            0x00008000
00441 #define CIF_EDF_OPTv            0x00010000
00442 #define CIF_EDF_OPTw            0x00020000
00443 #define CIF_EDF_OPTx            0x00040000
00444 #define CIF_EDF_OPTz            0x00080000
00445 #define CIF_EDF_OPTB            0x00100000
00446 #define CIF_EDF_OPTP            0x00200000
00447 #define CIF_EDF_OPTS            0x00400000
00448 
00449 #if CIF_VERSION != 1
00450 #define CIF_EDF_OPTt            0x00800000  /* reorganize transformations */
00451 #endif /* CIF_VERSION != 1 */
00452 
00453 
00454 #if CIF_VERSION != 1
00455 
00456 /* --- F90 enable/disable option masks --- */
00457 #define CIF_F90_EDF_OPTa                0x00000001
00458 #define CIF_F90_EDF_OPTd                0x00000002
00459 #define CIF_F90_EDF_OPTf                0x00000004
00460 #define CIF_F90_EDF_OPTi                0x00000008
00461 #define CIF_F90_EDF_OPTj                0x00000010
00462 #define CIF_F90_EDF_OPTn                0x00000020
00463 #define CIF_F90_EDF_OPTp                0x00000040
00464 #define CIF_F90_EDF_OPTq                0x00000080
00465 #define CIF_F90_EDF_OPTr                0x00000100
00466 #define CIF_F90_EDF_OPTt                0x00020000
00467 #define CIF_F90_EDF_OPTu                0x00000200
00468 #define CIF_F90_EDF_OPTv                0x00000400
00469 #define CIF_F90_EDF_OPTz                0x00000800
00470 #define CIF_F90_EDF_OPTB                0x00001000
00471 #define CIF_F90_EDF_OPTP                0x00002000
00472 #define CIF_F90_EDF_OPTS                0x00004000
00473 #define CIF_F90_EDF_OPTA                0x00008000
00474 #define CIF_F90_EDF_OPTX                0x00010000
00475 
00476 
00477 /* --- Distribution codes --- */
00478 #define CIF_DN_NA               0       /* not applicable */
00479 #define CIF_DN_PE_PRIVATE       1       /* PE_PRIVATE */
00480 #define CIF_DN_SHARED_CAN       2       /* shared canonical */
00481 #define CIF_DN_SHARED_DIM       3       /* shared dimensional */
00482 #define CIF_DN_UNKNOWN          4       /* unknown */
00483 #define CIF_DN_UNKNOWN_SHARED   5       /* unknown shared */
00484 
00485 /* --- cdir types --- */
00486 #define CIF_CD_MASTER           0
00487 #define CIF_CD_END_MASTER       1
00488 #define CIF_CD_BARRIER          2
00489 #define CIF_CD_NO_BARRIER       3
00490 #define CIF_CD_CRITICAL         4
00491 #define CIF_CD_END_CRITICAL     5
00492 #define CIF_CD_SHARED_IO        6
00493 #define CIF_CD_ATOMIC_UPDATE    7
00494 #define CIF_CD_LIST             8
00495 #define CIF_CD_NOLIST           9
00496 #define CIF_CD_EJECT            10
00497 
00498 /* --- cdir_doshared types --- */
00499 #define CIF_DO_ALIGNED          0
00500 #define CIF_DO_UNIFORM          1
00501 #define CIF_DO_CHUNKSIZE        2
00502 #define CIF_DO_NUMCHUNKS        3
00503 #define CIF_DO_GUIDED           4
00504 
00505 #endif /* CIF_VERSION != 1 */
00506 
00507 
00508 /* --- C symbol entity types --- */
00509 #define CIF_ENC_OBJECT          0       /* object */
00510 #define CIF_ENC_FORMARG         2       /* formal argument */
00511 #define CIF_ENC_TYPEDEF         3       /* typedef */
00512 #define CIF_ENC_ENUMMEM         4       /* enum member */
00513 
00514 #if CIF_VERSION == 1
00515 
00516 #define CIF_ENC_TAG             10      /* tag */
00517 #define CIF_ENC_MEMBER          11      /* structure/union member */
00518 #define CIF_ENC_STRLIT          12      /* string literal */
00519 #define CIF_ENC_MAX             13      /* entity type array size */
00520 
00521 #else
00522 
00523 #define CIF_ENC_TAG             9       /* tag */
00524 #define CIF_ENC_MEMBER          10      /* structure/union member */
00525 #define CIF_ENC_STRLIT          11      /* string literal */
00526 #define CIF_ENC_MAX             12      /* entity type array size */
00527 
00528 #endif
00529 
00530 /* --- Fortran 77 entry types --- */
00531 #define CIF_ET_ALT_ENTRY        1       /* alternate entry point */
00532 #define CIF_ET_BLOCKDATA        2       /* block data */
00533 #define CIF_ET_FUNCTION         3       /* function */
00534 #define CIF_ET_PROGRAM          4       /* main program */
00535 #define CIF_ET_SUBROUTINE       5       /* subroutine */
00536 #define CIF_ET_UNKNOWN          6       /* unknown */
00537 #define CIF_ET_MAX              7       /* entry type array size */
00538 
00539 #if CIF_VERSION != 1
00540 /* --- F90 entry types --- */
00541 #define CIF_F90_ET_ERROR        0       /* error status, should not occur */
00542 #define CIF_F90_ET_ALT_ENTRY    1       /* alternate entry point */
00543 #define CIF_F90_ET_BLOCKDATA    2       /* block data */
00544 #define CIF_F90_ET_FUNCTION     3       /* function */
00545 #define CIF_F90_ET_PROGRAM      4       /* main program */
00546 #define CIF_F90_ET_SUBROUTINE   5       /* subroutine */
00547 #define CIF_F90_ET_UNKNOWN      6       /* unknown */
00548 #define CIF_F90_ET_MODULE       7       /* module */
00549 #define CIF_F90_ET_STMT         8       /* statement function */
00550 #define CIF_F90_ET_MAX          9       /* entry type array size */
00551 
00552 
00553 /* --- F90 sub-entry codes --- */
00554 #define CIF_F90_PT_UNKNOWN      0       /* unknown */
00555 #define CIF_F90_PT_EXTERNAL     1       /* external */
00556 #define CIF_F90_PT_INTRINSIC    2       /* intrinsic */
00557 #define CIF_F90_PT_DUMMY        3       /* dummy */
00558 #define CIF_F90_PT_INTERNAL     4       /* internal */
00559 #define CIF_F90_PT_IMPORTED     5       /* imported */
00560 #define CIF_F90_PT_MODULE       6       /* module */
00561 #define CIF_F90_PT_MAX          7       /* f90 sub-entry type array size */
00562 
00563 
00564 /* --- Fortran 90 array types --- */
00565 #define CIF_AT_EXPLICIT         1       /* explicit array shape */
00566 #define CIF_AT_ASSUMED_SIZE     2       /* assumed size */
00567 #define CIF_AT_DEFERRED         3       /* deferred array shape */
00568 #define CIF_AT_ASSUMED          4       /* assumed array shape */
00569 
00570 #endif /* CIF_VERSION != 1 */
00571 
00572 
00573 /* --- file format indicators --- */
00574 #define CIF_FORM_RANDOM         0       /* random record order format file */
00575 #define CIF_FORM_SORTED         1       /* sort record order format file */
00576 
00577 /* --- binary file format indicators --- */
00578 #define CIF_FORM_CIFCONV        0       /* cif has been cifconv'd */
00579 #define CIF_FORM_LINES          1       /* cif has been lines'd */
00580 #define CIF_FORM_USER           2       /* cif has been written by user code */
00581 
00582 
00583 /* --- contiguous id value indicators --- */
00584 #define CIF_ID_NONCONTIG        0       /* id values aren't contiguous */
00585 #define CIF_ID_CONTIGUOUS       1       /* id values are contiguous */
00586 
00587 /* --- label types --- */
00588 #define CIF_LB_FORMAT           1       /* format label */
00589 #define CIF_LB_STMT             2       /* statement label */
00590 #define CIF_LB_UNKNOWN          3       /* unknown */
00591 #define CIF_LB_CONSTRUCT        4       /* F90 construct name */
00592 #define CIF_LB_MAX              5       /* label type array size */
00593 
00594 /* --- language types --- */
00595 #define CIF_LG_F77              0       /* Fortran 77 */
00596 #define CIF_LG_F90              1       /* Fortran 90 */
00597 #define CIF_LG_C                2       /* C */
00598 
00599 #if CIF_VERSION < 3
00600 #define CIF_LG_MAX              3       /* label type array size */
00601 
00602 #else
00603 
00604 #define CIF_LG_CC               3       /* C++ */
00605 #define CIF_LG_MAX              4       /* label type array size */
00606 #endif
00607 
00608 /* --- loop types --- */
00609 #define CIF_LP_DO               0       /* do loop */
00610 #define CIF_LP_DOWHILE          1       /* do_while loop */
00611 #define CIF_LP_WHILE            2       /* while loop */
00612 #define CIF_LP_FOR              3       /* for loop */
00613 #define CIF_LP_DO_INFINITE      4       /* infinit do loop : F90 only */
00614 #define CIF_LP_MAX              5       /* loop array size */
00615 
00616 /* --- memory mode types --- */
00617 #define CIF_MEM_DEFAULT         0       /* default (unselected) mode */
00618 #define CIF_MEM_INDIV           1       /* individually malloc'd structures */
00619 #define CIF_MEM_FIXED           2       /* fixed reused buffer */
00620 #define CIF_MEM_MANAGED         3       /* space alloc'd from managed area */
00621 #define CIF_MEM_MAX             4       /* managed memory array size */
00622 
00623 #define CIF_MEM_KEEP            0       /* retain memory for cif buffers */
00624 #define CIF_MEM_FREE            1       /* return cif buffer mem to system */
00625 
00626 
00627 /* F90 file format types */
00628 #define CIF_F90_FORM_FIXED      0       /* Fixed format source code */
00629 #define CIF_F90_FORM_FREE       1       /* Free format source code */
00630 
00631 /* --- machine characteristic values mask --- */
00632 #define CIF_MC_VPOP             0x0001  /* CRAY X-MP/Y-MP */
00633 #define CIF_MC_EMA              0x0002
00634 #define CIF_MC_CIGS             0x0004
00635 #define CIF_MC_PCF              0x0008
00636 #define CIF_MC_READVL           0x0010
00637 #define CIF_MC_VRECUR           0x0020
00638 #define CIF_MC_NOVRECUR         0x0040
00639 #define CIF_MC_AVL              0x0080
00640 #define CIF_MC_HPF              0x0100
00641 #define CIF_MC_BDM              0x0200
00642 #define CIF_MC_SREG             0x0400
00643 #define CIF_MC_CLUSTER          0x0800
00644 #define CIF_MC_COR              0x1000
00645 #define CIF_MC_ADDR32           0x2000
00646 #define CIF_MC_BMM              0x4000
00647 #define CIF_MC_XEA              0x8000
00648 
00649 #define CIF_MC_AVPOP            0x10000
00650 #define CIF_MC_FULLSECT         0x20000
00651 #define CIF_MC_IEEE             0x40000
00652 #define CIF_MC_CMRREQ           0x80000
00653 #define CIF_MC_CACHE            0x100000
00654 
00655 #if CIF_VERSION == 1
00656 
00657 #define CIF_MC_TAILGT           0x0001  /* CRAY-2 */
00658 #define CIF_MC_SHAREDREG        0x0002
00659 #define CIF_MC_MEMQUIET         0x0004
00660 
00661 #else
00662 
00663 #define CIF_MC_TAILGT_1         0x0001 /* old tailgate value ie from v1 */
00664 
00665 #define CIF_MC_FAR              0x0001  /* CRAY-2 */
00666 #define CIF_MC_TAILGT           0x0002
00667 #define CIF_MC_CMR              0x0004
00668 
00669 
00670 /* Mask to remove bits not provided in v1, but are in v2 */
00671 #define CIF_MC_MASK (~(CIF_MC_PCF & \
00672                        CIF_MC_NOVRECUR & \
00673                        CIF_MC_HPF & \
00674                        CIF_MC_SREG & \
00675                        CIF_MC_CLUSTER & \
00676                        CIF_MC_COR & \
00677                        CIF_MC_ADDR32 & \
00678                        CIF_MC_BMM))
00679 
00680 #endif /* CIF_VERSION != 1 */
00681 
00682 /* --- Fortran miscellaneous options values --- */
00683 #define CIF_MISCF_STACK         0       /* stack allocation */
00684 #define CIF_MISCF_STATIC        1       /* static allocation */
00685 #define CIF_MISCF_HEAP          2       /* Heap allocation */
00686 
00687 #define CIF_MISCF_INT64         0       /* integer length = 64 bits */
00688 #define CIF_MISCF_INT46         1       /* integer length = 46 bits */
00689 
00690 #define CIF_MISCF_UNKNOWN       0       /* unknown addressing mode */
00691 #define CIF_MISCF_FAST          1       /* fast addressing mode */
00692 #define CIF_MISCF_FULL          2       /* full addressing mode */
00693 #define CIF_MISCF_SREG          3       /* S register addressing mode */
00694 
00695 /* --- C message severity codes --- */
00696 #define CIF_MS_COMMENT           0      /* comment */
00697 #define CIF_MS_NOTE              1      /* note */
00698 #define CIF_MS_CAUTION           2      /* caution */
00699 #define CIF_MS_WARNING           3      /* warning */
00700 #define CIF_MS_ERROR             4      /* error */
00701 #define CIF_MS_INTERNAL          5      /* internal */
00702 #define CIF_MS_VECTOR            6      /* vector */
00703 #define CIF_MS_SCALAR            7      /* scalar */
00704 #define CIF_MS_TABLE             8      /* table */
00705 #define CIF_MS_ANSI              9      /* ansi */
00706 #define CIF_MS_LOGFILE          10      /* logfile */
00707 #define CIF_MS_INLINE           11      /* inline */
00708 #define CIF_MS_INFO             12      /* info */
00709 #define CIF_MS_TASKING          13      /* tasking */
00710 #define CIF_MS_LIMIT            14      /* limit */
00711 #define CIF_MS_LOGERROR         15      /* logfile error */
00712 #define CIF_MS_LOGSUM           16      /* logfile summary */
00713 #define CIF_MS_F77_ANSI         17      /* f77 ansi */
00714 #define CIF_MS_OPTIMIZATION     18      /* General optimization */
00715 #define CIF_MS_STREAM           19      /* Multi-streaming */
00716 #define CIF_MS_UNKNOWN          20      /* unknown */
00717 #define CIF_MS_MAX              21      /* C message severity array size */
00718 
00719 #if CIF_VERSION != 1
00720 /* --- C message message codes --- */
00721 #define CIF_MS_CODE_NORMAL      0       /* normal processing */
00722 #define CIF_MS_CODE_ARGSUSED    1       /* suppressed via ARGSUSED directive */
00723 #define CIF_MS_CODE_EMPTY       2       /* suppressed via EMPTY directive */
00724 #define CIF_MS_CODE_FALLTHROUGH 3       /* suppressed via FALLTHROUGH directive */
00725 #define CIF_MS_CODE_NOTREACHED  4       /* suppressed via NOTREACHED directive */
00726 #endif /* CIF_VERSION != 1 */
00727 
00728 
00729 /* --- Fortran message severity codes --- */
00730 #define CIF_F_MS_COMMENT         0      /* comment */
00731 #define CIF_F_MS_NOTE            1      /* note */
00732 #define CIF_F_MS_CAUTION         2      /* caution */
00733 #define CIF_F_MS_WARNING         3      /* warning */
00734 #define CIF_F_MS_ERROR           4      /* error */
00735 #define CIF_F_MS_INTERNAL        5      /* internal */
00736 #define CIF_F_MS_VECTOR          6      /* vector */
00737 #define CIF_F_MS_SCALAR          7      /* scalar */
00738 #define CIF_F_MS_OPT_INFO        7      /* optimisation information=old name */
00739 #define CIF_F_MS_TABLE           8      /* table */
00740 #define CIF_F_MS_ANSI            9      /* ansi */
00741 #define CIF_F_MS_LOGFILE        10      /* logfile */
00742 #define CIF_F_MS_INLINE         11      /* inline */
00743 #define CIF_F_MS_INFO           12      /* info */
00744 #define CIF_F_MS_TASKING        13      /* tasking */
00745 #define CIF_F_MS_LIMIT          14      /* limit */
00746 #define CIF_F_MS_LOGERROR       15      /* logfile error */
00747 #define CIF_F_MS_LOGSUM         16      /* logfile summary */
00748 #define CIF_F_MS_F77_ANSI       17      /* f77 ansi */
00749 #define CIF_F_MS_OPTIMIZATION   18      /* General optimization */
00750 #define CIF_F_MS_STREAM         19      /* Multi-streaming */
00751 #define CIF_F_MS_UNKNOWN        20      /* unknown */
00752 #define CIF_F_MS_MAX            21      /* Fortran message severity array size */
00753 
00754 /* --- C object usage codes --- */
00755 #define CIF_OBC_DEFINED         0x001   /* defined */
00756 #define CIF_OBC_DECLARED        0x002   /* declared */
00757 #define CIF_OBC_REFERENCED      0x004   /* referenced */
00758 #define CIF_OBC_MODIFIED        0x008   /* modified */
00759 #define CIF_OBC_ADDRESS         0x010   /* address taken */
00760 #define CIF_OBC_ARGLIST         0x020   /* appeared in function arg list */
00761 #define CIF_OBC_USEDDECL        0x040   /* used in declaration */
00762 #define CIF_OBC_USEDCAST        0x080   /* used in cast */
00763 #define CIF_OBC_USEDFUNC        0x100   /* used in function call */
00764 #define CIF_OBC_MACROEXP        0x200   /* a product of a macro expansion */
00765 #define CIF_OBC_MAX             9       /* object usage code array size */
00766 
00767 /* --- Fortran 77 object usage codes --- */
00768 #define CIF_OB_DEFINED          0       /* defined or declared */
00769 #define CIF_OB_USED             1       /* symbol is referenced */
00770 #define CIF_OB_MODIFIED         2       /* symbol's value is modified */
00771 #define CIF_OB_ARGLIST          3       /* named in argument list */
00772 #define CIF_OB_ASSIGN           4       /* label assign reference */
00773 #define CIF_OB_BRANCH           5       /* label branch reference */
00774 #define CIF_OB_FORMAT           6       /* label format reference */
00775 #define CIF_OB_DO               7       /* label do reference */
00776 #define CIF_OB_TYPEDEF          8       /* type is defined */
00777 #define CIF_OB_TYPEUSED         9       /* type appears in a declaration */
00778 #define CIF_OB_MAX              10      /* object usage array size */
00779 
00780 #if CIF_VERSION != 1
00781 
00782 /* --- F90 object usage codes --- */
00783 #define CIF_F90_OB_DEFINED      0       /* defined or declared */
00784 #define CIF_F90_OB_USED         1       /* symbol is referenced */
00785 #define CIF_F90_OB_MODIFIED     2       /* symbol's value is modified */
00786 #define CIF_F90_OB_ARGLIST      3       /* named in argument list */
00787 #define CIF_F90_OB_ASSIGN       4       /* label assign reference */
00788 #define CIF_F90_OB_BRANCH       5       /* label branch reference */
00789 #define CIF_F90_OB_FORMAT       6       /* label format reference */
00790 #define CIF_F90_OB_DO           7       /* label do reference */
00791 #define CIF_F90_OB_TYPEDEF      8       /* type is defined */
00792 #define CIF_F90_OB_TYPEUSED     9       /* type appears in a declaration */
00793 #define CIF_F90_OB_NAME         10      /* construct name */
00794 #define CIF_F90_OB_DUMMY        11      /* dummy argument */
00795 #define CIF_F90_OB_OPER_ARG     12      /* actual argument to an operator
00796                                          * function or assignment subroutine */
00797 #define CIF_F90_OB_IND_MOD      13      /* Indirect reference to module, from
00798                                          * nested use stmts */
00799 #define CIF_F90_OB_MODIFIED_ASN 14      /* modified as an actual argument to
00800                                          * an assignment subroutine, only
00801                                          * set by cif_lines */
00802 #define CIF_F90_OB_MAX          15      /* f90 object usage array size */
00803 
00804 
00805 /* --- Fortran run-time checking flags --- */
00806 #define CIF_RT_C                0x0001
00807 #define CIF_RT_E                0x0002
00808 #define CIF_RT_a                0x0004
00809 #define CIF_RT_b                0x0008
00810 #define CIF_RT_c                0x0010
00811 
00812 /* --- Cif options specified --- */
00813 #define CIF_CO_A                0x0001  /* option a */
00814 #define CIF_CO_C                0x0002  /* option c */
00815 #define CIF_CO_F                0x0004  /* option f */
00816 #define CIF_CO_I                0x0008  /* option i */
00817 #define CIF_CO_M                0x0010  /* option m */
00818 #define CIF_CO_O                0x0020  /* option o */
00819 #define CIF_CO_S                0x0040  /* option s */
00820 #define CIF_CO_X                0x0080  /* option x */
00821 
00822 #endif /* CIF_VERSION != 1 */
00823 
00824 /* --- Fortran optimization option masks --- */
00825 #define CIF_OOF_AGGRESS         0x00000001
00826 #define CIF_OOF_BLOAD           0x00000002
00827 #define CIF_OOF_INLINE          0x00000004
00828 #define CIF_OOF_LOOPALIGN       0x00000008
00829 #define CIF_OOF_RECURRENCE      0x00000010
00830 #define CIF_OOF_RECURSIVE       0x00000020
00831 #define CIF_OOF_SCALAR          0x00000040
00832 #define CIF_OOF_VECTOR          0x00000080
00833 #define CIF_OOF_VSEARCH         0x00000100
00834 #define CIF_OOF_ZEROINC         0x00000200
00835 #define CIF_OOF_KERNSCHED       0x00000400
00836 #if CIF_VERSION != 1
00837 #define CIF_OOF_TASK            0x00000800
00838 #define CIF_OOF_GENERAL         0x00001000
00839 #define CIF_OOF_OVERINDEX       0x00002000
00840 #define CIF_OOF_PATTERN         0x00004000
00841 #endif /* CIF_VERSION != 1 */
00842 
00843 
00844 /* --- Fortran 77 symbol classes --- */
00845 #define CIF_SC_COMMON           1       /* variable in common */
00846 #define CIF_SC_EXPR             2       /* expression */
00847 #define CIF_SC_UNKNOWN          3       /* unknown */
00848 #define CIF_SC_VARIABLE         4       /* local variable */
00849 #define CIF_SC_FIELD            5       /* field of aggregate */
00850 #define CIF_SC_EQUIV            6       /* local variable equiv'd to common */
00851 #define CIF_SC_MAX              7       /* symbol class array size */
00852 
00853 #if CIF_VERSION != 1
00854 
00855 /* --- F90 symbol classes --- */
00856 
00857 /*
00858  * Note, 0 through 6 are identical to the f77 CIF_SC_?? defines
00859  * and may be used interchangably; 7 though 9 represent F90 extensions.
00860  */
00861 
00862 #define CIF_F90_SC_ERROR        0       /* error */
00863 #define CIF_F90_SC_COMMON       1       /* variable in common */
00864 #define CIF_F90_SC_EXPR         2       /* expression */
00865 #define CIF_F90_SC_UNKNOWN      3       /* unknown */
00866 #define CIF_F90_SC_VARIABLE     4       /* variable */
00867 #define CIF_F90_SC_STRUCT       5       /* structure component */
00868 #define CIF_F90_SC_EQUIV        6       /* local variable equiv'd to common */
00869 #define CIF_F90_SC_MODULE       7       /* module variable */
00870 #define CIF_F90_SC_NAMED_CONST  8       /* named constant */
00871 #define CIF_F90_SC_FUNC_RESULT  9       /* function result */
00872 #define CIF_F90_SC_MX           10      /* f90 symbol class array size */
00873 
00874 #endif /* CIF_VERSION != 1 */
00875 
00876 /* --- C symbol classes --- */
00877 #define CIF_SCC_EXTERN          0       /* extern */
00878 #define CIF_SCC_STATIC          1       /* static */
00879 #define CIF_SCC_AUTO            2       /* auto */
00880 #define CIF_SCC_REGISTER        3       /* register */
00881 #define CIF_SCC_FORTRAN         4       /* fortran */
00882 #define CIF_SCC_STRMEM          6       /* structure member */
00883 #define CIF_SCC_UNMEM           7       /* union member */
00884 #define CIF_SCC_ENUMMEM         8       /* enum member */
00885 #define CIF_SCC_STRBITFLD       12      /* structure bit field */
00886 #define CIF_SCC_UNBITFLD        13      /* union bit field */
00887 #define CIF_SCC_USRLAB          14      /* user label */
00888 #define CIF_SCC_GLBREG          16      /* global B register */
00889 #define CIF_SCC_GLTREG          17      /* global T register */
00890 #define CIF_SCC_EXTLM           18      /* external local memory */
00891 #define CIF_SCC_MAX             19      /* storage class array size */
00892 
00893 
00894 /* --- Fortran 77 storage type --- */
00895 #define CIF_ST_AUXILIARY        1       /* assigned to auxiliary memory */
00896 #define CIF_ST_BASED            2       /* based */
00897 #define CIF_ST_DUMARG           3       /* formal argument */
00898 #define CIF_ST_POINTEE          4       /* accessed via pointer */
00899 #define CIF_ST_STACK            5       /* assigned to the stack */
00900 #define CIF_ST_STATIC           6       /* assigned to regular memory */
00901 #define CIF_ST_UNKNOWN          7       /* storage class unknown */
00902 #if CIF_VERSION == 1
00903 #define CIF_ST_MAX              8       /* storage class array size */
00904 #else
00905 #define CIF_ST_BSS              6       /* assigned to static BSS */
00906 #define CIF_ST_DATA             8       /* assigned to static DATA */
00907 #define CIF_ST_MAX              9       /* storage class array size */
00908 #endif
00909 
00910 #if CIF_VERSION != 1
00911 
00912 /* --- F90 storage types --- */
00913 #define CIF_F90_ST_ERROR        0       /* error */
00914 #define CIF_F90_ST_AUXILIARY    1       /* assigned to auxiliary memory */
00915 #define CIF_F90_ST_BASED        2       /* based */
00916 #define CIF_F90_ST_DUMMY        3       /* dummy argument */
00917 #define CIF_F90_ST_POINTEE      4       /* Cray pointee */
00918 #define CIF_F90_ST_STACK        5       /* stack (aka "automatic") */
00919 #define CIF_F90_ST_STATIC       6       /* static (aka @BSS) */
00920 #define CIF_F90_ST_BSS          6       /* @BSS */
00921 #define CIF_F90_ST_NO_STORAGE   7       /* no storage */
00922 #define CIF_F90_ST_DATA         8       /* DATA, not used by F90 */
00923 #define CIF_F90_ST_COMMON       9       /* common block */
00924 #define CIF_F90_ST_MAX          10      /* f90 storage types array size */
00925 
00926 /* --- C++ storage types --- */
00927 #define CIF_CC_ST_ERROR         0       /* error */
00928 #define CIF_CC_ST_STATIC        1       /* static */
00929 #define CIF_CC_ST_AUTO          2       /* auto */
00930 #define CIF_CC_ST_REGISTER      3       /* register */
00931 #define CIF_CC_ST_GLB_B_REG     4       /* global B register */
00932 #define CIF_CC_ST_GLB_T_REG     5       /* global T register */
00933 #define CIF_CC_ST_TSK_COMMON    6       /* taskcommon */
00934 #define CIF_CC_ST_SOFT          7       /* soft (pragma soft) */
00935 #define CIF_CC_ST_TSK_PRIVATE   8       /* taskprivate */
00936 
00937 /* --- C++ symbol class --- */
00938 #define CIF_CC_SC_ERROR         0       /* error */
00939 #define CIF_CC_SC_VARIABLE      1       /* variable */
00940 #define CIF_CC_SC_FORMAL_PARAM  2       /* formal parameter */
00941 #define CIF_CC_SC_MEMBER_VAR    3       /* member variable */
00942 
00943 
00944 
00945 #endif /* CIF_VERSION != 1 */
00946 
00947 /* --- C type modifiers --- */
00948 #define CIF_TMC_UNUSED          0x0     /* unused */
00949 #define CIF_TMC_ARRAY           0x1     /* array of */
00950 #define CIF_TMC_FUNCNOPR        0x2     /* function returning, no prototype */
00951 #define CIF_TMC_FUNCPRO         0x3     /* function returning, prototype */
00952 #define CIF_TMC_PTR             0x8     /* pointer to */
00953 #define CIF_TMC_CONPTR          0x9     /* const pointer to */
00954 #define CIF_TMC_VOLPTR          0xa     /* volatile pointer to */
00955 #define CIF_TMC_CNVLPTR         0xb     /* const volatile pointer to */
00956 #define CIF_TMC_RESPTR          0xc     /* restrict pointer to */
00957 #define CIF_TMC_RSCNPTR         0xd     /* restrict const pointer to */
00958 #define CIF_TMC_RSVLPTR         0xe     /* restrict volatile pointer to */
00959 #define CIF_TMC_RSCNVLPTR       0xf     /* restrict const volatile ptr to */
00960 #define CIF_TMC_MAX             16      /* type modifiers array size */
00961 
00962 
00963 #if CIF_VERSION != 1
00964 /* --- C undimensioned (variable length) array indicator --- */
00965 #define CIF_TMC_UNDIMENSIONED   0
00966 #endif /* CIF_VERSION != 1 */
00967 
00968 
00969 /* --- Fortran 77 statement types --- */
00970 #define CIF_TP_ALLOCATABLE      0
00971 #define CIF_TP_ALLOCATE         1
00972 #define CIF_TP_ASSIGN           2
00973 #define CIF_TP_ASSIGNMENT       3
00974 #define CIF_TP_BACKSPACE        4
00975 #define CIF_TP_BDATA            5
00976 #define CIF_TP_BUFFER           6
00977 #define CIF_TP_CALL             7
00978 #define CIF_TP_CASE             8
00979 #define CIF_TP_CLOSE            9
00980 #define CIF_TP_COMMON           10
00981 #define CIF_TP_CONTAINS         11
00982 #define CIF_TP_CONTINUE         12
00983 #define CIF_TP_CYCLE            13
00984 #define CIF_TP_DATA             14
00985 #define CIF_TP_DEALLOCATE       15
00986 #define CIF_TP_DECODE           16
00987 #define CIF_TP_DEFAULT          17
00988 #define CIF_TP_DERIVED_TYPE     18
00989 #define CIF_TP_DIMENSION        19
00990 #define CIF_TP_DIRECTIVE        20
00991 #define CIF_TP_LABELED_DO       21
00992 #define CIF_TP_UNLABELED_DO     22
00993 #define CIF_TP_ELSE             23
00994 #define CIF_TP_ELSEIF           24
00995 #define CIF_TP_ELSEWHERE        25
00996 #define CIF_TP_ENCODE           26
00997 #define CIF_TP_END              27
00998 #define CIF_TP_ENDFILE          28
00999 #define CIF_TP_ENTRY            29
01000 #define CIF_TP_EQUIVALENCE      30
01001 #define CIF_TP_EXIT             31
01002 #define CIF_TP_EXTERNAL         32
01003 #define CIF_TP_FORMAT           33
01004 #define CIF_TP_FUNCTION         34
01005 #define CIF_TP_GOTO             35
01006 #define CIF_TP_IF               36
01007 #define CIF_TP_IFTHEN           37
01008 #define CIF_TP_IMPLICIT         38
01009 #define CIF_TP_IMPNONE          39
01010 #define CIF_TP_INQUIRE          40
01011 #define CIF_TP_INTENT           41
01012 #define CIF_TP_INTERFACE        42
01013 #define CIF_TP_INTRINSIC        43
01014 #define CIF_TP_MODULE           44
01015 #define CIF_TP_MODULE_PROC      45
01016 #define CIF_TP_NAMELIST         46
01017 #define CIF_TP_NULLIFY          47
01018 #define CIF_TP_OPEN             48
01019 #define CIF_TP_OPTIONAL         49
01020 #define CIF_TP_PARAMETER        50
01021 #define CIF_TP_PAUSE            51
01022 #define CIF_TP_POINTER          52
01023 #define CIF_TP_PRINT            53
01024 #define CIF_TP_PRIVATE          54
01025 #define CIF_TP_PROGRAM          55
01026 #define CIF_TP_PUBLIC           56
01027 #define CIF_TP_PUNCH            57
01028 #define CIF_TP_READ             58
01029 #define CIF_TP_RETURN           59
01030 #define CIF_TP_REWIND           60
01031 #define CIF_TP_SAVE             61
01032 #define CIF_TP_SELECT           62
01033 #define CIF_TP_SEQUENCE         63
01034 #define CIF_TP_STMTFUNC         64
01035 #define CIF_TP_STOP             65
01036 #define CIF_TP_SUBROUTINE       66
01037 #define CIF_TP_TARGET           67
01038 #define CIF_TP_TYPE_DECL        68
01039 #define CIF_TP_USE              69
01040 #define CIF_TP_WHERE            70
01041 #define CIF_TP_WHERE_CONST      71
01042 #define CIF_TP_WRITE            72
01043 #define CIF_TP_BUFFER_IN        73
01044 #define CIF_TP_BUFFER_OUT       74
01045 #define CIF_TP_DOWHILE          75
01046 #define CIF_TP_DO               76
01047 #define CIF_TP_ENDDO            77
01048 #define CIF_TP_ENDIF            78
01049 #define CIF_TP_INCLUDE          79
01050 #if CIF_VERSION == 1
01051 #define CIF_TP_MAX              80
01052 #else
01053 #define CIF_TP_CDIR             80
01054 #define CIF_TP_MAX              81
01055 #endif /* CIF_VERSION == 1 */
01056 
01057 #if CIF_VERSION != 1
01058 
01059 /* --- C statement types --- */
01060 #define CIF_CTP_EXPRESSION      0
01061 #define CIF_CTP_COMPOUND        1
01062 #define CIF_CTP_IF              2
01063 #define CIF_CTP_ELSE            3
01064 #define CIF_CTP_WHILE           4
01065 #define CIF_CTP_DO              5
01066 #define CIF_CTP_FOR             6
01067 #define CIF_CTP_SWITCH          7
01068 #define CIF_CTP_BREAK           8
01069 #define CIF_CTP_GOTO            9
01070 #define CIF_CTP_RETURN          10
01071 #define CIF_CTP_CONTINUE        11
01072 #define CIF_CTP_NULL            12
01073 #define CIF_CTP_PRAGMA          13
01074 #define CIF_CTP_ASSIGNMENT      14
01075 #define CIF_CTP_END_COMPOUND    15
01076 #define CIF_CTP_EXPR_END        16
01077 #define CIF_CTP_DO_WHILE_END    17
01078 #define CIF_CTP_RETURN_WITH_EXPR 18
01079 #define CIF_CTP_CASE            19
01080 #define CIF_CTP_LABEL           20
01081 #define CIF_CTP_TRY             21
01082 #define CIF_CTP_ASM             22
01083 #define CIF_CTP_MAX             23
01084 
01085 /* --- F90 statement types --- */
01086 
01087 /*
01088  * Statement types 0-80 are indentical to f77, where applicable;
01089  * ie the gaps left below indicate that f90 will never produce a
01090  * statement of that number which has meaning to f77.
01091  * f90 specific values are stored 100-126.
01092  */
01093 
01094 #define CIF_F90_TP_ALLOCATABLE  0
01095 #define CIF_F90_TP_ALLOCATE     1
01096 #define CIF_F90_TP_ASSIGN       2
01097 #define CIF_F90_TP_ASSIGNMENT   3
01098 #define CIF_F90_TP_BACKSPACE    4
01099 #define CIF_F90_TP_BDATA        5
01100 
01101 #define CIF_F90_TP_CALL         7
01102 #define CIF_F90_TP_CASE         8
01103 #define CIF_F90_TP_CLOSE        9
01104 #define CIF_F90_TP_COMMON       10
01105 #define CIF_F90_TP_CONTAINS     11
01106 #define CIF_F90_TP_CONTINUE     12
01107 #define CIF_F90_TP_CYCLE        13
01108 #define CIF_F90_TP_DATA         14
01109 #define CIF_F90_TP_DEALLOCATE   15
01110 #define CIF_F90_TP_DECODE       16
01111 #define CIF_F90_TP_CASE_DEFAULT 17
01112 #define CIF_F90_TP_TYPE         18
01113 #define CIF_F90_TP_DIMENSION    19
01114 #define CIF_F90_TP_DIRECTIVE    20
01115 
01116 #define CIF_F90_TP_ELSE         23
01117 #define CIF_F90_TP_ELSEIF       24
01118 #define CIF_F90_TP_ELSEWHERE    25
01119 #define CIF_F90_TP_ENCODE       26
01120 
01121 #define CIF_F90_TP_ENDFILE      28
01122 #define CIF_F90_TP_ENTRY        29
01123 #define CIF_F90_TP_EQUIVALENCE  30
01124 #define CIF_F90_TP_EXIT         31
01125 #define CIF_F90_TP_EXTERNAL     32
01126 #define CIF_F90_TP_FORMAT       33
01127 #define CIF_F90_TP_FUNCTION     34
01128 
01129 #define CIF_F90_TP_IF           37
01130 #define CIF_F90_TP_IMPLICIT     38
01131 #define CIF_F90_TP_IMPLICIT_NONE 39
01132 #define CIF_F90_TP_INQUIRE      40
01133 
01134 #define CIF_F90_TP_INTRINSIC    43
01135 #define CIF_F90_TP_MODULE       44
01136 #define CIF_F90_TP_MODULE_PROC  45
01137 #define CIF_F90_TP_NAMELIST     46
01138 #define CIF_F90_TP_NULLIFY      47
01139 #define CIF_F90_TP_OPEN         48
01140 #define CIF_F90_TP_OPTIONAL     49
01141 #define CIF_F90_TP_PARAMETER    50
01142 #define CIF_F90_TP_PAUSE        51
01143 #define CIF_F90_TP_POINTER      52
01144 #define CIF_F90_TP_PRINT        53
01145 #define CIF_F90_TP_PRIVATE      54
01146 #define CIF_F90_TP_PROGRAM      55
01147 #define CIF_F90_TP_PUBLIC       56
01148 
01149 #define CIF_F90_TP_READ         58
01150 #define CIF_F90_TP_RETURN       59
01151 #define CIF_F90_TP_REWIND       60
01152 #define CIF_F90_TP_SAVE         61
01153 #define CIF_F90_TP_SELECT_CASE  62
01154 #define CIF_F90_TP_SEQUENCE     63
01155 #define CIF_F90_TP_STMTFUNC     64
01156 #define CIF_F90_TP_STOP         65
01157 #define CIF_F90_TP_SUBROUTINE   66
01158 #define CIF_F90_TP_TARGET       67
01159 #define CIF_F90_TP_TYPE_DECL    68
01160 #define CIF_F90_TP_USE          69
01161 #define CIF_F90_TP_WHERE        70
01162 #define CIF_F90_TP_WHERE_CONST  71
01163 #define CIF_F90_TP_WRITE        72
01164 #define CIF_F90_TP_BUFFER_IN    73
01165 #define CIF_F90_TP_BUFFER_OUT   74
01166 
01167 #define CIF_F90_TP_END_DO       77
01168 #define CIF_F90_TP_END_IF       78
01169 #define CIF_F90_TP_INCLUDE      79
01170 #define CIF_F90_TP_CDIR         80
01171 
01172 #define CIF_F90_TP_ARRAY_ASSIGNMENT 81  
01173 #define CIF_F90_TP_POINTER_ASGN 82
01174 
01175 #define CIF_F90_TP_LABELED_DO_INFINITE   100
01176 #define CIF_F90_TP_UNLABELED_DO_INFINITE 101
01177 #define CIF_F90_TP_LABELED_DO_ITERATIVE  102
01178 #define CIF_F90_TP_UNLABELED_DO_ITERATIVE 103
01179 #define CIF_F90_TP_LABELED_DO_WHILE   104
01180 #define CIF_F90_TP_UNLABELED_DO_WHILE 105
01181 #define CIF_F90_TP_END_BDATA    106
01182 #define CIF_F90_TP_END_FUNCTION 107
01183 #define CIF_F90_TP_END_INTERFACE 108
01184 #define CIF_F90_TP_END_MODULE   109
01185 #define CIF_F90_TP_END_PROGRAM  110
01186 #define CIF_F90_TP_END_SELECT   111
01187 #define CIF_F90_TP_END_SUBROUTINE 112
01188 #define CIF_F90_TP_END_TYPE     113
01189 #define CIF_F90_TP_END_WHERE    114
01190 #define CIF_F90_TP_GOTO         115
01191 #define CIF_F90_TP_GOTO_ASSIGNED  116
01192 #define CIF_F90_TP_GOTO_COMPUTED  117
01193 #define CIF_F90_TP_IF_LOGICAL   118
01194 #define CIF_F90_TP_IF_ARITHMETIC  119
01195 #define CIF_F90_TP_IF_IND_LOG   120
01196 #define CIF_F90_TP_IF_TWO_BRANCH_ARITHMETIC 121
01197 #define CIF_F90_TP_INTENT_IN    122
01198 #define CIF_F90_TP_INTENT_OUT   123
01199 #define CIF_F90_TP_INTENT_INOUT 124
01200 #define CIF_F90_TP_INTERFACE    125
01201 #define CIF_F90_TP_INTERFACE_GENERIC 126 
01202 #define CIF_F90_TP_INTERFACE_OPERATOR 127
01203 #define CIF_F90_TP_INTERFACE_ASSIGNMENT 128
01204 #define CIF_F90_TP_TASK_COMMON  129
01205 #define CIF_F90_TP_AUTOMATIC    130
01206 #define CIF_F90_TP_ELEMENTAL    131
01207 #define CIF_F90_TP_PURE         132
01208 #define CIF_F90_TP_FORALL       133
01209 #define CIF_F90_TP_FORALL_CONSTRUCT     134
01210 #define CIF_F90_TP_END_FORALL   135
01211 #define CIF_F90_TP_MAX          136
01212 
01213 
01214 
01215 
01216 /* ---- F90 scope types ---- */
01217 #define CIF_SCP_MAIN            0       /* main program */
01218 #define CIF_SCP_EXTERNAL        1       /* external subprogram (function or subroutine) */
01219 #define CIF_SCP_BLOCK           2       /* block data subprogram */
01220 #define CIF_SCP_MOD_SUB         3       /* module subprogram */
01221 #define CIF_SCP_MODULE          4       /* module procedure */
01222 #define CIF_SCP_INTERNAL        5       /* Internal procedure */
01223 #define CIF_SCP_INTERFACE       6       /* interface body (function or subroutine) */
01224 #define CIF_SCP_INT_BLOCK       7       /* interface block */
01225 #define CIF_SCP_C_FILE          8       /* C file scope */
01226 #define CIF_SCP_C_BLOCK         9       /* C block scope */
01227 
01228 
01229 /* ---- F90 interface block types */
01230 #define CIF_IB_SPECIFIC         1       /* specific (unnamed) */
01231 #define CIF_IB_GENERIC          2       /* generic (has a generic name) */
01232 #define CIF_IB_OPERATOR         3       /* operator */
01233 #define CIF_IB_ASSIGNMENT       4       /* assignment */
01234 
01235 
01236 /* ---- F90 derived type flags */
01237 #define CIF_DRT_SEQUENCE        0x1     /* definition contains the SEQUENCE statement */
01238 #define CIF_DRT_PRIVATE         0x2     /* type definition has private access (default is public) */
01239 #define CIF_DRT_COMP_PRIVATE    0x4     /* components have private access */
01240 
01241 
01242 /* --- back end node types --- */
01243 #define CIF_BE_TIMING            0      /* timing stats */
01244 #define CIF_BE_LOOP              1      /* loop stats */
01245 #define CIF_BE_BTE               2      /* block transfer engine stats */
01246 #define CIF_BE_OTHER             3      /* other:  branch, etc */
01247 
01248 /* --- back end timing subtypes --- */
01249 #define CIF_TT_WORK              0      /* user work */
01250 #define CIF_TT_CALL              1      /* function call site */
01251 #define CIF_TT_MEM               2      /* memory fetch, non-local */
01252 #define CIF_TT_PFQ               3      /* Pre Fetch Queue wait */
01253 #define CIF_TT_BTE               4      /* Block Transfer Engine wait */
01254 #define CIF_TT_BARRIER           5      /* barrier wait */
01255 #define CIF_TT_CRIT              6      /* critical section entry */
01256 #define CIF_TT_ATOMIC            7      /* atomic update */
01257 #define CIF_TT_LOOPS             8      /* loop start */
01258 #define CIF_TT_LOOPD             9      /* loop distribution */
01259 #define CIF_TT_LOOPT            10      /* loop termination */
01260 #define CIF_TT_ENTRY            11      /* entry point */
01261 
01262  /* --- back end other subtypes --- */
01263 #define CIF_BE_BRANCH            1      /* branch */
01264 #define CIF_BE_COND_BR           2      /* conditional branch */
01265 #define CIF_BE_PAL               3      /* pal call */
01266 #define CIF_BE_RET               4      /* return */
01267 #define CIF_BE_S2PC              5      /* shared to private coercion */
01268 
01269 
01270 /* --- back end instruction types --- */
01271 #define CIF_IT_FADD              0      /* floating adds+substracts */
01272 #define CIF_IT_FMUL              1      /* floating multiplies */
01273 #define CIF_IT_FDIV_S            2      /* floating divides, S format */
01274 #define CIF_IT_FDIV_T            3      /* floating divides, T format */
01275 #define CIF_IT_IADD              4      /* integer adds+subtracts */
01276 #define CIF_IT_IMUL              5      /* integer multiplies */
01277 #define CIF_IT_IDIV              6      /* integer divides */
01278 #define CIF_IT_LOAD              7      /* load  local */
01279 #define CIF_IT_STORE             8      /* store local */
01280 #define CIF_IT_LOAD_LS           9      /* load  local shared */
01281 #define CIF_IT_STORE_LS         10      /* store local shared */
01282 #define CIF_IT_LOAD_R           11      /* load  remote */
01283 #define CIF_IT_STORE_R          12      /* store remote */
01284 #define CIF_IT_OTHER            13      /* other instructions */
01285 #define CIF_IT_MAX              14
01286 
01287 /* Source position "kinds" */
01288 #define CIF_SRC_KIND_MAIN       1       /* main file */
01289 #define CIF_SRC_KIND_INCLUDE    2       /* included file */
01290 #define CIF_SRC_KIND_MACRO      3       /* macro expansion */
01291 #define CIF_SRC_KIND_INLINE     4       /* inlined routine */
01292 #define CIF_SRC_KIND_TAIL       5       /* tail recusrion */
01293 
01294 
01295 #endif /* CIF_VERSION != 1 */
01296 
01297 /* --- C type qualifiers --- */
01298 #define CIF_TQC_CONST           0x1     /* const */
01299 #define CIF_TQC_VOL             0x2     /* volatile */
01300 #define CIF_TQC_RESTR           0x4     /* restrict */
01301 #define CIF_TQC_MAX             5       /* type qualifiers array size */
01302 
01303 
01304 /* --- Error values stored in the CIF_SUMMARY records fldlen field
01305  *     These indicate that the CIF's should not be trusted as
01306  *     sufficient errors were found in the compilation to make
01307  *     it largely suspect
01308  */
01309 
01310 #define CIF_ER_100              -1 /* Compilation aborted due to 100 errors */
01311 #define CIF_ER_INTERNAL         -2 /* Internal or Limit error */
01312 #define CIF_ER_OTHER            -3 /* Other error */
01313 
01314 
01315 /* ---------------------------------------------------------------------------
01316  * The structure definitions for each CIF record follow.  The structure are
01317  * packed to minimize space.  Fields are aligned to maximize compaction on
01318  * both 32 and 64 bit boundaries.  After each structure is a "define" symbol
01319  * that specifies the number of bytes used for the "short" version of the
01320  * structure.  The short version is the amount of information in the structure
01321  * written to a binary format file.
01322  * ---------------------------------------------------------------------------
01323  */
01324 
01325 /* --- generic record header description --- */
01326 struct Cif_generic {
01327         FIELD rectype:8;        /* type of record */
01328 };
01329 
01330 /* --- C type modifier information --- */
01331 struct Cif_tmod {
01332         FIELD val:32;           /* symbol id or dimension size */
01333         FIELD mod:8;            /* C type modifier */
01334 };
01335 #define TMOD_SSIZE 5            /* short size of tmod structure */
01336 
01337 /* --- C constants information --- */
01338 struct Cif_c_const {
01339         FIELD rectype:8;        /* type of record = CIF_C_CONST */
01340         FIELD symid:24;         /* symbol id assigned to constant symbol */
01341         FIELD vlen:24;          /* number of characters in value */
01342         FIELD btype:8;          /* basic type of constant */
01343         char *value;            /* pointer to symbol value string */
01344 };
01345 #define CCONST_SSIZE 8          /* short size of C const structure */
01346 
01347 /* --- C entry information --- */
01348 
01349 #if CIF_VERSION == 1
01350 
01351 struct Cif_c_entry {
01352         FIELD rectype:8;        /* type of record = CIF_C_ENTRY */
01353         FIELD ptype:2;          /* =3 to indicate "function" */
01354         FIELD symclass:2;       /* symbol class of function entry */
01355         FIELD retvalue:2;       /* function returns a value */
01356                                 /* (0=no, 1=yes, 2=unknown, 3=intrinsic) */
01357         FIELD varargs:2;        /* 0=no, 1=yes; unknown max # arguments
01358                                  * doesn't necessarily mean varargs, eg
01359                                  * could be a function with no prototype
01360                                  * int b(); for example */
01361         FIELD scope:8;          /* scope level */
01362         FIELD nlen:8;           /* number of characters in name */
01363         FIELD symid:24;         /* symbol id assigned to function name */
01364         FIELD nargs:8;          /* number of known formal arguments */
01365         FIELD nmods:4;          /* number of type modifiers */
01366         FIELD qual:4;           /* type qualifier flag */
01367         FIELD btype:8;          /* basic type */
01368         struct Cif_tmod *mods;  /* ptr to list of type modifiers */
01369         long *argids;           /* ptr to list of format argument ids */
01370         char *name;             /* pointer to function name */
01371 };
01372 
01373 #define CENTRY_SSIZE 10         /* short size of entry structure */
01374 
01375 #else  /* VERSION 2 */
01376 
01377 struct Cif_c_entry {
01378         FIELD rectype:8;        /* type of record = CIF_C_ENTRY */
01379         FIELD ptype:2;          /* =3 to indicate "function" */
01380         FIELD symclass:6;       /* symbol class of function entry */
01381         FIELD retvalue:4;       /* function returns a value */
01382                                 /* (0=no, 1=yes, 2=unknown) */
01383         FIELD varargs:4;        /* 0=no, 1=yes.. with padding to byte*/
01384         FIELD scope:8;          /* scope level */
01385         FIELD nlen:8;           /* number of characters in name */
01386         FIELD symid:24;         /* symbol id assigned to function name */
01387         FIELD nargs:8;          /* number of known formal arguments */
01388         FIELD tagid:24;         /* tag id if the function returns a
01389                                    struct, union or enum; else empty */
01390         FIELD nmods:4;          /* number of type modifiers */
01391         FIELD qual:4;           /* type qualifier flag */
01392         FIELD btype:8;          /* basic type */
01393         FIELD un:16;            /* unused */
01394         FIELD link:24;          /* link to other equivalent entry records */
01395         struct Cif_tmod *mods;  /* ptr to list of type modifiers */
01396         long *argids;           /* ptr to list of format argument ids */
01397         char *name;             /* pointer to function name */
01398 };
01399 
01400 #define CENTRY_SSIZE_2 15       /* short size of Version 2 entry structure */
01401                                 /* in V2 CENTRY_SSIZE was incorrectly set */
01402                                 /* to 15.  This value is used to read V2 */
01403                                 /* binary CIF files */
01404 #define CENTRY_SSIZE 19         /* short size of entry structure */
01405 
01406 /* Verson 1 structure, allows libcif to honour a request to a version 1 application */
01407 
01408 struct Cif_c_entry_1 {
01409         FIELD rectype:8;        /* type of record = CIF_C_ENTRY */
01410         FIELD ptype:2;          /* =3 to indicate "function" */
01411         FIELD symclass:2;       /* symbol class of function entry */
01412         FIELD retvalue:2;       /* function returns a value */
01413                                 /* (0=no, 1=yes, 2=unknown) */
01414         FIELD varargs:2;        /* 0=no, 1=yes */
01415         FIELD scope:8;          /* scope level */
01416         FIELD nlen:8;           /* number of characters in name */
01417         FIELD symid:24;         /* symbol id assigned to function name */
01418         FIELD nargs:8;          /* number of known formal arguments */
01419         FIELD nmods:4;          /* number of type modifiers */
01420         FIELD qual:4;           /* type qualifier flag */
01421         FIELD btype:8;          /* basic type */
01422         struct Cif_tmod *mods;  /* ptr to list of type modifiers */
01423         long *argids;           /* ptr to list of format argument ids */
01424         char *name;             /* pointer to function name */
01425 };
01426 
01427 #define CENTRY_SSIZE_1 10               /* short size of entry structure */
01428 
01429 #endif /* CIF_VERSION == 1 */
01430 
01431 
01432 
01433 
01434 
01435 #if CIF_VERSION != 1
01436 /* --- C lint directive information --- */
01437 struct Cif_c_lint_directive {
01438         FIELD rectype:8;        /* type of record = CIF_C_LINT_DIRECTIVE */
01439         FIELD fid:24;           /* source file id */
01440         FIELD nlen:8;           /* number of characters in name */
01441         FIELD objid:24;         /* object id of the target obj of directive */
01442         FIELD val:16;           /* value of "n" */
01443         FIELD strpos:16;        /* char pos where the directive appears */
01444         FIELD strline:24;       /* source line num where directive appears */
01445         FIELD un1:8;            /* unused */
01446         FIELD endline:24;       /* source line where directive effect ends */
01447         FIELD un2:8;            /* unused */
01448         FIELD endpos:16;        /* char pos where directive effect ends */
01449         char *name;             /* pointer to name of directive */
01450 };
01451 #define CLINT_DIRECTIVE_SSIZE 22        /* short size of C lint directive structure */
01452 
01453 /* --- C entry end information --- */
01454 struct Cif_c_entry_end {
01455         FIELD rectype:8;        /* type of record = CIF_C_ENTRY_END */
01456         FIELD symid:24;         /* symbol id assigned to function name */
01457         FIELD strline:24;       /* source line number where the definition begins */
01458         FIELD nlen:8;           /* number of characters in name */
01459         FIELD endline:24;       /* source line number where the definition end */
01460         FIELD un1:8;            /* unused */
01461         FIELD fid:16;           /* id of file where function occurs */
01462         char *name;             /* pointer to function name */
01463 };
01464 #define CENTRY_END_SSIZE 14     /* short size of entry end structure */
01465 
01466 /* --- C macro def information --- */
01467 struct Cif_c_macro_def {
01468         FIELD rectype:8;        /* type of record = CIF_C_MACRO_DEF */
01469         FIELD symid:24;         /* symbol id assigned to macro */
01470         FIELD nlen:8;           /* number of characters in name */
01471         FIELD strline:24;       /* source line number where definition begins */
01472         FIELD fid:16;           /* id of file where macro occurs */
01473         FIELD strpos:16;        /* char pos where definition begins */
01474         FIELD endline:24;       /* source line number where definition ends */
01475         FIELD un1:8;            /* unused */
01476         FIELD endpos:16;        /* char pos within line where definition ends */
01477         char *name;             /* pointer to macro name */
01478 };
01479 #define CMACRO_DEF_SSIZE 18     /* short size of macro def structure */
01480 
01481 /* --- C macro undef information --- */
01482 struct Cif_c_macro_undef {
01483         FIELD rectype:8;        /* type of record = CIF_C_MACRO_UNDEF */
01484         FIELD symid:24;         /* symbol id assigned to macro */
01485         FIELD fid:16;           /* id of file where macro occurs */
01486         FIELD cpos:16;          /* char position where undefinition occurs */
01487         FIELD line:24;          /* source line where the undefinition occurs */
01488 };
01489 #define CMACRO_UNDEF_SSIZE 11   /* short size of undef structure */
01490 
01491 /* --- C macro usage information --- */
01492 struct Cif_c_macro_usage {
01493         FIELD rectype:8;        /* type of record = CIF_C_MACRO_USAGE */
01494         FIELD useid:24;         /* usage id */
01495         FIELD symid:24;         /* symbol id assigned to macro */
01496         FIELD un1:8;            /* unused */
01497         FIELD fid:16;           /* id of file where macro occurs */
01498         FIELD strpos:16;        /* char pos where usage begins */
01499         FIELD strline:24;       /* source line where the usage begins */
01500         FIELD un2:8;            /* unused */
01501         FIELD endline:24;       /* source line where the usage ends */
01502         FIELD un3:8;            /* unused */
01503         FIELD endpos:16;        /* char pos where usage ends */
01504 };
01505 #define CMACRO_USAGE_SSIZE 22   /* short size of macro usage structure */
01506 
01507 #endif /* CIF_VERSION == 1 */
01508 
01509 
01510 
01511 /* --- C messages --- */
01512 #if CIF_VERSION == 1
01513 struct Cif_c_message {
01514         FIELD rectype:8;        /* type of record = CIF_C_MESSAGE */
01515         FIELD fline:24;         /* line where message occurs */
01516         FIELD msgno:16;         /* message number */
01517         FIELD fid:16;           /* id of file where message occurs */
01518         FIELD flinesuf:8;       /* line number suffix ('s' or 'm') */
01519         FIELD severity:8;       /* message severity */
01520         FIELD incid:16;         /* include file id where message occurs */
01521         FIELD iline:24;         /* line in include file where msg occurs */
01522         FIELD nargs:8;          /* number of argument strings */
01523         char **args;            /* pointer to array of argument pointers */
01524 };
01525 #define CMESSAGE_SSIZE 16       /* short size of C message structure */
01526 
01527 #else  /* Version 2 */
01528 
01529 struct Cif_c_message {
01530         FIELD rectype:8;        /* type of record = CIF_C_MESSAGE */
01531         FIELD fline:24;         /* line where message occurs */
01532         FIELD msgno:16;         /* message number */
01533         FIELD fid:16;           /* id of file where message occurs */
01534         FIELD flinesuf:8;       /* line number suffix ('s' or 'm') */
01535         FIELD severity:8;       /* message severity */
01536         FIELD incid:16;         /* include file id where message occurs */
01537         FIELD iline:24;         /* line in include file where msg occurs */
01538         FIELD nargs:8;          /* number of argument strings */
01539         FIELD msgcode:8;        /* message code */
01540         char **args;            /* pointer to array of argument pointers */
01541 };
01542 #define CMESSAGE_SSIZE 17       /* short size of C message structure */
01543 
01544 /* a copy of the version 1 cif, used if an application compiled with version 2
01545    wants to read a version 1 cif */
01546 
01547 struct Cif_c_message_1 {
01548         FIELD rectype:8;        /* type of record = CIF_C_MESSAGE */
01549         FIELD fline:24;         /* line where message occurs */
01550         FIELD msgno:16;         /* message number */
01551         FIELD fid:16;           /* id of file where message occurs */
01552         FIELD flinesuf:8;       /* line number suffix ('s' or 'm') */
01553         FIELD severity:8;       /* message severity */
01554         FIELD incid:16;         /* include file id where message occurs */
01555         FIELD iline:24;         /* line in include file where msg occurs */
01556         FIELD nargs:8;          /* number of argument strings */
01557         char **args;            /* pointer to array of argument pointers */
01558 };
01559 #define CMESSAGE_SSIZE_1 16     /* short size of C message structure */
01560 
01561 #endif  /* CIF_VERSION == 1 */
01562 
01563 
01564 /* --- C object information --- */
01565 #if CIF_VERSION == 1
01566 struct Cif_c_object {
01567         FIELD rectype:8;        /* type of record = CIF_C_OBJECT */
01568         FIELD symid:24;         /* symbol id assigned to object */
01569         FIELD psymid:24;        /* parent symbol id if member/for. param */
01570         FIELD nlen:8;           /* number of characters in name */
01571         FIELD tagid:24;         /* tag id if struct, union, enum */
01572         FIELD scope:8;          /* scope level */
01573         FIELD size:6;           /* size of bitfield */
01574         FIELD symclass:6;       /* symbol class of object */
01575         FIELD entity:4;         /* entity of object */
01576         FIELD nmods:4;          /* number of type modifiers */
01577         FIELD qual:4;           /* type qualifier flag */
01578         FIELD btype:8;          /* basic type */
01579         struct Cif_tmod *mods;  /* ptr to list of type modifiers */
01580         char *name;             /* pointer to name of object */
01581 };
01582 #define COBJECT_SSIZE 16        /* short size of C object structure */
01583 
01584 #else  /* Version 2 */
01585 
01586 struct Cif_c_object {
01587         FIELD rectype:8;        /* type of record = CIF_C_OBJECT */
01588         FIELD symid:24;         /* symbol id assigned to object */
01589         FIELD psymid:24;        /* parent symbol id if member/for. param */
01590         FIELD nlen:8;           /* number of characters in name */
01591         FIELD tagid:24;         /* tag id if struct, union, enum */
01592         FIELD scope:8;          /* scope level */
01593         FIELD size:6;           /* size of bitfield */
01594         FIELD symclass:6;       /* symbol class of object */
01595         FIELD entity:4;         /* entity of object */
01596         FIELD nmods:4;          /* number of type modifiers */
01597         FIELD qual:4;           /* type qualifier flag */
01598         FIELD btype:8;          /* basic type */
01599         FIELD link:24;          /* link to other equivalent object records */
01600         struct Cif_tmod *mods;  /* ptr to list of type modifiers */
01601         char *name;             /* pointer to name of object */
01602 };
01603 #define COBJECT_SSIZE 19        /* short size of C object structure */
01604 
01605 /* a copy of the version 1 cif, used if an application compiled with version 2
01606    wants to read a version 1 cif */
01607 
01608 struct Cif_c_object_1 {
01609         FIELD rectype:8;        /* type of record = CIF_C_OBJECT */
01610         FIELD symid:24;         /* symbol id assigned to object */
01611         FIELD psymid:24;        /* parent symbol id if member/for. param */
01612         FIELD nlen:8;           /* number of characters in name */
01613         FIELD tagid:24;         /* tag id if struct, union, enum */
01614         FIELD scope:8;          /* scope level */
01615         FIELD size:6;           /* size of bitfield */
01616         FIELD symclass:6;       /* symbol class of object */
01617         FIELD entity:4;         /* entity of object */
01618         FIELD nmods:4;          /* number of type modifiers */
01619         FIELD qual:4;           /* type qualifier flag */
01620         FIELD btype:8;          /* basic type */
01621         struct Cif_tmod *mods;  /* ptr to list of type modifiers */
01622         char *name;             /* pointer to name of object */
01623 };
01624 #define COBJECT_SSIZE_1 16      /* short size of C object structure */
01625 
01626 #endif
01627 
01628 /* --- C compiler options --- */
01629 struct Cif_c_opts {
01630         FIELD rectype:8;        /* type of record = CIF_C_OPTS */
01631         FIELD msglev:8;         /* -h msglevel_X ASCII value */
01632         FIELD truncval:8;       /* -h trunc = numeric value */
01633         FIELD debug:8;          /* -G X ASCII value */
01634         FIELD atsklev:2;        /* optimization level for autotsking */
01635         FIELD inlnlev:2;        /* optimization level for inlining */
01636         FIELD sclrlev:2;        /* optimization level for scalar opt */
01637         FIELD vctrlev:2;        /* optimization level for vector opt */
01638         FIELD nincs:8;          /* number of -I options specified */
01639         FIELD ndefs:8;          /* number of -D options specified */
01640         FIELD nudefs:8;         /* number of -U options specified */
01641         char report[8];         /* report values "fisptv" */
01642         char bopts[16];         /* array of hex. digits */
01643         FIELD nlen:8;           /* number of characters in name */
01644         char *name;             /* full path name of the command */
01645         char **incs;            /* -I argument "name[=def]" */
01646         char **defs;            /* -D argument "name[=def]" */
01647         char **udefs;           /* -U arguments "name" */
01648 };
01649 #define COPTS_SSIZE 33           /* short size of c opts structure */
01650 
01651 /* --- C tag information --- */
01652 struct Cif_c_tag {
01653         FIELD rectype:8;        /* type of record = CIF_C_TAG */
01654         FIELD tagid:24;         /* tag id */
01655         FIELD size:32;          /* size of a structure/union in bits */
01656         FIELD nmems:16;         /* number of members */
01657         FIELD entity:4;         /* tag entity type */
01658         FIELD un1:4;            /* padding */
01659         FIELD nlen:8;           /* number of characters in name */
01660         FIELD nmods:4;          /* number of type modifiers */
01661         FIELD qual:4;           /* type qualifier flag */
01662         FIELD btype:8;          /* basic type */
01663         struct Cif_tmod *mods;  /* ptr to list of type modifiers */
01664         long *memids;           /* member ids */
01665         char *name;             /* tag name */
01666 };
01667 #define CTAG_SSIZE 14           /* short size of tag structure */
01668 
01669 /* --- call site --- */
01670 struct Cif_callsite {
01671         FIELD rectype:8;        /* type of record = CIF_CALLSITE */
01672         FIELD line:24;          /* line where call occurs */
01673         FIELD cpos:16;          /* char position where call occurs */
01674         FIELD nargs:16;         /* number of actual arguments */
01675         FIELD entryid:24;       /* symbol id for called procedure */
01676         FIELD valused:1;        /* set if return value used */
01677         FIELD un1:7;            /* padding field */
01678         FIELD fid:16;           /* id of file where call occurs */
01679         struct Cif_callsite *link; /* pointer to other call site record */
01680         long *argids;           /* ptr to list of actual argument ids */
01681 };
01682 #define CALLSITE_SSIZE 14       /* short size of callsite structure */
01683 
01684 /* --- cif header --- */
01685 struct Cif_cifhdr {
01686         FIELD rectype:8;        /* type of record = CIF_CIFHDR */
01687         FIELD version:8;        /* CIF format version */
01688         FIELD bintype:2;        /* 0 = cifconv'd, 1 = line'd */
01689         FIELD lang:6;           /* source language */
01690         FIELD form:1;           /* cif file format, 0 = ascii, 1 = binary */
01691         FIELD canpos:1;         /* set if positioning operations allowed */
01692         FIELD posinfo:1;        /* record positioning info is available */
01693         FIELD cont_id:1;        /* set if contiguous id values present */
01694         FIELD srcfid:4;         /* source file id */
01695         FIELD msgfid:16;        /* id of message catalog file */
01696         char cvers[16];         /* compiler version */
01697         char date[16];          /* date of CIF creation */
01698         char time[16];          /* time of CIF creation */
01699         char group[7];          /* message group id */
01700         char hostcpu[9];        /* type of cpu where cif is generated */
01701         char machname[16];      /* name of machine where cif was generated */
01702 };
01703 #define CIFHDR_SSIZE sizeof(struct Cif_cifhdr)
01704 
01705 #if CIF_VERSION == 1
01706 
01707 /* --- Fortran 77 common block --- */
01708 struct Cif_comblk {
01709         FIELD rectype:8;        /* type of record = CIF_COMBLK */
01710         FIELD symid:24;         /* symbol id assigned to common block */
01711         FIELD length:32;        /* number of bytes in common block */
01712         FIELD cbtype:8;         /* storage class of common block */
01713         FIELD nlen:8;           /* number of characters in name */
01714         char *name;             /* pointer to common block name */
01715 };
01716 #define COMBLK_SSIZE 10         /* short size of comblk structure */
01717 
01718 #else /* CIF_VERSION != 1 */
01719 
01720 struct Cif_comblk {
01721         FIELD rectype:8;        /* type of record = CIF_COMBLK */
01722         FIELD symid:24;         /* symbol id assigned to common block */
01723         FIELD length:32;        /* number of bytes in common block */
01724         FIELD cbtype:8;         /* storage class of common block */
01725         FIELD nlen:8;           /* number of characters in name */
01726         FIELD dist:4;           /* distribution code, see CIF_DN_?? */
01727         FIELD un1:4;            /* unused */
01728         char *name;             /* pointer to common block name */
01729 };
01730 #define COMBLK_SSIZE 11         /* short size of comblk structure */
01731 
01732 /* a copy of the version 1 cif, used if an application compiled with version 2
01733    wants to read a version 1 cif */
01734 
01735 struct Cif_comblk_1 {
01736         FIELD rectype:8;        /* type of record = CIF_COMBLK */
01737         FIELD symid:24;         /* symbol id assigned to common block */
01738         FIELD length:32;        /* number of bytes in common block */
01739         FIELD cbtype:8;         /* storage class of common block */
01740         FIELD nlen:8;           /* number of characters in name */
01741         char *name;             /* pointer to common block name */
01742 };
01743 #define COMBLK_SSIZE_1 10       /* short size of comblk structure */
01744 
01745 
01746 #endif  /* CIF_VERSION == 1 */
01747 
01748 #if CIF_VERSION == 1
01749 
01750 /* --- constant symbol info --- */
01751 struct Cif_const {
01752         FIELD rectype:8;        /* type of record = CIF_CONST */
01753         FIELD dtype:8;          /* data type of constant */
01754         FIELD nvalues:8;        /* number of values assigned */
01755         FIELD imptype:1;        /* implicitly defined flag */
01756         FIELD un1:7;            /* unused */
01757         FIELD nlen:8;           /* number of characters in name */
01758         FIELD symid:24;         /* symbol id assigned to constant symbol */
01759         FIELD vlen:24;          /* number of characters in value */
01760         char *value;            /* pointer to symbol value string */
01761         char *name;             /* pointer to constant symbol name */
01762 };
01763 #define CONST_SSIZE 11          /* short size of const structure */
01764 
01765 #else
01766 
01767 /* --- constant symbol info --- */
01768 struct Cif_const {
01769         FIELD rectype:8;        /* type of record = CIF_CONST */
01770         FIELD dtype:8;          /* data type of constant */
01771         FIELD nvalues:8;        /* number of values assigned */
01772         FIELD imptype:1;        /* implicitly defined flag */
01773         FIELD origform:1;       /* true if original form of constant is available */
01774         FIELD un1:6;            /* unused */
01775         FIELD nlen:8;           /* number of characters in name */
01776         FIELD symid:24;         /* symbol id assigned to constant symbol */
01777         FIELD vlen:24;          /* number of characters in value */
01778         FIELD un2:8;            /* unused */
01779         FIELD olen:24;          /* original format of constant length */
01780         char *value;            /* pointer to symbol value string */
01781         char *oform;            /* original form of the constant */
01782         char *name;             /* pointer to constant symbol name */
01783 };
01784 #define CONST_SSIZE 15          /* short size of const structure */
01785 
01786 struct Cif_const_1 {
01787         FIELD rectype:8;        /* type of record = CIF_CONST */
01788         FIELD dtype:8;          /* data type of constant */
01789         FIELD nvalues:8;        /* number of values assigned */
01790         FIELD imptype:1;        /* implicitly defined flag */
01791         FIELD un1:7;            /* unused */
01792         FIELD nlen:8;           /* number of characters in name */
01793         FIELD symid:24;         /* symbol id assigned to constant symbol */
01794         FIELD vlen:24;          /* number of characters in value */
01795         char *value;            /* pointer to symbol value string */
01796         char *name;             /* pointer to constant symbol name */
01797 };
01798 #define CONST_SSIZE_1 11        /* short size of const structure */
01799 
01800 #endif /* CIF_VERSION == 1 */
01801 
01802 
01803 #if CIF_VERSION != 1  /* New records from cft77 */
01804 /* --- simple cdir info */
01805 struct Cif_cdir {
01806         FIELD rectype:8;        /* type of record = CIF_CDIR */
01807         FIELD line:24;          /* line on which cdir starts */
01808         FIELD fid:16;           /* file id in which cdir appears */
01809         FIELD cpos:16;          /* character position of cdir */
01810         FIELD type:8;           /* cdir type, see CIF_CD_?? */
01811         FIELD nids:16;          /* number of COPY variables (only for type == end_master) */
01812         long *ids;              /* ptr to COPY variable symbol ids */
01813 };
01814 #define CDIR_SSIZE 11           /* short size of cdir structure */
01815 
01816 
01817 /* --- doshared cdir information ---*/
01818 struct Cif_cdir_doshared {
01819         FIELD rectype:8;        /* type of record = CIF_CDIR_DOSHARED */
01820         FIELD line:24;          /* line on which cdir doshared starts */
01821         FIELD type:8;           /* doshared type, see CIF_DO_?? */
01822         FIELD random:1;         /* random layout */
01823         FIELD mexpr:1;          /* 1 if M is an expression */
01824         FIELD un1:6;            /* unused */
01825         FIELD fid:16;           /* file id in which cdir doshared appears */
01826         FIELD cpos:16;          /* character position of cdir doshared*/
01827         FIELD mfid:16;          /* M file id */
01828         FIELD mcpos:16;         /* M character position */
01829         FIELD nids:16;          /* number of DOSHARED control variables */
01830         FIELD mline:24;         /* M line number */
01831         FIELD un2:8;            /* unused */
01832         FIELD m:32;             /* M : block, chunk size, guided value or expression ( = NULL ) */
01833         long *ids;              /* ptr to DOSHARED control variable symbol ids */
01834 };
01835 #define CDIR_DOSHARED_SSIZE 24          /* short size of cdir_doshared structure */
01836 
01837 /* --- doshared geometry information ---*/
01838 
01839 struct Cif_geometry_dim {
01840         FIELD dist:8;           /* dimension distribution */
01841         FIELD wline:24;         /* weight line number */
01842         FIELD weight:16;        /* weight, wtype is 1 if this is an expression */
01843         FIELD wfid:16;          /* weight file id */
01844         FIELD wcpos:16;         /* weight character position */
01845         FIELD bfid:16;          /* block size file id */
01846         FIELD bsize:24;         /* block size */
01847         FIELD btype:1;          /* 1 if block size is an expression */
01848         FIELD wtype:1;          /* 1 if weight is an expression */
01849         FIELD un1:6;            /* unused */
01850         FIELD bline:24;         /* block size line number */
01851         FIELD un2:8;            /* unused */
01852         FIELD bcpos:16;         /* block size character position */
01853 };
01854 #define GEOM_SSIZE 22
01855 
01856 struct Cif_geometry {
01857         FIELD rectype:8;        /* type of record = CIF_GEOMETRY */
01858         FIELD geomid:24;        /* geomtry id */
01859         FIELD ndims:8;          /* number of dimensions */
01860         FIELD nlen:24;          /* name length */
01861         struct Cif_geometry_dim *dim;  /* ptr to geometry dimension info */
01862         char *name;
01863 };
01864 #define GEOMETRY_SSIZE 8        /* short size of geometry structure */
01865 
01866 
01867 /* --- continuation line record */
01868 struct Cif_continuation {
01869         FIELD rectype:8;        /* type of record = CIF_CONTINUATION */
01870         FIELD line:24;          /* line on which the continuation occurs */
01871         FIELD fid:16;           /* file id where the continuation line appears */
01872         FIELD cpos:16;          /* character position at which the continuation line begins */
01873         FIELD type:1;           /* 0 = regular stmt; 1 = CDIR continuation */
01874         FIELD un1:7;            /* unused */
01875 };
01876 #define CONTINUATION_SSIZE  9   /* short size of geometry structure */
01877 
01878 
01879 #endif /* CIF_VERSION != 1 */
01880 
01881 
01882 
01883 /* --- Fortran enable/disable options --- */
01884 struct Cif_edopts {
01885         FIELD rectype:8;        /* type of record = CIF_EDOPTS */
01886         long opts;              /* enable/disable mask value, see CIF_[F90_]EDF_OPT? */
01887 };
01888 #define EDOPTS_SSIZE sizeof(struct Cif_edopts)
01889 
01890 /* --- Fortran 77 entry point/procedure information --- */
01891 struct Cif_entry {
01892         FIELD rectype:8;        /* type of record = CIF_ENTRY */
01893         FIELD etype:8;          /* type of entry */
01894         FIELD dtype:8;          /* data type of returned value */
01895         FIELD nlen:8;           /* number of characters in name */
01896         FIELD valargs:1;        /* valid arguments present indicator */
01897         FIELD recur:1;          /* routine is recursive */
01898         FIELD stmtfunc:1;       /* routine is statement function */
01899         FIELD extrn:1;          /* routine is external */
01900         FIELD intrin:1;         /* routine is intrinsic */
01901         FIELD un2:2;            /* unused */
01902         FIELD imptype:1;        /* implicitly typed */
01903         FIELD symid:24;         /* symbol id assigned to procedure name */
01904         FIELD charlen:24;       /* if character type, character length */
01905         FIELD nargs:8;          /* number of formal arguments */
01906         long *argids;           /* ptr to list of formal argument ids */
01907         char *name;             /* pointer to procedure name */
01908 };
01909 #define ENTRY_SSIZE 13          /* short size of entry structure */
01910 
01911 /* --- file declaration --- */
01912 
01913 #if CIF_VERSION == 3
01914 
01915 struct Cif_file {
01916         FIELD rectype:8;        /* type of record = CIF_FILE */
01917         FIELD nlen:8;           /* number of characters in name */
01918         FIELD fid:16;           /* id assigned to file name */
01919         FIELD onlen:8;          /* number of characters in oname */
01920         char *name;             /* pointer to the fully pathed file name */
01921         char *oname;            /* pointer to the original file name */
01922 };
01923 #define FILE_SSIZE 5            /* short size of file structure */
01924 
01925 struct Cif_file_1 {
01926         FIELD rectype:8;        /* type of record = CIF_FILE */
01927         FIELD nlen:8;           /* number of characters in name */
01928         FIELD fid:16;           /* id assigned to file name */
01929         char *name;             /* pointer to file name */
01930 };
01931 #define FILE_SSIZE_1 4          /* short size of file structure */
01932 
01933 #else /* Version < 3 */
01934 
01935 struct Cif_file {
01936         FIELD rectype:8;        /* type of record = CIF_FILE */
01937         FIELD nlen:8;           /* number of characters in name */
01938         FIELD fid:16;           /* id assigned to file name */
01939         char *name;             /* pointer to file name */
01940 };
01941 #define FILE_SSIZE 4            /* short size of file structure */
01942 
01943 #endif /* Version == 3 */
01944 
01945 /* --- file directory --- */
01946 struct Cif_unittbl {
01947         FIELD unitpos:32;       /* file position of CIF_UNIT record */
01948         FIELD nlen:8;           /* number of characters in unit name */
01949         char *name;             /* pointer to unit name */
01950 };
01951 #define UNITTBL_SSIZE 5         /* short size of unittbl structure */
01952 
01953 struct Cif_filedir {
01954         FIELD rectype:8;        /* type of record = CIF_FILEDIR */
01955         FIELD maxfid:24;        /* largest file id present in file */
01956         FIELD nunits:16;        /* number of units in file */
01957         FIELD nfiles:16;        /* number of CIF_FILE records present */
01958         FIELD maxsid:24;        /* maximum symbol id present in file */
01959         FIELD un1:8;            /* unused */
01960         FIELD nincs:16;         /* number of CIF_INCLUDE records present */
01961         struct Cif_unittbl *ut; /* pointer to unit table */
01962 };
01963 #define FILEDIR_SSIZE 14        /* short size of filedir */
01964 
01965 /* --- included file use --- */
01966 struct Cif_include {
01967         FIELD rectype:8;        /* type of record = CIF_INCLUDE */
01968         FIELD line:24;          /* line where include occurs */
01969         FIELD cpos:16;          /* char position where include occurs */
01970         FIELD srcid:16;         /* id of file where include occurs */
01971         FIELD incid:16;         /* id of file included */
01972 };
01973 #define INCLUDE_SSIZE 10        /* short size of include structure */
01974 
01975 /* --- Fortran 77 label info --- */
01976 struct Cif_label {
01977         FIELD rectype:8;        /* type of record = CIF_LABEL */
01978         FIELD symid:24;         /* symbol id assigned to label name */
01979         FIELD ltype:8;          /* type of label */
01980         FIELD nlen:8;           /* number of characters in name */
01981         char *name;             /* pointer to label name */
01982 };
01983 #define LABEL_SSIZE 6           /* short size of label structure */
01984 
01985 /* --- loop definition --- */
01986 struct Cif_loop {
01987         FIELD rectype:8;        /* type of record = CIF_LOOP */
01988         FIELD strline:24;       /* starting line of loop */
01989         FIELD lptype:8;         /* loop type */
01990         FIELD endline:24;       /* ending line of loop */
01991         FIELD strcpos:16;       /* starting char position of loop */
01992         FIELD endcpos:16;       /* ending char position of loop */
01993         FIELD sfid:16;          /* id of file where loop ends */
01994         FIELD efid:16;          /* id of file where loop ends */
01995         FIELD symid:24;         /* id of control variable */
01996         FIELD un1:8;            /* unused */
01997         FIELD labelid:24;       /* id of label terminating loop */
01998 };
01999 #define LOOP_SSIZE 23           /* short size of label structure */
02000 
02001 #if CIF_VERSION == 1
02002 
02003 /* --- machine characteristics --- */
02004 struct Cif_mach_char {
02005         FIELD rectype:8;        /* type of record = CIF_MACH_CHAR */
02006         int memspeed;           /* memory cycle time */
02007         long memsize;           /* number of words of memory */
02008         long valmask;           /* characteristics value mask */
02009         char cpuname[16];       /* name of target cpu */
02010 };
02011 #define MACH_CHAR_SSIZE sizeof(struct Cif_mach_char)
02012 
02013 #else  /* CIF_VERSION != 1 */
02014 
02015 /* --- machine characteristics --- */
02016 struct Cif_mach_char {
02017         FIELD rectype:8;        /* type of record = CIF_MACH_CHAR */
02018         FIELD memspeed:24;      /* memory cycle time */
02019         FIELD memsize:32;       /* number of words of memory */
02020         FIELD valmask:32;       /* characteristics value mask */
02021         char cpuname[15];       /* name of target cpu */
02022         FIELD tbitlen:8;        /* bit length on the target machine */
02023         FIELD numbanks:16;      /* number of memory banks */
02024         FIELD numcpus:16;       /* number of cpus */
02025         FIELD instbufsize:32;   /* instruction buffer size */
02026         FIELD clockperiod:16;   /* clock period in picoseconds */
02027         FIELD numclregs:16;     /* number of register clusters */
02028         FIELD bankbusytime:16;  /* number of clock periods that the memory bank is reserved */
02029 };
02030 #define MACH_CHAR_SSIZE 42      /* short size of machine char structure */
02031 
02032 struct Cif_mach_char_1 {
02033         FIELD rectype:8;        /* type of record = CIF_MACH_CHAR */
02034         int memspeed;           /* memory cycle time */
02035         long memsize;           /* number of words of memory */
02036         long valmask;           /* characteristics value mask */
02037         char cpuname[16];       /* name of target cpu */
02038 };
02039 #define MACH_CHAR_SSIZE_1 sizeof(struct Cif_mach_char_1)
02040 
02041 
02042 
02043 #endif /* CIF_VERSION == 1 */
02044 
02045 #if CIF_VERSION < 3
02046  
02047 /* --- Fortran message --- */
02048 struct Cif_message {
02049         FIELD rectype:8;        /* type of record = CIF_MESSAGE */
02050         FIELD fline:24;         /* line where message occurs */
02051         FIELD severity:8;       /* message severity */
02052         FIELD uline:24;         /* base level file line number */
02053         FIELD msgno:16;         /* message number */
02054         FIELD cpos:16;          /* char position where message occurs */
02055         FIELD nargs:8;          /* number of argument strings */
02056         FIELD fid:16;           /* id of file where message occurs */
02057         char **args;            /* pointer to array of argument pointers */
02058 };
02059 #define MESSAGE_SSIZE 15        /* short size of message structure */
02060 
02061 #else
02062 
02063 /* --- Fortran message --- */
02064 struct Cif_message {
02065         FIELD rectype:8;        /* type of record = CIF_MESSAGE */
02066         FIELD fline:24;         /* line where message occurs */
02067         FIELD severity:8;       /* message severity */
02068         FIELD uline:24;         /* base level file line number */
02069         FIELD msgno:16;         /* message number */
02070         FIELD cpos:16;          /* char position where message occurs */
02071         FIELD nargs:8;          /* number of argument strings */
02072         FIELD fid:16;           /* id of file where message occurs */
02073         FIELD nlen:8;           /* scoping unit name length */
02074         FIELD order:8;          /* relative order of same position messages */
02075         FIELD flags:8;          /* 0001 = alternative field definition */
02076         FIELD un1:16;           /* padding for future expandion */
02077         FIELD pfid:24;          /* primary fid, will only differ from fid when
02078                                  * a message comes from an inlined */
02079         char **args;            /* pointer to array of argument pointers */
02080         char *name;             /* scoping unit name */
02081 };
02082 #define MESSAGE_SSIZE 23        /* short size of message structure */
02083 
02084 /* --- Fortran message --- */
02085 struct Cif_message_1 {
02086         FIELD rectype:8;        /* type of record = CIF_MESSAGE */
02087         FIELD fline:24;         /* line where message occurs */
02088         FIELD severity:8;       /* message severity */
02089         FIELD uline:24;         /* base level file line number */
02090         FIELD msgno:16;         /* message number */
02091         FIELD cpos:16;          /* char position where message occurs */
02092         FIELD nargs:8;          /* number of argument strings */
02093         FIELD fid:16;           /* id of file where message occurs */
02094         char **args;            /* pointer to array of argument pointers */
02095 };
02096 #define MESSAGE_SSIZE_1 15      /* short size of message structure */
02097 
02098 #endif /* CIF_VERSION < 3 */
02099 
02100 #if CIF_VERSION == 1
02101 
02102 /* --- Fortran 77 miscellaneous options --- */
02103 struct Cif_misc_opts {
02104         FIELD rectype:8;        /* type of record = CIF_MISC_OPTS */
02105         FIELD malloc:4;         /* type of memory allocation */
02106         FIELD intlen:4;         /* length of integers */
02107         FIELD msglvl:4;         /* message level */
02108         FIELD vopt:4;           /* compilation statistics enabled */
02109         FIELD amode:4;          /* addressing mode */
02110         FIELD trunc:4;          /* truncation enabled */
02111         FIELD truncval:8;       /* number of bits to truncate */
02112         FIELD nmsgs:8;          /* number of messages disabled */
02113         FIELD ncdirs:8;         /* number of cdirs disabled */
02114         FIELD onlen:8;          /* no. of chars in object file name */
02115         FIELD cnlen:8;          /* no. of chars in cal file name */
02116         FIELD inlen:8;          /* no. of chars in inline file name */
02117         long *msgno;            /* pointer to messages disabled */
02118         char **cdirs;           /* pointer to cdirs disabled */
02119         char *objname;          /* pointer to object file name */
02120         char *calname;          /* pointer to cal file name */
02121         char *inname;           /* pointer to inline file name */
02122 };
02123 #define MISC_OPTS_SSIZE 10      /* short size of misc_opts structure */
02124 
02125 #else /* CIF_VERSION != 1 */
02126 
02127 /* --- Fortran 77 miscellaneous options --- */
02128 struct Cif_misc_opts {
02129         FIELD rectype:8;        /* type of record = CIF_MISC_OPTS */
02130         FIELD malloc:4;         /* type of memory allocation */
02131         FIELD intlen:4;         /* length of integers */
02132         FIELD msglvl:4;         /* message level */
02133         FIELD vopt:4;           /* compilation statistics enabled */
02134         FIELD amode:4;          /* addressing mode */
02135         FIELD trunc:4;          /* truncation enabled */
02136         FIELD truncval:8;       /* number of bits to truncate */
02137         FIELD nmsgs:8;          /* number of messages disabled */
02138         FIELD ncdirs:8;         /* number of cdirs disabled */
02139         FIELD onlen:8;          /* no. of chars in object file name */
02140         FIELD cnlen:8;          /* no. of chars in cal file name */
02141         FIELD inlen:8;          /* no. of chars in inline file name */
02142         FIELD llen:8;           /* no. of chars in listing file name */
02143 #ifdef CRAY
02144         /*
02145          * this format is fine on a Cray as we use two words and
02146          * there is no overlapping of bounadries; however, on the
02147          * sun cifopt spans a 32 bit word, so has to be moved.
02148          * Unfortunately, a release with this format has already been
02149          * released on a Cray, so it can not be changed as there
02150          * might be binary CIF's created which expect the original
02151          * format
02152          */
02153         FIELD cifopt:16;        /* cif options , see CIF_CO_? */
02154         FIELD inputlen:8;       /* input line length, 72 or 80 */
02155 #else
02156         FIELD inputlen:8;       /* input line length, 72 or 80 */
02157         FIELD cifopt:16;        /* cif options , see CIF_CO_? */
02158 #endif /* CRAY */
02159         FIELD runtime:8;        /* run time checking, see CIF_RT_? */
02160         FIELD numincs:8;        /* number of include directories specified with -P potion */
02161         long *msgno;            /* pointer to messages disabled */
02162         char **cdirs;           /* pointer to cdirs disabled */
02163         char *objname;          /* pointer to object file name */
02164         char *calname;          /* pointer to cal file name */
02165         char *inname;           /* pointer to inline file name */
02166         char *lname;            /* pointer to listing file name */
02167         char **incdirs;         /* pointer to include directories */
02168 };
02169 #define MISC_OPTS_SSIZE 16      /* short size of misc_opts structure */
02170 
02171 struct Cif_misc_opts_1 {
02172         FIELD rectype:8;        /* type of record = CIF_MISC_OPTS */
02173         FIELD malloc:4;         /* type of memory allocation */
02174         FIELD intlen:4;         /* length of integers */
02175         FIELD msglvl:4;         /* message level */
02176         FIELD vopt:4;           /* compilation statistics enabled */
02177         FIELD amode:4;          /* addressing mode */
02178         FIELD trunc:4;          /* truncation enabled */
02179         FIELD truncval:8;       /* number of bits to truncate */
02180         FIELD nmsgs:8;          /* number of messages disabled */
02181         FIELD ncdirs:8;         /* number of cdirs disabled */
02182         FIELD onlen:8;          /* no. of chars in object file name */
02183         FIELD cnlen:8;          /* no. of chars in cal file name */
02184         FIELD inlen:8;          /* no. of chars in inline file name */
02185         long *msgno;            /* pointer to messages disabled */
02186         char **cdirs;           /* pointer to cdirs disabled */
02187         char *objname;          /* pointer to object file name */
02188         char *calname;          /* pointer to cal file name */
02189         char *inname;           /* pointer to inline file name */
02190 };
02191 #define MISC_OPTS_SSIZE_1 10    /* short size of misc_opts structure */
02192 
02193 #endif /* CIF_VERSION == 1 */
02194 
02195 /* --- Fortran 77 namelist specification --- */
02196 struct Cif_namelist {
02197         FIELD rectype:8;        /* type of record = CIF_NAMELIST */
02198         FIELD symid:24;         /* symbol id assigned to namelist */
02199         FIELD nids:16;          /* number of items in namelist */
02200         FIELD nlen:8;           /* no. of characters in namelist */
02201         char *name;             /* ptr to name of namelist */
02202         long *ids;              /* ptr to list of ids in namelist */
02203 };
02204 #define NAMELIST_SSIZE 7        /* short size of namelist structure */
02205 
02206 /* --- Fortran non-default messages --- */
02207 struct Cif_nd_msg {
02208         FIELD rectype:8;        /* type of record = CIF_ND_MSG */
02209         FIELD fline:24;         /* line where message occurs */
02210         FIELD severity:8;       /* message severity */
02211         FIELD uline:24;         /* base level file line number */
02212         FIELD msgno:16;         /* message number */
02213         FIELD cpos:16;          /* char position where message occurs */
02214         FIELD fid:16;           /* id of file where message occurs */
02215         FIELD msgfid:16;        /* id of message catalog file */
02216         char group[16];         /* message group id */
02217         FIELD nargs:8;          /* number of argument strings */
02218         char **args;            /* pointer to array of argument pointers */
02219 };
02220 #define ND_MSG_SSIZE 33         /* short size of non-default msg structure */
02221 
02222 /* --- Fortran 77 object info --- */
02223 
02224 struct Cif_dim {
02225         int lower;                      /* lower bound */
02226         int upper;                      /* upper bound */
02227         FIELD ltype:8;          /* lower bound dimension type */
02228         FIELD utype:8;          /* upper bound dimension type */
02229 };
02230 #define DIM_SSIZE sizeof(struct Cif_dim)
02231 
02232 #if CIF_VERSION == 1
02233 
02234 struct Cif_object {
02235         FIELD rectype:8;        /* type of record = CIF_OBJECT */
02236         FIELD storage:24;       /* storage type of object */
02237         FIELD class:8;          /* symbol class of object */
02238         FIELD symid:24;         /* symbol id assigned to object */
02239         FIELD dtype:8;          /* data type of object */
02240         FIELD charlen:24;       /* if character type, character length */
02241         FIELD offset:32;        /* storage offset of object */
02242         FIELD nlen:8;           /* number of characters in name */
02243         FIELD ndims:3;          /* number of dimensions */
02244         FIELD aarray:1;         /* automatic array */
02245         FIELD equiv:1;          /* appears in EQUIVALENCE statement */
02246         FIELD data:1;           /* appears in DATA statement */
02247         FIELD save:1;           /* appears in SAVE statement */
02248         FIELD imptype:1;        /* implicitly defined flag */
02249         FIELD valoffset:1;      /* valid offset present indicator */
02250         FIELD cltype:1;         /* character length is assumed */
02251         FIELD un1:6;            /* unused */
02252         char *name;             /* pointer to name of object */
02253         struct Cif_dim *dim;    /* pointer to array of dimension items */
02254 };
02255 #define OBJECT_SSIZE 19         /* short size of object structure */
02256 
02257 #else /* CIF_VERSION != 1 */
02258 
02259 struct Cif_object {
02260         FIELD rectype:8;        /* type of record = CIF_OBJECT */
02261         FIELD storage:24;       /* storage type of object */
02262         FIELD symclass:8;       /* symbol class of object */
02263         FIELD symid:24;         /* symbol id assigned to object */
02264         FIELD dtype:8;          /* data type of object */
02265         FIELD charlen:24;       /* if character type, character length */
02266         FIELD offset:32;        /* storage offset of object */
02267         FIELD nlen:8;           /* number of characters in name */
02268         FIELD ndims:3;          /* number of dimensions */
02269         FIELD aarray:1;         /* automatic array */
02270         FIELD equiv:1;          /* appears in EQUIVALENCE statement */
02271         FIELD data:1;           /* appears in DATA statement */
02272         FIELD save:1;           /* appears in SAVE statement */
02273         FIELD imptype:1;        /* implicitly defined flag */
02274         FIELD valoffset:1;      /* valid offset present indicator */
02275         FIELD cltype:1;         /* character length is assumed */
02276         FIELD peresident:1;     /* object is PE resident */
02277         FIELD pointee:1;        /* object is a pointee */
02278         FIELD arraydec:1;       /* object used in an array declaration */
02279         FIELD geomdec:1;        /* object used in a geometry declaration */
02280         FIELD un1:6;            /* unused */
02281         FIELD dist:4;           /* distribution code, see CIF_DN_?? */
02282         FIELD geomid:24;        /* geometry id */
02283         FIELD un2:8;            /* unused */
02284         FIELD pointer:24;       /* pointer id if this is a pointee */
02285         char *name;             /* pointer to name of object */
02286         struct Cif_dim *dim;    /* pointer to array of dimension items */
02287 };
02288 #define OBJECT_SSIZE    27      /* short size of object structure */
02289 
02290 /* a copy of the version 1 cif, used if an application compiled with version 2
02291    wants to read a version 1 cif */
02292 
02293 struct Cif_object_1 {
02294         FIELD rectype:8;        /* type of record = CIF_OBJECT */
02295         FIELD storage:24;       /* storage type of object */
02296         FIELD symclass:8;       /* symbol class of object */
02297         FIELD symid:24;         /* symbol id assigned to object */
02298         FIELD dtype:8;          /* data type of object */
02299         FIELD charlen:24;       /* if character type, character length */
02300         FIELD offset:32;        /* storage offset of object */
02301         FIELD nlen:8;           /* number of characters in name */
02302         FIELD ndims:3;          /* number of dimensions */
02303         FIELD aarray:1;         /* automatic array */
02304         FIELD equiv:1;          /* appears in EQUIVALENCE statement */
02305         FIELD data:1;           /* appears in DATA statement */
02306         FIELD save:1;           /* appears in SAVE statement */
02307         FIELD imptype:1;        /* implicitly defined flag */
02308         FIELD valoffset:1;      /* valid offset present indicator */
02309         FIELD cltype:1;         /* character length is assumed */
02310         FIELD un1:6;            /* unused */
02311         char *name;             /* pointer to name of object */
02312         struct Cif_dim *dim;    /* pointer to array of dimension items */
02313 };
02314 #define OBJECT_SSIZE_1 19       /* short size of object structure */
02315 
02316 #endif /* CIF_VERSION == 1 */
02317 
02318 
02319 #if CIF_VERSION == 1
02320 
02321 /* --- Fortran 77 optimization options --- */
02322 struct Cif_opt_opts {
02323         FIELD rectype:8;        /* type of record = CIF_OPT_OPTS */
02324         long values;            /* optimization values mask */
02325 };
02326 #define OPT_OPTS_SSIZE sizeof(struct Cif_opt_opts)
02327 
02328 #else
02329 
02330 /* --- Fortran 77 optimization options --- */
02331 struct Cif_opt_opts {
02332         FIELD rectype:8;        /* type of record = CIF_OPT_OPTS */
02333         FIELD inlevel:2;        /* automatic inlining level */
02334         FIELD un1:22;
02335         FIELD values:32;        /* optimization values mask */
02336 };
02337 #define OPT_OPTS_SSIZE 8        /* short size of optimization options structure */
02338 
02339 
02340 /* --- Fortran 77 optimization options --- */
02341 struct Cif_opt_opts_1 {
02342         FIELD rectype:8;        /* type of record = CIF_OPT_OPTS */
02343         long values;            /* optimization values mask */
02344 };
02345 #define OPT_OPTS_SSIZE_1 sizeof(struct Cif_opt_opts_1)
02346 
02347 #endif /* CIF_VERSION == 1 */
02348 
02349 
02350 /* --- source file id --- */
02351 struct Cif_srcfile {
02352         FIELD rectype:8;        /* type of record = CIF_SRCFILE */
02353         FIELD form:8;           /* source file format */
02354         FIELD fid:16;           /* file id assigned to source file */
02355 };
02356 #define SRCFILE_SSIZE 4         /* short size of srcfile structure */
02357 
02358 /* --- summary --- */
02359 struct Cif_summary {
02360         FIELD rectype:8;        /* type of record = CIF_SUMMARY */
02361         char level[16];         /* compiler release level string */
02362         char gdate[16];         /* compiler generation date */
02363         char gtime[16];         /* compiler generation time */
02364         char ctime[16];         /* compilation time */
02365         long fldlen;            /* maximum target field length */
02366         long nlines;            /* number of source lines compiled */
02367         long csize;             /* length of generated code */
02368         long dsize;             /* length of generated data */
02369 };
02370 #define SUMMARY_SSIZE sizeof(struct Cif_summary)
02371 
02372 /* --- statement type --- */
02373 struct Cif_stmt_type {
02374         FIELD rectype:8;        /* type of record = CIF_STMT_TYPE */
02375         FIELD line:24;          /* line number of statement */
02376         FIELD cpos:16;          /* char position of statement */
02377         FIELD fid:16;           /* id of file where statement occurs */
02378         FIELD type:8;           /* statement type */
02379         FIELD eline:24;         /* end line */
02380         FIELD efid:16;          /* end file id */
02381         FIELD ecpos:16;         /* end char position */
02382 };
02383 #define STMT_TYPE_SSIZE 16      /* short size of stmt_type structure */
02384         
02385 /* --- begin unit marker --- */
02386 struct Cif_unit {
02387         FIELD rectype:8;        /* type of record = CIF_UNIT */
02388         FIELD line:24;          /* line where unit begins */
02389         FIELD cpos:16;          /* char position where unit begins */
02390         FIELD fid:16;           /* id of file where unit begins */
02391         FIELD nlen:8;           /* number of characters in name */
02392         char *name;             /* pointer to name of unit */
02393 };
02394 #define UNIT_SSIZE 9            /* short size of unit record */
02395 
02396 /* --- end unit marker --- */
02397 struct Cif_endunit {
02398         FIELD rectype:8;        /* type of record = CIF_ENDUNIT */
02399         FIELD line:24;          /* line where unit ends */
02400         FIELD cpos:16;          /* char position where unit ends */
02401         FIELD fid:16;           /* id of file where unit ends */
02402         FIELD nlen:8;           /* number of characters in name */
02403         char *name;             /* pointer to name of unit */
02404 };
02405 #define ENDUNIT_SSIZE 9         /* short size of endunit record */
02406 
02407 #if CIF_VERSION == 1
02408 
02409 /* --- usage --- */
02410 struct Cif_use {
02411         FIELD line:24;          /* line where usage occurs */
02412         FIELD utype:10;         /* type of usage, see CIF_OB_?? or CIF_F90_OB_?? */
02413         FIELD cpos:14;          /* char position where usage occurs */
02414         FIELD fid:16;           /* id of file where usage occurs */
02415 };
02416 
02417 struct Cif_usage {
02418         FIELD rectype:8;        /* type of record = CIF_USAGE */
02419         FIELD nuses:24;         /* number of symbol usages */
02420         FIELD symid:24;         /* symbol id used */
02421         struct Cif_use *use;    /* ptr to array of usages */
02422 };
02423 #define USAGE_SSIZE 7           /* short size of usage structure */
02424 
02425 #else /* VERSION != 1 */
02426 
02427 /* --- usage --- */
02428 struct Cif_use {
02429         FIELD line:24;          /* line where usage occurs */
02430         FIELD utype:10;         /* type of usage, see CIF_OB_?? or CIF_F90_OB_?? */
02431         FIELD data:1;           /* used in a data statement */
02432         FIELD init:1;           /* initialized in a declaration */
02433         FIELD cpos:12;          /* char position where usage occurs */
02434         FIELD fid:16;           /* id of file where usage occurs */
02435 };
02436 
02437 /* --- usage --- */
02438 struct Cif_use_1 {
02439         FIELD line:24;          /* line where usage occurs */
02440         FIELD utype:10;         /* type of usage, see CIF_OB_?? or CIF_F90_OB_?? */
02441         FIELD cpos:14;          /* char position where usage occurs */
02442         FIELD fid:16;           /* id of file where usage occurs */
02443 };
02444 
02445 struct Cif_usage {
02446         FIELD rectype:8;        /* type of record = CIF_USAGE */
02447         FIELD nuses:24;         /* number of symbol usages */
02448         FIELD symid:24;         /* symbol id used */
02449         FIELD nmembs:8;         /* number of structure member id's,
02450                                  *  eg for a%b%c, this would be 2 */
02451         long *membs;            /* b and c symbol id's for a%b%c, a is in symid */
02452         struct Cif_use *use;    /* ptr to array of usages */
02453 };
02454 #define USAGE_SSIZE 8           /* short size of usage structure */
02455 
02456 struct Cif_usage_1 {
02457         FIELD rectype:8;        /* type of record = CIF_USAGE */
02458         FIELD nuses:24;         /* number of symbol usages */
02459         FIELD symid:24;         /* symbol id used */
02460         struct Cif_use *use;    /* ptr to array of usages */
02461 };
02462 #define USAGE_SSIZE_1 7         /* short size of usage structure */
02463 
02464 #endif /* CIF_VERSION == 1 */
02465 
02466 
02467 /* --- unit directory --- */
02468 struct Cif_urectbl {
02469         FIELD rectype:8;        /* record type of records in section */
02470         FIELD nrecords:24;      /* number of records present in section */
02471         FIELD recpos:32;        /* file position of first record in section */
02472 };
02473 #define URECTBL_SSIZE sizeof(struct Cif_urectbl)
02474 
02475 struct Cif_unitdir {
02476         FIELD rectype:8;        /* type of record = CIF_UNITDIR */
02477         FIELD maxsid:24;        /* max symbol id present in unit */
02478         FIELD nsections:16;     /* number of record sections in unit */
02479         struct Cif_urectbl *ur; /* pointer to unit record table */
02480 };
02481 #define UNITDIR_SSIZE 6          /* short size of unitdir */
02482 
02483 
02484 
02485 
02486 #if CIF_VERSION != 1
02487 
02488 /* --- Code transformation record --- */
02489 struct Cif_transform {
02490         FIELD rectype:8;        /* type of record = CIF_TRANSFORM */
02491         FIELD line:23;          /* line number of the transform */
02492         FIELD type:1;           /* 0 = begin, 1 = end transform */
02493         FIELD fid:16;           /* file id of the transform */
02494 };
02495 #define TRANSFORM_SSIZE 6
02496 
02497 
02498 /* F90 Records */
02499 
02500 #if CIF_VERSION == 2
02501 
02502 /* --- F90 derived type --- */
02503 struct Cif_f90_derived_type {
02504         FIELD rectype:8;        /* type of record = CIF_F90_DERIVED_TYPE */
02505         FIELD symid:24;         /* symbol id assigned to derived type name */
02506         FIELD scopeid:24;       /* scope id for derived type definition */
02507         FIELD nlen:8;           /* name length */
02508         FIELD dervtype:24;      /* derived type id associated with this derived type */
02509         FIELD sequence:1;       /* definition contains the sequence statement */
02510         FIELD defprivate:1;     /* type definition has private access */
02511         FIELD comprivate:1;     /* type components have private access */
02512         FIELD un1:5;            /* unused */
02513         FIELD flag:16;          /* format and characteristics of the derived type, see CIF_DRT_?? */
02514         FIELD nmembs:16;        /* number of members of the derived type */
02515         char *name;             /* derived type name */
02516         long *memids;           /* ptr to list of component member symbol ids */
02517 };
02518 #define F90_DERIVED_TYPE_SSIZE 16  /* short size of derived_type */
02519 
02520 #else /* Version 3 CIF */
02521 
02522 /* --- F90 derived type --- */
02523 struct Cif_f90_derived_type {
02524         FIELD rectype:8;        /* type of record = CIF_F90_DERIVED_TYPE */
02525         FIELD symid:24;         /* symbol id assigned to derived type name */
02526         FIELD scopeid:24;       /* scope id for derived type definition */
02527         FIELD nlen:8;           /* name length */
02528         FIELD dervtype:24;      /* derived type id associated with this derived type */
02529         FIELD sequence:1;       /* definition contains the sequence statement */
02530         FIELD defprivate:1;     /* type definition has private access */
02531         FIELD comprivate:1;     /* type components have private access */
02532         FIELD un1:5;            /* unused */
02533         FIELD flag:16;          /* format and characteristics of the derived type, see CIF_DRT_?? */
02534         FIELD nmembs:16;        /* number of members of the derived type */
02535         FIELD moduleid:24;      /* module reference if this derived type came
02536                                  * from a module */
02537         FIELD un2:8;            /* padding, for future expansion */
02538         FIELD un3:32;
02539         FIELD un4:32;
02540 
02541         char *name;             /* derived type name */
02542         long *memids;           /* ptr to list of component member symbol ids */
02543 };
02544 #define F90_DERIVED_TYPE_SSIZE 28  /* short size of derived_type */
02545 
02546 /* --- F90 derived type --- */
02547 struct Cif_f90_derived_type_2 {
02548         FIELD rectype:8;        /* type of record = CIF_F90_DERIVED_TYPE */
02549         FIELD symid:24;         /* symbol id assigned to derived type name */
02550         FIELD scopeid:24;       /* scope id for derived type definition */
02551         FIELD nlen:8;           /* name length */
02552         FIELD dervtype:24;      /* derived type id associated with this derived type */
02553         FIELD sequence:1;       /* definition contains the sequence statement */
02554         FIELD defprivate:1;     /* type definition has private access */
02555         FIELD comprivate:1;     /* type components have private access */
02556         FIELD un1:5;            /* unused */
02557         FIELD flag:16;          /* format and characteristics of the derived type, see CIF_DRT_?? */
02558         FIELD nmembs:16;        /* number of members of the derived type */
02559         char *name;             /* derived type name */
02560         long *memids;           /* ptr to list of component member symbol ids */
02561 };
02562 #define F90_DERIVED_TYPE_SSIZE_2 16  /* short size of derived_type */
02563 
02564 #endif /* CIF_VERSION == 2 */
02565 
02566 /* --- F90 call site --- */
02567 struct Cif_f90_callsite {
02568         FIELD rectype:8;        /* type of record = CIF_F90_CALLSITE */
02569         FIELD line:24;          /* line where call occurs */
02570         FIELD cpos:16;          /* char position where call occurs */
02571         FIELD nargs:16;         /* number of actual arguments */
02572         FIELD entryid:24;       /* symbol id for called procedure */
02573         FIELD valused:1;        /* unused */
02574         FIELD rank:1;           /* true if argid ranks are specied */
02575         FIELD un1:6;            /* padding field */
02576         FIELD procid:24;        /* specific procedure symbol id if a generic name */
02577         FIELD un2:8;            /* unused */
02578         FIELD fid:16;           /* id of file where call occurs */
02579         FIELD un3:16;           /* unused */
02580         FIELD scopeid:24;       /* scopeid where this call occus */
02581         struct Cif_f90_callsite *link; /* pointer to other call site record */
02582         long *argids;           /* ptr to list of actual argument ids */
02583         int *nmembs;            /* ptr to a list of the number of member symbol id's for each argid */
02584         long **membs;           /* ptr to member symold id's for each argid, eg the b of a%b */
02585         int *ranks;             /* ptr to rank of each argument; 0 for scalar
02586                                  * 1 for 1-D array etc */
02587 };
02588 #define F90_CALLSITE_SSIZE 23   /* short size of callsite structure */
02589 
02590 /* --- F90 common block --- */
02591 struct Cif_f90_comblk {
02592         FIELD rectype:8;        /* type of record = CIF_F90_COMBLK */
02593         FIELD symid:24;         /* symbol id assigned to common block */
02594         FIELD length:32;        /* number of bytes in common block */
02595         FIELD cbtype:8;         /* storage class of common block, see CIF_CB_?? */
02596         FIELD scopeid:24;       /* scope id of scope containing this common block */
02597         FIELD nlen:8;           /* number of characters in name */
02598         FIELD moduleid:24;      /* module where this common block was defined, NULL if not defined in a module */
02599         FIELD dist:8;           /* common block distribution, see CIF_DN_?? */
02600         char *name;             /* pointer to common block name */
02601 };
02602 #define F90_COMBLK_SSIZE 16             /* short size of comblk structure */
02603 
02604 /* --- F90 constant symbol info --- */
02605 struct Cif_f90_const {
02606         FIELD rectype:8;        /* type of record = CIF_F90_CONST */
02607         FIELD aggregate:1;      /* 0 = scalar; 1 = aggregate constructor */
02608         FIELD strline:23;       /* starting line of value */
02609         FIELD endline:24;       /* ending line of value */
02610         FIELD un1:8;            /* unused */
02611         FIELD vlen:16;          /* number of characters in value */
02612         FIELD fid:16;           /* id of file where named constant declaration occurs */
02613         FIELD strpos:16;        /* starting character position of value */
02614         FIELD endpos:16;        /* ending character position of value */
02615         FIELD symid:24;         /* symbol id assigned to constant name */
02616         FIELD un2:8;            /* unused */
02617         FIELD scopeid:24;       /* scopeid where this constant is declared */
02618         char *value;            /* pointer to symbol value string */
02619 };
02620 #define F90_CONST_SSIZE 23              /* short size of f90 const structure */
02621 
02622 /* --- F90 entry point/procedure information --- */
02623 struct Cif_f90_entry {
02624         FIELD rectype:8;        /* type of record = CIF_F90_ENTRY */
02625         FIELD symid:24;         /* symbol id assigned to procedure name */
02626         FIELD etype:8;          /* type of entry, see CIF_F90_ET_?? */
02627         FIELD resultid:24;      /* symbol id for the result name, if appropriate */
02628         FIELD ptype:8;          /* sub-type entry, see CIF_F90_PT_?? */
02629         FIELD useassoc:1;       /* entry point was brought in by use association */
02630         FIELD direct:1;         /* appears in use stmt in this source, otherwise the module is used indirectly through another module */
02631                                 /* Note. only used by cflist, via cif_lines
02632                                  * function. Not set otherwise; see use_module
02633                                  * record */
02634         FIELD scopeid:22;       /* scope id for the scope containing this entry point, definition or reference */
02635         FIELD moduleid:24;      /* module id if entry from a module */
02636         FIELD nlen:8;           /* number of characters in name */
02637         FIELD valargs:1;        /* valid arguments present indicator */
02638         FIELD defined:1;        /* entry point is being defined */
02639         FIELD intblock:1;       /* defined in an interface block */
02640         FIELD stmtfunc:1;       /* routine is a statement function */
02641         FIELD referenced:1;     /* entry point is being referenced */
02642         FIELD optional:1;       /* OPTIONAL */
02643         FIELD priv:1;           /* PRIVATE */
02644         FIELD recur:1;          /* RECURSIVE */
02645         FIELD nargs:8;          /* number of formal arguments, -1 if unknown */
02646         long *argids;           /* ptr to list of formal argument ids */
02647         char *name;             /* pointer to procedure name */
02648 };
02649 #define F90_ENTRY_SSIZE 18      /* short size of f90 entry structure */
02650 
02651 /* --- F90 loop definition --- */
02652 struct Cif_f90_loop {
02653         FIELD rectype:8;        /* type of record = CIF_F90_LOOP */
02654         FIELD strline:24;       /* starting line of loop */
02655         FIELD lptype:8;         /* loop type, see CIF_LP_?? */
02656         FIELD endline:24;       /* ending line of loop */
02657         FIELD strcpos:16;       /* starting char position of loop */
02658         FIELD endcpos:16;       /* ending char position of loop */
02659         FIELD sfid:16;          /* id of file where loop ends */
02660         FIELD efid:16;          /* id of file where loop ends */
02661         FIELD scopeid:24;       /* scope id for this loop */
02662         FIELD stmtid1:8;        /* top most bits of the statement id */
02663         FIELD symid:24;         /* id of control variable */
02664         FIELD stmtid2:8;        /* middle bits of the statement id */
02665         FIELD labelid:24;       /* id of label terminating loop */
02666         FIELD stmtid3:8;        /* bottom bits of the statement id */
02667         FIELD nameid:24;        /* construct name symbol id */
02668 };
02669 /* contstruct the full stmt id from its individual
02670  * components. This field was added after the record
02671  * definition, resulting in this non-optimal solution
02672  */ 
02673 #define TOPBITS 255 << 16
02674 #define MIDDLEBITS 255 << 8
02675 #define BOTTOMBITS 255
02676 #define stmtid(A) ((A)->stmtid1<<16 | (A)->stmtid2<<8 | (A)->stmtid3)
02677 #define setStmtid(A, B) (A)->stmtid1 = (((B) & TOPBITS) >> 16); (A)->stmtid2 = (((B) & MIDDLEBITS) >> 8); (A)->stmtid3 = (B) & BOTTOMBITS
02678 #define F90_LOOP_SSIZE 31               /* short size of f90 loop structure */
02679 
02680 
02681 /* --- F90 label info --- */
02682 struct Cif_f90_label {
02683         FIELD rectype:8;        /* type of record = CIF_F90_LABEL */
02684         FIELD symid:24;         /* symbol id assigned to label name */
02685         FIELD ltype:8;          /* type of label, see CIF_LB_?? */
02686         FIELD scopeid:24;       /* scope id for this label */
02687         FIELD nlen:8;           /* number of characters in name */
02688         char *name;             /* pointer to label name */
02689 };
02690 #define F90_LABEL_SSIZE 9               /* short size of f90 label structure */
02691 
02692 
02693 /* --- F90 namelist specification --- */
02694 struct Cif_f90_namelist {
02695         FIELD rectype:8;        /* type of record = CIF_F90_NAMELIST */
02696         FIELD symid:24;         /* symbol id assigned to namelist */
02697         FIELD nlen:8;           /* no. of characters in namelist */
02698         FIELD scopeid:24;       /* scope id for this namelist */
02699         FIELD nids:16;          /* number of items in namelist */
02700         FIELD un:16;            /* unused word boundary padding */
02701         FIELD moduleid:24;      /* module where this namelist was defined, NULL if not declared in a module */
02702         char *name;             /* ptr to name of namelist */
02703         long *ids;              /* ptr to list of ids in namelist */
02704 };
02705 #define F90_NAMELIST_SSIZE 15   /* short size of f90 namelist structure */
02706 
02707 
02708 /* --- F90 object info --- */
02709 
02710 struct Cif_f90_object {
02711         FIELD rectype:8;        /* type of record = CIF_F90_OBJECT */
02712         FIELD symid:24;         /* symbol id assigned to object */
02713         FIELD storage:8;        /* storage type of object, see CIF_F90_ST_?? */
02714         FIELD storageid:24;     /* symbol id for a named storage area (common or module) */
02715         FIELD symclass:8;       /* symbol class of object, see CIF_F90_SC_?? */
02716         FIELD charlen:24;       /* if character type, character length */
02717         FIELD offset:32;        /* storage offset of object */
02718         FIELD nlen:8;           /* number of characters in name */
02719         FIELD ndims:4;          /* number of dimensions */
02720         FIELD equiv:1;          /* appears in EQUIVALENCE statement */
02721         FIELD data:1;           /* appears in a DATA statement */
02722         FIELD save:1;           /* appears in a SAVE statement */
02723         FIELD imptype:1;        /* implicitly typed */
02724         FIELD valoffset:1;      /* valid offset present indicator */
02725         FIELD deftype:1;        /* default type */
02726         FIELD allocatable:1;    /* ALLOCATABLE */
02727         FIELD startype:1;       /* star typed */
02728         FIELD kindtype:1;       /* kind typed */
02729         FIELD intentin:1;       /* INTENT(IN) */
02730         FIELD intentout:1;      /* INTENT(OUT) */
02731         FIELD intentinout:1;    /* INTENT(INOUT) */
02732         FIELD optional:1;       /* OPTIONAL */
02733         FIELD pointer:1;        /* POINTER */
02734         FIELD priv:1;           /* PRIVATE */
02735         FIELD target:1;         /* TARGET */
02736         FIELD chartype:4;       /* type of character string: constant, expression or assumed */
02737         FIELD scopeid:24;       /* scope id for this object */
02738         FIELD atype:3;          /* array type, see CIF_AT_?? */
02739         FIELD peresident:1;     /* object is PE resident */
02740         FIELD pointee:1;        /* object is a pointee */
02741         FIELD arraydec:1;       /* object used in an array declaration */
02742         FIELD geomdec:1;        /* object used in a geometry declaration */
02743         FIELD init:1;           /* object initialised at declaration */
02744         FIELD dervid:24;        /* derived type id */
02745         FIELD dist:4;           /* distribution code, see CIF_DN_?? */
02746         FIELD localname:1;      /* local name of entry in a module */
02747         FIELD un1:3;
02748         FIELD dtype:32;         /* data type of object, see CIF_F90_DT_?? */
02749         FIELD geomid:24;        /* geometry id */
02750         FIELD un2:8;
02751         FIELD pointerid:24;     /* pointer id if this is a pointee */
02752         char *name;             /* pointer to name of object */
02753         struct Cif_dim *dim;    /* pointer to array of dimension items */
02754 };
02755 #define F90_OBJECT_SSIZE 39     /* short size of F90 object structure */
02756 
02757 
02758 
02759 /* --- F90 miscellaneous options --- */
02760 struct Cif_f90_misc_opts {
02761         FIELD rectype:8;        /* type of record = CIF_F90_MISC_OPTS */
02762         FIELD intlen:4;         /* length of integers */
02763         FIELD msglvl:4;         /* message level */
02764         FIELD vopt:4;           /* compilation statistics enabled */
02765         FIELD trunc:4;          /* truncation enabled */
02766         FIELD truncval:8;       /* number of bits to truncate */
02767         FIELD swidth:8;         /* source line width in fixed source form; 72 or 80 */
02768         FIELD nmsgs:8;          /* number of messages disabled */
02769         FIELD ncdirs:8;         /* number of cdirs disabled */
02770         FIELD nPdirs:8;         /* number of times the -P (include path) option was specified */
02771         FIELD npdirs:8;         /* number of times the -p (module path) option was specified */
02772         FIELD onlen:8;          /* no. of chars in object file name */
02773         FIELD cnlen:8;          /* no. of chars in cal file name */
02774         FIELD inlen:8;          /* no. of chars in inline file name */
02775         FIELD ciflen:8;         /* no. of chars in cif name */
02776         FIELD cifopts:8;        /* cif options specified, see CIF_CO_?? */
02777         FIELD srcform:1;        /* 0 if -f fixed (default), 1 if -f free */
02778         FIELD runtime:7;        /* run time checking, see CIF_RT_? */
02779         long *msgno;            /* pointer to messages disabled */
02780         char **cdirs;           /* pointer to cdirs disabled */
02781         char **Pdirs;           /* pointer to -P dirs specified */
02782         char **pdirs;           /* pointer to -p dirs specified */
02783         char *objname;          /* pointer to object file name */
02784         char *calname;          /* pointer to cal file name */
02785         char *inname;           /* pointer to inline file name */
02786         char *cifname;          /* pointer to cif name */
02787 };
02788 #define F90_MISC_OPTS_SSIZE 15  /* short size of f90 misc_opts structure */
02789 
02790 
02791 
02792 struct Cif_f90_level_opts {
02793   FIELD optinlevel:16;          /* level qualified compiler optimization options, see CIF_OOF_?? */
02794   FIELD level:16;                       /* level specifed for options */
02795 };
02796 
02797 #define OPTS_SSIZE sizeof(struct Cif_f90_level_opts)
02798 
02799 /* --- F90 optimization options --- */
02800 struct Cif_f90_opt_opts {
02801         FIELD rectype:8;        /* type of record = CIF_F90_OPT_OPTS */
02802         FIELD newdef:1; /* a bug in a version of libcif didn't write the correct
02803                            * values in a binary cif. This is now fixed, but for
02804                            * upwards compatability, libcif needs to recognise
02805                            * the old structure. This field is for internal
02806                            * use only. It is set for all new binary
02807                            * cif's */
02808         FIELD noptlevels:7;  /* number of optimisation levels */
02809         FIELD values:16;        /* optimization values mask, see CIF_OOF_?? */
02810         struct Cif_f90_level_opts *lopts;  /* ptr to options that are qualified by a level */
02811 };
02812 #define F90_OPT_OPTS_SSIZE 4  /* short size of f90 opt_opts */
02813 
02814 
02815 /* --- F90 begin scope --- */
02816 struct Cif_f90_begin_scope {
02817         FIELD rectype:8;        /* type of record = CIF_F90_BEGIN_SCOPE */
02818         FIELD scopeid:24;       /* scope id that is starting */
02819         FIELD fid:16;           /* id of file where this scope starts */
02820         FIELD cpos:16;          /* char position of start of this scope */
02821         FIELD line:24;          /* line number of scope start */
02822         FIELD stype:8;          /* scope type; see CIF_SCP_?? constants */
02823         FIELD symid:24;         /* symid of a named scope, NULL otherwise */
02824         FIELD level:8;          /* nesting level for this scope, 1...  */
02825         FIELD parentid:24;      /* scope id of the parent, NULL if no parent for level == 1 */
02826 };
02827 #define F90_BEGIN_SCOPE_SSIZE 19        /* short size of begin_scope */
02828 
02829 
02830 /* --- F90 end scope --- */
02831 struct Cif_f90_end_scope {
02832         FIELD rectype:8;        /* type of record = CIF_F90_END_SCOPE */
02833         FIELD scopeid:24;       /* scope id of scope that is ending */
02834         FIELD fid:16;           /* id of file where this scope ends */
02835         FIELD cpos:15;          /* char position of end of this scope */
02836         FIELD error:1;          /* error in this scope */
02837         FIELD line:24;          /* line number of scope end */
02838 };
02839 #define F90_END_SCOPE_SSIZE 11  /* short size of end_scope */
02840 
02841 
02842 /* --- F90 scope information --- */
02843 struct Cif_f90_scope_info {
02844         FIELD rectype:8;        /* type of record = CIF_F90_SCOPE_INFO */
02845         FIELD scopeid:24;       /* scope id to provide information on */
02846         FIELD impnone:1;        /* contains 1 if this scope has an IMPLICIT NONE statement */
02847         FIELD doesio:1;         /* contains 1 if this scope contains any I/O statements */
02848         FIELD hascalls:1;       /* contains 1 if this scope contains any procedure calls */
02849         FIELD hascmics:1;       /* contains 1 if this scope contains any CMIC$ directives */
02850         FIELD numalts:12;       /* number of alternate entry points for this scope */
02851         long *entryids;         /* ptr to list of alternate entry ids */
02852 };
02853 #define F90_SCOPE_INFO_SSIZE 6  /* short size of scope_info */
02854 
02855 
02856 /* --- F90 use module --- */
02857 struct Cif_f90_use_module {
02858         FIELD rectype:8;        /* type of record = CIF_F90_USE_MODULE */
02859         FIELD modid:24;         /* symbol id for the module name */
02860         FIELD modfid:16;        /* file id where the module source appears */
02861         FIELD direct:1;         /* 1 if module appears in use stmt, 0 if included via use of another module */
02862         FIELD un1:15;           /* unused */
02863 };
02864 #define F90_USE_MODULE_SSIZE 8  /* short size of use_module */
02865 
02866         
02867 /* --- F90 rename --- */
02868 struct Cif_f90_rename {
02869         FIELD rectype:8;        /* type of record = CIF_F90_RENAME */
02870         FIELD modid:24;         /* symbol id for the module name */
02871         FIELD orignlen:8;       /* length of original name in the module */
02872         FIELD origmodid:24;     /* symbol id for the original module */
02873         FIELD nlen:8;           /* length of name in the module */
02874         FIELD scopeid:24;       /* scope id containing the rename clause */
02875         FIELD nlocalids:8;      /* number of local object id's */
02876         FIELD nameid:24;        /* symbol id for the entities name in the module */
02877         long *localid;          /* array of local object id's */
02878         char *name;             /* name of the object within the module */
02879         char *origname;         /* origibal name when defined */
02880 };
02881 #define F90_RENAME_SSIZE 16     /* short size of rename */
02882 
02883 
02884 /* --- F90 interface block--- */
02885 
02886 #if CIF_VERSION <= 2
02887 struct Cif_f90_int_block {
02888         FIELD rectype:8;        /* type of record = CIF_F90_INT_BLOCK */
02889         FIELD intid:24;         /* symbol id of generic name or operator, otherwise NULL */
02890         FIELD type:7;           /* interface block type; see CIF_IB_?? */
02891         FIELD priv:1;           /* private interface block */
02892         FIELD nlen:8;           /* name length */
02893         FIELD numints:16;       /* number of interfaces described in this interface block */
02894         FIELD scopeid:24;       /* scope id for interface block */
02895         long *procids;          /* ptr to list of specific procedure symbol ids */
02896         char *name;             /* interface block name */
02897 };
02898 #define F90_INT_BLOCK_SSIZE 11  /* short size of interface block */
02899 
02900 #else  /* CIF_VERSION == 3 */
02901 
02902 struct Cif_f90_int_block {
02903         FIELD rectype:8;        /* type of record = CIF_F90_INT_BLOCK */
02904         FIELD intid:24;         /* symbol id of generic name or operator, otherwise NULL */
02905         FIELD type:7;           /* interface block type; see CIF_IB_?? */
02906         FIELD priv:1;           /* private interface block */
02907         FIELD nlen:8;           /* name length */
02908         FIELD numints:16;       /* number of interfaces described in this interface block */
02909         FIELD scopeid:24;       /* scope id for interface block */
02910         FIELD un1:8;            /* padding to word boundary */
02911         FIELD moduleid:24;      /* module id where interface block occurs */
02912         FIELD un2:32;           /* extra padding; just in case */
02913         FIELD un3:32;           /*  " */
02914         long *procids;          /* ptr to list of specific procedure symbol ids */
02915         char *name;             /* interface block name */
02916 };
02917 #define F90_INT_BLOCK_SSIZE 23  /* short size of interface block */
02918 
02919 struct Cif_f90_int_block_2 {
02920         FIELD rectype:8;        /* type of record = CIF_F90_INT_BLOCK */
02921         FIELD intid:24;         /* symbol id of generic name or operator, otherwise NULL */
02922         FIELD type:7;           /* interface block type; see CIF_IB_?? */
02923         FIELD priv:1;           /* private interface block */
02924         FIELD nlen:8;           /* name length */
02925         FIELD numints:16;       /* number of interfaces described in this interface block */
02926         FIELD scopeid:24;       /* scope id for interface block */
02927         long *procids;          /* ptr to list of specific procedure symbol ids */
02928         char *name;             /* interface block name */
02929 };
02930 #define F90_INT_BLOCK_SSIZE_2 11        /* short size of interface block */
02931 
02932 #endif /* CIF_VERSION <= 2 */
02933 
02934 
02935 
02936 /* --- F90 vectorization --- */
02937 struct Cif_f90_vectorization {
02938         FIELD rectype:8;        /* type of record = CIF_F90_VECTORIZATION */
02939 
02940 };
02941 #define F90_VECTORIZATION_SSIZE 1       /* short size of vectorization */
02942 
02943 
02944 #if CIF_VERSION == 2
02945 
02946 /* --- back end nodes --- */
02947 struct Cif_BE_node {
02948         FIELD   rectype:8;      /* type of record = CIF_BE_NODE */
02949         FIELD   block:24;       /* code block number */
02950         FIELD   blocklet:8;     /* code blocklet number */
02951         FIELD   nsuccs:4;       /* # of successor nodes */
02952         FIELD   nlines:4;       /* # of source lines */
02953         FIELD   type:7;         /* node type CIF_BE_xxx */
02954         FIELD   is_entry:1;     /* is entry to function */
02955         FIELD   subtype:8;      /* timing types */
02956         FIELD   app_before:8;   /* apprentice instr before blocklet */
02957         FIELD   app_after:8;    /* apprentice instr after  blocklet */
02958         FIELD   index:16;       /* index into statistic array */
02959         FIELD   clocks:32;      /* predicted # of clocks per pass */
02960         int     icnt[ CIF_IT_MAX ]; /* instruction counts */
02961         int     *succs;         /* array of successor code blocks */
02962         int     *lines;         /* array of source lines */
02963         char    *label;         /* func name, if CIF_TT_CALL */
02964 };
02965 #define BENODE_SSIZE    (16 + CIF_IT_MAX * sizeof( int )) /* short size */
02966 
02967 #else
02968 
02969 /* --- back end nodes --- */
02970 struct Cif_BE_node {
02971         FIELD   rectype:8;      /* type of record = CIF_BE_NODE */
02972         FIELD   block:24;       /* code block number */
02973         FIELD   blocklet:8;     /* code blocklet number */
02974         FIELD   nsuccs:4;       /* # of successor nodes */
02975         FIELD   nlines:4;       /* # of source lines */
02976         FIELD   type:7;         /* node type CIF_BE_xxx */
02977         FIELD   is_entry:1;     /* is entry to function */
02978         FIELD   subtype:8;      /* timing types */
02979         FIELD   app_before:8;   /* apprentice instr before blocklet */
02980         FIELD   app_after:8;    /* apprentice instr after  blocklet */
02981         FIELD   index:16;       /* index into statistic array */
02982         FIELD   clocks:32;      /* predicted # of clocks per pass */
02983         int     icnt[ CIF_IT_MAX ]; /* instruction counts */
02984         int     *succs;         /* array of successor code blocks */
02985         int     *fid;           /* array of source fids */
02986         int     *lines;         /* array of source lines */
02987         char    *label;         /* func name, if CIF_TT_CALL */
02988 };
02989 #define BENODE_SSIZE    (16 + CIF_IT_MAX * sizeof( int )) /* short size */
02990 
02991 /* --- back end nodes --- */
02992 struct Cif_BE_node_2 {
02993         FIELD   rectype:8;      /* type of record = CIF_BE_NODE */
02994         FIELD   block:24;       /* code block number */
02995         FIELD   blocklet:8;     /* code blocklet number */
02996         FIELD   nsuccs:4;       /* # of successor nodes */
02997         FIELD   nlines:4;       /* # of source lines */
02998         FIELD   type:7;         /* node type CIF_BE_xxx */
02999         FIELD   is_entry:1;     /* is entry to function */
03000         FIELD   subtype:8;      /* timing types */
03001         FIELD   app_before:8;   /* apprentice instr before blocklet */
03002         FIELD   app_after:8;    /* apprentice instr after  blocklet */
03003         FIELD   index:16;       /* index into statistic array */
03004         FIELD   clocks:32;      /* predicted # of clocks per pass */
03005         int     icnt[ CIF_IT_MAX ]; /* instruction counts */
03006         int     *succs;         /* array of successor code blocks */
03007         int     *lines;         /* array of source lines */
03008                                 /* if < 0, contains line<<8 | fid */
03009         char    *label;         /* func name, if CIF_TT_CALL */
03010 };
03011 #define BENODE_SSIZE_2  (16 + CIF_IT_MAX * sizeof( int )) /* short size */
03012 
03013 #endif /* CIF_VERSION == 2 */
03014 
03015 struct Cif_BE_fid {
03016         FIELD   rectype:8;      /* type of record = CIF_BE_FID */
03017         FIELD   block:24;       /* code block number */
03018         FIELD   blocklet:8;     /* code blocklet number */
03019         FIELD   un1:4;          /* # of successor nodes */
03020         FIELD   nfid:4;         /* # of source lines */
03021         int     *fid;           /* array of source fids */
03022 };
03023 #define BEFID_SSIZE 6           /* short size */
03024 
03025 #endif /* CIF_VERSION != 1 */
03026 
03027 
03028 #if CIF_VERSION == 3
03029 
03030 struct Cif_cc_type {
03031         FIELD   rectype:8;      /* type of record = CIF_CC_TYPE */
03032         FIELD   scopeid:24;     /* scope id */
03033         FIELD   ptype:16;       /* parent C type */
03034         FIELD   typeId:16;      /* C type id */
03035         FIELD   size:32;        /* container size in bits */
03036         FIELD   type:8;         /* type kind */
03037         FIELD   subtype:8;      /* sub type */
03038         FIELD   flags:8;        /* */
03039         FIELD   prec:8;         /* precision */
03040         FIELD   symid:24;       /* symbol id */
03041         FIELD   btype:8;        /* base type */
03042         FIELD   rtype:8;        /* return type */
03043         FIELD   nlen:8;         /* name length */
03044         FIELD   nmem:8;         /* # of member symid's */
03045         char    *name;          /* name */
03046         int     *mem;           /* array of symid's for members */
03047 };
03048 #define CCTYPE_SSIZE 23         /* short size */
03049 
03050 struct Cif_cc_entry {
03051         FIELD   rectype:8;      /* type of record = CIF_CC_ENTRY */
03052         FIELD   symid:24;       /* symbol id of entry point */
03053         FIELD   linkage:8;      /* linkage */
03054         FIELD   scopeid:24;     /* scope id */
03055         FIELD   typeId:16;      /* C type id */
03056         FIELD   ptype:16;       /* parent C type of class, if member func */
03057         FIELD   attr:8;         /* misc attributes */
03058         FIELD   sfid:24;        /* start file id */
03059         FIELD   sline:24;       /* start line */
03060         FIELD   scol:8;         /* start column */
03061         FIELD   nlen:8;         /* name length */
03062         FIELD   efid:24;        /* end file id */
03063         FIELD   eline:24;       /* end line */
03064         FIELD   ecol:8;         /* end column */
03065         FIELD   fsymid:24;      /* actual function symbol id */
03066         FIELD   elen:8;         /* external name length */
03067         FIELD   nparam:8;       /* # of formal parameters */
03068         char    *name;          /* name */
03069         char    *ename;         /* external name */
03070         int     *param;         /* array of formal param symid's */
03071 };
03072 #define CCENTRY_SSIZE 33        /* short size */
03073 
03074 struct Cif_cc_obj {
03075         FIELD   rectype:8;      /* type of record = CIF_CC_OBJ */
03076         FIELD   symid:24;       /* symbol id of entry point */
03077         FIELD   typeId:16;      /* C type id */
03078         FIELD   symcl:8;        /* symbol class, see CIF_CC_SC_?? */
03079         FIELD   linkage:8;      /* linkage */
03080         FIELD   storage:8;      /* storage class, see CIF_CC_ST_?? */
03081         FIELD   scopeid:24;     /* scope id */
03082         FIELD   offset:32;      /* offset of member within parent in bits */
03083         FIELD   ptype:24;       /* parent C type, or entry symid */
03084         FIELD   nlen:8;         /* name length */
03085         char    *name;          /* name */
03086 };
03087 #define CCOBJ_SSIZE 20          /* short size */
03088 
03089 struct Cif_cc_subtype {
03090         FIELD   rectype:8;      /* type of record = CIF_CC_SUBTYPE */
03091         FIELD   symid:24;       /* symbol id */
03092         FIELD   ptype:24;       /* parent symid */
03093         FIELD   symkind:8;      /* symbol kind */
03094         FIELD   subkind:8;      /* sub type kind */
03095         FIELD   flags:8;        /* */
03096 };
03097 #define CCSUBTYPE_SSIZE 10      /* short size */
03098 
03099 struct Cif_cc_enum {
03100         FIELD   rectype:8;      /* type of record = CIF_CC_ENUM */
03101         FIELD   symid:24;       /* symbol id */
03102         FIELD   typeId:16;      /* C type id */
03103         FIELD   nlen:8;         /* name length */
03104         FIELD   vlen:8;         /* value length */
03105         char    *name;          /* name of enum constant */
03106         char    *value;         /* ASCII form of constant value */
03107 };
03108 #define CCENUM_SSIZE 8          /* short size */
03109 
03110 struct Cif_cc_expr {
03111         FIELD   rectype:8;      /* type of record = CIF_CC_EXPR */
03112         FIELD   exprid:24;      /* expression id */
03113         FIELD   type:8;         /* expression type */
03114         FIELD   fid:24;         /* file id */
03115         FIELD   line:24;        /* line number */
03116         FIELD   col:8;          /* column number */
03117         FIELD   noper:8;        /* # operands */
03118         int     *oper;          /* array of expression id's of operands */
03119 };
03120 #define CCEXPR_SSIZE 13         /* short size */
03121 
03122 #endif
03123 
03124 #if CIF_VERSION == 3
03125 struct Cif_src_pos {
03126         FIELD rectype:8;        /* type of record = CIF_SRC_POS */
03127         FIELD srcid:24;         /* source id for this source position */
03128         FIELD kind:8;           /* kind of source position, see CIF_SRC_KIND_?? */
03129         FIELD psrcid:24;        /* parent source id for this source position */
03130         FIELD sline:24;         /* source line for the include or start of macro exp. */
03131         FIELD scol:8;           /* starting column for the above line
03132                                  * For f90, first character of the file name on the
03133                                  * INCLUDE line. For macros, this is the start column of
03134                                  * the macro expansion */
03135         FIELD fid:24;           /* ID of the file in the file table */
03136         FIELD ecol:8;           /* end column */
03137         FIELD eline:24;         /* end line of the include or macro expansion */
03138         FIELD un1:8;            /* padding to maintin 32 boundaries */
03139         FIELD symid:24;         /* symbol id of the macro being expanded */
03140 };
03141 #define SRC_POS_SSIZE 23        /* short size of source position record */
03142 
03143 struct Cif_orig_cmd {
03144         FIELD rectype:8;        /* type of record = CIF_ORIG_CMD */
03145         FIELD nlen:16;          /* length of the command line */
03146         char *name;             /* command line */
03147 };
03148 #define ORIG_CMD_SSIZE 3        /* short size of original command line record */
03149 #endif /* CIF_VERSION == 3 */
03150 
03151 
03152 
03153 
03154 #if CIF_VERSION != 1
03155 #define CIF_MAX_SSIZE 100       /* max short size for any record, used when mapping
03156                                    between a binary cif version 1 and an application
03157                                    wanting a version 2 (and vice a versa) */
03158 #endif /* CIF_VERSION != 1 */
03159 
03160 
03161 
03162 /* --- Structure pointer casting macros --- */
03163 #define CIFGEN(X)       ((struct Cif_generic *)(X))
03164 #define CIFCS(X)        ((struct Cif_callsite *)(X))
03165 #define CIFHDR(X)       ((struct Cif_cifhdr *)(X))
03166 #define CIFCB(X)        ((struct Cif_comblk *)(X))
03167 #define CIFCON(X)       ((struct Cif_const *)(X))
03168 #define CIFED(X)        ((struct Cif_edopts *)(X))
03169 #define CIFENTRY(X)     ((struct Cif_entry *)(X))
03170 #define CIFFILE(X)      ((struct Cif_file *)(X))
03171 #define CIFINC(X)       ((struct Cif_include *)(X))
03172 #define CIFLABEL(X)     ((struct Cif_label *)(X))
03173 #define CIFLOOP(X)      ((struct Cif_loop *)(X))
03174 #define CIFMC(X)        ((struct Cif_mach_char *)(X))
03175 #define CIFMSG(X)       ((struct Cif_message *)(X))
03176 #define CIFMO(X)        ((struct Cif_misc_opts *)(X))
03177 #define CIFNL(X)        ((struct Cif_namelist *)(X))
03178 #define CIFNMSG(X)      ((struct Cif_nd_msg *)(X))
03179 #define CIFOBJ(X)       ((struct Cif_object *)(X))
03180 #define CIFOPTOPT(X)    ((struct Cif_opt_opts *)(X))
03181 #define CIFSRC(X)       ((struct Cif_srcfile *)(X))
03182 #define CIFSUM(X)       ((struct Cif_summary *)(X))
03183 #define CIFSTMT(X)      ((struct Cif_stmt_type *)(X))
03184 #define CIFUNIT(X)      ((struct Cif_unit *)(X))
03185 #define CIFENDU(X)      ((struct Cif_endunit *)(X))
03186 #define CIFUSAGE(X)     ((struct Cif_usage *)(X))
03187 #define CIFUDIR(X)      ((struct Cif_unitdir *)(X))
03188 #define CIFFDIR(X)      ((struct Cif_filedir *)(X))
03189 #define CIFCCON(X)      ((struct Cif_c_const *)(X))
03190 #define CIFCENTRY(X)    ((struct Cif_c_entry *)(X))
03191 #define CIFCMSG(X)      ((struct Cif_c_message *)(X))
03192 #define CIFCOBJ(X)      ((struct Cif_c_object *)(X))
03193 #define CIFCOPTS(X)     ((struct Cif_c_opts *)(X))
03194 #define CIFCTAG(X)      ((struct Cif_c_tag *)(X))
03195 
03196 #if CIF_VERSION != 1
03197 #define CIFCMSG1(X)     ((struct Cif_c_message_1 *)(X))
03198 #define CIFCENTRY1(X)   ((struct Cif_c_entry_1 *)(X))
03199 
03200 #define CIFOBJ1(X)      ((struct Cif_object_1 *)(X))
03201 #define CIFCB1(X)       ((struct Cif_comblk_1 *)(X))
03202 #define CIFMO1(X)       ((struct Cif_misc_opts_1 *)(X))
03203 #define CIFCON1(X)      ((struct Cif_const_1 *)(X))
03204 #define CIFUSAGE1(X)    ((struct Cif_usage_1 *)(X))
03205 #define CIFMC1(X)       ((struct Cif_mach_char_1 *)(X))
03206 
03207 
03208 #define CIFTRAN(X)      ((struct Cif_transform *)(X))
03209 #define CIFCDIR(X)      ((struct Cif_cdir *)(X))
03210 #define CIFCDIRDO(X)    ((struct Cif_cdir_doshared *)(X))
03211 #define CIFGEOM(X)      ((struct Cif_geometry *)(X))
03212 #define CIFCONT(X)      ((struct Cif_continuation *)(X))
03213 #define CIFF90CS(X)     ((struct Cif_f90_callsite *)(X))
03214 #define CIFF90CB(X)     ((struct Cif_f90_comblk *)(X))
03215 #define CIFF90CON(X)    ((struct Cif_f90_const *)(X))
03216 #define CIFF90ENTRY(X)  ((struct Cif_f90_entry *)(X))
03217 #define CIFF90LOOP(X)   ((struct Cif_f90_loop *)(X))
03218 #define CIFF90DTYPE(X)  ((struct Cif_f90_derived_type *)(X))
03219 #define CIFF90LABEL(X)  ((struct Cif_f90_label *)(X))
03220 #define CIFF90NL(X)     ((struct Cif_f90_namelist *)(X))
03221 #define CIFF90OBJ(X)    ((struct Cif_f90_object *)(X))
03222 #define CIFF90MO(X)     ((struct Cif_f90_misc_opts *)(X))
03223 #define CIFF90OPTOPT(X) ((struct Cif_f90_opt_opts *)(X))
03224 #define CIFF90BS(X)     ((struct Cif_f90_begin_scope *)(X))
03225 #define CIFF90ES(X)     ((struct Cif_f90_end_scope *)(X))
03226 #define CIFF90SI(X)     ((struct Cif_f90_scope_info *)(X))
03227 #define CIFF90USE(X)    ((struct Cif_f90_use_module *)(X))
03228 #define CIFF90RN(X)     ((struct Cif_f90_rename *)(X))
03229 #define CIFF90IB(X)     ((struct Cif_f90_int_block *)(X))
03230 #define CIFF90VECT(X)   ((struct Cif_f90_vectorization *)(X))
03231 #define CIFCLDIR(X)     ((struct Cif_c_lint_directive *)(X))
03232 #define CIFCMDEF(X)     ((struct Cif_c_macro_def *)(X))
03233 #define CIFCMUDEF(X)    ((struct Cif_c_macro_undef *)(X))
03234 #define CIFCMUSE(X)     ((struct Cif_c_macro_usage *)(X))
03235 #define CIFCEEND(X)     ((struct Cif_c_entry_end *)(X))
03236 #define CIFBENODE(X)    ((struct Cif_BE_node *)(X))
03237 #define CIFBEFID(X)     ((struct Cif_BE_fid *)(X))
03238 
03239 #if CIF_VERSION >= 3
03240 #define CIFF90IB2(X)    ((struct Cif_f90_int_block_2 *)(X))
03241 #define CIFF90DTYPE2(X) ((struct Cif_f90_derived_type_2 *)(X))
03242 #define CIFMSG1(X)      ((struct Cif_message_1 *)(X))
03243 #define CIFFILE1(X)     ((struct Cif_file_1 *)(X))
03244 #define CIFCCTYPE(X)    ((struct Cif_cc_type *)(X))
03245 #define CIFCCENT(X)     ((struct Cif_cc_entry *)(X))
03246 #define CIFCCOBJ(X)     ((struct Cif_cc_obj *)(X))
03247 #define CIFCCSUB(X)     ((struct Cif_cc_subtype *)(X))
03248 #define CIFCCENUM(X)    ((struct Cif_cc_enum *)(X))
03249 #define CIFCCEXPR(X)    ((struct Cif_cc_expr *)(X))
03250 #define CIFSPOS(X)      ((struct Cif_src_pos *)(X))
03251 #define CIFOCMD(X)      ((struct Cif_orig_cmd *)(X))
03252 #define CIFBENODE2(X)   ((struct Cif_BE_node_2 *)(X))
03253 #endif
03254 
03255 #endif /* CIF_VERSION != 1 */
03256 
03257 
03258 
03259 
03260 
03261 
03262 
03263 CIF_BEGIN_DECLS
03264 extern int Cif_Close __((int, int));
03265 extern struct Cif_generic *Cif_Duplicate __((struct Cif_generic *));
03266 extern char *Cif_Errstring __((int));
03267 extern void Cif_Free __((struct Cif_generic *));
03268 extern int Cif_Getfiledir __((int, struct Cif_filedir **));
03269 extern int Cif_Getrecord __((int, struct Cif_generic **));
03270 extern long Cif_Getpos __((int));
03271 extern int Cif_Getunitdir __((int, struct Cif_unittbl *, struct Cif_unitdir **));
03272 extern int Cif_Memmode __((int, int));
03273 extern int Cif_Msginsert __((char *, struct Cif_generic *, char *, int));
03274 extern int Cif_Putrecord __((int, struct Cif_generic *));
03275 
03276 #if CIF_VERSION != 1
03277 extern int Cif_Cifconv __((char *, char *, int *, int, int));
03278 extern int Cif_Lines __((char *, char *, int *, int, int));
03279 extern void Cif_ConvDir __((char *dir));
03280 
03281 extern int Cif_CifStatus __(( ));
03282 
03283 extern char *Cif_Filename __((int));
03284 #endif /* CIF_VERSION != 1 */
03285 
03286 extern char* cif_basename __((char *));
03287 extern char *mktemp __((char *));
03288 
03289 /* The version 1 and version 2 Cif_Open functions below should be accessed
03290    indirectly through Cif_Open, NOT Cif_Open_Vx */
03291 
03292 /* Special open for version 1 applications, allows us to check if they are
03293    trying to open a cif greater than the library thay they were compiled
03294    with; ie app = v1, trying to open a v2 cif */
03295 
03296 #if CIF_VERSION == 1
03297 extern int Cif_Open_V1 __((char *, char *, int *, int));
03298 #endif
03299 
03300 /* Special open for version 2 applications, allows us to check if they are
03301    trying to open a cif less than the library thay they were compiled
03302    with; ie app = v1, trying to open a v2 cif */
03303 
03304 /* eraxxon: must be visible becuase will be used w/o a macro check! */
03305 /* #if CIF_VERSION == 2 */
03306 extern int Cif_Open_V2 __((char *, char *, int *, int));
03307 extern int Cif_Open_V2_1 __((char *, char *, int *, int, int));
03308 extern int Cif_Lines_V2_1 __((char *, char *, int *, int, int, int));
03309 extern int Cif_Cifconv_V2_1 __((char *, char *, int *, int, int, int));
03310 /* #endif */
03311 
03312 /* eraxxon: must be visible becuase will be used w/o a macro check! */
03313 /* #if CIF_VERSION == 3 */
03314 extern int Cif_Open_V3 __((char *, char *, int *, int));
03315 extern int Cif_Open_V3_1 __((char *, char *, int *, int, int));
03316 extern int Cif_Lines_V3_1 __((char *, char *, int *, int, int, int));
03317 extern int Cif_Cifconv_V3_1 __((char *, char *, int *, int, int, int));
03318 /* #endif */
03319 
03320 extern int Cif_Recgroup __((int, struct Cif_unitdir *, int, struct Cif_generic **));
03321 extern int Cif_Release __((int, int));
03322 extern int Cif_Setpos __((int, long));
03323 CIF_END_DECLS
03324 
03325 #undef CIF_BEGIN_DECLS
03326 #undef CIF_END_DECLS
03327 
03328 /* --- interface routine return status values --- */
03329 #define CIF_NOTCIF      -1      /* file is not a CIF file */
03330 #define CIF_MAXOPENS    -2      /* Maximum number of CIF files open already */
03331 #define CIF_NOTOPEN     -3      /* CIF file descriptor not an open file */
03332 #define CIF_NOMEM       -4      /* problem encountered acquiring memory */
03333 #define CIF_EOF         -5      /* end of file encountered */
03334 #define CIF_INTERNAL    -6      /* internal error */
03335 #define CIF_BADREQ      -7      /* the requested func can't be performed */
03336 #define CIF_BADFORM     -8      /* the CIF file has incorrect format */
03337 #define CIF_SYSERR      -9      /* error occurred calling a system routine */
03338 #define CIF_EXP_VERS    -10     /* expected CIF version too large */
03339 #define CIF_FILE_VERS   -11     /* CIF file version too large */
03340 #if CIF_VERSION == 1
03341 #define CIF_MAXERROR    -11     /* "largest" CIF error status */
03342 #else
03343 #define CIF_EXP_VERS2   -12     /* CIF file version too small (application is compiled
03344                                  * including the v2 cif definitions, but tries to
03345                                  * open a cif as v1
03346                                  */
03347 #define CIF_SUBVER      -13     /* cif sub-version number incompatability */
03348 #define CIF_MAXERROR_1  -11     /* version 1 "largest" CIF error status */
03349 #define CIF_MAXERROR    -13     /* "largest" CIF error status */
03350 #endif /* CIF_VERSION == 1 */
03351 
03352 /* --- special interface values --- */
03353 #define CIF_FIRST_RECORD -1     /* special start_of_file indicator for
03354                                  * Cif_Setpos */
03355 
03356 #undef FIELD
03357 
03358 #endif  /* !_CIF_H */
03359 
03360 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines