Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
opn.c File Reference
#include <errno.h>
#include <fortran.h>
#include <liberrno.h>
#include <string.h>
#include <stdarg.h>
#include <cray/nassert.h>
#include "fmt.h"
#include "fio.h"
#include "f90io.h"
Include dependency graph for opn.c:

Go to the source code of this file.

Defines

#define OPNERR(n)
#define SETSPEC(_specifier, _default_value, _error_code, _nval, _spec_list)
#define S(_spec)   , #_spec, OS_##_spec
#define ARGS_11   (4 + 7*sizeof(_fcd)/sizeof(long))
#define ARGS_12   (4 + 8*sizeof(_fcd)/sizeof(long))
#define ARGS_13   (4 + 9*sizeof(_fcd)/sizeof(long))
#define ARGS_16   (7 + 9*sizeof(_fcd)/sizeof(long))
#define PASSED_ARG(x)   (1)

Functions

static int findmatch (_fcd fortstring, int *result, int nval,...)
 __OPN (_f_int *unitn, _f_int *iostat, int *errf, _fcd file, _fcd status, _fcd access, _fcd form, _f_int *recl, _fcd blank, _fcd position, _fcd action_arg, _fcd delim_arg, _fcd pad_arg, int unused1, int unused2, int isf90_arg)
int _OPEN (struct open_spec_list *o)

Define Documentation

#define ARGS_11   (4 + 7*sizeof(_fcd)/sizeof(long))

Definition at line 70 of file opn.c.

Referenced by __OPN().

#define ARGS_12   (4 + 8*sizeof(_fcd)/sizeof(long))

Definition at line 71 of file opn.c.

Referenced by __OPN().

#define ARGS_13   (4 + 9*sizeof(_fcd)/sizeof(long))

Definition at line 72 of file opn.c.

Referenced by __OPN().

#define ARGS_16   (7 + 9*sizeof(_fcd)/sizeof(long))

Definition at line 73 of file opn.c.

Referenced by __OPN().

#define OPNERR (   n)
Value:
{ \
        errn    = n;    \
        goto opn_done;  \
}

Definition at line 50 of file opn.c.

Referenced by __OPN().

#define PASSED_ARG (   x)    (1)

Definition at line 77 of file opn.c.

Referenced by __OPN().

#define S (   _spec)    , #_spec, OS_##_spec

Definition at line 64 of file opn.c.

Referenced by __OPN().

#define SETSPEC (   _specifier,
  _default_value,
  _error_code,
  _nval,
  _spec_list 
)
Value:
\
        if (_fcdtocp(_specifier) == NULL) \
                a.o##_specifier = _default_value; \
        else if (! findmatch(_specifier, (int*) &a.o##_specifier, _nval \
                             _spec_list)) \
                OPNERR(_error_code)

Definition at line 55 of file opn.c.

Referenced by __OPN().


Function Documentation

__OPN ( _f_int *  unitn,
_f_int *  iostat,
int *  errf,
_fcd  file,
_fcd  status,
_fcd  access,
_fcd  form,
_f_int *  recl,
_fcd  blank,
_fcd  position,
_fcd  action_arg,
_fcd  delim_arg,
_fcd  pad_arg,
int  unused1,
int  unused2,
int  isf90_arg 
)
static int findmatch ( _fcd  fortstring,
int *  result,
int  nval,
  ... 
) [static]

Definition at line 495 of file opn.c.

References _fcdlen(), _fcdtocp(), and ret.

Here is the call graph for this function:

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines