if (cp = msgparseopts(localmsglist, TRUE)) {
if ((cp = msgparseopts(localmsglist, TRUE))) {
main(argc, argv, envp)	int argc;	char *argv[];	char **envp;{	struct namelist *hostlist = NULL;	register int x;	register char *cp;	int cmdargs = 0;	int c;	/*	 * We initialize progname here instead of init() because	 * things in msgparseopts() need progname set.	 */	setprogname(argv);	if (cp = msgparseopts(localmsglist, TRUE)) {		error("Bad builtin log option (%s): %s.", 		      localmsglist, cp);		usage();	}	if (init(argc, argv, envp) < 0)		exit(1);	/*	 * Be backwards compatible.	 */	for (x = 1; x <= argc && argv[x]; x++) {		if (strcmp(argv[x], "-Server") != 0)			continue;#if	defined(_PATH_OLDRDIST)		message(MT_SYSLOG, 			"Old rdist (-Server) requested; running %s", 			_PATH_OLDRDIST);		(void) execl(_PATH_OLDRDIST, xbasename(_PATH_OLDRDIST), 			     "-Server", (char *)NULL);		fatalerr("Exec old rdist failed: %s: %s.", 			 _PATH_OLDRDIST, SYSERR);#else	/* !_PATH_OLDRDIST */		fatalerr("Old rdist not available.");#endif	/* _PATH_OLDRDIST */		exit(1);	}#if	defined(DIRECT_RCMD)	if (becomeuser() != 0)		exit(1);#else	/* !DIRECT_RCMD */	/*	 * Perform check to make sure we are not incorrectly installed	 * setuid to root or anybody else.	 */	if (getuid() != geteuid())		fatalerr("This version of rdist should not be installed setuid.");#endif	/* DIRECT_RCMD */	while ((c = getopt(argc, argv, optchars)) != -1)		switch (c) {		case 'l':			if (cp = msgparseopts(optarg, TRUE)) {				error("Bad log option \"%s\": %s.", optarg,cp);				usage();			}			break;		case 'L':			remotemsglist = strdup(optarg);			break;		case 'A':		case 'a':		case 'M':		case 't':			if (!isdigit(*optarg)) {				error("\"%s\" is not a number.", optarg);				usage();			}			if (c == 'a')				min_freespace = atoi(optarg);			else if (c == 'A')				min_freefiles = atoi(optarg);			else if (c == 'M')				maxchildren = atoi(optarg);			else if (c == 't')				rtimeout = atoi(optarg);			break;		case 'F':			do_fork = FALSE;			break;		case 'f':			distfile = strdup(optarg);			if (distfile[0] == '-' && distfile[1] == CNULL)				fin = stdin;			break;		case 'm':			addhostlist(optarg, &hostlist);			break;		case 'd':			define(optarg);			break;		case 'D':			debug = DM_ALL;			if (cp = msgparseopts("stdout=all,debug", TRUE)) {				error("Enable debug messages failed: %s.", cp);				usage();			}			break;		case 'c':			cmdargs++;			break;		case 'n':			nflag++;			break;		case 'V':			printf("%s\n", getversion());			exit(0);		case 'o':			if (parsedistopts(optarg, &options, TRUE)) {				error("Bad dist option string \"%s\".", 				      optarg);				usage();			}			break;		case 'p':			if (!optarg) {				error("No path specified to \"-p\".");				usage();			}			path_rdistd = strdup(optarg);			break;		case 'P':			if (!optarg) {				error("No path specified to \"-P\".");				usage();			}			if (cp = searchpath(optarg))				path_remsh = strdup(cp);			else {				error("No component of path \"%s\" exists.",				      optarg);				usage();			}			break;			/*			 * These options are obsoleted by -o.  They are			 * provided only for backwards compatibility			 */		case 'v':	FLAG_ON(options, DO_VERIFY);		break;		case 'N':	FLAG_ON(options, DO_CHKNFS);		break;		case 'O':	FLAG_ON(options, DO_CHKREADONLY);	break;		case 'q':	FLAG_ON(options, DO_QUIET);		break;		case 'b':	FLAG_ON(options, DO_COMPARE);		break;		case 'r':	FLAG_ON(options, DO_NODESCEND);		break;		case 'R':	FLAG_ON(options, DO_REMOVE);		break;		case 's':	FLAG_ON(options, DO_SAVETARGETS);	break;		case 'w':	FLAG_ON(options, DO_WHOLE);		break;		case 'y':	FLAG_ON(options, DO_YOUNGER);		break;		case 'h':	FLAG_ON(options, DO_FOLLOW);		break;		case 'i':	FLAG_ON(options, DO_IGNLNKS);		break;		case 'x':	FLAG_ON(options, DO_NOEXEC);		break;		case '?':		default:			usage();		}	if (debug) {		printf("%s\n", getversion());		msgprconfig();	}	if (nflag && IS_ON(options, DO_VERIFY))		fatalerr(		 "The -n flag and \"verify\" mode may not both be used.");	if (path_remsh == NULL)		path_remsh = getenv("RSH");	/*	 * Don't fork children for nflag	 */	if (nflag)		do_fork = 0;	if (cmdargs)		docmdargs(realargc - optind, &realargv[optind]);	else {		if (fin == NULL)			fin = opendist(distfile);		(void) yyparse();		/*		 * Need to keep stdin open for child processing later		 */		if (fin != stdin)			(void) fclose(fin);		if (nerrs == 0)			docmds(hostlist, realargc-optind, &realargv[optind]);	}	exit(nerrs != 0);}