Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
assign.h File Reference
#include <ffio.h>
#include <liberrno.h>
#include <stddef.h>
#include <stdio.h>
#include <cray/fortio.h>
#include <cray/mtlock.h>
#include <sys/param.h>
Include dependency graph for assign.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  assign_obj_id
struct  assign_info_s
struct  assign_cntl
struct  attribute
struct  assign_record
struct  assign_environment
struct  aenv_stack
struct  aio_desc
struct  tok_list_s
struct  opt_table_s
struct  parse_info_s

Defines

#define _LIB_INTERNAL   1 /* expose internal FFIO definitions */
#define AS_SKIPBAD   1 /* -d skipbad */
#define AS_ACPTBAD   2 /* -d acptbad */
#define AS_FORTRAN77   1 /* -f 77 */
#define AS_FORTRAN90   2 /* -f 90 */
#define AS_IRIX_F77   3 /* -f irixf77 */
#define AS_IRIX_F90   4 /* -f irixf90 */
#define AS_THREAD   1 /* -P thread */
#define AS_PROCESS   2 /* -P process */
#define AS_TEAM   3 /* -P team */
#define AS_PRIVATE   4 /* -P private */
#define AS_GLOBAL   5 /* -P global */
#define BYFILE   'f'
#define BYGLOBAL   'g'
#define BYPATTERN   'p'
#define BYUNIT   'u'
#define MAX_FDC_SPEC   128 /* max words in an FDC specification */
#define MAX_ASSIGN_LINE   5000 /* maximum number of characters in an */
#define DECIMAL   10 /* for strtol */
#define AE_LIB   1 /* call from assign lib routines */
#define AE_ASSIGN   2 /* call from assign command */
#define AE_ASGCMD   3 /* call from asgcmd command */
#define ASSIGN_ENV_VAR   "FILENV" /* pointer to assign environment */
#define ASSIGN_OPT_VAR   "_LIBASSIGNENV_"/* default asn environment repository */
#define ASGCMD_ENV_VAR   "_ASG_ATTR" /* location of asgcmd attributes */
#define PROCENVFLAG   '$' /* indicate an environment var name */
#define DELIMSTR   " # # " /* delimiter in environment strings */
#define ASN_G_ALL   0001
#define ASN_G_SF   0002
#define ASN_G_SU   0004
#define ASN_G_DF   0010
#define ASN_G_DU   0020
#define ASN_G_AQ   0040
#define ASN_G_FF   0400
#define ASN_G_MPI   01000
#define RETERR(_EH, _NUM)
#define RETERR1(_EH, _NUM, _D1)
#define RETERR2(_EH, _NUM, _D1, _D2)
#define ERRET(ee)   { errno = ee; return(-1); }
#define ASSIGN_LOCK()   MEM_LOCK(&_Ae_assign_lock)
#define ASSIGN_UNLOCK()   MEM_UNLOCK(&_Ae_assign_lock)
#define _AE_SKIPWHITE(pp)
#define _AE_NULLINFO(P)   ((void)memset((char*)P,0,sizeof(assign_info)))
#define ASN_DEBUG(ARGLIST)
#define AFLAGSIZE
#define _ae_opt_control(ch)   ((ch)>='A' && (ch)<='z' && _Ae_letters[(ch)-'A'] == 'c')
#define _ae_opt_nooptval(ch)   ((ch)>='A' && (ch)<='z' && _Ae_letters[(ch)-'A'] == 'n')
#define _ae_opt_optval(ch)   ((ch)>='A' && (ch)<='z' && _Ae_letters[(ch)-'A'] == 'v')

Typedefs

typedef unsigned char aflg_t
typedef struct assign_info_s assign_info
typedef struct tok_list_s tok_list
typedef struct opt_table_s opt_table
typedef struct parse_info_s parse_info

Enumerations

enum  asn_flags { ATTR_SET = 1, ATTR_USED = 2 }

Functions

