1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)fiodefs.h	5.2 (Berkeley) 7/30/85
   7:  */
   8: 
   9: /*
  10:  * fortran file i/o type definitions
  11:  */
  12: 
  13: #include <stdio.h>
  14: #include "f_errno.h"
  15: 
  16: /* Logical Unit Table Size */
  17: #define MXUNIT 100
  18: 
  19: #define GLITCH '\2' /* special quote for Stu, generated in f77pass1 */
  20: 
  21: #define NAMELIST      -2
  22: #define LISTDIRECTED  -1
  23: #define FORMATTED      1
  24: 
  25: #define ERROR   1
  26: #define OK  0
  27: #define YES 1
  28: #define NO  0
  29: 
  30: #define STDERR  0
  31: #define STDIN   5
  32: #define STDOUT  6
  33: 
  34: #define WRITE   1
  35: #define READ    2
  36: #define SEQ 3
  37: #define DIR 4
  38: #define FMT 5
  39: #define UNF 6
  40: #define EXT 7
  41: #define INT 8
  42: 
  43: typedef char ioflag;
  44: typedef long ftnint;
  45: typedef ftnint flag;
  46: typedef long ftnlen;
  47: 
  48: typedef struct      /*external read, write*/
  49: {   flag cierr;
  50:     ftnint ciunit;
  51:     flag ciend;
  52:     char *cifmt;
  53:     ftnint cirec;
  54: } cilist;
  55: 
  56: typedef struct      /*internal read, write*/
  57: {   flag icierr;
  58:     char *iciunit;
  59:     flag iciend;
  60:     char *icifmt;
  61:     ftnint icirlen;
  62:     ftnint icirnum;
  63:     ftnint icirec;
  64: } icilist;
  65: 
  66: typedef struct      /*open*/
  67: {   flag oerr;
  68:     ftnint ounit;
  69:     char *ofnm;
  70:     ftnlen ofnmlen;
  71:     char *osta;
  72:     char *oacc;
  73:     char *ofm;
  74:     ftnint orl;
  75:     char *oblnk;
  76: } olist;
  77: 
  78: typedef struct      /*close*/
  79: {   flag cerr;
  80:     ftnint cunit;
  81:     char *csta;
  82: } cllist;
  83: 
  84: typedef struct      /*rewind, backspace, endfile*/
  85: {   flag aerr;
  86:     ftnint aunit;
  87: } alist;
  88: 
  89: typedef struct      /*units*/
  90: {   FILE *ufd;  /*0=unconnected*/
  91:     char *ufnm;
  92:     long uinode;
  93:     int url;    /*0=sequential*/
  94:     flag useek; /*true=can backspace, use dir, ...*/
  95:     flag ufmt;
  96:     flag uprnt;
  97:     flag ublnk;
  98:     flag uend;
  99:     flag uwrt;  /*last io was write*/
 100:     flag uscrtch;
 101: } unit;
 102: 
 103: typedef struct      /* inquire */
 104: {   flag inerr;
 105:     ftnint inunit;
 106:     char *infile;
 107:     ftnlen infilen;
 108:     ftnint  *inex;  /*parameters in standard's order*/
 109:     ftnint  *inopen;
 110:     ftnint  *innum;
 111:     ftnint  *innamed;
 112:     char    *inname;
 113:     ftnlen  innamlen;
 114:     char    *inacc;
 115:     ftnlen  inacclen;
 116:     char    *inseq;
 117:     ftnlen  inseqlen;
 118:     char    *indir;
 119:     ftnlen  indirlen;
 120:     char    *inform;
 121:     ftnlen  informlen;
 122:     char    *infmt;
 123:     ftnint  infmtlen;
 124:     char    *inunf;
 125:     ftnlen  inunflen;
 126:     ftnint  *inrecl;
 127:     ftnint  *innrec;
 128:     char    *inblank;
 129:     ftnlen  inblanklen;
 130: } inlist;
 131: 
 132: typedef union
 133: {   float pf;
 134:     double pd;
 135: } ufloat;
 136: 
 137: typedef union
 138: {   short is;
 139:     char ic;
 140:     long il;
 141: } uint;
 142: 
 143: struct ioiflg {
 144:     short if_oeof;
 145:     short if_ctrl;
 146:     short if_bzro;
 147: };
 148: #define opneof  ioiflg_.if_oeof
 149: #define ccntrl  ioiflg_.if_ctrl
 150: #define blzero  ioiflg_.if_bzro

Defined struct's

ioiflg defined in line 143; used 6 times

Defined typedef's

Defined macros

ERROR defined in line 25; used 3 times
EXT defined in line 40; never used
GLITCH defined in line 19; used 2 times
INT defined in line 41; never used
OK defined in line 26; used 149 times
STDIN defined in line 31; used 2 times
UNF defined in line 39; used 2 times
blzero defined in line 150; used 2 times
ccntrl defined in line 149; used 2 times
opneof defined in line 148; used 2 times

Usage of this include

Last modified: 1987-02-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1252
Valid CSS Valid XHTML 1.0 Strict