/* ufilter2.c - prototype filter program - line (actually record) oriented */

	/***************************************\
	*					*
	*	fails for binary files		*
	*					*
	\***************************************/

#include <stdio.h>
#include <algol68.h>
#define BUFSIZ 4096
char buffer[BUFSIZ];
main(argc,argv)
char **argv;
BEGIN
register int	howlong;	/* char length of this record */
	WHILE	(!feof(stdin))
	DO	howlong = fget(buffer,BUFSIZ,stdin);
		IF	(ferror(stdin))
		THEN	error("read failure $$ferr=%oo\7\n",$$ferr);
		FI
		IF	(feof(stdin))
		THEN	break;
		FI
		fput(buffer,howlong,stdout);
		IF	(ferror(stdout))
		THEN	error("write failed $$ferr=%oo\7\n",$$ferr);
		FI
	OD
	exit(IO_SUCCESS);
END
/* end: ufilter2.c */