char * _ae_build_envstring (assign_environment *aep)
void _ae_dealloc_env (assign_environment *aep)
void _ae_dealloc_recflds (assign_record *arp)
int _ae_externalize (int fromwhere, FILE *gfile, assign_environment *ap)
int _ae_externalize_file (FILE *gfile, assign_environment *ap)
int _ae_externalize_env (int fromwhere, assign_environment *ap)
int _ae_glob_code (char *str)
char * _ae_glob_str (int ga)
int _ae_insert (assign_obj_id *aoidp, char *attr, int attrlen, assign_environment *aep)
int _ae_internalize (FILE *gfile, assign_environment *aep)
int _ae_internalize_file (FILE *gfile, assign_environment *aep)
int _ae_internalize_env (assign_environment *aep, int ifasgcmd)
int _ae_match_pattern (const char *fname, assign_record **arpp, assign_environment *aep)
int _ae_select (assign_obj_id *aoidp, assign_record **arpp, assign_environment *aep)
void _ae_setupenv (assign_environment *aep)
char * _ae_glob_name (int ga)
int _asndir_split (char *buf, char **options, char **object, int ifasgcmd)
int _assign (char *opt_string, assign_obj_id *aop, int errmode)
int _assign_asgcmd_info (const char *fname, unum_t unum, int gamask, assign_info *aip, char **atstr, int catcherr)
FILE * _gae_open (char acc_mode, char res_mode, int *status)
void _gae_close (FILE *f)
int _get_a_options (int ifasgcmd, const char *fname, unum_t unum, int gamask, assign_info *aip, char **atstr, int errmode)
char * _lae_get_assign_file_name (int *estat)
char * _lae_get_assign_var_name (void)
int _lae_get_object (char *objtext, assign_obj_id *aoidp)
int _patmatch (const char *str, const char *pat)
void _unique_close (FILE *f)
FILE * _unique_open (char *fname, char mode, int *ostat)
int _lae_do_assign (int fromwhere, int assign_mode, char open_mode, char res_mode, assign_obj_id *aoidp, char *attr_string, int optcheck, int errmode)
int _lae_assign_mode (int fromwhere, assign_cntl *cnp, int numobj, int *amode, char *omode, char *rmode)
int _attrs_used (assign_info *aip, char **attrstr)
void _attr_clear_used (assign_info *aip)
int _ae_eclipse (char *attr1, int len1, char *attr2, int len2, char **newarp)
int _ae_parse (assign_obj_id *aiodp, char *attr, int attrlen, assign_info *aip, int warnmode, int errmode)
int _lae_process_opts (char *opt_string, char **attr_string, assign_cntl *cntlp)
int _ae_delete (assign_record *arp, assign_environment *aep)
void _lae_print_record (assign_record *arp)
int _ae_next (assign_record *prev, assign_record **next, assign_environment *aep)
int _ae_check_attr (assign_info *ai, int warnmode, int errmode)
void _ae_setoflags (assign_info *aip, int *flagmask)

Variables

aenv_stack _Ae_env_stack
int _Ae_asgcmd
int _Ae_assign_cmd
char _Ae_letters []
parse_info _Ae_option_parse_info []

Define Documentation

#define _AE_NULLINFO (   P)    ((void)memset((char*)P,0,sizeof(assign_info)))

Definition at line 207 of file assign.h.

#define _ae_opt_control (   ch)    ((ch)>='A' && (ch)<='z' && _Ae_letters[(ch)-'A'] == 'c')

Definition at line 236 of file assign.h.

#define _ae_opt_nooptval (   ch)    ((ch)>='A' && (ch)<='z' && _Ae_letters[(ch)-'A'] == 'n')

Definition at line 239 of file assign.h.

#define _ae_opt_optval (   ch)    ((ch)>='A' && (ch)<='z' && _Ae_letters[(ch)-'A'] == 'v')

Definition at line 242 of file assign.h.

#define _AE_SKIPWHITE (   pp)
Value:
{ \
        register char   cc;                     \
        cc      = *pp;                          \
        while (isspace(cc) && cc != '\0')       \
                cc      = *++pp;                \
}

Definition at line 196 of file assign.h.

#define _LIB_INTERNAL   1 /* expose internal FFIO definitions */

Definition at line 42 of file assign.h.

#define AE_ASGCMD   3 /* call from asgcmd command */

Definition at line 103 of file assign.h.

#define AE_ASSIGN   2 /* call from assign command */

Definition at line 102 of file assign.h.

#define AE_LIB   1 /* call from assign lib routines */

Definition at line 101 of file assign.h.

#define AFLAGSIZE
Value:
((offsetof(assign_info, flagpad) +                      \
                   sizeof(((assign_info*) 0)->flagpad)) )

