Move SUN4 console echo hack cnget() (from Chuck Cranor).
This commit is contained in:
parent
3f230414c7
commit
05daa72b3c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cons.c,v 1.14 1995/06/01 14:36:17 pk Exp $ */
|
||||
/* $NetBSD: cons.c,v 1.15 1995/07/13 12:02:19 pk Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -58,6 +58,9 @@
|
|||
|
||||
#include <machine/bsd_openprom.h>
|
||||
#include <machine/psl.h>
|
||||
#ifdef SUN4
|
||||
#include <machine/oldmon.h>
|
||||
#endif
|
||||
|
||||
#include "zs.h"
|
||||
|
||||
|
@ -474,8 +477,24 @@ cngetc()
|
|||
}
|
||||
c = c0;
|
||||
} else {
|
||||
#ifdef SUN4
|
||||
/* SUN4 PROM: must turn off echo to avoid double char echo */
|
||||
extern struct om_vector *oldpvec;
|
||||
int saveecho;
|
||||
#endif
|
||||
|
||||
s = splhigh();
|
||||
#ifdef SUN4
|
||||
if (cputyp == CPU_SUN4) {
|
||||
saveecho = *(oldpvec->echo);
|
||||
*(oldpvec->echo) = 0;
|
||||
}
|
||||
#endif
|
||||
c = (*promvec->pv_getchar)();
|
||||
#ifdef SUN4
|
||||
if (cputyp == CPU_SUN4)
|
||||
*(oldpvec->echo) = saveecho;
|
||||
#endif
|
||||
splx(s);
|
||||
}
|
||||
if (c == '\r')
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: autoconf.c,v 1.29 1995/06/26 22:59:54 pk Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.30 1995/07/13 12:03:08 pk Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -1359,12 +1359,6 @@ getstr(cp, size)
|
|||
register char *lp;
|
||||
register int c;
|
||||
register int len;
|
||||
int saveecho;
|
||||
|
||||
#if defined(SUN4)
|
||||
saveecho = *(oldpvec->echo);
|
||||
*(oldpvec->echo) = 0;
|
||||
#endif
|
||||
|
||||
lp = cp;
|
||||
len = 0;
|
||||
|
@ -1375,9 +1369,6 @@ getstr(cp, size)
|
|||
case '\r':
|
||||
printf("\n");
|
||||
*lp++ = '\0';
|
||||
#if defined(SUN4)
|
||||
*(oldpvec->echo) = saveecho;
|
||||
#endif
|
||||
return (len);
|
||||
case '\b':
|
||||
case '\177':
|
||||
|
|
Loading…
Reference in New Issue