Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
rnl90def.h
Go to the documentation of this file.
00001 /*
00002 
00003   Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
00004 
00005   This program is free software; you can redistribute it and/or modify it
00006   under the terms of version 2.1 of the GNU Lesser General Public License 
00007   as published by the Free Software Foundation.
00008 
00009   This program is distributed in the hope that it would be useful, but
00010   WITHOUT ANY WARRANTY; without even the implied warranty of
00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00012 
00013   Further, this software is distributed without any warranty that it is
00014   free of the rightful claim of any third person regarding infringement 
00015   or the like.  Any license provided herein, whether implied or 
00016   otherwise, applies only to this software file.  Patent licenses, if
00017   any, provided herein do not apply to combinations of this program with 
00018   other software, or any other product whatsoever.  
00019 
00020   You should have received a copy of the GNU Lesser General Public 
00021   License along with this program; if not, write the Free Software 
00022   Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, 
00023   USA.
00024 
00025   Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
00026   Mountain View, CA 94043, or:
00027 
00028   http://www.sgi.com
00029 
00030   For further information regarding this notice, see:
00031 
00032   http://oss.sgi.com/projects/GenInfo/NoticeExplan
00033 
00034 */
00035 
00036 
00037 /* USMID @(#) libf/include/rnl90def.h   92.0    10/08/98 14:30:10 */
00038 #ifndef _RNL90DEF_H
00039 #define _RNL90DEF_H
00040 
00041 #define BLANK   ((int) ' ')
00042 #define NULLC   ((int) '\0')
00043 #define OCTAL   1               /* reading octal input */
00044 #define HEX     2               /* reading hex input */
00045 #define SKIPMSG " - Skipped record named: "
00046 #define UNITSTR " On Unit: "
00047 
00048 #define OCTSHFT 61              /* allow 20 octal digits */
00049 #define HEXSHFT 60              /* allow 15 hex digits */
00050 #define OCTSHFT4 30             /* allow 10 octal digits */
00051 #define HEXSHFT4 28             /* allow 7 hex digits */
00052 
00053 #define MAXNAML 31              /* 31-character name length */
00054 #define MAXDIMS 8               /* Maximum number of dimensions for an array */
00055 #define RNL_ERROR -3
00056 
00057 #define ISBLANK(c)      (((c) == ' ') || ((c) == '\t'))
00058 #define ISSEP(c)        (isspace(c) || (c) =='/' || (c) ==',')
00059 
00060 #define ENDD(cond, css, n) {            \
00061         if (!(cond))                    \
00062                 _ferr(css, n);          \
00063         else {                          \
00064                 errn    = n;            \
00065                 goto finalization;      \
00066         }                               \
00067 }
00068 #define ERROR0(cond, css, n) {          \
00069         if (!(cond))                    \
00070                 _ferr(css, n);          \
00071         else                            \
00072                 goto finalization;      \
00073 }
00074 
00075 #define ERROR1(cond, css, n, p) {       \
00076         if (!(cond))                    \
00077                 _ferr(css, n, p);       \
00078         else                            \
00079                 goto finalization;      \
00080 }
00081 
00082 #define ERROR3(cond, css, n, p, t) {    \
00083         if (!(cond))                    \
00084                 _ferr(css, n, p, t);    \
00085         else                            \
00086                 goto finalization;      \
00087 }
00088 
00089 /*
00090  * Use GETSTRD to read a character string surrounded by quotes or
00091  * apostrophes. Comment characters are not recognized as such inside a
00092  * quoted string, so SUBGTC is used.
00093  */
00094 #define GETSTRD() {                             \
00095         SUBGTC(ch);                             \
00096         if (ch == enddelim) {                   \
00097                 eos     = -1; /* end of string */\
00098                 SUBGTC(ch); /* unless string delimiter is doubled */ \
00099                 if (ch == enddelim)             \
00100                 eos     = 0;                    \
00101                 else {                          \
00102                         cup->ulineptr--;        \
00103                         cup->ulinecnt++;        \
00104                 }                               \
00105         }                                       \
00106 }
00107 
00108 /* Logical equates */
00109 
00110 #ifndef TRUE
00111 #define TRUE    (_btol(1))
00112 #endif
00113 
00114 #ifndef FALSE
00115 #define FALSE   (_btol(0))
00116 #endif
00117 
00118 #ifndef _UNICOS
00119 /*
00120  * TOGGLE_CHAR sets or clears the bit for a particular character.
00121  *      TOGGLE_CHAR(c,a,b)
00122  *      where:  c       is the character
00123  *              cat     is the category
00124  *              val     set bit if != 0, clear bit if 0
00125  */
00126 #define TOGGLE_CHAR(c,cat,val) { \
00127         if (val)                                                        \
00128                 _MASKS[(c >= 0x3f) ? cat+1 : cat] |= (1 << (IND(c)));   \
00129         else                                                            \
00130                 _MASKS[(c >= 0x3f) ? cat+1 : cat] &= ~(1 << (IND(c)));  \
00131 }
00132 
00133 /* IND computes the bit index of a character */
00134 #define IND(c)  ((c >= 0x3f) ? 0x7f - (unsigned)c : (unsigned)(0x40 - c - 1))
00135 #endif
00136 
00137 /* Indicies into _MASKS */
00138 
00139 #ifndef MRNLDELIM
00140 #define MRNLDELIM       0
00141 #endif
00142 
00143 #ifndef MRNLREP
00144 #define MRNLREP         4
00145 #endif
00146 
00147 #ifndef MRNLSEP
00148 #define MRNLSEP         6
00149 #endif
00150 
00151 #ifndef MRNLFLAG
00152 #define MRNLFLAG        8
00153 #endif
00154 
00155 #ifndef MRNLCOMM
00156 #define MRNLCOMM        10
00157 #endif
00158 
00159 extern  long    _BLNKSEP;
00160 #ifdef _WORD32
00161 extern  long long _MASKS[];
00162 #else
00163 extern  long    _MASKS[];
00164 #endif
00165 extern  unum_t  _OUT_UNIT;
00166 extern  long    _SKP_MESS;
00167 extern  long    _TYP_CONV;
00168 
00169 #endif /* !_RNL90DEF_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines