From 9449ba1894c66e123e842f434418d6e4d03ff513 Mon Sep 17 00:00:00 2001 From: "Henry M. Wu" Date: Thu, 27 Feb 1992 18:56:52 +0000 Subject: [PATCH] Added OS_tty_map_interrupt_char to request interrupt character when the interrupt is taken by Scheme. --- v7/src/microcode/ostty.c | 9 +++++++-- v7/src/microcode/ostty.h | 3 ++- v7/src/microcode/uxsig.c | 11 ++++++++++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/v7/src/microcode/ostty.c b/v7/src/microcode/ostty.c index 47b55516e..9d6e95c82 100644 --- a/v7/src/microcode/ostty.c +++ b/v7/src/microcode/ostty.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/ostty.c,v 1.1 1990/06/20 19:36:51 cph Rel $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/ostty.c,v 1.2 1992/02/27 18:56:52 mhwu Exp $ Copyright (c) 1990 Massachusetts Institute of Technology @@ -53,7 +53,12 @@ DEFUN_VOID (OS_tty_next_interrupt_char) if (next_interrupt_char == '\0') error_external_return (); { - cc_t result = next_interrupt_char; + /* The interrupt character is mapped here. This provides a + chance for OS's which have only one interrupt character + and can't do I/O during an interrupt to request the + interrupt character in a safe place. + */ + cc_t result = OS_tty_map_interrupt_char(next_interrupt_char); next_interrupt_char = '\0'; return (result); } diff --git a/v7/src/microcode/ostty.h b/v7/src/microcode/ostty.h index 33db9b756..a0c8a8e21 100644 --- a/v7/src/microcode/ostty.h +++ b/v7/src/microcode/ostty.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/ostty.h,v 1.2 1990/11/05 11:55:06 cph Rel $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/ostty.h,v 1.3 1992/02/27 18:53:26 mhwu Exp $ Copyright (c) 1990 Massachusetts Institute of Technology @@ -44,5 +44,6 @@ extern unsigned int EXFUN (OS_tty_y_size, (void)); extern CONST char * EXFUN (OS_tty_command_beep, (void)); extern CONST char * EXFUN (OS_tty_command_clear, (void)); extern cc_t EXFUN (OS_tty_next_interrupt_char, (void)); +extern cc_t EXFUN (OS_tty_map_interrupt_char, (cc_t)); #endif /* SCM_OSTTY_H */ diff --git a/v7/src/microcode/uxsig.c b/v7/src/microcode/uxsig.c index aac2f7bcc..a97d6ba25 100644 --- a/v7/src/microcode/uxsig.c +++ b/v7/src/microcode/uxsig.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxsig.c,v 1.21 1992/02/04 04:15:02 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxsig.c,v 1.22 1992/02/27 18:54:43 mhwu Exp $ Copyright (c) 1990-92 Massachusetts Institute of Technology @@ -695,6 +695,15 @@ DEFUN_VOID (UX_initialize_signals) /* Interactive Interrupt Handler */ +/* Under Unix, the interrupt char is NOT requested when the interrupt is + taken. + */ +cc_t +DEFUN (OS_tty_map_interrupt_char, (int_char), cc_t int_char) +{ + return int_char; +} + static void EXFUN (print_interactive_help, (void)); static void EXFUN (print_interrupt_chars, (void)); static void EXFUN (examine_memory, (void)); -- 2.25.1