1*47943Sbostic /*-
2*47943Sbostic * Copyright (c) 1980 The Regents of the University of California.
3*47943Sbostic * All rights reserved.
42488Sdlw *
5*47943Sbostic * %sccs.include.proprietary.c%
623069Skre */
723069Skre
8*47943Sbostic #ifndef lint
9*47943Sbostic static char sccsid[] = "@(#)dolio.c 5.4 (Berkeley) 04/12/91";
10*47943Sbostic #endif /* not lint */
11*47943Sbostic
1223069Skre /*
1324101Sjerry * list directed and namelist i/o common routines
142488Sdlw */
152488Sdlw
162488Sdlw #include "fio.h"
172488Sdlw #include "lio.h"
182488Sdlw
192488Sdlw
c_le(a,flg)2040228Sdonn c_le(a,flg) cilist *a;
212488Sdlw { int n;
222488Sdlw lfname = NULL;
232488Sdlw elist = NO;
2424101Sjerry sequential=external=YES;
252488Sdlw errflag = a->cierr;
262488Sdlw endflag = a->ciend;
272488Sdlw lunit = a->ciunit;
282586Sdlw if(not_legal(lunit)) err(errflag,F_ERUNIT,fmtbuf)
292488Sdlw curunit = &units[lunit];
3040228Sdonn if(!curunit->ufd && (n=fk_open(flg,SEQ,FMT,(ftnint)lunit)))
312488Sdlw err(errflag,n,fmtbuf)
322488Sdlw cf = curunit->ufd;
332488Sdlw elist = YES;
342488Sdlw lfname = curunit->ufnm;
352488Sdlw scale=recpos=cursor=0;
362488Sdlw cplus=cblank=NO;
372586Sdlw if(!curunit->ufmt) err(errflag,F_ERNOFIO,fmtbuf)
382586Sdlw if(curunit->url) err(errflag,F_ERNOSIO,fmtbuf)
392488Sdlw return(OK);
402488Sdlw }
412488Sdlw
do_lio(type,number,ptr,len)422488Sdlw do_lio(type,number,ptr,len) ftnint *number,*type; flex *ptr; ftnlen len;
432488Sdlw {
442488Sdlw return((*lioproc)(number,ptr,len,*type));
452488Sdlw }
46