xref: /csrg-svn/usr.bin/f77/libI77/dolio.c (revision 23069)
12488Sdlw /*
2*23069Skre  * Copyright (c) 1980 Regents of the University of California.
3*23069Skre  * All rights reserved.  The Berkeley software License Agreement
4*23069Skre  * specifies the terms and conditions for redistribution.
52488Sdlw  *
6*23069Skre  *	@(#)dolio.c	5.1	06/07/85
7*23069Skre  */
8*23069Skre 
9*23069Skre /*
102488Sdlw  * list directed i/o common routines
112488Sdlw  */
122488Sdlw 
132488Sdlw #include "fio.h"
142488Sdlw #include "lio.h"
152488Sdlw 
162488Sdlw 
172488Sdlw c_le(a,flag) cilist *a;
182488Sdlw {	int n;
192488Sdlw 	lfname = NULL;
202488Sdlw 	elist = NO;
212488Sdlw 	sequential=external=formatted= LISTDIRECTED;
222488Sdlw 	fmtbuf = "ext list io";
232488Sdlw 	errflag = a->cierr;
242488Sdlw 	endflag = a->ciend;
252488Sdlw 	lunit = a->ciunit;
262586Sdlw 	if(not_legal(lunit)) err(errflag,F_ERUNIT,fmtbuf)
272488Sdlw 	curunit = &units[lunit];
282488Sdlw 	if(!curunit->ufd && (n=fk_open(flag,SEQ,FMT,(ftnint)lunit)))
292488Sdlw 		err(errflag,n,fmtbuf)
302488Sdlw 	cf = curunit->ufd;
312488Sdlw 	elist = YES;
322488Sdlw 	lfname = curunit->ufnm;
332488Sdlw 	scale=recpos=cursor=0;
342488Sdlw 	cplus=cblank=NO;
352586Sdlw 	if(!curunit->ufmt) err(errflag,F_ERNOFIO,fmtbuf)
362586Sdlw 	if(curunit->url) err(errflag,F_ERNOSIO,fmtbuf)
372488Sdlw 	return(OK);
382488Sdlw }
392488Sdlw 
402488Sdlw do_lio(type,number,ptr,len) ftnint *number,*type; flex *ptr; ftnlen len;
412488Sdlw {
422488Sdlw 	return((*lioproc)(number,ptr,len,*type));
432488Sdlw }
44