File:  [XINU] / xinu / sys / TEST / test.c.io
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:39:04 2018 UTC (8 years, 2 months ago) by root
Branches: xinu, MAIN
CVS tags: xinu-19870308, HEAD
Xinu for VAX

/* test.c - main */

#include <conf.h>

main ()
{
	char	ch;
	char	line[128];
	int	i,l;

	printf("Starting I/O test\n");
	printf("type line(s) to be echoed (you have 5 seconds): ");
	sleep10(50);
	printf("I got %d characters\n\n" , l=read(CONSOLE,line,0));
	for (i=0 ; i<l ; i++)
		putc(CONSOLE,line[i]);
	printf("\n\nI'll echo chars until you type S\n");
	while ( (ch=getc(CONSOLE)) != 'S')
		putc(CONSOLE,ch);
	printf("\n\ntest over\n");
}

unix.superglobalmegacorp.com

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