File:  [Research Unix] / researchv10dc / libI77 / notused / stest.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

/*	@(#)stest.c	1.2	*/
#include "fio.h"
#define out(a,b) {n=b;if(n==0) fprintf(stderr,"%s:%d\n",a,errno);else \
		fprintf(stderr,"%s:%d %d\n",a,errno,n);}
extern errno;
olist xopen;
cllist xclose;
alist xaux;
cilist xio;
long one = 1;
char xx[] = "1234";
char yy[] = "terrible junk";
main()
{
	int n;
	setolist(&xopen,9,"junk","o","u",0,NULL,0);
	out("open",f_open(&xopen));
	setalist(&xaux,9,0);
	out("rew",f_rew(&xaux));
	setcilist(&xio,9,NULL,0,0,0);
	out("start",s_wsue(&xio));
	out("io",do_uio(&one,xx,(long)sizeof(xx)-1));
	out("endw",e_wsue());
	out("enf",f_end(&xaux));
	out("bck",f_back(&xaux));
	out("bck",f_back(&xaux));
	out("startr",s_rsue(&xio));
	out("rio",do_uio(&one,yy,(long)sizeof(xx)-1));
	out("endr",e_rsue());
	fprintf(stdout,"yy: %s\n",yy);
}

unix.superglobalmegacorp.com

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