char sccsID[] = "@(#) 18to15.c V1.0 Copyright Julian H. Stacey 1996\n";
#include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <unistd.h>

main()
{
int in,out,i;
char buf[18 * 512] ;
if ((in = open("in",O_RDONLY)) < 0) perror("18to15 in");
if ((out = open("out",O_WRONLY|O_CREAT,0666)) < 0) perror("18to15 out");
for ( i=160 ; i-- ; )
	{
	if ((18 * 512) != read(in,buf,18 * 512)) perror("18to15 in block") ;
	if ((15 * 512) != write(out,buf,15 * 512) ) perror("18to15 out block") ;
	}
}
