err(2, name);
err(2, "%s", name);
main(argc, argv)	int argc;	char *argv[];{	struct stat sb;	int ch;	char *name;	while ((ch = getopt(argc, argv, "")) != -1)		switch(ch) {		case '?':		default:			usage();		}	argc -= optind;	argv += optind;	if ((name = ttyname(STDERR_FILENO)) == NULL)		err(2, "tty");	if (stat(name, &sb))		err(2, "stat");	if (*argv == NULL) {		(void)printf("is %s\n", sb.st_mode & S_IXUSR ? "y" : "n");		exit(sb.st_mode & S_IXUSR ? 0 : 1);	}	switch(argv[0][0]) {	case 'n':		if (chmod(name, sb.st_mode & ~S_IXUSR) < 0)			err(2, name);		break;	case 'y':		if (chmod(name, sb.st_mode | S_IXUSR) < 0)			err(2, name);		break;	default:		usage();	}	exit(sb.st_mode & S_IXUSR ? 0 : 1);}