if ((getdomainname(&domain, sizeof(domain)) == 0) && domain[0])
if ((getdomainname(domain, sizeof(domain)) == 0) && domain[0])
main(argc, argv)	int argc;	char **argv;{	extern int optind;	extern char *__progname;	int ch;	char domain[MAXHOSTNAMELEN];	struct stat sb;	oflag = 1;		/* default to old "office" behavior */	while ((ch = getopt(argc, argv, "lmMpsho")) != -1)		switch(ch) {		case 'l':			lflag = 1;		/* long format */			break;		case 'm':			mflag = 1;		/* force exact match of names */			break;		case 'M':			Mflag = 1;		/* allow name matching */			break;		case 'p':			pplan = 1;		/* don't show .plan/.project */			break;		case 's':			sflag = 1;		/* short format */			break;		case 'h':			oflag = 0;		/* remote host info */			break;		case 'o':			oflag = 1;		/* office info */			break;		case '?':		default:			(void)fprintf(stderr,			    "usage: %s [-lmMpsho] [login ...]\n", __progname);			exit(1);		}	argc -= optind;	argv += optind;	/* If a domainname is set, increment mflag. */	if ((getdomainname(&domain, sizeof(domain)) == 0) && domain[0])		mflag++;	/* If _PATH_MP_DB is larger than 1MB, increment mflag. */	if (stat(_PATH_MP_DB, &sb) == 0) {		if (sb.st_size > 1048576)			mflag++;	}	(void)time(&now);	setpassent(1);	if (!*argv) {		/*		 * Assign explicit "small" format if no names given and -l		 * not selected.  Force the -s BEFORE we get names so proper		 * screening will be done.		 */		if (!lflag)			sflag = 1;	/* if -l not explicit, force -s */		loginlist();		if (entries == 0)			(void)printf("No one logged on.\n");	} else {		userlist(argc, argv);		/*		 * Assign explicit "large" format if names given and -s not		 * explicitly stated.  Force the -l AFTER we get names so any		 * remote finger attempts specified won't be mishandled.		 */		if (!sflag)			lflag = 1;	/* if -s not explicit, force -l */	}	if (entries != 0) {		if (lflag)			lflag_print();		else			sflag_print();	}	exit(0);}