Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
#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"
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_func * | ncf_tab90 [] |
#define CMTE_MAINGT | ( | x | ) |
{ \ 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 | ) |
{ \ 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 | ) |
{ \ 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 | ) |
#define MAINGT | ( | x | ) |
#define SUBGTC | ( | x | ) |
{ \ 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 | ) |
static void _cnvrt_toupper | ( | char * | bufr | ) | [static] |
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().
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.
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().
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().
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().
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().
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 _getnlval | ( | FIOSPTR | css, |
nmlist_goli_t * | nlvar, | ||
char * | lastc, | ||
unit * | cup | ||
) | [static] |
Definition at line 740 of file rnl90.c.
References _cnvrt_toupper(), _fcdlen(), _fcdtocp(), _findname(), _getname(), _indx_nl(), _nl_strd_derv(), _nl_stride_dv(), _nlrdent(), _nlread(), DopeVector::a, DopeVector::base_addr, c, nmlist_scalar::charptr, DopeVector::charptr, CMTE_SUBGTC, DopeVector::dimension, nmlist_goli::dv, nmlist_struclist::dv, DopeVector::DvDimen::extent, FEINTUNK, FENLBNDY, FENLIOER, FENLNOVL, FENLNREC, FENLSTRG, FENLSTRN, FENLSUBN, FENLSUBS, FENLUNKI, FENLUNKN, nmlist_struclist::goli, nmlist_goli::goli_addr, if(), f90_type::int_len, ISBLANK, DopeVector::DvDimen::low_bound, MAXDIM, MAXNAML, DopeVector::n_dim, NULL, nmlist_scalar::ptr, nmlist_goli::ptr, nmlist_scalar::scal_addr, SMSCALE, nmlist_goli::sptr, DopeVector::DvDimen::stride_mult, nmlist_struclist::struc_addr, nmlist_struclist::structlen, SUBGTC, nmlist_scalar::tinfo, f90_type::type, DopeVector::type_lens, and nmlist_goli::valtype.
Referenced by _FRN().
static int _gocthex | ( | FIOSPTR | css, |
unit * | cup, | ||
ftype_t | type, | ||
long * | lval, | ||
int | base, | ||
long | elsize, | ||
int * | nullvlu | ||
) | [static] |
Definition at line 2837 of file rnl90.c.
References c, CMTE_SUBGTC, FENICVIC, FENLIOER, FENLUNKI, HEXSHFT, HEXSHFT4, ISBLANK, NULL, OCTAL, OCTSHFT, OCTSHFT4, SUBGTC, unit_s::ulinecnt, and unit_s::ulineptr.
Referenced by _nexdata().
static int _indx_nl | ( | FIOSPTR | css, |
unit * | cup, | ||
struct DvDimen * | dvdn, | ||
int * | ndim, | ||
long | strbegend[3], | ||
int * | encnt, | ||
int * | icnt, | ||
int | arryflag | ||
) | [static] |
Definition at line 1401 of file rnl90.c.
References _iu2s, c, dummy, FENLSTRG, FENLSTRN, FENLSUBD, FENLSUBN, FENLSUBS, GETSECTION, ISBLANK, MAXDIMS, stat, SUBGTC, tempbuf, unit_s::ulinecnt, and unit_s::ulineptr.
Referenced by _getnlval().
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().
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().
static int _nl_stride_dv | ( | FIOSPTR | css, |
unit * | cup, | ||
DopeVectorType * | dv, | ||
struct DvDimen * | sectn, | ||
char * | lastc, | ||
long | strbegend[3] | ||
) | [static] |
Definition at line 2924 of file rnl90.c.
References _fcdlen(), _fcdtocp(), _nlread(), DopeVector::a, DopeVector::assoc, DopeVector::base_addr, DopeVector::charptr, DopeVector::dimension, DopeVector::DvDimen::extent, FENLUNKN, FEPTRNAS, f90_type::int_len, DopeVector::n_dim, NULL, DopeVector::p_or_a, ret, SMSCALE, SMSHIFT, f90_type::type, and DopeVector::type_lens.
Referenced by _getnlval().
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 _nlrdent | ( | FIOSPTR | css, |
unit * | cup, | ||
nmlist_goli_t * | nalist, | ||
unsigned | count, | ||
char * | lastc, | ||
int | byt | ||
) | [static] |
Definition at line 1648 of file rnl90.c.
References _fcdlen(), _fcdtocp(), _nlread(), DopeVector::a, DopeVector::base_addr, c, nmlist_scalar::charptr, DopeVector::charptr, DopeVector::dimension, nmlist_goli::dv, nmlist_struclist::dv, DopeVector::DvDimen::extent, FEINTUNK, nmlist_struclist::goli, nmlist_goli::goli_addr, f90_type::int_len, DopeVector::n_dim, NULL, nmlist_scalar::ptr, nmlist_goli::ptr, nmlist_scalar::scal_addr, nmlist_goli::sptr, nmlist_struclist::struc_addr, nmlist_struclist::structlen, nmlist_scalar::tinfo, f90_type::type, DopeVector::type_lens, and nmlist_goli::valtype.
Referenced by _getnlval(), and _nl_strd_derv().
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().
int _s_scan_extensions | ( | void * | ptr, |
ftype_t | type, | ||
unsigned long | elsize, | ||
long * | field_begin, | ||
unsigned long | rec_chars, | ||
int * | fwptr, | ||
long | cmode | ||
) |