Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
wnly.c File Reference
#include <stdio.h>
#include <errno.h>
#include <fortran.h>
#include <memory.h>
#include <stdlib.h>
#include <liberrno.h>
#include <cray/fmtconv.h>
#include "fio.h"
#include "fmt.h"
#include "lio.h"
#include "rnl.h"
Include dependency graph for wnly.c:

Go to the source code of this file.

Classes

struct  BUFFERS

Defines

#define YMP80   (_dreal8 == DREAL8_YMP80)
#define NLPUT(x)
#define NLPUTS(string)
#define LPUT(x)
#define LPUTS(string)
#define NLINE()
#define REPFLUSH()

Functions

void _memwcpy (long *_S1, long *_S2, int _N)
static char * char_rep (char *_P, int _Cn, unsigned int _Ln, int *_Lc, struct BUFFERS *_Bp)
static long * find_rep (long *_P, int _Cn, int _In, int _Ty, int *_Lc, struct BUFFERS *_Bp)
static int l_write (FIOSPTR css, unit *cup, void *dptr, unsigned elsize, int count, int inc, int type, long recsize, int errf, struct BUFFERS *bptr)
static int lw_A (FIOSPTR css, char *_P, int _Cl, long _Rc, unit *_Cu, int _Er, struct BUFFERS *_Bp)
static void writ_rep (long repcnt, struct BUFFERS *buffers)
int WNL (_f_int *unump, Namelist *nl, int errf)
int _wnl_beautify (ftype_t typ90, long *ugly, long *p_limit, long *pretty, unsigned isf90)

Define Documentation

#define LPUT (   x)
Value:
{       \
        (*(bptr->f_lbufptr)++   = (long) x);    \
        bptr->f_lbufcnt++;                      \
}

Definition at line 121 of file wnly.c.

Referenced by l_write(), lw_A(), and WNL().

#define LPUTS (   string)
Value:
{               \
        s       = string;       \
        while (c = *s++) {      \
                LPUT(c);        \
        }                       \
}

Definition at line 126 of file wnly.c.

Referenced by WNL().

#define NLINE ( )
Value:
{ \
        bptr->lcomma    = 0;    /* suppress commas except for arrays */ \
        if (OUT_LINE) { \
                REPFLUSH();     /* Write out what's in outbuff */       \
        }               \
}

Definition at line 137 of file wnly.c.

Referenced by _FWN(), _wnl90to77(), and WNL().

#define NLPUT (   x)
Value:
{       \
        *(bptr->outptr)++       = (long) x;     \
        bptr->outcnt--;                         \
}

Definition at line 105 of file wnly.c.

Referenced by WNL().

#define NLPUTS (   string)
Value:
{       \
        s       = string;       \
        while (c = *s++) {      \
                NLPUT(c);       \
        }                       \
}

Definition at line 110 of file wnly.c.

Referenced by WNL().

#define REPFLUSH ( )
Value:
{                       \
        if (_fwch(cup, bptr->outbuff, recsize - bptr->outcnt, 1) < 0)\
                RERR(css, errno);               \
        bptr->outptr    = bptr->outbuff;\
        *bptr->outptr++ = (long) ' ';   \
        *bptr->outptr++ = (long) ' ';   \
        bptr->outcnt    = recsize - 2;  \
}

Definition at line 150 of file wnly.c.

Referenced by l_write(), lw_A(), and WNL().

#define YMP80   (_dreal8 == DREAL8_YMP80)

Definition at line 64 of file wnly.c.

Referenced by _wnl_beautify(), and l_write().


Function Documentation

void _memwcpy ( long *  _S1,
long *  _S2,
int  _N 
)

Referenced by l_write(), and lw_A().

int _wnl_beautify ( ftype_t  typ90,
long *  ugly,
long *  p_limit,
long *  pretty,
unsigned  isf90 
)

Definition at line 843 of file wnly.c.

References _beautify(), ret, and YMP80.

Referenced by l_write().

Here is the call graph for this function:

static char * char_rep ( char *  _P,
int  _Cn,
unsigned int  _Ln,
int *  _Lc,
struct BUFFERS _Bp 
) [static]

Definition at line 661 of file wnly.c.

References writ_rep().

Referenced by l_write().

Here is the call graph for this function:

static long * find_rep ( long *  _P,
int  _Cn,
int  _In,
int  _Ty,
int *  _Lc,
struct BUFFERS _Bp 
) [static]

Definition at line 567 of file wnly.c.

References DT_CMPLX, DT_DBLE, p1, p2, q1, q2, and writ_rep().

Referenced by l_write().

Here is the call graph for this function:

static int l_write ( FIOSPTR  css,
unit cup,
void *  dptr,
unsigned  elsize,
int  count,
int  inc,
int  type,
long  recsize,
int  errf,
struct BUFFERS bptr 
) [static]
static int lw_A ( FIOSPTR  css,
char *  _P,
int  _Cl,
long  _Rc,
unit _Cu,
int  _Er,
struct BUFFERS _Bp 
) [static]

Definition at line 695 of file wnly.c.

References _memwcpy(), BUFFERS::f_lbuf, BUFFERS::f_lbufcnt, BUFFERS::f_lbufptr, BUFFERS::lcomma, LPUT, MIN, OUT_SEP, BUFFERS::outcnt, BUFFERS::outptr, REPFLUSH, and ret.

Referenced by l_write().

Here is the call graph for this function:

static void writ_rep ( long  repcnt,
struct BUFFERS buffers 
) [static]

Definition at line 622 of file wnly.c.

References _s2ui, buf, BUFFERS::f_lbufcnt, BUFFERS::f_lbufptr, WINT, and zero.

Referenced by char_rep(), and find_rep().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines