pty_search(pty) int *pty;
pty_search(int *pty)
pty_search(pty)    int *pty;{	char namebuf[PTMS_BUFSZ];	/* ask the PTY manager */	int fd = open("/dev/ptms$",0);	if (fd && ptioctl(fd,PTMS_GETPTY,namebuf)==0) {		strcpy(ttydev,namebuf);		strcpy(ptydev,namebuf);		ttydev[5] = 't';		close (fd);		if ((*pty = open(ptydev, O_RDWR)) >= 0) {#ifdef PTYDEBUG			ptioctl(*pty,XTY_TRACE,0);#endif			return 0;		}	}	return 1;}