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