struct tty *bugttytty __P((dev_t dev)); int bugttymctl __P((dev_t dev, int bits, int how)); int bugttyparam __P((struct tty *tp, struct termios *tm));  #define DIALOUT(x) ((x) & 0x80) #define SWFLAGS(dev) (bugttyswflags | (DIALOUT(dev) ? TIOCFLAG_SOFTCAR : 0))  #define BUGBUF 80 char bugtty_ibuffer[BUGBUF+1]; volatile char *pinchar = bugtty_ibuffer; char bug_obuffer[BUGBUF+1];  struct tty *bugtty_tty[NBUGTTY]; int needprom = 1;   int bugttymatch(parent, self, aux) struct device *parent; void *self; void *aux; { struct confargs *ca = aux;  if (needprom == 0) return (0); ca->ca_paddr = (void *)0xfff45000; ca->ca_vaddr = (void *)0xfff45000; ca->ca_len = 0x200; ca->ca_ipl = IPL_TTY; ca->ca_name = "bugtty\0"; return (1); }  void bugttyattach(parent, self, aux) struct device *parent; struct device *self; void *aux; { printf(": bugtty\n"); }  #define BUGTTYUNIT(x) ((x) & (0x7f)) void bugttyoutput __P((struct tty *tp));  int bugttydefaultrate = TTYDEF_SPEED; int bugttyswflags;  struct tty *
bugttytty(dev)dev_t dev;{	int unit;	unit = BUGTTYUNIT(dev);	if (unit >= 4) {		return (NULL);	}	return bugtty_tty[unit];}