#include "stdio.h"		/* include file overhead info */

main(argc, argv)		/* General program head with one argument */
int argc;			/* If arg is not supplied in program line */
char *argv[];			/* user is prompted for it */
{
	FILE	*fp;
	char	*gets();
	char	arg1[14];	/* long enough for d:filename.ext */
	char	*pa;		/* pointer to first argument in program line */
	char	*p1 = &arg1[0];	/* pointer to where first argument is copied */

	if (argc != 2) {
		printf("File name: ");
		p1 = gets(p1);
		while (*p1 = toupper(*p1))
			p1++;
	}
	else {
		pa = argv[1];
		while (*p1++ = *pa++)
			;
	}
	p1 = &arg1[0];

	if ((fp = fopen(p1, "r")) == NULL) {
		printf("Can't open file %s\n", p1);
		exit(-1);
	}

	printf("\nWorking on file %s\n",p1);

/* ............. Program body .............. */


	fclose(fp);
}