Definition at line 223 of file assign.h.

Referenced by _do_open().

#define AS_ACPTBAD   2 /* -d acptbad */

Definition at line 65 of file assign.h.

#define AS_FORTRAN77   1 /* -f 77 */

Definition at line 67 of file assign.h.

#define AS_FORTRAN90   2 /* -f 90 */

Definition at line 68 of file assign.h.

Referenced by _f_opn().

#define AS_GLOBAL   5 /* -P global */

Definition at line 76 of file assign.h.

Referenced by _f_open().

#define AS_IRIX_F77   3 /* -f irixf77 */

Definition at line 69 of file assign.h.

Referenced by _f_opn(), _FRN(), and _rnl90to77().

#define AS_IRIX_F90   4 /* -f irixf90 */

Definition at line 70 of file assign.h.

Referenced by _f_opn(), _FRN(), and _rnl90to77().

#define AS_PRIVATE   4 /* -P private */

Definition at line 75 of file assign.h.

Referenced by _f_open().

#define AS_PROCESS   2 /* -P process */

Definition at line 73 of file assign.h.

Referenced by _f_open().

#define AS_SKIPBAD   1 /* -d skipbad */

Definition at line 64 of file assign.h.

Referenced by _f_opn().

#define AS_TEAM   3 /* -P team */

Definition at line 74 of file assign.h.

Referenced by _f_open().

#define AS_THREAD   1 /* -P thread */

Definition at line 72 of file assign.h.

Referenced by _f_open().

#define ASGCMD_ENV_VAR   "_ASG_ATTR" /* location of asgcmd attributes */

Definition at line 111 of file assign.h.

#define ASN_DEBUG (   ARGLIST)

Definition at line 215 of file assign.h.

#define ASN_G_ALL   0001

Definition at line 120 of file assign.h.

Referenced by _f_open().

#define ASN_G_AQ   0040

Definition at line 125 of file assign.h.

#define ASN_G_DF   0010

Definition at line 123 of file assign.h.

Referenced by _f_open().

#define ASN_G_DU   0020

Definition at line 124 of file assign.h.

Referenced by _f_open().

#define ASN_G_FF   0400

Definition at line 126 of file assign.h.

#define ASN_G_MPI   01000

Definition at line 127 of file assign.h.

#define ASN_G_SF   0002

Definition at line 121 of file assign.h.

Referenced by _f_open().

#define ASN_G_SU   0004

Definition at line 122 of file assign.h.

Referenced by _f_open().

#define ASSIGN_ENV_VAR   "FILENV" /* pointer to assign environment */

Definition at line 109 of file assign.h.

#define ASSIGN_LOCK ( )    MEM_LOCK(&_Ae_assign_lock)

Definition at line 181 of file assign.h.

#define ASSIGN_OPT_VAR   "_LIBASSIGNENV_"/* default asn environment repository */

Definition at line 110 of file assign.h.

#define ASSIGN_UNLOCK ( )    MEM_UNLOCK(&_Ae_assign_lock)

Definition at line 182 of file assign.h.

#define BYFILE   'f'

Definition at line 82 of file assign.h.

#define BYGLOBAL   'g'

Definition at line 83 of file assign.h.

#define BYPATTERN   'p'

Definition at line 84 of file assign.h.

#define BYUNIT   'u'

Definition at line 85 of file assign.h.

#define DECIMAL   10 /* for strtol */

Definition at line 99 of file assign.h.

#define DELIMSTR   " # # " /* delimiter in environment strings */

Definition at line 113 of file assign.h.

#define ERRET (   ee)    { errno = ee; return(-1); }

Definition at line 150 of file assign.h.

#define MAX_ASSIGN_LINE   5000 /* maximum number of characters in an */

Definition at line 89 of file assign.h.

#define MAX_FDC_SPEC   128 /* max words in an FDC specification */

Definition at line 87 of file assign.h.

#define PROCENVFLAG   '$' /* indicate an environment var name */

Definition at line 112 of file assign.h.

#define RETERR (   _EH,
  _NUM 
)
Value:
{       \
        _lerror(_EH,_NUM);              \
        errno   = _NUM;                 \
        return(-1);                     \
}

Definition at line 135 of file assign.h.

