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:  *	@(#)fio.h	5.1 (Berkeley) 6/7/85
   7:  */
   8: 
   9: #include <stdio.h>
  10: typedef long ftnint;
  11: typedef ftnint flag;
  12: typedef long ftnlen;
  13: /*external read, write*/
  14: typedef struct
  15: {   flag cierr;
  16:     ftnint ciunit;
  17:     flag ciend;
  18:     char *cifmt;
  19:     ftnint cirec;
  20: } cilist;
  21: /*internal read, write*/
  22: typedef struct
  23: {   flag icierr;
  24:     char *iciunit;
  25:     flag iciend;
  26:     char *icifmt;
  27:     ftnint icirlen;
  28:     ftnint icirnum;
  29: } icilist;
  30: /*open*/
  31: typedef struct
  32: {   flag oerr;
  33:     ftnint ounit;
  34:     char *ofnm;
  35:     ftnlen ofnmlen;
  36:     char *osta;
  37:     char *oacc;
  38:     char *ofm;
  39:     ftnint orl;
  40:     char *oblnk;
  41: } olist;
  42: /*close*/
  43: typedef struct
  44: {   flag cerr;
  45:     ftnint cunit;
  46:     char *csta;
  47: } cllist;
  48: /*rewind, backspace, endfile*/
  49: typedef struct
  50: {   flag aerr;
  51:     ftnint aunit;
  52: } alist;
  53: /*units*/
  54: typedef struct
  55: {   FILE *ufd;  /*0=unconnected*/
  56:     char *ufnm;
  57:     long uinode;
  58:     int url;    /*0=sequential*/
  59:     flag useek; /*true=can backspace, use dir, ...*/
  60:     flag ufmt;
  61:     flag uprnt;
  62:     flag ublnk;
  63:     flag uend;
  64:     flag uwrt;  /*last io was write*/
  65:     flag uscrtch;
  66: } unit;
  67: typedef struct
  68: {   flag inerr;
  69:     ftnint inunit;
  70:     char *infile;
  71:     ftnlen infilen;
  72:     ftnint  *inex;  /*parameters in standard's order*/
  73:     ftnint  *inopen;
  74:     ftnint  *innum;
  75:     ftnint  *innamed;
  76:     char    *inname;
  77:     ftnlen  innamlen;
  78:     char    *inacc;
  79:     ftnlen  inacclen;
  80:     char    *inseq;
  81:     ftnlen  inseqlen;
  82:     char    *indir;
  83:     ftnlen  indirlen;
  84:     char    *infmt;
  85:     ftnlen  infmtlen;
  86:     char    *inform;
  87:     ftnint  informlen;
  88:     char    *inunf;
  89:     ftnlen  inunflen;
  90:     ftnint  *inrecl;
  91:     ftnint  *innrec;
  92:     char    *inblank;
  93:     ftnlen  inblanklen;
  94: } inlist;
  95: 
  96: extern int errno;
  97: extern flag init;
  98: extern cilist *elist;   /*active external io list*/
  99: extern flag reading,external,sequential,formatted;
 100: extern int (*getn)(),(*putn)(); /*for formatted io*/
 101: extern FILE *cf;    /*current file*/
 102: extern unit *curunit;   /*current unit*/
 103: extern unit units[];
 104: #define err(f,n,s) {if(f) errno= n; else fatal(n,s); return(n);}
 105: 
 106: /*Table sizes*/
 107: #define MXUNIT 10
 108: 
 109: extern int recpos;  /*position in current record*/

Defined typedef's

flag defined in line 11; used 17 times
ftnint defined in line 10; used 17 times
ftnlen defined in line 12; used 9 times

Defined macros

MXUNIT defined in line 107; never used
err defined in line 104; never used
Last modified: 1985-06-08
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1015
Valid CSS Valid XHTML 1.0 Strict