case 'V': printf("%s\n", rcs_version); exit(0);
rcsdiff_main(int argc, char **argv){	int i, ch, status;	RCSNUM *rev, *rev2, *frev;	RCSFILE *file;	char fpath[MAXPATHLEN];	rev = RCS_HEAD_REV;	rev2 = NULL;	status = 0;	strlcpy(diffargs, "diff", sizeof(diffargs));	while ((ch = rcs_getopt(argc, argv, "cnqr:uV")) != -1) {		switch (ch) {		case 'c':			strlcat(diffargs, " -c", sizeof(diffargs));			diff_format = D_CONTEXT;			break;		case 'n':			strlcat(diffargs, " -n", sizeof(diffargs));			diff_format = D_RCSDIFF;			break;		case 'q':			verbose = 0;			break;		case 'u':			strlcat(diffargs, " -u", sizeof(diffargs));			diff_format = D_UNIFIED;			break;		case 'V':			printf("%s\n", rcs_version);			exit(0);		case 'r':			if (rev == RCS_HEAD_REV) {				if ((rev = rcsnum_parse(rcs_optarg)) == NULL) {					cvs_log(LP_ERR, "bad revision number");					exit(1);				}			} else {				if ((rev2 = rcsnum_parse(rcs_optarg)) == NULL) {					cvs_log(LP_ERR, "bad revision number");					exit(1);				}			}			break;		default:			(usage)();			exit (1);		}	}	argc -= rcs_optind;	argv += rcs_optind;	if (argc == 0) {		cvs_log(LP_ERR, "no input file");		(usage)();		exit(1);	}	for (i = 0; i < argc; i++) {		if (rcs_statfile(argv[i], fpath, sizeof(fpath)) < 0)			continue;		if ((file = rcs_open(fpath, RCS_READ)) == NULL)			continue;		if (rev == RCS_HEAD_REV)			frev = file->rf_head;		else			frev = rev;		if (verbose == 1) {			printf("%s\n", RCS_DIFF_DIV);			printf("RCS file: %s\n", fpath);		}		diff_file = argv[i];		if (rev2 == NULL) {			if (rcsdiff_file(file, frev, argv[i]) < 0) {				rcs_close(file);				status = 2;				continue;			}		} else {			if (rcsdiff_rev(file, rev, rev2, argv[i]) < 0) {				rcs_close(file);				status = 2;				continue;			}		}		rcs_close(file);	}	exit(status);}