diff options
author | kato <kato@FreeBSD.org> | 1998-01-10 13:31:27 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 1998-01-10 13:31:27 +0000 |
commit | c5bb64779d7deba6ed756fef05367752f9152bb6 (patch) | |
tree | ab5295ea104e4c04252882107ea441c0040bb0cc | |
parent | 7b6e03e14717f1a9269eec7323ad1222e1ab8dcb (diff) | |
download | FreeBSD-src-c5bb64779d7deba6ed756fef05367752f9152bb6.zip FreeBSD-src-c5bb64779d7deba6ed756fef05367752f9152bb6.tar.gz |
Sync with sys/i386/isa/syscons.c revision 1.244.
-rw-r--r-- | sys/pc98/pc98/syscons.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c index 95d10ea..020c138 100644 --- a/sys/pc98/pc98/syscons.c +++ b/sys/pc98/pc98/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.67 1998/01/04 09:59:23 kato Exp $ + * $Id: syscons.c,v 1.68 1998/01/08 10:50:46 kato Exp $ */ #include "sc.h" @@ -4677,6 +4677,7 @@ next_code: case NEXT: { int next, this = get_scr_num(); + accents = 0; for (next = this+1; next != this; next = (next+1)%MAXCONS) { struct tty *tp = VIRTUAL_TTY(next); if (tp->t_state & TS_ISOPEN) { @@ -4691,11 +4692,30 @@ next_code: return(BKEY); default: if (action >= F_ACC && action <= L_ACC) { - accents = action - F_ACC + 1; - if (accent_map.acc[accents - 1].accchar == 0) { + /* turn it into an index */ + action -= F_ACC - 1; + if ((action > accent_map.n_accs) + || (accent_map.acc[action - 1].accchar == 0)) { + /* + * The index is out of range or pointing to an + * empty entry. + */ accents = 0; do_bell(cur_console, BELL_PITCH, BELL_DURATION); } + /* + * If the same accent key has been hit twice, + * produce the accent char itself. + */ + if (action == accents) { + action = accent_map.acc[accents - 1].accchar; + accents = 0; + if (metas) + action |= MKEY; + return (action); + } + /* remember the index and wait for the next key stroke */ + accents = action; break; } if (accents > 0) { @@ -4718,6 +4738,10 @@ next_code: acc = &accent_map.acc[accents - 1]; accents = 0; + /* + * If the accent key is followed by the space key, + * produce the accent char itself. + */ if (action == ' ') { action = acc->accchar; if (metas) @@ -4725,7 +4749,7 @@ next_code: return (action); } for (i = 0; i < NUM_ACCENTCHARS; ++i) { - if (acc->map[i][0] == 0) + if (acc->map[i][0] == 0) /* end of the map entry */ break; if (acc->map[i][0] == action) { action = acc->map[i][1]; |