fprintf(stderr, "\n  units version %s  Copyright (c) 1993 by Adrian Mariano\n",
fprintf(stderr, "units version %s Copyright (c) 1993 by Adrian Mariano\n",
main(int argc, char **argv){	struct unittype have, want;	char havestr[81], wantstr[81];	int optchar;	char *userfile = 0;	int quiet = 0;	extern char *optarg;	extern int optind;	while ((optchar = getopt(argc, argv, "vqf:")) != -1) {		switch (optchar) {		case 'f':			userfile = optarg;			break;		case 'q':			quiet = 1;			break;		case 'v':			fprintf(stderr, "\n  units version %s  Copyright (c) 1993 by Adrian Mariano\n",			    VERSION);			fprintf(stderr, "                    This program may be freely distributed\n");			usage();		default:			usage();			break;		}	}	if (optind != argc - 2 && optind != argc)		usage();	readunits(userfile);	if (optind == argc - 2) {		strcpy(havestr, argv[optind]);		strcpy(wantstr, argv[optind + 1]);		initializeunit(&have);		addunit(&have, havestr, 0);		completereduce(&have);		initializeunit(&want);		addunit(&want, wantstr, 0);		completereduce(&want);		showanswer(&have, &want);	}	else {		if (!quiet)			printf("%d units, %d prefixes\n\n", unitcount,			    prefixcount);		for (;;) {			do {				initializeunit(&have);				if (!quiet)					printf("You have: ");				if (!fgets(havestr, 80, stdin)) {					if (!quiet);					putchar('\n');					exit(0);				}			} while (addunit(&have, havestr, 0) ||			    completereduce(&have));			do {				initializeunit(&want);				if (!quiet)					printf("You want: ");				if (!fgets(wantstr, 80, stdin)) {					if (!quiet)						putchar('\n');					exit(0);				}			} while (addunit(&want, wantstr, 0) ||			    completereduce(&want));			showanswer(&have, &want);		}	}}