#include <stdio.h>

main (int argc, char *argv[])
{
	int cnt;
	char buf[256];
	FILE *infp, *outfp;

	if (argc < 3)
	{
		fprintf(stderr, "Usage: <input> <output>\n");
		exit(0);
	}

	if ((infp = fopen(argv[1], "r")) == NULL)
	{
		fprintf(stderr, "Unable to open input file %s\n",argv[1]);
		exit(1);
	}

	if ((outfp = fopen(argv[2], "w")) == NULL)
	{
		fprintf(stderr, "Unable to open output file %s\n",argv[2]);
		exit(1);
	}

	while ((cnt = fread(buf, 1, 255, infp)) != 0)
	{
		fwrite(buf, 1, cnt, outfp);
	}

	fclose(infp);
	fclose(outfp);
	exit(0);
}