#define RETERR1 (   _EH,
  _NUM,
  _D1 
)
Value:
{       \
        _lerror(_EH,_NUM,_D1);          \
        errno   = _NUM;                 \
        return(-1);                     \
}

Definition at line 140 of file assign.h.

#define RETERR2 (   _EH,
  _NUM,
  _D1,
  _D2 
)
Value:
{       \
        _lerror(_EH,_NUM,_D1,_D2);      \
        errno   = _NUM;                 \
        return(-1);                     \
}

Definition at line 145 of file assign.h.


Typedef Documentation

typedef unsigned char aflg_t

Definition at line 283 of file assign.h.

typedef struct assign_info_s assign_info
typedef struct opt_table_s opt_table
typedef struct parse_info_s parse_info
typedef struct tok_list_s tok_list

Enumeration Type Documentation

enum asn_flags
Enumerator:
ATTR_SET 
ATTR_USED 

Definition at line 278 of file assign.h.


Function Documentation

int _ae_check_attr ( assign_info ai,
int  warnmode,
int  errmode 
)
int _ae_delete ( assign_record arp,
assign_environment aep 
)
int _ae_eclipse ( char *  attr1,
int  len1,
char *  attr2,
int  len2,
char **  newarp 
)
int _ae_externalize ( int  fromwhere,
FILE *  gfile,
assign_environment ap 
)
int _ae_externalize_env ( int  fromwhere,
assign_environment ap 
)
int _ae_externalize_file ( FILE *  gfile,
assign_environment ap 
)
int _ae_glob_code ( char *  str)
char* _ae_glob_name ( int  ga)
char* _ae_glob_str ( int  ga)
int _ae_insert ( assign_obj_id aoidp,
char *  attr,
int  attrlen,
assign_environment aep 
)
int _ae_internalize ( FILE *  gfile,
assign_environment aep 
)
int _ae_internalize_env ( assign_environment aep,
int  ifasgcmd 
)
int _ae_internalize_file ( FILE *  gfile,
assign_environment aep 
)
int _ae_match_pattern ( const char *  fname,
assign_record **  arpp,
assign_environment aep 
)
int _ae_next ( assign_record prev,
assign_record **  next,
assign_environment aep 
)
int _ae_parse ( assign_obj_id aiodp,
char *  attr,
int  attrlen,
assign_info aip,
int  warnmode,
int  errmode 
)
int _ae_select ( assign_obj_id aoidp,
assign_record **  arpp,
assign_environment aep 
)
void _ae_setoflags ( assign_info aip,
int *  flagmask 
)

Referenced by _do_open().

int _asndir_split ( char *  buf,
char **  options,
char **  object,
int  ifasgcmd 
)
int _assign ( char *  opt_string,
assign_obj_id aop,
int  errmode 
)
int _assign_asgcmd_info ( const char *  fname,
unum_t  unum,
int  gamask,
assign_info aip,
char **  atstr,
int  catcherr 
)

Referenced by _f_open().

void _attr_clear_used ( assign_info aip)
int _attrs_used ( assign_info aip,
char **  attrstr 
)
void _gae_close ( FILE *  f)
FILE* _gae_open ( char  acc_mode,
char  res_mode,
int *  status 
)
int _get_a_options ( int  ifasgcmd,
const char *  fname,
unum_t  unum,
int  gamask,
assign_info aip,
char **  atstr,
int  errmode 
)

Referenced by _f_inqu().

int _lae_assign_mode ( int  fromwhere,
assign_cntl cnp,
int  numobj,
int *  amode,
char *  omode,
char *  rmode 
)
int _lae_do_assign ( int  fromwhere,
int  assign_mode,
char  open_mode,
char  res_mode,
assign_obj_id aoidp,
char *  attr_string,
int  optcheck,
int  errmode 
)
char* _lae_get_assign_file_name ( int *  estat)
char* _lae_get_assign_var_name ( void  )
int _lae_get_object ( char *  objtext,
assign_obj_id aoidp 
)
int _lae_process_opts ( char *  opt_string,
char **  attr_string,
assign_cntl cntlp 
)
int _patmatch ( const char *  str,
const char *  pat 
)
void _unique_close ( FILE *  f)
FILE* _unique_open ( char *  fname,
char  mode,
int *  ostat 
)

Variable Documentation

char _Ae_letters[]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines