Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
rnl90.c File Reference
#include <stdio.h>
#include <errno.h>
#include <liberrno.h>
#include <fortran.h>
#include <stdlib.h>
#include <cray/fmtconv.h>
#include <cray/nassert.h>
#include <sys/unistd.h>
#include "fio.h"
#include "namelist.h"
#include "rnl90def.h"
Include dependency graph for rnl90.c:

Go to the source code of this file.

Defines

#define SUBGTC(x)
#define SUBGTCNOEOR(x)
#define CMTE_SUBGTC(x)
#define CMTE_SUBGTCNOEOR(x)
#define MAINGT(x)
#define CMTE_MAINGT(x)
#define GETSECTION(x)

Functions

int _s_scan_extensions (void *ptr, ftype_t type, unsigned long elsize, long *field_begin, unsigned long rec_chars, int *fwptr, long cmode)
int _nicverr (const int _Nicverror)
static int _nlrd_fillrec (FIOSPTR css, unit *cup)
static int _getname (FIOSPTR css, unit *cup, char *buf, char *lastc)
static void _cnvrt_toupper (char *bufr)
static nmlist_goli_t_findname (char *key, nmlist_goli_t *nlvar, unsigned countitm)
static int _getnlval (FIOSPTR css, nmlist_goli_t *nlvar, char *lastc, unit *cup)
static int _indx_nl (FIOSPTR css, unit *cup, struct DvDimen *dvdn, int *ndim, long strbegend[3], int *encnt, int *icnt, int arryflag)
static int _nlrdent (FIOSPTR css, unit *cup, nmlist_goli_t *nalist, unsigned count, char *lastc, int byt)
static int _nlread (FIOSPTR css, ftype_t type, unit *cup, void *ptr, long elsize, int cnt, int inc, char *lastc)
static int _nexdata (FIOSPTR css, ftype_t type, void *ptr, int cnt, int inc, char lastc, unit *cup, long *lval, int *lcount, long elsize, int *nullvlu)
static int _g_charstr (FIOSPTR css, unit *cup, void *p, int cnt, char c, int lcount, long elsize, int *nullvlu)
static int _g_complx (FIOSPTR css, unit *cup, ftype_t type, long *lval, long elsize)
static int _g_number (ftype_t type, unit *cup, long *lval, long elsize)
static int _gocthex (FIOSPTR css, unit *cup, ftype_t type, long *lval, int base, long elsize, int *nullvlu)
static int _get_holl (FIOSPTR css, unit *cup, char holltype, int count, ftype_t type, long *lval, long elsize)
static int _get_quoholl (FIOSPTR css, unit *cup, char cdelim, ftype_t type, long *lval, long elsize)
static int _nl_stride_dv (FIOSPTR css, unit *cup, DopeVectorType *dv, struct DvDimen *sectn, char *lastc, long strbegend[3])
static int _nl_strd_derv (FIOSPTR css, unit *cup, DopeVectorType *dv, struct DvDimen *sectn, char *lastch, nmlist_goli_t *vdr, unsigned int cnt, long bte)
int _FRN (ControlListType *cilist, nmlist_group *namlist, void *stck)

Variables

ic_funcncf_tab90 []

Define Documentation

#define CMTE_MAINGT (   x)
Value:
{                                       \
        while (cup->ulinecnt == 0) {                            \
                if (errn = _nlrd_fillrec(css, cup)) {           \
                        if (errn < 0) {                         \
                                ENDD(endf, css, FERDPEOF);      \
                        }                                       \
                        else {                                  \
                                ERROR0(errf, css, errn);        \
                        }                                       \
                }                                               \
        }                                                       \
        x       = (char) *cup->ulineptr++;                      \
        /* CHECK for comment */                                 \
        if (x == '!') {                                         \
                x       = ' ';                                  \
                cup->ulinecnt   = 1;                            \
        }                                                       \
        cup->ulinecnt--;                                        \
}

Definition at line 141 of file rnl90.c.

Referenced by _FRN().

#define CMTE_SUBGTC (   x)
Value:
{                               \
        while (cup->ulinecnt == 0) {                    \
                if (errn = _nlrd_fillrec(css, cup)) {   \
                        return(errn);                   \
                }                                       \
        }                                               \
        x       = (char) *cup->ulineptr++;              \
        if (x == '!') {                                 \
                x       = ' ';                          \
                cup->ulinecnt   = 1;                    \
        }                                               \
        cup->ulinecnt--;                                \
}

Definition at line 91 of file rnl90.c.

Referenced by _getname(), _getnlval(), _gocthex(), _nexdata(), and _nlread().

#define CMTE_SUBGTCNOEOR (   x)
Value:
{                               \
        if (!cup->ulinecnt) {                           \
                x       = ' ';                          \
        } else {                                        \
                x       = (char) *cup->ulineptr++;      \
                cup->ulinecnt--;                        \
        }                                               \
        if (x == '!') {                                 \
                x       = ' ';                          \
                cup->ulinecnt   = 0;                    \
        }                                               \
}

Definition at line 105 of file rnl90.c.

Referenced by _getname(), and _nexdata().

#define GETSECTION (   x)
Value:
{  \
                field_begin     = cup->ulineptr;                \
                field_end       = cup->ulineptr;                \
                for (j = 0; j < cup->ulinecnt; j++) {           \
                        x       = (char) *field_end;            \
                        if (x == ')' || x == ',' || x == ':')   \
                                break;                          \
                        field_end++;                            \
                }                                               \
                field_width     = j;                            \
}

Definition at line 161 of file rnl90.c.

Referenced by _indx_nl().

#define MAINGT (   x)
Value:
{                                               \
        while (cup->ulinecnt == 0) {                            \
                if (errn = _nlrd_fillrec(css, cup)) {           \
                        if (errn < 0) {                         \
                                ENDD(endf, css, FERDPEOF);      \
                        }                                       \
                        else {                                  \
                                ERROR0(errf, css, errn);        \
                        }                                       \
                }                                               \
        }                                                       \
        x       = (char) *cup->ulineptr++;                      \
        cup->ulinecnt--;                                        \
}

Definition at line 126 of file rnl90.c.

Referenced by _FRN().

#define SUBGTC (   x)
Value:
{                                       \
        while (cup->ulinecnt == 0) {                    \
                if (errn = _nlrd_fillrec(css, cup)) {   \
                        return(errn);                   \
                }                                       \
        }                                               \
        x       = (char) *cup->ulineptr++;              \
        cup->ulinecnt--;                                \
}

Definition at line 66 of file rnl90.c.

Referenced by _g_complx(), _get_holl(), _get_quoholl(), _getnlval(), _gocthex(), and _indx_nl().

#define SUBGTCNOEOR (   x)
Value:
{                               \
        if (!cup->ulinecnt) {                           \
                x       = ' ';                          \
        } else {                                        \
                x       = (char) *cup->ulineptr++;      \
                cup->ulinecnt--;                        \
        }                                               \
}

Definition at line 76 of file rnl90.c.

Referenced by _nexdata().


Function Documentation

static void _cnvrt_toupper ( char *  bufr) [static]

Definition at line 1628 of file rnl90.c.

References c.

Referenced by _FRN(), and _getnlval().

static nmlist_goli_t * _findname ( char *  key,
nmlist_goli_t nlvar,
unsigned  countitm 
) [static]

Definition at line 696 of file rnl90.c.

References _fcdlen(), _fcdtocp(), nmlist_goli::goli_name, NULL, and varlen().

Referenced by _FRN(), and _getnlval().

Here is the call graph for this function:

int _FRN ( ControlListType cilist,
nmlist_group namlist,
void *  stck 
)

Definition at line 255 of file rnl90.c.

References _cnvrt_toupper(), _fcdlen(), _fcdtocp(), _findname(), _getname(), _getnlval(), _imp_open(), _nlrd_fillrec(), _rnl90to77(), _sr_endrec(), _UENDF, _UERRF, _UIOSTF, AS_IRIX_F77, AS_IRIX_F90, fiostate::iostate::fmtstate::blank0, buf, c, CMTE_MAINGT, cup, ControlList::dflag, ENDD, ControlList::endflag, fiostate::iostate::fmtstate::endrec, ControlList::errflag, ERROR0, ERROR1, FEFMTTIV, FENLIVGP, FENLLGNM, FENLNREC, FENLONEC, FENLSTRG, FENLSTRN, FENLSUBD, FENLSUBN, FENLSUBS, FENLUNKI, FENLUNKN, FENOREAD, FERDAFWR, FERDENDR, FERDPEOF, FESEQTIV, FMT, ControlList::fmt, fiostate::iostate::fmt, nmlist_group::goli, nmlist_struclist::goli, nmlist_goli::goli_addr, nmlist_group::group_name, nmlist_group::icount, fiostate::iostate::fmtstate::icp, ControlList::internal, IO_END, IO_ERR, IO_OKAY, ControlList::iostat_spec, ControlList::iostatflg, ISBLANK, fiostate::iostate::fmtstate::lcomma, fiostate::iostate::fmtstate::leftablim, MAINGT, MAXNAML, fiostate::iostate::fmtstate::nonadv, NULL, OS_READ, unit_s::pnonadv, SEQ, fiostate::iostate::fmtstate::slash, nmlist_goli::sptr, STDIN_U, ControlList::stksize, STMT_BEGIN, STMT_END, nmlist_struclist::structlen, T_RNL, TF_READ, fiostate::u, unit_s::uaction, unit_s::ublnk, unit_s::uend, unit_s::ufcompat, ControlList::uflag, unit_s::uflag, unit_s::ufmt, unit_s::ufnl_skip, unit_s::uft90, unit_s::ulinecnt, unit_s::ulineptr, unit_s::umultfil, ControlList::unit, unit_s::useq, unit_s::uwrt, nmlist_goli::valtype, varlen(), and gfptr_t::wa.

Here is the call graph for this function:

static int _g_charstr ( FIOSPTR  css,
unit cup,
void *  p,
int  cnt,
char  c,
int  lcount,
long  elsize,
int *  nullvlu 
) [static]

Definition at line 2477 of file rnl90.c.

References BLANK, c, eos, FENLNOVL, FENLUNKI, GETSTRD, ISBLANK, MIN, unit_s::ulinecnt, and unit_s::ulineptr.

Referenced by _nexdata().

static int _g_complx ( FIOSPTR  css,
unit cup,
ftype_t  type,
long *  lval,
long  elsize 
) [static]

Definition at line 2227 of file rnl90.c.

References _nicverr(), _s_scan_extensions(), c, FEKNTSUP, FENICVIC, FENLIVCX, ISBLANK, ISSEP, MODEDP, MODEHP, ncf_tab90, stat, SUBGTC, unit_s::ulinecnt, unit_s::ulineptr, and zero.

Referenced by _nexdata().

Here is the call graph for this function:

static int _g_number ( ftype_t  type,
unit cup,
long *  lval,
long  elsize 
) [static]

Definition at line 2350 of file rnl90.c.

References _nicverr(), _s_scan_extensions(), FEKNTSUP, FENICVIC, FENLUNKI, ISSEP, MODEDP, MODEHP, ncf_tab90, stat, unit_s::ulinecnt, unit_s::ulineptr, and zero.

Referenced by _nexdata().

Here is the call graph for this function:

static int _get_holl ( FIOSPTR  css,
unit cup,
char  holltype,
int  count,
ftype_t  type,
long *  lval,
long  elsize 
) [static]

Definition at line 2642 of file rnl90.c.

References BLANK, c, FENLIOER, FENLUNKI, NULLC, SUBGTC, and unit_s::ulinecnt.

Referenced by _nexdata().

