string.h is ANSI C include file
[unix-history] / usr / src / usr.bin / f77 / libI77 / dolio.c
CommitLineData
466c389e 1/*
161423a6
RE
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.
466c389e 5 *
7784fa72 6 * @(#)dolio.c 5.3 %G%
161423a6
RE
7 */
8
9/*
60fce068 10 * list directed and namelist i/o common routines
466c389e
DW
11 */
12
13#include "fio.h"
14#include "lio.h"
15
16
7784fa72 17c_le(a,flg) cilist *a;
466c389e
DW
18{ int n;
19 lfname = NULL;
20 elist = NO;
60fce068 21 sequential=external=YES;
466c389e
DW
22 errflag = a->cierr;
23 endflag = a->ciend;
24 lunit = a->ciunit;
43666f58 25 if(not_legal(lunit)) err(errflag,F_ERUNIT,fmtbuf)
466c389e 26 curunit = &units[lunit];
7784fa72 27 if(!curunit->ufd && (n=fk_open(flg,SEQ,FMT,(ftnint)lunit)))
466c389e
DW
28 err(errflag,n,fmtbuf)
29 cf = curunit->ufd;
30 elist = YES;
31 lfname = curunit->ufnm;
32 scale=recpos=cursor=0;
33 cplus=cblank=NO;
43666f58
DW
34 if(!curunit->ufmt) err(errflag,F_ERNOFIO,fmtbuf)
35 if(curunit->url) err(errflag,F_ERNOSIO,fmtbuf)
466c389e
DW
36 return(OK);
37}
38
39do_lio(type,number,ptr,len) ftnint *number,*type; flex *ptr; ftnlen len;
40{
41 return((*lioproc)(number,ptr,len,*type));
42}