1 /*-
2 * Copyright (c) 1980 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.proprietary.c%
6 */
7
8 #ifndef lint
9 static char sccsid[] = "@(#)dolio.c 5.4 (Berkeley) 04/12/91";
10 #endif /* not lint */
11
12 /*
13 * list directed and namelist i/o common routines
14 */
15
16 #include "fio.h"
17 #include "lio.h"
18
19
c_le(a,flg)20 c_le(a,flg) cilist *a;
21 { int n;
22 lfname = NULL;
23 elist = NO;
24 sequential=external=YES;
25 errflag = a->cierr;
26 endflag = a->ciend;
27 lunit = a->ciunit;
28 if(not_legal(lunit)) err(errflag,F_ERUNIT,fmtbuf)
29 curunit = &units[lunit];
30 if(!curunit->ufd && (n=fk_open(flg,SEQ,FMT,(ftnint)lunit)))
31 err(errflag,n,fmtbuf)
32 cf = curunit->ufd;
33 elist = YES;
34 lfname = curunit->ufnm;
35 scale=recpos=cursor=0;
36 cplus=cblank=NO;
37 if(!curunit->ufmt) err(errflag,F_ERNOFIO,fmtbuf)
38 if(curunit->url) err(errflag,F_ERNOSIO,fmtbuf)
39 return(OK);
40 }
41
do_lio(type,number,ptr,len)42 do_lio(type,number,ptr,len) ftnint *number,*type; flex *ptr; ftnlen len;
43 {
44 return((*lioproc)(number,ptr,len,*type));
45 }
46