static int _get_quoholl ( FIOSPTR  css,
unit cup,
char  cdelim,
ftype_t  type,
long *  lval,
long  elsize 
) [static]

Definition at line 2725 of file rnl90.c.

References BLANK, c, FENLIOER, FENLUNKI, NULLC, SUBGTC, unit_s::ulinecnt, and unit_s::ulineptr.

Referenced by _nexdata().

static int _getname ( FIOSPTR  css,
unit cup,
char *  buf,
char *  lastc 
) [static]

Definition at line 652 of file rnl90.c.

References c, CMTE_SUBGTC, CMTE_SUBGTCNOEOR, FENLLGNM, ISBLANK, MAXNAML, and s.

Referenced by _FRN(), and _getnlval().

static int _gocthex ( FIOSPTR  css,
unit cup,
ftype_t  type,
long *  lval,
int  base,
long  elsize,
int *  nullvlu 
) [static]
static int _indx_nl ( FIOSPTR  css,
unit cup,
struct DvDimen *  dvdn,
int *  ndim,
long  strbegend[3],
int *  encnt,
int *  icnt,
int  arryflag 
) [static]
static int _nexdata ( FIOSPTR  css,
ftype_t  type,
void *  ptr,
int  cnt,
int  inc,
char  lastc,
unit cup,
long *  lval,
int *  lcount,
long  elsize,
int *  nullvlu 
) [static]

Definition at line 1845 of file rnl90.c.

References _btol(), _g_charstr(), _g_complx(), _g_number(), _get_holl(), _get_quoholl(), _gocthex(), c, CMTE_SUBGTC, CMTE_SUBGTCNOEOR, FEKNTSUP, FENLIVCX, FENLIVLG, HEX, ISBLANK, OCTAL, SUBGTCNOEOR, unit_s::ulinecnt, and unit_s::ulineptr.

Referenced by _nlread().

Here is the call graph for this function:

int _nicverr ( const int  _Nicverror)

Definition at line 828 of file rdfmt.c.

static int _nl_strd_derv ( FIOSPTR  css,
unit cup,
DopeVectorType dv,
struct DvDimen *  sectn,
char *  lastch,
nmlist_goli_t vdr,
unsigned int  cnt,
long  bte 
) [static]

Definition at line 3213 of file rnl90.c.

References _nlrdent(), DopeVector::a, DopeVector::base_addr, DopeVector::dimension, DopeVector::DvDimen::extent, DopeVector::n_dim, NULL, ret, SMSCALE, f90_type::type, and DopeVector::type_lens.

Referenced by _getnlval().

Here is the call graph for this function:

static int _nl_stride_dv ( FIOSPTR  css,
unit cup,
DopeVectorType dv,
struct DvDimen *  sectn,
char *  lastc,
long  strbegend[3] 
) [static]
static int _nlrd_fillrec ( FIOSPTR  css,
unit cup 
) [static]

Definition at line 627 of file rnl90.c.

References fiostate::iostate::fmtstate::endrec, fiostate::iostate::fmt, and fiostate::u.

Referenced by _FRN().

static int _nlread ( FIOSPTR  css,
ftype_t  type,
unit cup,
void *  ptr,
long  elsize,
int  cnt,
int  inc,
char *  lastc 
) [static]

Definition at line 1307 of file rnl90.c.

References _nexdata(), c, CMTE_SUBGTC, FENLTOOM, ISBLANK, MIN, and stat.

Referenced by _getnlval(), _nl_stride_dv(), and _nlrdent().

Here is the call graph for this function:

int _s_scan_extensions ( void *  ptr,
ftype_t  type,
unsigned long  elsize,
long *  field_begin,
unsigned long  rec_chars,
int *  fwptr,
long  cmode 
)

Variable Documentation

Initial value:
 {
        NULL,           
        NULL,           
        _iu2s,          
        _defgu2sd,      
        _defgu2sd,      
        NULL,           
        NULL,           
}

Definition at line 177 of file rnl90.c.

Referenced by _g_complx(), and _g_number().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines