File:  [CSRG BSD Unix] / 3BSD / new / libI77uc / rewind.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:53 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, CSRG
CVS tags: HEAD, BSD3
BSD 3.0

/*
 * rewind.c  -  f77 file rewind
 */

#include "fio.h"

f_rew(a) alist *a;
{	int n;
	unit *b;
	lfname = NULL;
	elist = NO;
	external = YES;			/* for err */
	lunit = a->aunit;
	if(not_legal(lunit)) err(a->aerr,101,"rewind")
	b = &units[lunit];
	if(!b->ufd && (n=fk_open(READ,SEQ,FMT,lunit)) ) err(a->aerr,n,"rewind")
	lfname = b->ufnm;
	if(!b->useek) err(a->aerr,106,"rewind")
	b->uend = NO;
	if(b->uwrt)
		if(n=t_runc(b,a->aerr)) return(n);
	rewind(b->ufd);
	return(OK);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.